-
Notifications
You must be signed in to change notification settings - Fork 270
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
[Q] Unversioned endpoints appearing below versioned endpoint #926
Comments
shouldn't be an issue given that this is all based on a supported versioning class (URLPathVersioning)
I think not. There shouldn't be duplication unless you add no version given: unversioned endpoints All the endpoints are iterated ONCE, so they should fall in one category and thats it. no duplication. at least that is the intended funtionality. FYI: you should set drf-spectacular/drf_spectacular/settings.py Lines 8 to 13 in 24b8a98
|
closing this issue for now. feel free to comment if anything is missing or not working and we will follow-up. |
I've addressed most of the egregious errors after importing drf-spectacular to my project. I've tried looking extensively in all the github issues (#253, #22, #367, #420) to see if I can find a solution, but I've come up empty thus far...
Potentially releveant info:
We use a custom regex that looks like this:
url(r'^api/(?P<version>(v?\d\.\d+))/', include("braintest.api.urls", namespace="apiv")),
We also have a corresponding middleware that overrides
URLPathVersioning
to handle the incoming versioning in the URL. We need it as a bunch of serializers depend on a float to check versioningeg:
After these two changes above, when I hit my Swagger UI at
localhost/api/schema/swagger-ui/?version=1.6/
it groups all the endpoints under 1.6, and then below that, all the endpoints in their respective classes, but without versioning. I attached a screenshot below to illustrate the issue.Is this expected behaviour? I feel like all the versioned endpoints shouldn't duplicate themselves again without their versions though. Thank you in advance!
The text was updated successfully, but these errors were encountered: