mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 09:07:09 +08:00
feat(router): serve OpenAPI docs at /docs (#698)
Co-authored-by: bernard eugine <bernard.eugine@bernard.eugine-MacBookPro> Co-authored-by: Sanchith Hegde <sanchith.hegde@juspay.in>
This commit is contained in:
@ -78,6 +78,15 @@ pub fn mk_app(
|
||||
> {
|
||||
let mut server_app = get_application_builder(request_body_limit);
|
||||
|
||||
#[cfg(feature = "openapi")]
|
||||
{
|
||||
use utoipa::OpenApi;
|
||||
server_app = server_app.service(
|
||||
utoipa_swagger_ui::SwaggerUi::new("/docs/{_:.*}")
|
||||
.url("/docs/openapi.json", openapi::ApiDoc::openapi()),
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "olap", feature = "oltp"))]
|
||||
{
|
||||
server_app = server_app
|
||||
|
||||
Reference in New Issue
Block a user