Skip to content

Releases: marshmallow-code/flask-smorest

0.19.0

19 Feb 09:12
Compare
Choose a tag to compare

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

30 Jan 12:00
Compare
Choose a tag to compare

Other changes:

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

0.18.4

07 Jan 16:44
Compare
Choose a tag to compare

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

0.18.3

20 Dec 14:42
Compare
Choose a tag to compare

Features:

  • Add default description to responses (:pr:113).
    Thanks :user:nonnib for the pull-request.

0.18.2

21 Oct 08:22
Compare
Choose a tag to compare

Features:

  • Official Python 3.8 support (:pr:108).

0.18.1

07 Oct 08:47
Compare
Choose a tag to compare

Bug fixes:

  • Fix passing spec_kwargs in Api.__init__ and app in
    Api.init_app (:issue:103).

0.18.0

22 Sep 14:16
Compare
Choose a tag to compare

Rename to flask-smorest (:issue:42).

0.17.0

19 Sep 10:09
Compare
Choose a tag to compare

Features:

  • Backwards-incompatible: Only return status code and short name in error
    handler (:pr:84).
  • Backwards-incompatible: Remove logging from error handler. Logging can be
    achieved in application code by overriding handle_http_exception.
    Remove _prepare_error_response_content. Reponse payload is computed in
    handle_http_exception. (:pr:85)
  • Backwards-incompatible: Remove InvalidLocationError. The mapping from
    webargs locations to OAS locations is done in apispec and no exception is
    raised if an invalid location is passed. (:pr:81)
  • Add content_type argument to Blueprint.arguments and provide
    reasonable default content type for form and files (:pr:83).
  • Add description parameter to Blueprint.arguments to pass description
    for requestBody (:pr:93).
  • Allow customization of docstring delimiter string (:issue:49).
  • Support file uploads as multipart/form-data (:pr:97).

Bug fixes:

  • Fix documentation of form and files arguments: use requestBody
    in OAS3, document content type (:pr:83).

Other changes:

  • Backwards-incompatible: Don't republish NestedQueryArgsParser anymore.
    This belongs to user code and can be copied from webargs doc (:pr:94).
  • Backwards-incompatible: Bump minimum apispec version to 3.0.0.

0.16.1

15 Jul 08:30
Compare
Choose a tag to compare

Bug fixes:

  • Fix detection of unhandled exceptions in error handler for Flask=>1.1.0
    (:pr:82).

Other changes:

  • Bump minimum Flask version to 1.1.0. From this version on, uncaught
    exceptions are passed to the error handler as InternalServerError with
    the exception attached as original_exception attribute. (:pr:82)

0.16.0

20 Jun 08:17
Compare
Choose a tag to compare

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)