mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-06-06 22:53:24 +03:00
Update 3.9 announcement
This commit is contained in:
parent
2deb6b42f1
commit
4e8577353d
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
# Django REST framework 3.9
|
# Django REST framework 3.9
|
||||||
|
|
||||||
The 3.9 release gives access to _extra actions_ in the Browsable API, introduces composable permissions and built-in [OpenAPI][openapi] schema support.
|
The 3.9 release gives access to _extra actions_ in the Browsable API, introduces composable permissions and built-in [OpenAPI][openapi] schema support. (Formerly known as Swagger)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -45,9 +45,9 @@ If you use REST framework commercially and would like to see this work continue,
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## In-built OpenAPI schema support
|
## Built-in OpenAPI schema support
|
||||||
|
|
||||||
REST framework now has a first-pass at directly including OpenAPI schema support.
|
REST framework now has a first-pass at directly including OpenAPI schema support. (Formerly known as Swagger)
|
||||||
|
|
||||||
Specifically:
|
Specifically:
|
||||||
|
|
||||||
|
@ -77,10 +77,31 @@ urlpatterns = [
|
||||||
|
|
||||||
And here's how you can use the `generateschema` management command:
|
And here's how you can use the `generateschema` management command:
|
||||||
|
|
||||||
```
|
```shell
|
||||||
$ python manage.py generateschema --format openapi > schema.yml
|
$ python manage.py generateschema --format openapi > schema.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
There's lots of different tooling that you can use for working with OpenAPI
|
||||||
|
schemas. One option that we're working on is the [API Star](https://docs.apistar.com/)
|
||||||
|
command line tool.
|
||||||
|
|
||||||
|
You can use `apistar` to validate your API schema:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ apistar validate --path schema.json --format openapi
|
||||||
|
✓ Valid OpenAPI schema.
|
||||||
|
```
|
||||||
|
|
||||||
|
Or to build API documentation:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ apistar docs --path schema.json --format openapi
|
||||||
|
✓ Documentation built at "build/index.html".
|
||||||
|
```
|
||||||
|
|
||||||
|
API Star also includes a [dynamic client library](https://docs.apistar.com/client-library/)
|
||||||
|
that uses an API schema to automatically provide a client library interface for making requests.
|
||||||
|
|
||||||
## Composable permission classes
|
## Composable permission classes
|
||||||
|
|
||||||
You can now compose permission classes using the and/or operators, `&` and `|`.
|
You can now compose permission classes using the and/or operators, `&` and `|`.
|
||||||
|
@ -105,6 +126,12 @@ When defined, a dropdown of "Extra Actions", appropriately filtered to detail/no
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Supported Versions
|
||||||
|
|
||||||
|
REST framework 3.9 supports Django versions 1.11, 2.0, and 2.1.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Deprecations
|
## Deprecations
|
||||||
|
|
||||||
### `DjangoObjectPermissionsFilter` moved to third-party package.
|
### `DjangoObjectPermissionsFilter` moved to third-party package.
|
||||||
|
@ -164,9 +191,19 @@ OpenAPI functionality.
|
||||||
|
|
||||||
This will also make a wider range of tooling available.
|
This will also make a wider range of tooling available.
|
||||||
|
|
||||||
We'll focus on continuing to develop the `apistar` library and client tool into
|
We'll focus on continuing to develop the [API Star](https://docs.apistar.com/)
|
||||||
a recommended option for generating API docs, validating API schemas, and
|
library and client tool into a recommended option for generating API docs,
|
||||||
providing a dynamic client library.
|
validating API schemas, and providing a dynamic client library.
|
||||||
|
|
||||||
|
There's also a huge amount of ongoing work on maturing the ASGI landscape,
|
||||||
|
with the possibility that some of this work will eventually [feed back into
|
||||||
|
Django](https://www.aeracode.org/2018/06/04/django-async-roadmap/).
|
||||||
|
|
||||||
|
There will be further work on the [Uvicorn](https://www.uvicorn.org/)
|
||||||
|
webserver, as well as lots of functionality planned for the [Starlette](https://www.starlette.io/)
|
||||||
|
web framework, which is building a foundational set of tooling for working with
|
||||||
|
ASGI.
|
||||||
|
|
||||||
|
|
||||||
[funding]: funding.md
|
[funding]: funding.md
|
||||||
[gh5886]: https://github.com/encode/django-rest-framework/issues/5886
|
[gh5886]: https://github.com/encode/django-rest-framework/issues/5886
|
||||||
|
|
Loading…
Reference in New Issue
Block a user