mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
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:
@ -1,3 +1,5 @@
|
||||
use utoipa::ToSchema;
|
||||
|
||||
#[derive(
|
||||
Clone,
|
||||
Copy,
|
||||
@ -125,6 +127,7 @@ pub enum ConnectorType {
|
||||
serde::Serialize,
|
||||
strum::Display,
|
||||
strum::EnumString,
|
||||
ToSchema,
|
||||
frunk::LabelledGeneric,
|
||||
)]
|
||||
pub enum Currency {
|
||||
@ -339,6 +342,7 @@ pub enum PaymentMethodIssuerCode {
|
||||
serde::Serialize,
|
||||
strum::Display,
|
||||
strum::EnumString,
|
||||
ToSchema,
|
||||
frunk::LabelledGeneric,
|
||||
)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
@ -364,6 +368,7 @@ pub enum PaymentMethodSubType {
|
||||
serde::Serialize,
|
||||
strum::Display,
|
||||
strum::EnumString,
|
||||
ToSchema,
|
||||
frunk::LabelledGeneric,
|
||||
)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
@ -435,8 +440,12 @@ pub enum RefundStatus {
|
||||
serde::Serialize,
|
||||
strum::Display,
|
||||
strum::EnumString,
|
||||
ToSchema,
|
||||
frunk::LabelledGeneric,
|
||||
)]
|
||||
|
||||
/// The routing algorithm to be used to process the incoming request from merchant to outgoing payment processor or payment method. The default is 'Custom'
|
||||
#[schema(example = "custom")]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
pub enum RoutingAlgorithm {
|
||||
|
||||
Reference in New Issue
Block a user