Apiflask

Latest version: v2.1.1

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

Scan your dependencies

Page 4 of 7

1.0.0

Released: 2022/5/4<br>Codename: Wujiaochang

- Remove the deprecated standalone decorators: `input`, `output`, `doc`, and `auth_required`.
Use app/blueprint decorators instead (e.g. `input()` -> `app.input()`/`bp.input()`).
- Deprecate the following parameters ([issue 237][issue_237]):
- `role` in `app.auth_required()`/`bp.auth_required()`, use `roles` and always pass a list.
- `tag` in `app.doc()`/`bp.doc()`, use `tags` and always pass a list.
- Add a base class (`apiflask.scaffold.APIScaffold`) for common logic of `APIFlask` and
`APIBlueprint`, move route decorators and API-related decorators to this base class
to improve the IDE auto-completion ([issue 231][issue_231]).
- Support customizing OpenAPI securitySchemes and operation security, this makes it
possible to use any external authentication libraries ([pull 232][pull_232]).
- Improve the way to detect blueprint from view endpoint to support the endpoints that
contain dots ([issue 211][issue_211]).
- Support file uploading ([issue 123][issue_123]):
- Fix the content type of `form` and `files` input locations.
- Raise error if the user uses multiple body input locations ("files", "form", "json").
- Add `Form` field and `form_and_files` location for better form upload support.
- Rewrite the `files` to act like `form_and_files`, so that failed parsed file will
be included in the returned data.
- Allow to use `json_or_form` location and fields (`DelimitedList` and `DelimitedTuple`)
from webargs ([issue 254][issue_254]).
- When creating a custom error processor, call it for generic HTTP errors even if the
`json_errors` is set to `False` when creating the app instance ([issue 171][issue_171]).

[issue_211]: https://github.com/apiflask/apiflask/issues/211
[issue_231]: https://github.com/apiflask/apiflask/issues/231
[pull_232]: https://github.com/apiflask/apiflask/pull/232
[issue_237]: https://github.com/apiflask/apiflask/issues/237
[issue_123]: https://github.com/apiflask/apiflask/issues/123
[issue_254]: https://github.com/apiflask/apiflask/issues/254
[issue_171]: https://github.com/apiflask/apiflask/issues/171

0.12.0

Released: 2022/3/2

- Move standalone decorators (input, output, auth_required, doc) to APIFlask/APIBlueprint
classes. The old decorators are deprecated and will be removed in 1.0. ([issue 187][issue_187]).

[issue_187]: https://github.com/apiflask/apiflask/issues/187

0.11.0

Released: 2021/12/6

- Support creating custom error classes based on `HTTPError`. The position argument `status_code` of
`HTTPError` is changed to a keyword argument, defaults to `500` ([issue 172][issue_172]).

[issue_172]: https://github.com/apiflask/apiflask/issues/172

0.10.1

Released: 2021/11/26

- Fix missing headers for JSON error responses when catching Werkzeug exceptions ([issue 173][issue_173]).

[issue_173]: https://github.com/apiflask/apiflask/issues/173

0.10.0

Released: 2021/9/19

- Support using `add_url_rule` method on view classes ([issue 110][issue_110]).
- Revoke the undocumented name changes on `validates` and `validates_schema` from marshmallow ([issue 62][issue_62]).
- Only expose marshmallow `fields`, `validators`, and `Schema` in APIFlask.
- Remove the `status_code` field from the default error response ([issue 124][issue_124]).
- Add parameter `extra_data` to `abort` and `HTTPError`, it accepts a dict that will be added
to the error response ([issue 125][issue_125]).
- Support passing `operation_id` in the `doc` decorator. The auo-generating of operationId
can be enabled with config `AUTO_OPERATION_ID`, defaults to `False` ([pull 131][pull_131]).
- Support setting response links via `output(links=...)` ([issue 138][issue_138]).

[issue_110]: https://github.com/apiflask/apiflask/issues/110
[issue_62]: https://github.com/apiflask/apiflask/issues/62
[issue_124]: https://github.com/apiflask/apiflask/issues/124
[issue_125]: https://github.com/apiflask/apiflask/issues/125
[pull_131]: https://github.com/apiflask/apiflask/pull/131
[issue_138]: https://github.com/apiflask/apiflask/issues/138

0.9.0

Released: 2021/8/10

- Support base response schema customization, add config `BASE_RESPONSE_SCHEMA`
and `BASE_RESPONSE_DATA_KEY` ([issue 65][issue_65]).
- Support setting custom schema name resolver via the `APIFlask.schema_name_resolver`
attribute ([issue 105][issue_105]).
- Improve error handling ([issue 107][issue_107]):
- Authentication error now calls app error processor function when `APIFlask(json_errors=True)`.
The default HTTP reason phrase is used for auth errors.
- Always pass an `HTTPError` instance to error processors. When you set a custom error
processor, now you need to accept an `HTTPError` instance as the argument. The `detail` and
`headers` attribute of the instance will be empty dict if not set.
- Add an `error_processor` decorator for `HTTPTokenAuth` and `HTTPBasicAuth`, it can be used
to register a custom error processor for auth errors.
- Support to config Redoc via the configuration variable `REDOC_CONFIG` ([issue 121][issue_121]).

[issue_65]: https://github.com/apiflask/apiflask/issues/65
[issue_105]: https://github.com/apiflask/apiflask/issues/105
[issue_107]: https://github.com/apiflask/apiflask/issues/107
[issue_121]: https://github.com/apiflask/apiflask/issues/121

Page 4 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.