Flask-smorest

Latest version: v0.44.0

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

Scan your dependencies

Page 9 of 13

0.16.0

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

Features:

- Add ``parameters`` argument to ``Blueprint.route`` to pass documentation for
parameters that are shared by all operations of a path (:pr:`78`).

Other changes:

- *Backwards-incompatible*: Bump minimum apispec version to 2.0.0.
- *Backwards-incompatible*: Path parameters documentation passed in
``Blueprint.doc`` is no longer merged with automatic documentation. It should
be passed in ``Blueprint.route`` instead.
- *Backwards-incompatible*: Remove ``Api.schema`` and ``Api.definition``.
Those methods are useless since ``Schema`` components are automatically
registered by apispec. Manual component registration is still possible using
the internal apispec ``Components`` object. (:pr:`75`)

0.15.1

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

Bug fixes:

- marshmallow 3.0.0rc7 compatibility (:pr:`77`).

0.15.0

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

Features:

- Add parameters to pass examples and headers in ``Blueprint.response``
decorator (:pr:`63`).
- Add parameters to pass examples for ``requestBody`` in OpenAPI v3 in
``Blueprint.arguments`` decorator (:pr:`68`).
- Support status codes expressed as ``HTTPStatus`` in ``Blueprint.response``
decorator (:issue:`60`).
Thanks :user:`Regzand` for reporting.

Other changes:

- Bump minimum apispec version to 1.3.2.
- Bump minimum werkzeug version to 0.15. With 0.14.x versions, `412` responses
are returned with no content.
- *Backwards-incompatible*: When using ``Blueprint.doc`` decorator to provide
additional documentation to the response described in the
``Blueprint.response`` decorator, the user must use the same format (``str``,
``int`` or ``HTTPStatus``) to express the status code in both decorators.
This is a side-effect of (:issue:`60`). Now that headers and examples can
be described in ``Blueprint.response``, this should not be a common use case.

0.14.1

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

Features:

- Official Python 3.7 support (:pr:`45`).
- Rename ``Api.definition`` to ``Api.schema``. Keep ``Api.definition`` as an
alias to ``Api.schema`` for backward compatibility (:pr:`53`).

Bug fixes:

- Fix passing route with path parameter default value (:pr:`58`).
Thanks :user:`zedrdave` for reporting.
- When no descrition is provided to ``Blueprint.response``, don't add an empty
string as description in the docs.
- Fix returning a ``tuple`` subclass from a view function. Only raw ``tuple``
instances are considered as Flask's (return value, status, headers).
``tuple`` subclasses are treated as ``list`` and can be paginated/dumped.
Raw ``tuple`` return values should be cast to another type (e.g. ``list``)
to be distinguished from (return value, status, headers) tuple. (:issue:`52`)
Thanks :user:`asyncee` for reporting.

0.14.0

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

Features:

- Allow view functions decorated with ``response`` to return a ``Response``
object or a tuple with status and/or headers (:pr:`40`).
- Allow view functions decorated with ``paginate`` to return a tuple with
status and/or headers (:pr:`40`). The pagination header is now passed
in the response tuple. Users relying on undocumented
``get_context()['headers']`` as a workaround to pass headers must update
their code to pass headers in the response tuple as well.

Bug fixes:

- Fix ETag computation when headers contain a duplicate key.

0.13.1

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

Features:

- Register Werkzeug's ``UUIDConverter`` in ``Api`` so that ``uuid`` path
parameters are correctly documented.

Page 9 of 13

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.