Skip to content

Web API with same route but different versioning- unable to generate multi version swagger document #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Anjayg opened this issue Mar 9, 2017 · 4 comments

Comments

@Anjayg
Copy link

Anjayg commented Mar 9, 2017

we adopted versioning approach for our public api and version can be accepted via query string or headers. below are same resource but different store to connect data.

[ApiVersion("1")]
[RoutePrefix("api/items")]
items1controller: apicontroller
{
GET api/items?api-version =1
}

[ApiVersion("2")]
[RoutePrefix("api/items")]
items2controller: apicontroller
{
GET api/items?api-version =2
}

api/items/1?api-version =1
api/items/1?api-version 2

we are unable to generate swagger documentation for multi version api. I think this question was asked many times in different forum. but looking for some solution/direction so that api explorer does not break and we are able to generate swagger document.

@commonsensesoftware
Copy link
Collaborator

Have you looked at #59, #60, and their related links? First-class support for documentation is on the roadmap, but getting out bugs and updates are the highest priority for me. I've almost got all of the other open issues burned down and then I'll have time to focus a lot more effort to formally supporting documentation. Until then, there have been a lot of discussions, code examples, and community ad hoc implementations.

If there are questions that you can't find answered in any of the questions, then I'll answer what I can for you. Thanks for your patience.

@commonsensesoftware
Copy link
Collaborator

Since there don't seem to be any other questions on this topic and I've already linked the existing, active issues related to this topic, I'm going to close this issue out. I am actively looking into supporting the required documentation features for Swagger, etc. Follow the linked issues for updates. Thanks for your support and interest in the success of the project.

@Berezhnyk
Copy link

I was got the same bug

@commonsensesoftware
Copy link
Collaborator

Can you elaborate? Are you using Swagger? Have you included the API Explorer package for API Versioning? All of this information is documented in the API Documentation wiki topic. The NuGet packages, samples, and quick starts all have links on the home page as well.

Let me know how else I can help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants