mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 09:38:33 +08:00
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:
@ -20,6 +20,150 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
|
"/organization": {
|
||||||
|
"post": {
|
||||||
|
"tags": [
|
||||||
|
"Organization"
|
||||||
|
],
|
||||||
|
"summary": "Organization - Create",
|
||||||
|
"description": "Organization - Create\n\nCreate a new organization",
|
||||||
|
"operationId": "Create an Organization",
|
||||||
|
"requestBody": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/OrganizationRequest"
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"Create an organization with organization_name": {
|
||||||
|
"value": {
|
||||||
|
"organization_name": "organization_abc"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Organization Created",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/OrganizationResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Invalid data"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"admin_api_key": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/organization/{organization_id}": {
|
||||||
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"Organization"
|
||||||
|
],
|
||||||
|
"summary": "Organization - Retrieve",
|
||||||
|
"description": "Organization - Retrieve\n\nRetrieve an existing organization",
|
||||||
|
"operationId": "Retrieve an Organization",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "organization_id",
|
||||||
|
"in": "path",
|
||||||
|
"description": "The unique identifier for the Organization",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Organization Created",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/OrganizationResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Invalid data"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"admin_api_key": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
|
"tags": [
|
||||||
|
"Organization"
|
||||||
|
],
|
||||||
|
"summary": "Organization - Update",
|
||||||
|
"description": "Organization - Update\n\nCreate a new organization for .",
|
||||||
|
"operationId": "Update an Organization",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "organization_id",
|
||||||
|
"in": "path",
|
||||||
|
"description": "The unique identifier for the Organization",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/OrganizationRequest"
|
||||||
|
},
|
||||||
|
"examples": {
|
||||||
|
"Update organization_name of the organization": {
|
||||||
|
"value": {
|
||||||
|
"organization_name": "organization_abcd"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Organization Created",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/OrganizationResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Invalid data"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"admin_api_key": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"/v2/connector_accounts": {
|
"/v2/connector_accounts": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
|
|||||||
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
openapi: post /organization
|
||||||
|
---
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
openapi: get /organization/{organization_id}
|
||||||
|
---
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
openapi: put /organization/{organization_id}
|
||||||
|
---
|
||||||
@ -103,6 +103,14 @@
|
|||||||
"api-reference/disputes/disputes--list"
|
"api-reference/disputes/disputes--list"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"group": "Organization",
|
||||||
|
"pages": [
|
||||||
|
"api-reference/organization/organization--create",
|
||||||
|
"api-reference/organization/organization--retrieve",
|
||||||
|
"api-reference/organization/organization--update"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"group": "Merchant Account",
|
"group": "Merchant Account",
|
||||||
"pages": [
|
"pages": [
|
||||||
|
|||||||
@ -1157,13 +1157,52 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/organization/{organization_id}": {
|
"/organization/{organization_id}": {
|
||||||
"post": {
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"Organization"
|
||||||
|
],
|
||||||
|
"summary": "Organization - Retrieve",
|
||||||
|
"description": "Organization - Retrieve\n\nRetrieve an existing organization",
|
||||||
|
"operationId": "Retrieve an Organization",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "organization_id",
|
||||||
|
"in": "path",
|
||||||
|
"description": "The unique identifier for the Organization",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Organization Created",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/OrganizationResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Invalid data"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"admin_api_key": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
"tags": [
|
"tags": [
|
||||||
"Organization"
|
"Organization"
|
||||||
],
|
],
|
||||||
"summary": "Organization - Update",
|
"summary": "Organization - Update",
|
||||||
"description": "Organization - Update\n\nCreate a new organization for .",
|
"description": "Organization - Update\n\nCreate a new organization for .",
|
||||||
"operationId": "Create an Organization",
|
"operationId": "Update an Organization",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "organization_id",
|
"name": "organization_id",
|
||||||
|
|||||||
@ -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
|
// The paths will be displayed in the same order as they are registered here
|
||||||
paths(
|
paths(
|
||||||
|
// Routes for Organization
|
||||||
|
routes::organization::organization_create,
|
||||||
|
routes::organization::organization_retrieve,
|
||||||
|
routes::organization::organization_update,
|
||||||
|
|
||||||
// Routes for merchant connector account
|
// Routes for merchant connector account
|
||||||
routes::merchant_connector_account::connector_create,
|
routes::merchant_connector_account::connector_create,
|
||||||
routes::merchant_connector_account::connector_retrieve,
|
routes::merchant_connector_account::connector_retrieve,
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
#[cfg(any(feature = "v1", feature = "v2"))]
|
||||||
/// Organization - Create
|
/// Organization - Create
|
||||||
///
|
///
|
||||||
/// Create a new organization
|
/// Create a new organization
|
||||||
@ -24,11 +25,12 @@
|
|||||||
)]
|
)]
|
||||||
pub async fn organization_create() {}
|
pub async fn organization_create() {}
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1", feature = "v2"))]
|
||||||
/// Organization - Retrieve
|
/// Organization - Retrieve
|
||||||
///
|
///
|
||||||
/// Retrieve an existing organization
|
/// Retrieve an existing organization
|
||||||
#[utoipa::path(
|
#[utoipa::path(
|
||||||
post,
|
get,
|
||||||
path = "/organization/{organization_id}",
|
path = "/organization/{organization_id}",
|
||||||
params (("organization_id" = String, Path, description = "The unique identifier for the Organization")),
|
params (("organization_id" = String, Path, description = "The unique identifier for the Organization")),
|
||||||
responses(
|
responses(
|
||||||
@ -36,16 +38,17 @@ pub async fn organization_create() {}
|
|||||||
(status = 400, description = "Invalid data")
|
(status = 400, description = "Invalid data")
|
||||||
),
|
),
|
||||||
tag = "Organization",
|
tag = "Organization",
|
||||||
operation_id = "Create an Organization",
|
operation_id = "Retrieve an Organization",
|
||||||
security(("admin_api_key" = []))
|
security(("admin_api_key" = []))
|
||||||
)]
|
)]
|
||||||
pub async fn organization_retrieve() {}
|
pub async fn organization_retrieve() {}
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1", feature = "v2"))]
|
||||||
/// Organization - Update
|
/// Organization - Update
|
||||||
///
|
///
|
||||||
/// Create a new organization for .
|
/// Create a new organization for .
|
||||||
#[utoipa::path(
|
#[utoipa::path(
|
||||||
post,
|
put,
|
||||||
path = "/organization/{organization_id}",
|
path = "/organization/{organization_id}",
|
||||||
request_body(
|
request_body(
|
||||||
content = OrganizationRequest,
|
content = OrganizationRequest,
|
||||||
@ -63,7 +66,7 @@ pub async fn organization_retrieve() {}
|
|||||||
(status = 400, description = "Invalid data")
|
(status = 400, description = "Invalid data")
|
||||||
),
|
),
|
||||||
tag = "Organization",
|
tag = "Organization",
|
||||||
operation_id = "Create an Organization",
|
operation_id = "Update an Organization",
|
||||||
security(("admin_api_key" = []))
|
security(("admin_api_key" = []))
|
||||||
)]
|
)]
|
||||||
pub async fn organization_update() {}
|
pub async fn organization_update() {}
|
||||||
|
|||||||
Reference in New Issue
Block a user