|
| 1 | +Configuration |
| 2 | +============= |
| 3 | + |
| 4 | +Flask-RESTX provides the following `Flask configuration values <https://flask.palletsprojects.com/en/1.1.x/config/#configuration-handling>`_: |
| 5 | + |
| 6 | + Note: Values with no additional description should be covered in more detail |
| 7 | + elsewhere in the documentation. If not, please open an issue on GitHub. |
| 8 | + |
| 9 | +.. py:data:: RESTX_JSON |
| 10 | +
|
| 11 | + Provide global configuration options for JSON serialisation as a :class:`dict` |
| 12 | + of :func:`json.dumps` keyword arguments. |
| 13 | + |
| 14 | +.. py:data:: RESTX_VALIDATE |
| 15 | +
|
| 16 | + Whether to enforce payload validation by default when using the |
| 17 | + ``@api.expect()`` decorator. See the `@api.expect() |
| 18 | + <swagger.html#the-api-expect-decorator>`__ documentation for details. |
| 19 | + This setting defaults to ``False``. |
| 20 | + |
| 21 | +.. py:data:: RESTX_MASK_HEADER |
| 22 | +
|
| 23 | + Choose the name of the *Header* that will contain the masks to apply to your |
| 24 | + answer. See the `Fields masks <mask.html>`__ documentation for details. |
| 25 | + This setting defaults to ``X-Fields``. |
| 26 | + |
| 27 | +.. py:data:: RESTX_MASK_SWAGGER |
| 28 | +
|
| 29 | + Whether to enable the mask documentation in your swagger or not. See the |
| 30 | + `mask usage <mask.html#usage>`__ documentation for details. |
| 31 | + This setting defaults to ``True``. |
| 32 | + |
| 33 | +.. py:data:: RESTX_INCLUDE_ALL_MODELS |
| 34 | +
|
| 35 | + This option allows you to include all defined models in the generated Swagger |
| 36 | + documentation, even if they are not explicitly used in either ``expect`` nor |
| 37 | + ``marshal_with`` decorators. |
| 38 | + This setting defaults to ``False``. |
| 39 | + |
| 40 | +.. py:data:: BUNDLE_ERRORS |
| 41 | +
|
| 42 | + Bundle all the validation errors instead of returning only the first one |
| 43 | + encountered. See the `Error Handling <parsing.html#error-handling>`__ section |
| 44 | + of the documentation for details. |
| 45 | + This setting defaults to ``False``. |
| 46 | + |
| 47 | +.. py:data:: ERROR_404_HELP |
| 48 | +
|
| 49 | +.. py:data:: HTTP_BASIC_AUTH_REALM |
| 50 | +
|
| 51 | +.. py:data:: SWAGGER_VALIDATOR_URL |
| 52 | +
|
| 53 | +.. py:data:: SWAGGER_UI_DOC_EXPANSION |
| 54 | +
|
| 55 | +.. py:data:: SWAGGER_UI_OPERATION_ID |
| 56 | +
|
| 57 | +.. py:data:: SWAGGER_UI_REQUEST_DURATION |
| 58 | +
|
| 59 | +.. py:data:: SWAGGER_UI_OAUTH_APP_NAME |
| 60 | +
|
| 61 | +.. py:data:: SWAGGER_UI_OAUTH_CLIENT_ID |
| 62 | +
|
| 63 | +.. py:data:: SWAGGER_UI_OAUTH_REALM |
| 64 | +
|
| 65 | +.. py:data:: SWAGGER_SUPPORTED_SUBMIT_METHODS |
0 commit comments