Flask-rest-api

Latest version: v0.17.1

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

Scan your dependencies

Page 3 of 6

0.11.1

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

Features:

- The ``HTTP_METHODS`` list that defines the order of the methods in the spec
is now a class attribute of ``Blueprint``. It can be overridden to enforce
another order.

Bug fixes:

- Import ``Mapping`` from ``collections.abc`` rather than ``collections``. The
latter is deprecated in Python 3.7 and will be removed in 3.8.
- Merge manual doc added with ``Blueprint.doc`` with automatic documentation
after auto doc is prepared (i.e. adapted to OpenAPI version) (:issue:`19`).
Thanks :user:`fbergroth` for reporting.
- Merge automatic path parameter documentation with existing manual doc rather
than append as duplicate parameter (:issue:`23`).
Thanks :user:`congenica-andrew` for reporting.
- Fix path parameter documentation structure when using OpenAPI v3.
- Document http status codes as strings, not integers.
- Fix use of Swagger UI config parameter ``OPENAPI_SWAGGER_UI_URL``.


Other changes:

- 100% test coverage !

0.11.0

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

Features:

- *Backwards-incompatible*: Rework of the ETag feature. It is now accesible
using dedicated ``Blueprint.etag`` decorator. ``check_etag`` and ``set_etag``
are methods of ``Blueprint`` and ``etag.INCLUDE_HEADERS`` is replaced with
``Blueprint.ETAG_INCLUDE_HEADERS``. It is enabled by default (only on views
decorated with ``Blueprint.etag``) and disabled with ``ETAG_DISABLED``
application configuration parameter. ``is_etag_enabled`` is now private.
(:pr:`21`)
- *Backwards-incompatible*: The ``response`` decorator returns a ``Response``
object rather than a (``Response`` object, status code) tuple. The status
code is set in the ``Response`` object.
- Support apispec 1.0.0b5.

0.10.0

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

Features:

- *Backwards-incompatible*: Don't prefix all routes in the spec with
``APPLICATION_ROOT``. If using OpenAPI v2, set ``APPLICATION_ROOT`` as
``basePath``. If using OpenAPI v3, the user should specify ``servers``
manually.
- *Backwards-incompatible*: In testing and debug modes, ``verify_check_etag``
not only logs a warning but also raises ``CheckEtagNotCalledError`` if
``check_etag`` is not called in a resource that needs it.

0.9.2

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

Features:

- ``Api.register_blueprint`` passes ``**options`` keyword parameters to
``app.register_blueprint`` to override ``Blueprint`` defaults. Thanks
:user:`dryobates` for the suggestion.

0.9.1

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

Features:

- Support apispec 1.0.0b3.

Bug fixes:

- Fix crash when serving documentation at root of application. Thanks
:user:`fbergroth` for the suggestion.

0.9.0

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

Features:

- *Backwards-incompatible*: When pagination parameters are out of range, the
API does not return a `404` error anymore. It returns a `200` code with an
empty list and pagination metadata (:pr:`10`).
- *Backwards-incompatible*: Remove dependency on python-dateutil. This is an
optional marshmallow dependency. Whether it is needed to deserialize date,
time, or datetime strings depends on the application.
- Rework internal features by using mixin classes. This makes the code cleaner
and adds customization possibilities (:issue:`9`).
- *Backwards-incompatible*: ``DEFAULT_PAGINATION_PARAMETERS`` is a class
attribute of ``Blueprint``.
- *Backwards-incompatible*: When no ``Page`` class is passed to ``pagination``,
(i.e. when doing pagination in view function), the pagination parameters are
passed as a ``PaginationParameters`` object. The item count must be passed by
setting it as ``item_count`` attribute of the ``PaginationParameters``
object. The ``set_item_count`` function is removed.
- The pagination header name can be configured by overriding
``PAGINATION_HEADER_FIELD_NAME`` class attribute of ``Blueprint``. If set to
``None``, no pagination header is added to the response.
- *Backwards-incompatible*: The ``paginate`` decorator doesn't use
``NestedQueryFlaskParser`` by default. It is renamed as
``NestedQueryArgsParser`` and it can be used by overriding
``Blueprint.ARGUMENTS_PARSER``.
- *Backwards-incompatible*: Drop Flask 0.x support. Flask>=1.0 is now required.
- Default error handler is registered for generic ``HTTPException``. Other
extensions may register other handlers for specific exceptions or codes
(:pr:`12`).

Page 3 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.