Skip to content
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

chore: required after properties and regen #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions generated/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.openapi-generator-ignore
apis/DefaultApi.ts
apis/index.ts
index.ts
Expand Down
10 changes: 6 additions & 4 deletions generated/models/PlatformFee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,22 @@ export interface PlatformFee {
* @type {string}
* @memberof PlatformFee
*/
amount?: string;
amount: string;
/**
*
* @type {number}
* @memberof PlatformFee
*/
feeBps?: number;
feeBps: number;
}

/**
* Check if a given object implements the PlatformFee interface.
*/
export function instanceOfPlatformFee(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "amount" in value;
isInstance = isInstance && "feeBps" in value;

return isInstance;
}
Expand All @@ -52,8 +54,8 @@ export function PlatformFeeFromJSONTyped(json: any, ignoreDiscriminator: boolean
}
return {

'amount': !exists(json, 'amount') ? undefined : json['amount'],
'feeBps': !exists(json, 'feeBps') ? undefined : json['feeBps'],
'amount': json['amount'],
'feeBps': json['feeBps'],
};
}

Expand Down
5 changes: 3 additions & 2 deletions generated/models/SwapInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export interface SwapInfo {
* @type {string}
* @memberof SwapInfo
*/
label?: string;
label: string;
/**
*
* @type {string}
Expand Down Expand Up @@ -75,6 +75,7 @@ export interface SwapInfo {
export function instanceOfSwapInfo(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "ammKey" in value;
isInstance = isInstance && "label" in value;
isInstance = isInstance && "inputMint" in value;
isInstance = isInstance && "outputMint" in value;
isInstance = isInstance && "inAmount" in value;
Expand All @@ -96,7 +97,7 @@ export function SwapInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean):
return {

'ammKey': json['ammKey'],
'label': !exists(json, 'label') ? undefined : json['label'],
'label': json['label'],
'inputMint': json['inputMint'],
'outputMint': json['outputMint'],
'inAmount': json['inAmount'],
Expand Down
46 changes: 25 additions & 21 deletions swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,6 @@ components:

QuoteResponse:
type: object
required:
- inputMint
- outputMint
- inAmount
- outAmount
- otherAmountThreshold
- swapMode
- slippageBps
- priceImpactPct
- routePlan
properties:
inputMint:
type: string
Expand Down Expand Up @@ -174,6 +164,16 @@ components:
type: number
timeTaken:
type: number
required:
- inputMint
- outputMint
- inAmount
- outAmount
- otherAmountThreshold
- swapMode
- slippageBps
- priceImpactPct
- routePlan

SwapMode:
type: string
Expand All @@ -189,6 +189,9 @@ components:
feeBps:
type: integer
format: int32
required:
- amount
- feeBps

RoutePlanStep:
type: object
Expand All @@ -204,14 +207,6 @@ components:

SwapInfo:
type: object
required:
- ammKey
- inputMint
- outputMint
- inAmount
- outAmount
- feeAmount
- feeMint
properties:
ammKey:
type: string
Expand All @@ -229,12 +224,18 @@ components:
type: string
feeMint:
type: string
required:
- ammKey
- label
- inputMint
- outputMint
- inAmount
- outAmount
- feeAmount
- feeMint

SwapRequest:
type: object
required:
- userPublicKey
- quoteResponse
properties:
userPublicKey:
description: The user public key.
Expand Down Expand Up @@ -262,6 +263,9 @@ components:
type: string
quoteResponse:
$ref: '#/components/schemas/QuoteResponse'
required:
- userPublicKey
- quoteResponse

SwapResponse:
type: object
Expand Down