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.
At present, Menes provides the ability to automatically expose an API's definition via a built in
/swaggerendpoint, added by calling theAddSwaggerEndpointextension method onIOpenApiDocumentsduring 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:
/openapiendpoint for v3./swaggerendpoint, but add a query param to allow specifying the required version. Default to v2 to retain existing behaviour.