Skip to content

Commit c6e2452

Browse files
authored
Add third-party schema library drf-spectacular to docs (encode#7540)
Co-authored-by: T. Franzel <13507857+tfranzel@users.noreply.github.com>
1 parent e17779c commit c6e2452

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

docs/coreapi/schemas.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,10 +828,17 @@ A short description of the meaning and intended usage of the input field.
828828
[drf-yasg][drf-yasg] generates [OpenAPI][open-api] documents suitable for code generation - nested schemas,
829829
named models, response bodies, enum/pattern/min/max validators, form parameters, etc.
830830

831+
832+
## drf-spectacular - Sane and flexible OpenAPI 3.0 schema generation for Django REST framework
833+
834+
[drf-spectacular][drf-spectacular] is a [OpenAPI 3][open-api] schema generation tool with explicit focus on extensibility,
835+
customizability and client generation. It's usage patterns are very similar to [drf-yasg][drf-yasg].
836+
831837
[cite]: https://blog.heroku.com/archives/2014/1/8/json_schema_for_heroku_platform_api
832838
[coreapi]: https://www.coreapi.org/
833839
[corejson]: https://www.coreapi.org/specification/encoding/#core-json-encoding
834840
[drf-yasg]: https://github.com/axnsan12/drf-yasg/
841+
[drf-spectacular]: https://github.com/tfranzel/drf-spectacular/
835842
[open-api]: https://openapis.org/
836843
[json-hyperschema]: https://json-schema.org/latest/json-schema-hypermedia.html
837844
[api-blueprint]: https://apiblueprint.org/

docs/topics/documenting-your-api.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,16 @@ This also translates into a very useful interactive documentation viewer in the
142142

143143
![Screenshot - drf-yasg][image-drf-yasg]
144144

145+
#### drf-spectacular - Sane and flexible OpenAPI 3.0 schema generation for Django REST framework
146+
147+
[drf-spectacular][drf-spectacular] is a [OpenAPI 3][open-api] schema generation tool with explicit focus on extensibility,
148+
customizability and client generation. Usage patterns are very similar to [drf-yasg][drf-yasg].
149+
150+
It aims to extract as much schema information as possible, while providing decorators and extensions for easy
151+
customization. There is explicit support for [swagger-codegen][swagger], [SwaggerUI][swagger-ui] and [Redoc][redoc],
152+
i18n, versioning, authentication, polymorphism (dynamic requests and responses), query/path/header parameters,
153+
documentation and more. Several popular plugins for DRF are supported out-of-the-box as well.
154+
145155
---
146156

147157
## Self describing APIs
@@ -216,6 +226,7 @@ To implement a hypermedia API you'll need to decide on an appropriate media type
216226
[image-self-describing-api]: ../img/self-describing.png
217227

218228
[drf-yasg]: https://github.com/axnsan12/drf-yasg/
229+
[drf-spectacular]: https://github.com/tfranzel/drf-spectacular/
219230
[markdown]: https://daringfireball.net/projects/markdown/syntax
220231
[open-api]: https://openapis.org/
221232
[redoc]: https://github.com/Rebilly/ReDoc

0 commit comments

Comments
 (0)