Skip to content

Commit 8837d7c

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 8837d7c

2 files changed

Lines changed: 95 additions & 2 deletions

File tree

defs/app_components_oas.yaml

Lines changed: 16 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,14 @@ 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-Datetime'
912+
- $ref: '#/components/schemas/FormField-MultiLineText'
913+
- $ref: '#/components/schemas/FormField-RichText'
914+
- $ref: '#/components/schemas/FormField-StaticText'
907915
on_submit_callback:
908916
description: >-
909917
The URL to `POST` the form to when the user clicks the submit button.
@@ -1435,6 +1443,13 @@ components:
14351443
14361444
Valid object schemas: [WidgetField-DatetimeWithIcon](/reference/widgets#widgetfield-datetimewithicon), [WidgetField-Pill](/reference/widgets#widgetfield-pill), [WidgetField-TextWithIcon](/reference/widgets#widgetfield-textwithicon).
14371445
type: array
1446+
minItems: 1
1447+
maxItems: 5
1448+
items:
1449+
anyOf:
1450+
- $ref: '#/components/schemas/DatetimeWithIcon'
1451+
- $ref: '#/components/schemas/WidgetField-Pill'
1452+
- $ref: '#/components/schemas/WidgetField-TextWithIcon'
14381453
subtitle:
14391454
description: >-
14401455
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)