Skip to content

adding drf-yasg to the documentation's documenting-your-api section #5719

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs/topics/documenting-your-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,20 @@ The `rest_framework.documentation` module provides three helper functions to hel

There are a number of mature third-party packages for providing API documentation.

---

#### drf-yasg - Yet another Swagger generator
[drf-yasg][drf-yasg] does not rely on the internal DRF's documenting package, the [Core API][core_api].
The rationale was that the Core API has not been able to generate response schemas ([issue #4502][issue_4502]).

This is a major issue when a swagger file is the source for code generation, which is typed (for example when using TypeScript).

The [drf-yasg][drf-yasg] solves this problem.

The other DRF swagger packages listed below are based on the [Core API][core_api]. Consequently, they suffer from the same issue.

---

#### DRF OpenAPI

[DRF OpenAPI][drf-openapi] bridges the gap between OpenAPI specification and tool chain with the schema exposed
Expand Down Expand Up @@ -296,3 +310,6 @@ To implement a hypermedia API you'll need to decide on an appropriate media type
[image-self-describing-api]: ../img/self-describing.png
[schemas-examples]: ../api-guide/schemas/#example
[metadata-docs]: ../api-guide/metadata/
[drf-yasg]: https://github.com/axnsan12/drf-yasg
[core_api]: http://www.django-rest-framework.org/api-guide/schemas/#core-api
[issue_4502]: https://github.com/encode/django-rest-framework/issues/4502
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy