You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25
Original file line number
Diff line number
Diff line change
@@ -66,6 +66,7 @@ The validation on files are different to the others, but file input can still be
66
66
* datetime.datetime
67
67
* datetime.date
68
68
* datetime.time
69
+
* dict
69
70
70
71
### Validation
71
72
All parameters can have default values, and automatic validation.
@@ -84,6 +85,7 @@ All parameters can have default values, and automatic validation.
84
85
* datetime_format: str, datetime format string ([datetime format codes](https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes))
85
86
* comment: str, A string to display as the argument description in generated documentation (if used)
86
87
* alias: str, An expected parameter name instead of the function name. See `access_type` example for clarification.
88
+
* json_schema: dict, An expected [JSON Schema](https://json-schema.org) which the dict input must conform to
87
89
88
90
`File` has the following options:
89
91
* content_types: array of strings, an array of allowed content types.
@@ -221,6 +223,29 @@ This method returns an object with the following structure:
221
223
]
222
224
```
223
225
226
+
### JSON Schema Validation
227
+
An example of the [JSON Schema](https://json-schema.org) validation is provided below:
"description": "This document will be uploaded to an API route that expects image/jpeg or image/png Content-Type, with the expectation that the API will return an error."
0 commit comments