From 4e8577353dddcc70284bc16d5c3b9da4980046df Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Thu, 18 Oct 2018 09:53:07 +0100 Subject: [PATCH] Update 3.9 announcement --- docs/community/3.9-announcement.md | 51 ++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 7 deletions(-) diff --git a/docs/community/3.9-announcement.md b/docs/community/3.9-announcement.md index ee690f6895..3cd9b1a54e 100644 --- a/docs/community/3.9-announcement.md +++ b/docs/community/3.9-announcement.md @@ -19,7 +19,7 @@ # 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: @@ -77,10 +77,31 @@ urlpatterns = [ And here's how you can use the `generateschema` management command: -``` +```shell $ 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 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 ### `DjangoObjectPermissionsFilter` moved to third-party package. @@ -164,9 +191,19 @@ OpenAPI functionality. This will also make a wider range of tooling available. -We'll focus on continuing to develop the `apistar` library and client tool into -a recommended option for generating API docs, validating API schemas, and -providing a dynamic client library. +We'll focus on continuing to develop the [API Star](https://docs.apistar.com/) +library and client tool into a recommended option for generating API docs, +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 [gh5886]: https://github.com/encode/django-rest-framework/issues/5886