Correct way to use AddOpenApi with API versioning #57780
Unanswered
marcominerva
asked this question in
Q&A
Replies: 2 comments
-
I don't think there is at the moment, based on this block of code: aspnetcore/src/OpenApi/src/Services/OpenApiDocumentProvider.cs Lines 53 to 64 in f2ea31d |
Beta Was this translation helpful? Give feedback.
0 replies
-
Now you can see the both paths at /openapi/v1.json and /openapi/v2.json |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
In the OpenApi.Extensions.cs file from eShop, I see this code to define the available API versions with
AddOpenApi
:In particular, I refer to the line:
string[] versions = ["v1"];
My question is: is there a way to dynamically infer the available API versions at runtime?
Beta Was this translation helpful? Give feedback.
All reactions