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

Allow retrieval of the API definition in OpenAPI 3 form #147

Open
jongeorge1 opened this issue Oct 15, 2020 · 1 comment
Open

Allow retrieval of the API definition in OpenAPI 3 form #147

jongeorge1 opened this issue Oct 15, 2020 · 1 comment

Comments

@jongeorge1
Copy link
Contributor

At present, Menes provides the ability to automatically expose an API's definition via a built in /swagger endpoint, added by calling the AddSwaggerEndpoint extension method on IOpenApiDocuments during setup.

This endpoint returns the definition in JSON form using the OpenAPI v2 spec (controlled in OpenApiDocumentJsonConverter). As we move towards using more OpenAPI v3 features, we're finding that this conversion loses a lot of useful information. As such, it would be useful to retrieve the definition as per the v3 spec.

Options:

  • Add a separate /openapi endpoint for v3.
  • Retain the existing /swagger endpoint, but add a query param to allow specifying the required version. Default to v2 to retain existing behaviour.
@jongeorge1
Copy link
Contributor Author

My preference is for the first option - a new endpoint. This due to the fact that Swagger v2 was donated to the OpenAPI initiative to form the basis on which OpenApi 3 was developed - so really there is no such thing as "Swagger v3".

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