Flask-smorest

Latest version: v0.44.0

Safety actively analyzes 628903 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 7 of 13

0.20.0

+++++++++++++++++++

Bug fixes:

- *Backwards-incompatible*: Use ``HTTPStatus`` ``name`` rather than ``phrase``
to name error components. This fixes an issue due to ``phrase`` containing
spaces not being URL-encoded. Also change ``DefaultError`` into
``DEFAULT_ERROR`` for consistency. This change will break code referencing
one of those errors. (:issue:`136`).
Thanks :user:`michelle-avery` for reporting.

Other changes:

- *Backwards-incompatible*: Remove ``OPENAPI_REDOC_VERSION`` and
``OPENAPI_SWAGGER_UI_VERSION``. Remove hardcoded CDNs. Users should modify
their code to use ``OPENAPI_REDOC_URL`` and ``OPENAPI_SWAGGER_UI_URL``
instead. The docs provide examples of CDN URLs. (:issue:`134`).

0.19.2

+++++++++++++++++++

Bug fixes:

- Fix ``utils.deepupdate`` for the case where the original value is a string or
integer and the updated value is a ``dict`` (:issue:`129`).
Thanks :user:`maj-skymedia` for reporting.

0.19.1

+++++++++++++++++++

Bug fixes:

- Fix a regression introduced in 0.19.0. With marshmallow 2, the response would
contain two ``'X-Pagination'`` headers: the correct header and an empty one.
(:pr:`128`)

0.19.0

+++++++++++++++++++

Features:

- *Backwards-incompatible*: Refactor automatic documentation generation. At
import time, each decorator stores information under its own namespace in
the view function's ``_apidoc`` attribute. Then at app init time, the
information is used to generate the docs. This allows access to init time
parameters, such as OpenAPI version or application parameters like feature
toggle flags, when generating the doc. Custom decorators storing doc in
``_apidoc`` must adapt by storing doc under their own name (e.g.:
``_apidoc['custom']``), creating a doc preparation callback (e.g.:
``_prepare_custom_doc`` and appending this callback to
``Blueprint._prepare_doc_cbks``. (:pr:`123`).

- Define all possible HTTP responses as response components and automatically
document "error" responses: ``"Default Error"`` when ``response`` is used,
response returned by ``arguments`` on client input error, and responses for
304, 412 and 428 when ``etag`` is used. Also document pagination header.
(:pr:`125`).

- Document error response in ``paginate`` decorator (:pr:`126`).

Bug fixes:

- *Backwards-incompatible*: Ensure pagination arguments are in query string.
``'page'`` and ``'page_size'`` arguments passed in any other location are
ignored by ``paginate`` decorator. (:pr:`127`)

0.18.5

+++++++++++++++++++

Other changes:

- Restrict webargs to <6.0.0 in setup.py due to breaking changes introduced in
webargs 6 (:issue:`117`).

0.18.4

+++++++++++++++++++

Features:

- ``check_etag`` logs a warning if method is not PUT, PATCH or DELETE
(:pr:`116`).

Bug fixes:

- Only return 304 on GET and HEAD (:pr:`115`).

Page 7 of 13

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.