refactor(openapi): move openapi to separate crate to decrease compile times (#3110)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Co-authored-by: Sai Harsha Vardhan <56996463+sai-harsha-vardhan@users.noreply.github.com>
Co-authored-by: Sahkal Poddar <sahkalplanet@gmail.com>
Co-authored-by: Amisha Prabhat <55580080+Aprabhat19@users.noreply.github.com>
Co-authored-by: Sarthak Soni <76486416+Sarthak1799@users.noreply.github.com>
Co-authored-by: shashank_attarde <shashank.attarde@juspay.in>
Co-authored-by: Aprabhat19 <amishaprabhat@gmail.com>
Co-authored-by: sai-harsha-vardhan <harsha111hero@gmail.com>
Co-authored-by: Sahkal Poddar <sahkal.poddar@juspay.in>
Co-authored-by: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com>
This commit is contained in:
Narayan Bhat
2024-01-29 16:20:43 +05:30
committed by GitHub
parent dd0d2dc2dd
commit 7d8d68faba
48 changed files with 6620 additions and 1197 deletions

View File

@ -9,6 +9,7 @@ license.workspace = true
[features]
dummy_connector = []
openapi = []
[dependencies]
diesel = { version = "2.1.0", features = ["postgres"] }

View File

@ -74,10 +74,12 @@ pub enum AttemptStatus {
strum::EnumString,
strum::EnumIter,
strum::EnumVariantNames,
ToSchema,
)]
#[router_derive::diesel_enum(storage_type = "db_enum")]
#[serde(rename_all = "snake_case")]
#[strum(serialize_all = "snake_case")]
/// Connectors eligible for payments routing
pub enum RoutableConnectors {
#[cfg(feature = "dummy_connector")]
#[serde(rename = "phonypay")]
@ -328,6 +330,7 @@ pub enum CaptureMethod {
Scheduled,
}
/// Type of the Connector for the financial use case. Could range from Payments to Accounting to Banking.
#[derive(
Clone,
Copy,
@ -364,6 +367,7 @@ pub enum ConnectorType {
PaymentMethodAuth,
}
/// The three letter ISO currency code in uppercase. Eg: 'USD' for the United States Dollar.
#[allow(clippy::upper_case_acronyms)]
#[derive(
Clone,
@ -1074,6 +1078,7 @@ pub enum PaymentMethodIssuerCode {
JpBacs,
}
/// To indicate the type of payment experience that the customer would go through
#[derive(
Eq,
strum::EnumString,
@ -1109,6 +1114,7 @@ pub enum PaymentExperience {
DisplayWaitScreen,
}
/// Indicates the sub type of payment method. Eg: 'google_pay' & 'apple_pay' for wallets.
#[derive(
Clone,
Copy,
@ -1214,6 +1220,7 @@ pub enum PaymentMethodType {
PayEasy,
}
/// Indicates the type of payment method. Eg: 'card', 'wallet', etc.
#[derive(
Clone,
Copy,
@ -1249,6 +1256,7 @@ pub enum PaymentMethod {
GiftCard,
}
/// To be used to specify the type of payment. Use 'setup_mandate' in case of zero auth flow.
#[derive(
Clone,
Copy,
@ -1297,7 +1305,7 @@ pub enum RefundStatus {
TransactionFailure,
}
/// The status of the mandate, which indicates whether it can be used to initiate a payment
/// The status of the mandate, which indicates whether it can be used to initiate a payment.
#[derive(
Clone,
Copy,
@ -1322,6 +1330,7 @@ pub enum MandateStatus {
Revoked,
}
/// Indicates the card network.
#[derive(
Clone,
Debug,