fix(openapi): correct schema references and semantics for v1 openApi spec (#8127)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
AkshayaFoiger
2025-06-20 18:21:27 +05:30
committed by GitHub
parent a721d90c6b
commit 02dee9c581
19 changed files with 305 additions and 483 deletions

View File

@ -467,6 +467,7 @@ Never share your secret api keys. Keep them guarded and secure.
api_models::payments::PazeWalletData,
api_models::payments::SessionToken,
api_models::payments::ApplePaySessionResponse,
api_models::payments::NullObject,
api_models::payments::ThirdPartySdkSessionResponse,
api_models::payments::NoThirdPartySdkSessionResponse,
api_models::payments::SecretInfoToInitiateSdk,
@ -798,7 +799,9 @@ struct SecurityAddon;
impl utoipa::Modify for SecurityAddon {
fn modify(&self, openapi: &mut utoipa::openapi::OpenApi) {
use utoipa::openapi::security::{ApiKey, ApiKeyValue, SecurityScheme};
use utoipa::openapi::security::{
ApiKey, ApiKeyValue, HttpAuthScheme, HttpBuilder, SecurityScheme,
};
if let Some(components) = openapi.components.as_mut() {
components.add_security_schemes_from_iter([
@ -833,6 +836,10 @@ impl utoipa::Modify for SecurityAddon {
to a single customer object for a short period of time."
))),
),
(
"jwt_key",
SecurityScheme::Http(HttpBuilder::new().scheme(HttpAuthScheme::Bearer).bearer_format("JWT").build())
)
]);
}
}