We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7646a75 + 570e032 commit cef896fCopy full SHA for cef896f
fastapi_versioning/routing.py
@@ -11,5 +11,9 @@ def versioned_api_route(
11
class VersionedAPIRoute(route_class):
12
def __init__(self, *args, **kwargs):
13
super().__init__(*args, **kwargs)
14
- self.endpoint._api_version = (major, minor)
+ try:
15
+ self.endpoint._api_version = (major, minor)
16
+ except AttributeError:
17
+ # Support bound methods
18
+ self.endpoint.__func__._api_version = (major, minor)
19
return VersionedAPIRoute
0 commit comments