You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Yes, I want to use this with a api with Websockets as well Describe the solution you'd like
A clear and concise description of what you want to happen.
Websocket support in fastapi versioner Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
I right now have my own middleware to handle these things but this looks better Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
I'm looking for the same feature, namely the ability to decorate a @fastapi.APIRouter.websocket("/path") route with @fastapi_versioning.version(major, minor).
Currently getting the same error as cheesycod.
Actually, even without decorating a WebSocket-based FastAPI endpoint with @Version(major, minor), and having such decorators strictly at REST / non-WebSocket routes level, I'm still getting the same error (AttributeError: 'APIWebSocketRoute' object has no attribute 'methods') in the line that creates a VersionedFastAPI instance.
... and to mitigate the error, I have to re-structure the routers registration (i.e. FastAPI.include_router() calls) so that any WebSocket-based router comes AFTER creating the VersionedFastAPI instance. Like this:
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Yes, I want to use this with a api with Websockets as well
Describe the solution you'd like
A clear and concise description of what you want to happen.
Websocket support in fastapi versioner
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
I right now have my own middleware to handle these things but this looks better
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: