mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 09:07:09 +08:00
fix(openapi): Standardise API naming scheme for V2 (#6510)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -22,9 +22,14 @@ pub struct OrganizationId {
|
||||
#[derive(Debug, serde::Serialize, serde::Deserialize, Clone, ToSchema)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct OrganizationCreateRequest {
|
||||
/// Name of the organization
|
||||
pub organization_name: String,
|
||||
|
||||
/// Details about the organization
|
||||
#[schema(value_type = Option<Object>)]
|
||||
pub organization_details: Option<pii::SecretSerdeValue>,
|
||||
|
||||
/// Metadata is useful for storing additional, unstructured information on an object.
|
||||
#[schema(value_type = Option<Object>)]
|
||||
pub metadata: Option<pii::SecretSerdeValue>,
|
||||
}
|
||||
@ -32,20 +37,53 @@ pub struct OrganizationCreateRequest {
|
||||
#[derive(Debug, serde::Serialize, serde::Deserialize, Clone, ToSchema)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct OrganizationUpdateRequest {
|
||||
/// Name of the organization
|
||||
pub organization_name: Option<String>,
|
||||
|
||||
/// Details about the organization
|
||||
#[schema(value_type = Option<Object>)]
|
||||
pub organization_details: Option<pii::SecretSerdeValue>,
|
||||
|
||||
/// Metadata is useful for storing additional, unstructured information on an object.
|
||||
#[schema(value_type = Option<Object>)]
|
||||
pub metadata: Option<pii::SecretSerdeValue>,
|
||||
}
|
||||
|
||||
#[cfg(feature = "v1")]
|
||||
#[derive(Debug, serde::Serialize, Clone, ToSchema)]
|
||||
pub struct OrganizationResponse {
|
||||
/// The unique identifier for the Organization
|
||||
#[schema(value_type = String, max_length = 64, min_length = 1, example = "org_q98uSGAYbjEwqs0mJwnz")]
|
||||
pub organization_id: id_type::OrganizationId,
|
||||
|
||||
/// Name of the Organization
|
||||
pub organization_name: Option<String>,
|
||||
|
||||
/// Details about the organization
|
||||
#[schema(value_type = Option<Object>)]
|
||||
pub organization_details: Option<pii::SecretSerdeValue>,
|
||||
|
||||
/// Metadata is useful for storing additional, unstructured information on an object.
|
||||
#[schema(value_type = Option<Object>)]
|
||||
pub metadata: Option<pii::SecretSerdeValue>,
|
||||
pub modified_at: time::PrimitiveDateTime,
|
||||
pub created_at: time::PrimitiveDateTime,
|
||||
}
|
||||
|
||||
#[cfg(feature = "v2")]
|
||||
#[derive(Debug, serde::Serialize, Clone, ToSchema)]
|
||||
pub struct OrganizationResponse {
|
||||
/// The unique identifier for the Organization
|
||||
#[schema(value_type = String, max_length = 64, min_length = 1, example = "org_q98uSGAYbjEwqs0mJwnz")]
|
||||
pub id: id_type::OrganizationId,
|
||||
|
||||
/// Name of the Organization
|
||||
pub organization_name: Option<String>,
|
||||
|
||||
/// Details about the organization
|
||||
#[schema(value_type = Option<Object>)]
|
||||
pub organization_details: Option<pii::SecretSerdeValue>,
|
||||
|
||||
/// Metadata is useful for storing additional, unstructured information on an object.
|
||||
#[schema(value_type = Option<Object>)]
|
||||
pub metadata: Option<pii::SecretSerdeValue>,
|
||||
pub modified_at: time::PrimitiveDateTime,
|
||||
|
||||
Reference in New Issue
Block a user