Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
549 views
in Technique[技术] by (71.8m points)

django - DRF OpenAPI documentation omitting nested endpoints

In urls.py I specify a number of URLs. But only those with only one slash-separated "word" beyond api/ are actually included in the schema. E.g. an openapi schema generated from the code below will only document the /api/token/ endpoint.

The (deprecated) corejson schema does include them. Is this because my endpoints are not OpenAPI compliant?

urls.py

urlpatterns = [
    path("api/token/", auth_user_views.AuthUserView.as_view(), name="auth_user"),
    path(
        "api/token/refresh/",
        auth_user_views.AuthUserRefreshView.as_view(),
        name="token_refresh",
    ),
    url(
        r"^api/token/verify/$", jwt_views.TokenVerifyView.as_view(), name="token_verify"
    ),
]

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...