feat(openapi): automatically generate OpenAPI spec from code (#318)

Co-authored-by: bernard eugine <bernard.eugine@bernard.eugine-MacBookPro>
Co-authored-by: Sanchith Hegde <sanchith.hegde@juspay.in>
This commit is contained in:
bernard-eugine
2023-01-09 16:09:49 +05:30
committed by GitHub
parent c807713a6f
commit 3fe60b5a48
15 changed files with 1401 additions and 14 deletions

View File

@ -4,6 +4,18 @@ use router_env::{instrument, tracing, Flow};
use super::app::AppState;
use crate::{core::admin::*, services::api, types::api::admin};
/// Merchant Account - Create
///
/// Create a new account for a merchant and the merchant could be a seller or retailer or client who likes to receive and send payments.
#[utoipa::path(
post,
path = "/account",
request_body= CreateMerchantAccount,
responses(
(status = 200, description = "Merchant Account Created", body = MerchantAccountResponse),
(status = 400, description = "Invalid data")
)
)]
#[instrument(skip_all, fields(flow = ?Flow::MerchantsAccountCreate))]
// #[post("")]
pub async fn merchant_account_create(