-
Notifications
You must be signed in to change notification settings - Fork 64
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
Docs showing routes of all versions #34
Comments
Hello, I believe this is not an issue, there is a bit of misunderstanding of how it works. Let me explain: Basically what you are doing with this code The problem here is that you are specifying again version on the path e.g. When you are adding the new route When we create a new version all the routes from the past version will be replicated in the new version + the new routes with the new version |
I am in the same situation. So there is no way to include in the new version all the routes of the new version + just the routes of the old version which are also referenced in the new one? Up to now I ended up not to use fastapi_versioning at all, but creating separated APIRouter for the two versions. |
@colibri17 To fix this I had to patch the library. In the file |
Hello,
I have a sample app with two versions of the user endpoint. Version 1 has an endpoint and version 2 has an other endpoint. Now if I navigate to the docs version 1 shows all correct but version two shows both of the endpoints together (the endpoint from v1 and the endpoint from v2)
Here my code:
Here what I see in the docs when I navigate to
http://localhost:8000/v2/docs
I would expect the docs of version 2 to only show the endpoint defined in
app/v2/routers/users.py
and not a combination of both versions.Thanx for any help with this!
The text was updated successfully, but these errors were encountered: