-
Notifications
You must be signed in to change notification settings - Fork 3
fix: reverting back to using enums instead of const for openapi generator #140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
pengying
merged 1 commit into
main
from
01-28-fix_reverting_back_to_using_enums_instead_of_const_for_openapi_generator
Jan 30, 2026
+2,269
−2,211
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
openapi/components/schemas/common/BasePaymentAccountInfo.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| type: object | ||
| required: | ||
| - accountType | ||
| properties: | ||
| accountType: | ||
| $ref: ./PaymentAccountType.yaml | ||
| discriminator: | ||
| propertyName: accountType | ||
| mapping: | ||
| CLABE: ./PaymentClabeAccountInfo.yaml | ||
| US_ACCOUNT: ./PaymentUsAccountInfo.yaml | ||
| PIX: ./PaymentPixAccountInfo.yaml | ||
| IBAN: ./PaymentIbanAccountInfo.yaml | ||
| UPI: ./PaymentUpiAccountInfo.yaml | ||
| NGN_ACCOUNT: ./PaymentNgnAccountInfo.yaml | ||
| SPARK_WALLET: ./PaymentSparkWalletInfo.yaml | ||
| LIGHTNING: ./PaymentLightningInvoiceInfo.yaml | ||
| SOLANA_WALLET: ./PaymentSolanaWalletInfo.yaml | ||
| TRON_WALLET: ./PaymentTronWalletInfo.yaml | ||
| POLYGON_WALLET: ./PaymentPolygonWalletInfo.yaml | ||
| BASE_WALLET: ./PaymentBaseWalletInfo.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 8 additions & 5 deletions
13
openapi/components/schemas/common/PaymentBaseWalletInfo.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,10 @@ | ||
| allOf: | ||
| - $ref: ./BasePaymentAccountInfo.yaml | ||
| - $ref: ./BaseWalletInfo.yaml | ||
| properties: | ||
| assetType: | ||
| type: string | ||
| description: Type of asset | ||
| const: USDC | ||
| - type: object | ||
| properties: | ||
| assetType: | ||
| type: string | ||
| description: Type of asset | ||
| enum: | ||
| - USDC |
20 changes: 11 additions & 9 deletions
20
openapi/components/schemas/common/PaymentClabeAccountInfo.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,13 @@ | ||
| allOf: | ||
| - $ref: ./BasePaymentAccountInfo.yaml | ||
| - $ref: ./ClabeAccountInfo.yaml | ||
| required: | ||
| - reference | ||
| properties: | ||
| reference: | ||
| type: string | ||
| description: >- | ||
| Unique reference code that must be included with the payment to properly | ||
| credit it | ||
| example: UMA-Q12345-REF | ||
| - type: object | ||
| required: | ||
| - reference | ||
| properties: | ||
| reference: | ||
| type: string | ||
| description: >- | ||
| Unique reference code that must be included with the payment to properly | ||
| credit it | ||
| example: UMA-Q12345-REF |
20 changes: 11 additions & 9 deletions
20
openapi/components/schemas/common/PaymentIbanAccountInfo.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,13 @@ | ||
| allOf: | ||
| - $ref: ./BasePaymentAccountInfo.yaml | ||
| - $ref: ./IbanAccountInfo.yaml | ||
| required: | ||
| - reference | ||
| properties: | ||
| reference: | ||
| type: string | ||
| description: >- | ||
| Unique reference code that must be included with the payment to properly | ||
| credit it | ||
| example: UMA-Q12345-REF | ||
| - type: object | ||
| required: | ||
| - reference | ||
| properties: | ||
| reference: | ||
| type: string | ||
| description: >- | ||
| Unique reference code that must be included with the payment to properly | ||
| credit it | ||
| example: UMA-Q12345-REF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 10 additions & 13 deletions
23
openapi/components/schemas/common/PaymentLightningInvoiceInfo.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,10 @@ | ||
| type: object | ||
| required: | ||
| - accountType | ||
| - invoice | ||
| properties: | ||
| accountType: | ||
| type: string | ||
| const: LIGHTNING | ||
| example: LIGHTNING | ||
| invoice: | ||
| type: string | ||
| description: Invoice for the payment | ||
| example: lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs | ||
| allOf: | ||
| - $ref: ./BasePaymentAccountInfo.yaml | ||
| - type: object | ||
| required: | ||
| - invoice | ||
| properties: | ||
| invoice: | ||
| type: string | ||
| description: Invoice for the payment | ||
| example: lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs |
20 changes: 11 additions & 9 deletions
20
openapi/components/schemas/common/PaymentNgnAccountInfo.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,13 @@ | ||
| allOf: | ||
| - $ref: ./BasePaymentAccountInfo.yaml | ||
| - $ref: ./NgnAccountInfo.yaml | ||
| required: | ||
| - reference | ||
| properties: | ||
| reference: | ||
| type: string | ||
| description: >- | ||
| Unique reference code that must be included with the payment to properly | ||
| credit it | ||
| example: UMA-Q12345-REF | ||
| - type: object | ||
| required: | ||
| - reference | ||
| properties: | ||
| reference: | ||
| type: string | ||
| description: >- | ||
| Unique reference code that must be included with the payment to properly | ||
| credit it | ||
| example: UMA-Q12345-REF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| allOf: | ||
| - $ref: ./BasePaymentAccountInfo.yaml | ||
| - $ref: ./PixAccountInfo.yaml |
14 changes: 9 additions & 5 deletions
14
openapi/components/schemas/common/PaymentPolygonWalletInfo.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,11 @@ | ||
| allOf: | ||
| - $ref: ./BasePaymentAccountInfo.yaml | ||
| - $ref: ./PolygonWalletInfo.yaml | ||
| properties: | ||
| assetType: | ||
| type: string | ||
| description: Type of asset | ||
| const: USDC | ||
| - type: object | ||
| properties: | ||
| assetType: | ||
| type: string | ||
| description: Type of asset | ||
| enum: | ||
| - USDC | ||
|
|
16 changes: 9 additions & 7 deletions
16
openapi/components/schemas/common/PaymentSolanaWalletInfo.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,11 @@ | ||
| allOf: | ||
| - $ref: ./BasePaymentAccountInfo.yaml | ||
| - $ref: ./SolanaWalletInfo.yaml | ||
| properties: | ||
| assetType: | ||
| type: string | ||
| description: Type of asset | ||
| enum: | ||
| - USDC | ||
| - USDT | ||
| - type: object | ||
| properties: | ||
| assetType: | ||
| type: string | ||
| description: Type of asset | ||
| enum: | ||
| - USDC | ||
| - USDT | ||
28 changes: 15 additions & 13 deletions
28
openapi/components/schemas/common/PaymentSparkWalletInfo.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,17 @@ | ||
| allOf: | ||
| - $ref: ./BasePaymentAccountInfo.yaml | ||
| - $ref: ./SparkWalletInfo.yaml | ||
| required: | ||
| - assetType | ||
| properties: | ||
| assetType: | ||
| type: string | ||
| description: Type of asset | ||
| enum: | ||
| - BTC | ||
| - USDB | ||
| invoice: | ||
| type: string | ||
| description: Invoice for the payment | ||
| example: sparkrt1pgss8ter0fhc4c220f3zftmpz49h8wqte8eg3m5zkrraplgc048jucgszg3ssqgjzqqekv73mmh842yj7drsjwh7t7tz5zt8wf5kghm5v4ehggszppjp5s80cg3qjdzc55g2567tn3lj705hdsr577tg8ah795mlnt6807y657qhkmgfkf9w75p4wz3l8vhua85zdn6ryj32zuj0p00pv2l5z4u47mw6h4s | ||
| - type: object | ||
| required: | ||
| - assetType | ||
| properties: | ||
| assetType: | ||
| type: string | ||
| description: Type of asset | ||
| enum: | ||
| - BTC | ||
| - USDB | ||
| invoice: | ||
| type: string | ||
| description: Invoice for the payment | ||
| example: sparkrt1pgss8ter0fhc4c220f3zftmpz49h8wqte8eg3m5zkrraplgc048jucgszg3ssqgjzqqekv73mmh842yj7drsjwh7t7tz5zt8wf5kghm5v4ehggszppjp5s80cg3qjdzc55g2567tn3lj705hdsr577tg8ah795mlnt6807y657qhkmgfkf9w75p4wz3l8vhua85zdn6ryj32zuj0p00pv2l5z4u47mw6h4s |
12 changes: 7 additions & 5 deletions
12
openapi/components/schemas/common/PaymentTronWalletInfo.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,9 @@ | ||
| allOf: | ||
| - $ref: ./BasePaymentAccountInfo.yaml | ||
| - $ref: ./TronWalletInfo.yaml | ||
| properties: | ||
| assetType: | ||
| type: string | ||
| description: Type of asset | ||
| const: USDT | ||
| - type: object | ||
| properties: | ||
| assetType: | ||
| type: string | ||
| description: Type of asset | ||
| enum: [USDT] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| allOf: | ||
| - $ref: ./BasePaymentAccountInfo.yaml | ||
| - $ref: ./UpiAccountInfo.yaml |
20 changes: 11 additions & 9 deletions
20
openapi/components/schemas/common/PaymentUsAccountInfo.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,13 @@ | ||
| allOf: | ||
| - $ref: ./BasePaymentAccountInfo.yaml | ||
| - $ref: ./UsAccountInfo.yaml | ||
| required: | ||
| - reference | ||
| properties: | ||
| reference: | ||
| type: string | ||
| description: >- | ||
| Unique reference code that must be included with the payment to properly | ||
| credit it | ||
| example: UMA-Q12345-REF | ||
| - type: object | ||
| required: | ||
| - reference | ||
| properties: | ||
| reference: | ||
| type: string | ||
| description: >- | ||
| Unique reference code that must be included with the payment to properly | ||
| credit it | ||
| example: UMA-Q12345-REF |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be a ref?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could make it a ref if you want to create an enum for openapi-generator for webdev.
For external generation via stainless, this results in a distinct type:
https://github.com/stainless-sdks/grid-kotlin/blob/main/grid-kotlin-core/src/main/kotlin/com/grid/api/models/quotes/PaymentInstructions.kt#L4432