Last active
April 14, 2021 06:42
-
-
Save KimSoungRyoul/c36ca9be803c26a576ed7a14dd11b88a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# urls.py | |
from drf_spectacular.views import SpectacularJSONAPIView | |
from drf_spectacular.views import SpectacularRedocView | |
from drf_spectacular.views import SpectacularSwaggerView | |
from drf_spectacular.views import SpectacularYAMLAPIView | |
urlpatterns = [ | |
# Open API 자체를 조회 : json, yaml, | |
path("docs/json/", SpectacularJSONAPIView.as_view(), name="schema-json"), | |
path("docs/yaml/", SpectacularYAMLAPIView.as_view(), name="swagger-yaml"), | |
# Open API Document UI로 조회: Swagger, Redoc | |
path("docs/swagger/", SpectacularSwaggerView.as_view(url_name="schema-json"), name="swagger-ui",), | |
path("docs/redoc/", SpectacularRedocView.as_view(url_name="schema-json"), name="redoc",), | |
# ... | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment