Skip to content
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

Swagger Generator Does Not Use All API Explorer Metadata #1133

Open
commonsensesoftware opened this issue Jul 13, 2017 · 0 comments
Open

Swagger Generator Does Not Use All API Explorer Metadata #1133

commonsensesoftware opened this issue Jul 13, 2017 · 0 comments

Comments

@commonsensesoftware
Copy link

commonsensesoftware commented Jul 13, 2017

Overview

The implementation of SwaggerGenerator.cs should consider all relevant metadata provided by API explorers. The following information is not currently mapped in all NonBodyParameter scenarios:

In addition, the Consumes() and Produces() extension methods in ApiDescriptionExtensions.cs only use the MediaTypeValueHeader.MediaType value, which excludes additional information such as media type parameters. All media type information should be considered. This can easily be remedied using MediaTypeValueHeader.ToString().

These items were previously partially addressed by PR #1090, which is now closed and was never merged.

Scenarios

There are undoubtedly numerous scenarios where this would be useful. In the case of API Versioning, this will enable discovered API version parameters to be injected into Swagger documents and the UI via its API explorer extensions without requiring additional configuration from service authors. Service authors must currently use custom IOperationFilter implementations to bridge this gap.

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

No branches or pull requests

1 participant