-
I am looking for a decorator to append versions to the URL.
There will generate three openapi files(v1,v2,v3) after executing My question is how to automatically append the version enum to the URL like:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The short answer is that there isn't a way to automatically do this yet, however, you can achieve a similar thing by using explict Creating templates based on these definitions would make this a bit easier to express. In the future, it may be possible to use string interpolation to represent the version value in the operation route, which would remove the need to represent the versioned operatiosn separately. |
Beta Was this translation helpful? Give feedback.
The short answer is that there isn't a way to automatically do this yet, however, you can achieve a similar thing by using explict
@route
decoration with versioned interfaces or operations, for example this playground shows versioning interfacesCreating templates based on these definitions would make this a bit easier to express. In the future, it may be possible to use string interpolation to represent the version value in the operation route, which would remove the need to represent the versioned operatiosn separately.