Skip to content

Commit 8b33467

Browse files
resolve validation errors under OpenAPI 3.0
specifically: - "items" must be present if type is "array" - "description" must be present in a responses object
1 parent fbfd730 commit 8b33467

2 files changed

Lines changed: 100 additions & 2 deletions

File tree

defs/app_components_oas.yaml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
openapi: 3.0.0
2+
openapi: 3.0.4
33
info:
44
description: >-
55
This is the interface for handling requests for
@@ -904,6 +904,19 @@ components:
904904
[FormField-RichText](/reference/modal-forms#formfield-richtext), [FormField-SingleLineText](/reference/modal-forms#formfield-singlelinetext),
905905
[FormField-StaticText](/reference/modal-forms#formfield-statictext), [FormField-Typeahead](/reference/modal-forms#formfield-typeahead)
906906
type: array
907+
maxItems: 30
908+
items:
909+
anyOf:
910+
- $ref: '#/components/schemas/FormField-Checkbox'
911+
- $ref: '#/components/schemas/FormField-Date'
912+
- $ref: '#/components/schemas/FormField-Datetime'
913+
- $ref: '#/components/schemas/FormField-Dropdown'
914+
- $ref: '#/components/schemas/FormField-MultiLineText'
915+
- $ref: '#/components/schemas/FormField-RadioButton'
916+
- $ref: '#/components/schemas/FormField-RichText'
917+
- $ref: '#/components/schemas/FormField-SingleLineText'
918+
- $ref: '#/components/schemas/FormField-StaticText'
919+
- $ref: '#/components/schemas/FormField-Typeahead'
907920
on_submit_callback:
908921
description: >-
909922
The URL to `POST` the form to when the user clicks the submit button.
@@ -1435,6 +1448,13 @@ components:
14351448
14361449
Valid object schemas: [WidgetField-DatetimeWithIcon](/reference/widgets#widgetfield-datetimewithicon), [WidgetField-Pill](/reference/widgets#widgetfield-pill), [WidgetField-TextWithIcon](/reference/widgets#widgetfield-textwithicon).
14371450
type: array
1451+
minItems: 1
1452+
maxItems: 5
1453+
items:
1454+
anyOf:
1455+
- $ref: '#/components/schemas/DatetimeWithIcon'
1456+
- $ref: '#/components/schemas/WidgetField-Pill'
1457+
- $ref: '#/components/schemas/WidgetField-TextWithIcon'
14381458
subtitle:
14391459
description: >-
14401460
The text to show under the title of the widget, next to "Open in {App Name}". If not provided, the

0 commit comments

Comments
 (0)