Releases: marshmallow-code/flask-smorest
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
0.18.4
0.18.3
0.18.2
0.18.1
0.18.0
0.17.0
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 overridinghandle_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 toBlueprint.arguments
and provide
reasonable default content type forform
andfiles
(:pr:83
). - Add
description
parameter toBlueprint.arguments
to pass description
forrequestBody
(: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
andfiles
arguments: userequestBody
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
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 asInternalServerError
with
the exception attached asoriginal_exception
attribute. (:pr:82
)
0.16.0
Features:
- Add
parameters
argument toBlueprint.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 inBlueprint.route
instead. - Backwards-incompatible: Remove
Api.schema
andApi.definition
.
Those methods are useless sinceSchema
components are automatically
registered by apispec. Manual component registration is still possible using
the internal apispecComponents
object. (:pr:75
)