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

@ -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 {