feat(merchant_account): add merchant account create v2 route (#5061)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Co-authored-by: Arun Raj M <jarnura47@gmail.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com>
Co-authored-by: Chethan Rao <70657455+Chethan-rao@users.noreply.github.com>
Co-authored-by: Sarthak Soni <76486416+Sarthak1799@users.noreply.github.com>
Co-authored-by: Sandeep Kumar <83278309+tsdk02@users.noreply.github.com>
Co-authored-by: Abhitator216 <abhishek.kanojia@juspay.in>
Co-authored-by: Abhishek Kanojia <89402434+Abhitator216@users.noreply.github.com>
Co-authored-by: ivor-juspay <138492857+ivor-juspay@users.noreply.github.com>
Co-authored-by: Sampras Lopes <sampras.lopes@juspay.in>
Co-authored-by: Pa1NarK <69745008+pixincreate@users.noreply.github.com>
Co-authored-by: likhinbopanna <131246334+likhinbopanna@users.noreply.github.com>
Co-authored-by: Sahkal Poddar <sahkalplanet@gmail.com>
Co-authored-by: Hrithikesh <61539176+hrithikesh026@users.noreply.github.com>
Co-authored-by: Shankar Singh C <83439957+ShankarSinghC@users.noreply.github.com>
Co-authored-by: SamraatBansal <55536657+SamraatBansal@users.noreply.github.com>
Co-authored-by: GORAKHNATH YADAV <gorakhcodes@gmail.com>
Co-authored-by: Apoorv Dixit <64925866+apoorvdixit88@users.noreply.github.com>
Co-authored-by: ShivanshMathurJuspay <104988143+ShivanshMathurJuspay@users.noreply.github.com>
Co-authored-by: awasthi21 <107559116+awasthi21@users.noreply.github.com>
Co-authored-by: Prajjwal Kumar <prajjwal.kumar@juspay.in>
This commit is contained in:
Narayan Bhat
2024-07-10 13:15:36 +05:30
committed by GitHub
parent fa7add19ee
commit d6b9151e9e
36 changed files with 1568 additions and 972 deletions

View File

@ -2,14 +2,24 @@ mod openapi;
mod routes;
fn main() {
let file_path = "api-reference/openapi_spec.json";
#[cfg(not(feature = "v2"))]
let relative_file_path = "api-reference/openapi_spec.json";
#[cfg(feature = "v2")]
let relative_file_path = "api-reference/v2/openapi_spec.json";
let mut file_path = router_env::workspace_path();
file_path.push(relative_file_path);
let openapi = <openapi::ApiDoc as utoipa::OpenApi>::openapi();
#[allow(clippy::expect_used)]
std::fs::write(
file_path,
<openapi::ApiDoc as utoipa::OpenApi>::openapi()
openapi
.to_pretty_json()
.expect("Failed to serialize OpenAPI specification as JSON"),
)
.expect("Failed to write OpenAPI specification to file");
println!("Successfully saved OpenAPI specification file at '{file_path}'");
println!("Successfully saved OpenAPI specification file at '{relative_file_path}'");
}

View File

@ -559,7 +559,7 @@ Never share your secret api keys. Keep them guarded and secure.
)]
// Bypass clippy lint for not being constructed
#[allow(dead_code)]
pub struct ApiDoc;
pub(crate) struct ApiDoc;
struct SecurityAddon;