MultipleApiVersions is not called
See original GitHub issueHi,
I want to force to include both methods in a Swagger document. The second method is simply skipped in MultipleApiVersions
because both methods have the same route. Once i change a Route for any action, MultipleApiVersions
is called for both.
[MapToApiVersion("6.0")]
[Route("items")]
public Task<Item> PostItemsAsync([FromBody] Item item)
{
}
[MapToApiVersion("8.0")]
[Route("items")]
[HttpPost]
public Task<ItemV8> PostItemAsyncV8([FromBody] ItemV8 item)
{
}
Thanks
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
MultipleApiVersions is not called · Issue #1057
Hi, I want to force to include both methods in a Swagger document. The second method is simply skipped in MultipleApiVersions because both ......
Read more >c# - Swagger not working correctly with multiple versions of ...
I'm trying to setup API versioning for a ASP.NET WebApi project, along with Swagger. The API versioning works fine, calling different versions ...
Read more >Supporting Multiple API Versions in Android
VERSION.SDK_INT is not called on Cupcake devices. Java knows that it is not available on that device when it loads the class. This...
Read more >C# – Swagger not working correctly with multiple versions ...
The API versioning works fine, calling different versions returns the correct results (see below). On the contrary, Swagger fails to serve both versions....
Read more >Put request to Azure API does not update parameters on linked ...
Hello everyone I am trying to update paramerers for linked service below: { name": "asql", "type": "Microsoft.Synapse/workspaces/linkedservices" ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In addition to the API versioning and Swashbuckle packages, you also need the ASP.NET Web API Versioned API Explorer package. Then you need to call
configuration.AddVersionedApiExplorer()
in your application setup. Finally, you need to use the API explorer to call MultipleApiVersions in the Swagger configuration. A complete example of what this might look like can be found here. Your application configuration may be slightly different.@commonsensesoftware thank you very much! That was exactly what i needed.