Configuration¶
Flask-RESTX provides the following Flask configuration values:
Note: Values with no additional description should be covered in more detail elsewhere in the documentation. If not, please open an issue on GitHub.
- RESTX_JSON¶
Provide global configuration options for JSON serialisation as a
dict
ofjson.dumps()
keyword arguments.
- RESTX_VALIDATE¶
Whether to enforce payload validation by default when using the
@api.expect()
decorator. See the @api.expect() documentation for details. This setting defaults toFalse
.
- RESTX_MASK_HEADER¶
Choose the name of the Header that will contain the masks to apply to your answer. See the Fields masks documentation for details. This setting defaults to
X-Fields
.
- RESTX_MASK_SWAGGER¶
Whether to enable the mask documentation in your swagger or not. See the mask usage documentation for details. This setting defaults to
True
.
- RESTX_INCLUDE_ALL_MODELS¶
This option allows you to include all defined models in the generated Swagger documentation, even if they are not explicitly used in either
expect
normarshal_with
decorators. This setting defaults toFalse
.
- BUNDLE_ERRORS¶
Bundle all the validation errors instead of returning only the first one encountered. See the Error Handling section of the documentation for details. This setting defaults to
False
.
- ERROR_404_HELP¶
- HTTP_BASIC_AUTH_REALM¶
- SWAGGER_VALIDATOR_URL¶
- SWAGGER_UI_DOC_EXPANSION¶
- SWAGGER_UI_OPERATION_ID¶
- SWAGGER_UI_REQUEST_DURATION¶
- SWAGGER_UI_OAUTH_APP_NAME¶
- SWAGGER_UI_OAUTH_CLIENT_ID¶
- SWAGGER_UI_OAUTH_REALM¶
- SWAGGER_SUPPORTED_SUBMIT_METHODS¶