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
| error_handler |`Optional[Response]`|`None`| Overwrite the output format of generated errors, see [Overwriting Default Errors](#overwriting-default-errors) for more |
50
+
| route_deprecated |`bool`|`False`| Marks this Route as deprecated in any generated [API Documentation](#api-documentation)|
51
+
| openapi_responses |`Optional[dict]`|`None`| The OpenAPI Responses Object for this route, as a `dict` to be used in any generated [API Documentation](#api-documentation)|
52
+
| hide_from_docs |`bool`|`False`| Hide this Route from any generated [API Documentation](#api-documentation)|
50
53
51
54
#### Overwriting Default Errors
52
55
By default, the error messages are returned as a JSON response, with the detailed error in the "error" field. However, this can be edited by passing a custom error function into the `ValidateParameters()` decorator. For example:
@@ -120,7 +123,7 @@ Validation beyond type-checking can be done by passing arguments into the constr
120
123
|`datetime_format`|`str`|`datetime.datetime`| Python datetime format string datetime format string ([datetime format codes](https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes)) |
121
124
|`comment`|`str`| All | A string to display as the argument description in any generated documentation |
122
125
|`alias`|`str`| All but `FileStorage`| An expected parameter name to receive instead of the function name. |
123
-
|`json_schema`|`dict`|`dict`| An expected [JSON Schema](https://json-schema.org) which the dict input must conform to |
126
+
|`json_schema`|`dict`|All but `FileStorage`| An expected [JSON Schema](https://json-schema.org) which the dict input must conform to |
|`min_length`|`int`|`FileStorage`| Minimum `Content-Length` for a file |
126
129
|`max_length`|`int`|`FileStorage`| Maximum `Content-Length` for a file |
@@ -148,8 +151,10 @@ def is_odd(val: int):
148
151
### API Documentation
149
152
Using the data provided through parameters, docstrings, and Flask route registrations, Flask Parameter Validation can generate API Documentation in various formats.
150
153
To make this easy to use, it comes with a `Blueprint` and the output and configuration options below:
154
+
#### OpenAPI 3.1.0
155
+
*`FPV_OPENAPI_BASE: dict`: The base [OpenAPI Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#openapi-object) that will be populated with a generated [Paths Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#paths-object). Must be set to enable the blueprints. Alternatively, the standalone Paths Object can be retrieved anytime through the `generate_openapi_paths_object()` method.
151
156
152
-
#### Format
157
+
#### Non-standard Format
153
158
*`FPV_DOCS_SITE_NAME: str`: Your site's name, to be displayed in the page title, default: `Site`
154
159
*`FPV_DOCS_CUSTOM_BLOCKS: array`: An array of dicts to display as cards at the top of your documentation, with the (optional) keys:
0 commit comments