Skip to content

Releases: marshmallow-code/flask-smorest

0.15.1

18 Jun 20:43
Compare
Choose a tag to compare

Bug fixes:

  • marshmallow 3.0.0rc7 compatibility (:pr:77).

0.15.0

09 May 16:15
Compare
Choose a tag to compare

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

18 Apr 07:35
Compare
Choose a tag to compare

Features:

  • Official Python 3.7 support (:pr:45).
  • Rename Api.definition as 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

08 Mar 20:53
Compare
Choose a tag to compare

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

13 Feb 16:56
Compare
Choose a tag to compare

Features:

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

0.13.0

12 Feb 16:38
Compare
Choose a tag to compare

Features:

  • Add flask_plugin and marshmallow_plugin spec kwargs to allow
    overriding base plugins.
  • Backwards-incompatible: Rename plugins spec kwarg into
    extra_plugins.
  • Backwards-incompatible: Don't default to OpenAPI version 2.0. The version
    must now be specified, either as OPENAPI_VERSION app parameter or as
    openapi_version spec kwarg.
  • Support apispec 1.0.0.
  • Backwards-incompatible: Drop support for apispec 0.x.

0.12.0

02 Dec 22:02
Compare
Choose a tag to compare

Features:

  • Backwards-incompatible: Api.register_converter doesn't register
    converter in Flask app anymore. It should be registered manually using
    app.url_map.converters['converter_name'] = Converter.
  • Api.definition, Api.register_field and Api.register_converter can
    be called before app initialization. The information is buffered and passed
    to the internal APISpec object when it is created, in Api.init_app.

0.11.2

28 Nov 10:16
Compare
Choose a tag to compare

Bug fixes:

  • Fix typo in ErrorHandlerMixin._prepare_error_response_content.

0.11.1

20 Nov 21:20
Compare
Choose a tag to compare

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

09 Nov 16:12
Compare
Choose a tag to compare

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.
  • 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.