You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use case:
In my project I want to be able to generate the OpenAPI spec in development builds for internal use, but not expose it in production.
Currently this is almost impossible, since .build and .build_with functions force having openapi route(s), without the ability to remove or even limit access to that specific route with middleware.
My current solution is to use global middleware that checks every request, and limits access only to specified routes - openapi spec and swagger ui in my particular case
Alternatively there could be a way to add middlewares to apistos-generated routes, which might cover more use cases, provided such use cases exists and that would probably be a more complicated feature to implement
The text was updated successfully, but these errors were encountered:
Thanks for the suggestion.
How do you plan on retrieving the generated OAS file if not exposing the routes ? Would you like to have a file generated somewhere, ideally at build time ?
Use case:
In my project I want to be able to generate the OpenAPI spec in development builds for internal use, but not expose it in production.
Currently this is almost impossible, since
.build
and.build_with
functions force having openapi route(s), without the ability to remove or even limit access to that specific route with middleware.My current solution is to use global middleware that checks every request, and limits access only to specified routes - openapi spec and swagger ui in my particular case
Alternatively there could be a way to add middlewares to apistos-generated routes, which might cover more use cases, provided such use cases exists and that would probably be a more complicated feature to implement
The text was updated successfully, but these errors were encountered: