mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 09:07:09 +08:00
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:
@ -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())
|
||||
)
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user