Skip to content

Releases: marshmallow-code/flask-smorest

0.10.0

24 Oct 13:56
Compare
Choose a tag to compare
  • 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

15 Oct 23:44
Compare
Choose a tag to compare

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

11 Oct 07:15
Compare
Choose a tag to compare

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

01 Oct 20:34
Compare
Choose a tag to compare

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

0.8.1

24 Sep 10:12
Compare
Choose a tag to compare

Features:

  • Add page (page number) to pagination metadata.
  • Set produces and consumes root document attributes when using OpenAPI v2.

Bug fixes:

  • Document body parameter correctly when using OpenAPI 3.

0.8.0

20 Sep 08:45
Compare
Choose a tag to compare

Features:

  • Add API_SPEC_OPTIONS app config parameter. Thanks :user:xalioth for the
    suggestion.
  • Backwards-incompatible: Api accepts a spec_kargs parameter, passed
    as kwargs to the internal APISpec instance. spec_plugins is removed,
    plugins shall be passed as spec_kwargs={'plugins': [...]}.
  • Backwards-incompatible: Get summary and description from docstrings
    (:pr:5).
  • Add support for marshmallow 3.0.0b13. 2.x and 3b are now supported.
  • Add support for apispec 1.0.0b2. 0.x and 1b are now supported.

Bug fixes:

  • Document response schema correctly when using OpenAPI 3 (:issue:8). Thanks
    :user:ffarella for reporting.

0.7.0

19 Jul 16:33
Compare
Choose a tag to compare

Other changes:

  • Backwards-incompatible: Remove _wrapper_class from Page. Creating a
    custom pager is easier by just overriding Page methods.
  • Backwards-incompatible: Let OPENAPI_SWAGGER_UI_SUPPORTED_SUBMIT_METHODS
    default to "all methods" list.

0.6.1

29 Jun 12:40
Compare
Choose a tag to compare
  • Swagger UI integration: respect OPENAPI_SWAGGER_UI_URL configuration paramater.
  • Api.register_field: use APISpec.register_field rather than access self.spec.ma_plugin directly.

0.6.0

29 Jun 09:45
Compare
Choose a tag to compare

Features:

  • Backwards-incompatible: Use apispec 0.39.0 plugin class interface.
  • Backwards-incompatible: Expose APISpec's register_field and register_converter methods from Api object. Api.register_converter signature is modified to make name parameter optional.
  • Pass extra apispec plugins to internal APISpec instance.
  • Backwards-incompatible: Drop officiel support for Python 3.4.

0.5.2

21 Jun 16:28
Compare
Choose a tag to compare

Features:

  • Pass OpenAPI version as OPENAPI_VERSION app config parameter.
  • Add Swagger UI (3.x) integration.