chore: generate openapi specs for organization endpoint for v1 and v2 (#5648)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Hrithikesh
2024-08-21 16:45:45 +05:30
committed by GitHub
parent b60ced02ff
commit 1d08c7b932
8 changed files with 214 additions and 6 deletions

View File

@ -69,6 +69,11 @@ Never share your secret api keys. Keep them guarded and secure.
),
// The paths will be displayed in the same order as they are registered here
paths(
// Routes for Organization
routes::organization::organization_create,
routes::organization::organization_retrieve,
routes::organization::organization_update,
// Routes for merchant connector account
routes::merchant_connector_account::connector_create,
routes::merchant_connector_account::connector_retrieve,

View File

@ -1,3 +1,4 @@
#[cfg(any(feature = "v1", feature = "v2"))]
/// Organization - Create
///
/// Create a new organization
@ -24,11 +25,12 @@
)]
pub async fn organization_create() {}
#[cfg(any(feature = "v1", feature = "v2"))]
/// Organization - Retrieve
///
/// Retrieve an existing organization
#[utoipa::path(
post,
get,
path = "/organization/{organization_id}",
params (("organization_id" = String, Path, description = "The unique identifier for the Organization")),
responses(
@ -36,16 +38,17 @@ pub async fn organization_create() {}
(status = 400, description = "Invalid data")
),
tag = "Organization",
operation_id = "Create an Organization",
operation_id = "Retrieve an Organization",
security(("admin_api_key" = []))
)]
pub async fn organization_retrieve() {}
#[cfg(any(feature = "v1", feature = "v2"))]
/// Organization - Update
///
/// Create a new organization for .
#[utoipa::path(
post,
put,
path = "/organization/{organization_id}",
request_body(
content = OrganizationRequest,
@ -63,7 +66,7 @@ pub async fn organization_retrieve() {}
(status = 400, description = "Invalid data")
),
tag = "Organization",
operation_id = "Create an Organization",
operation_id = "Update an Organization",
security(("admin_api_key" = []))
)]
pub async fn organization_update() {}