# APIFlask Change Log

Upgrade to the latest version:

```
$ pip install -U apiflask
```

or check the current installed version first:

```
$ pip show apiflask
```

## Version 0.6.0

0.6.0 plan: <https://github.com/greyli/apiflask/issues/31>

## Version 0.5.1
Released: 2021/4/28

- Change the default endpoint of the view class to the original class name (not lowercase).

## Version 0.5.0
Released: 2021/4/27

- Remove the support to generate `info.description` and tag description from module
docstring, and also remove the `AUTO_DESCRIPTION` config ([pull #30][pull_30]).
- Remove the configuration variable `DOCS_HIDE_BLUEPRINTS`, add `APIBlueprint.enable_openapi`
as a replacement.
- Support class-based views, now the `route` decorator can be used on `MethodView` class. Other decorators (i.e. `@input`, `@output`, etc.) can be used on view methods (i.e. `get()`, `post()`,
etc.) ([pull #32][pull_32]).
- No longer support to mix the use of `flask.Bluerpint` and `apiflask.APIBluerpint`.
- Support to use the `auth_required` decorator on app-wide `before_request` functions
([pull #34][pull_34]).

[pull_30]: https://github.com/greyli/apiflask/pull/30
[pull_32]: https://github.com/greyli/apiflask/pull/32
[pull_34]: https://github.com/greyli/apiflask/pull/34

## Version 0.4.0
Released: 2021/4/20

- Merge the following configuration variables to `SUCCESS_DESCRIPTION` ([pull #7][pull_7]):
    - `DEFAULT_2XX_DESCRIPTION`
    - `DEFAULT_200_DESCRIPTION`
    - `DEFAULT_201_DESCRIPTION`
    - `DEFAULT_204_DESCRIPTION`
- Remove the following configuration variables ([pull #7][pull_7]):
    - `AUTO_HTTP_ERROR_RESPONSE`
    - `AUTH_ERROR_SCHEMA`
- Add new configuration variables `YAML_SPEC_MIMETYPE` and `JSON_SPEC_MIMETYPE` to support
    to customize the MIME type of spec response ([pull #3][pull_3]).
- Remove configuration variable `SPEC_TYPE`.
- Fix the support to pass an empty dict as schema for 204 response ([pull #12][pull_12]).
- Support set multiple examples for request/response body with `@output(examples=...)`
and `@iniput(examples=...)` ([pull #23][pull_23]).
- Add `auth_required(roles=...)` and `doc(tags=...)` parameters for list value, `role` and
`tag` parameter now only accept string value ([pull #26][pull_26]).
- Add new configuration variable `OPENAPI_VERSION` to set the version of OAS
([pull #27][pull_27]).
- Rename `abort_json()` to `abort()` ([pull #29][pull_29]).

[pull_3]: https://github.com/greyli/apiflask/pull/3
[pull_12]: https://github.com/greyli/apiflask/pull/12
[pull_7]: https://github.com/greyli/apiflask/pull/7
[pull_23]: https://github.com/greyli/apiflask/pull/23
[pull_26]: https://github.com/greyli/apiflask/pull/26
[pull_27]: https://github.com/greyli/apiflask/pull/27
[pull_29]: https://github.com/greyli/apiflask/pull/29

## Version 0.3.0
Released: 2021/3/31

- First public version.
- Add type annotations and enable type check in tox ([commit](https://github.com/greyli/apiflask/commit/5cbf27ecbb4318a9fd177307a52146aa993f86c8)).
- Refactor the APIs ([commit](https://github.com/greyli/apiflask/commit/d149c0c0ee90a7120e6ede1c3e09715c944bb704)):
    - Change base class `scaffold.Scaffold` to class decorator `utils.route_shortcuts`.
    - Merge the `_OpenAPIMixin` class into `APIFlask` class.
    - Turn `security._AuthErrorMixin` into `handle_auth_error` function.
    - Add explicit parameter `role` and `optional` for `@auth_required` decorator.
    - Rename module `errors` to `exceptions`.
    - Rename `api_abort()` to `abort_json()`.
    - Rename `get_error_message()` to `get_reason_phrase()` and move it to `utils` module.
    - Update the default value of config `AUTH_ERROR_DESCRIPTION`.
    - Add `validators` module.
    - Change `@doc(tags)` to `@doc(tag)`.
- Support to pass a dict schema in `@output` decorator ([commit](https://github.com/greyli/apiflask/commit/e82fd168faf5f04871e549ebe22c63e66270bd1b)).
- Support to pass a dict schema in `@input` decorator ([commit](https://github.com/greyli/apiflask/commit/f9c2c441363ddf4720800e0d3fc3d0e9cc28fe81)).
- Check if the status code is valid for `abort_json` and `HTTPError` ([commit](https://github.com/greyli/apiflask/commit/20077dea0e82f123a3d2fc50c2ec529346215789)).
- Add basic docstrings to generate the API reference documentation ([commit](https://github.com/greyli/apiflask/commit/6d65a25ab4de9d623e22575d4d5476abdc50cbc0)).
- Support to set custom example for request/response body ([commit](https://github.com/greyli/apiflask/commit/638fa9c5680944d6454a4dbafe8abb152525d91c)).

## Version 0.2.0
Released: 2021-3-27

- Fix various bugs.
- Refactor the package and tests (100% coverage).
- Rename most of the APIs.
- Add new APIs:
    - `APIFlask`
    - `APIBlueprint`
    - `HTTPError`
    - `api_json`
    - `HTTPTokenAuth`
    - `HTTPBasicAuth`
    - `@doc`
    - `EmptySchema`
- Add a bunch of new configuration variables:
    - `DESCRIPTION`
    - `TAGS`
    - `CONTACT`
    - `LICENSE`
    - `SERVERS`
    - `EXTERNAL_DOCS`
    - `TERMS_OF_SERVICE`
    - `SPEC_FORMAT`
    - `AUTO_TAGS`
    - `AUTO_DESCRIPTION`
    - `AUTO_PATH_SUMMARY`
    - `AUTO_PATH_DESCRIPTION`
    - `AUTO_200_RESPONSE`
    - `DEFAULT_2XX_DESCRIPTION`
    - `DEFAULT_200_DESCRIPTION`
    - `DEFAULT_201_DESCRIPTION`
    - `DEFAULT_204_DESCRIPTION`
    - `AUTO_VALIDATION_ERROR_RESPONSE`
    - `VALIDATION_ERROR_STATUS_CODE`
    - `VALIDATION_ERROR_DESCRIPTION`
    - `VALIDATION_ERROR_SCHEMA`
    - `AUTO_AUTH_ERROR_RESPONSE`
    - `AUTH_ERROR_STATUS_CODE`
    - `AUTH_ERROR_DESCRIPTION`
    - `AUTH_ERROR_SCHEMA`
    - `AUTO_HTTP_ERROR_RESPONSE`
    - `HTTP_ERROR_SCHEMA`
    - `DOCS_HIDE_BLUEPRINTS`
    - `DOCS_FAVICON`
    - `REDOC_USE_GOOGLE_FONT`
    - `REDOC_STANDALONE_JS`
    - `SWAGGER_UI_CSS`
    - `SWAGGER_UI_BUNDLE_JS`
    - `SWAGGER_UI_STANDALONE_PRESET_JS`
    - `SWAGGER_UI_LAYOUT`
    - `SWAGGER_UI_CONFIG`
    - `SWAGGER_UI_OAUTH_CONFIG`
- Support to hide blueprint from API docs with config `DOCS_HIDE_BLUEPRINTS` ([commit](https://github.com/greyli/apiflask/commit/3b2cc0097defaabf0b916e00930dda1da8226430))
- Support to deprecate and hide an endpoint with `doc(hide=True, deprecated=True)`([commit](https://github.com/greyli/apiflask/commit/82d181a7080bd4088ee8db929e81431a723cda93))
- Support to customize the API docs with various configuration variables. ([commit](https://github.com/greyli/apiflask/commit/294379428f5032c6c8228841a836a37860012c0f))
- Support to set all fields of OpenAPI object and Info object ([commit](https://github.com/greyli/apiflask/commit/a7990e28e73bdd5b86c1471aa97861025e14295f))
- Support YAML format spec ([commit](https://github.com/greyli/apiflask/commit/ce6975bb465e01b0e48b2b8adce0f99a8db56e01))
- Automatically register a validation error response for endpoints which use `@input`. ([commit](https://github.com/greyli/apiflask/commit/c3d7c3b585ca5d7f9f6d84f16137dd257bfe0518))
- Automatically register a authorization error response for endpoints which use `@auth_required`. ([commit](https://github.com/greyli/apiflask/commit/c8992a8e420522a3e66563e455aa628f0f20a09c))
- Automatically add response schema for responses added with `@doc(responses=...)`. ([commit](https://github.com/greyli/apiflask/commit/1b7dce5f722d038be5dc726d52a0eefd0365eeeb))
- Pass view arguments to view function as positional arguments ([commit](https://github.com/greyli/apiflask/commit/15c66f3ba97310ed10c851721177e6c504a87317))
- Require Python 3.7 to use ordered dict ([commit](https://github.com/greyli/apiflask/commit/557a7e649b64aef8f4b8596a4af175524d108ff4))
- Add shortcuts for `app.route`: `app.get()`, `app.post()`, etc. ([commit](https://github.com/greyli/apiflask/commit/48bc1246628e53573c811def4a909be0faa9dcfb))
- Not an extension any more ([commit](https://github.com/greyli/apiflask/commit/ecaec37544524deb8b2ce445d4a3cbf990ff95cb))

## Version 0.1.0
Released: 2021-1-27

- Add view functions without response schema into spec ([commit](https://github.com/greyli/apiflask/commit/aabf427590227001e0e443d8d6a3bf5f56dc5964))       
- Set default response descriptions ([commit](https://github.com/greyli/apiflask/commit/b9edf9e8f5731a8f45b359f6a101b4d39ba3f2f5))
- Stop rely on Flask-Marshmallow ([commit](https://github.com/greyli/apiflask/commit/cce7a0b8b97f345e087973b127c6d25c884dbc8f))
- Change default spec path to `openapi.json` ([commit](https://github.com/greyli/apiflask/commit/09d0d278a1fc27fa5868ef5848f3931bd8f76ef4))
- Add support for enabling Swagger UI and Redoc at the same time ([commit](https://github.com/greyli/apiflask/commit/d5176418b8c22e523d8b82e1f9af8f2403fa70bb))
- Change default spec title and version ([commit](https://github.com/greyli/apiflask/commit/0953c310327539f96bcdfad142772c7800285d56))
- Support auto generating summary from function name ([commit](https://github.com/greyli/apiflask/commit/d3d7cc2f63f3cf26466e42d68a03b4d96bf2fd97))
- Start as a fork of [APIFairy 0.6.2](https://github.com/miguelgrinberg/APIFairy/releases/tag/v0.6.2) at 2021-01-13.
