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

BigInt flags for strings in Swagger #502

Merged
merged 1 commit into from
Oct 10, 2024
Merged
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
69 changes: 54 additions & 15 deletions api/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1456,6 +1456,7 @@ paths:
required: true
schema:
type: string
x-js-format: bigint
example: "1000000000"
- in: query
name: ticker
Expand Down Expand Up @@ -3394,6 +3395,7 @@ components:
example: 13
value:
type: string
x-js-format: bigint
example: "10000000000"
BlockValueFlow:
type: object
Expand Down Expand Up @@ -3462,7 +3464,8 @@ components:
format: int32
shard:
type: string
example: 8000000000000000
# x-js-format: bigint ???
example: "8000000000000000"
seqno:
mr-tron marked this conversation as resolved.
Show resolved Hide resolved
type: integer
example: 21734019
Expand All @@ -3481,12 +3484,12 @@ components:
type: array
items:
type: string
example: [ (0,4234235,8000000000000000) ]
example: "[ (0,4234235,8000000000000000) ]"
parent:
type: array
items:
type: string
example: [ (0,21734018,8000000000000000) ]
example: "[ (0,21734018,8000000000000000) ]"
BlockchainBlock:
type: object
required:
Expand Down Expand Up @@ -3529,7 +3532,8 @@ components:
format: int32
shard:
type: string
example: 8000000000000000
# x-js-format: bigint ???
example: "8000000000000000"
seqno:
type: integer
example: 21734019
Expand Down Expand Up @@ -3750,6 +3754,7 @@ components:
example: 5681002
op_code:
type: string
x-js-format: bigint
example: "0xdeadbeaf"
init:
$ref: '#/components/schemas/StateInit'
Expand Down Expand Up @@ -4208,10 +4213,10 @@ components:
example: 1000000
zerostate_root_hash:
type: string
example: 1000000
example: "131D0C65055F04E9C19D687B51BC70F952FD9CA6F02C2801D3B89964A779DF85"
zerostate_file_hash:
type: string
example: 1000000
example: "A6A0BD6608672B11B79538A50B2204E748305C12AA0DED9C16CF0006CE3AF8DB"
version:
type: integer
format: int64
Expand Down Expand Up @@ -4328,6 +4333,7 @@ components:
type: integer
total_weight:
type: string
x-js-format: bigint
example: "1152921504606846800"
list:
type: array
Expand All @@ -4345,6 +4351,7 @@ components:
x-js-format: bigint
adnl_addr:
type: string
example: "45061C1D4EC44A937D0318589E13C73D151D1CEF5D3C0E53AFBCF56A6C2FE2BD"
Oracle:
type: object
required:
Expand Down Expand Up @@ -4541,6 +4548,8 @@ components:
type: object
additionalProperties:
type: string
# x-js-format: bigint ???
# example ???
code:
type: string
format: cell
Expand Down Expand Up @@ -4678,6 +4687,8 @@ components:
example: 0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf
amount:
type: string
# x-js-format: bigint
# example: "1000000" nanocoins or decimal ?
description: "Number of nanocoins to send. Decimal string."
payload:
type: string
Expand All @@ -4702,8 +4713,9 @@ components:
example: 0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf
commission:
type: string
description: "Commission for the transaction. In nanocoins."
x-js-format: bigint
example: "1000000"
description: "Commission for the transaction. In nanocoins."
from:
type: string
format: address
Expand Down Expand Up @@ -4855,6 +4867,8 @@ components:
format: int64
amount:
type: string
# x-js-format: bigint
# example: "1000000"
"8":
type: object
description: The network version and additional capabilities supported by the validators.
Expand Down Expand Up @@ -4994,10 +5008,16 @@ components:
properties:
min_stake:
type: string
# x-js-format: bigint
# example: "1000000"
max_stake:
type: string
# x-js-format: bigint
# example: "1000000"
min_total_stake:
type: string
# x-js-format: bigint
# example: "1000000"
max_stake_factor:
type: integer
format: int64
Expand Down Expand Up @@ -5370,7 +5390,8 @@ components:
properties:
balance:
type: string
example: 597968399
x-js-format: bigint
example: "597968399"
price:
$ref: '#/components/schemas/TokenRates'
wallet_address:
Expand All @@ -5392,7 +5413,8 @@ components:
properties:
amount:
type: string
example: 597968399
x-js-format: bigint
example: "597968399"
till:
type: integer
format: int64
Expand All @@ -5414,6 +5436,7 @@ components:
properties:
value:
type: string
x-js-format: bigint
example: "123000000000"
token_name:
type: string
Expand Down Expand Up @@ -5817,6 +5840,7 @@ components:
example: "NftTransfer or 0x35d95a12"
payload:
type: string
# example ??, maybe cell?
refund:
$ref: '#/components/schemas/Refund'
DomainRenewAction:
Expand Down Expand Up @@ -5848,6 +5872,7 @@ components:
$ref: '#/components/schemas/AccountAddress'
amount:
type: string
x-js-format: bigint
description: amount in minimal particles
example: "123456789"
type:
Expand Down Expand Up @@ -5878,6 +5903,7 @@ components:
$ref: '#/components/schemas/AccountAddress'
amount:
type: string
x-js-format: bigint
description: amount in minimal particles
example: "123456789"
comment:
Expand Down Expand Up @@ -5940,8 +5966,9 @@ components:
example: 0:E93E7D444180608B8520C00DC664383A387356FB6E16FDDF99DBE5E1415A574B
amount:
type: string
x-js-format: bigint
example: "1000000000"
description: amount in quanta of tokens
example: 1000000000
comment:
type: string
example: "Hi! This is your salary. \nFrom accounting with love."
Expand All @@ -5967,8 +5994,9 @@ components:
example: 0:E93E7D444180608B8520C00DC664383A387356FB6E16FDDF99DBE5E1415A574B
amount:
type: string
x-js-format: bigint
example: "1000000000"
description: amount in quanta of tokens
example: 1000000000
jetton:
$ref: '#/components/schemas/JettonPreview'
JettonMintAction:
Expand All @@ -5987,8 +6015,9 @@ components:
example: 0:E93E7D444180608B8520C00DC664383A387356FB6E16FDDF99DBE5E1415A574B
amount:
type: string
x-js-format: bigint
example: "1000000000"
description: amount in quanta of tokens
example: 1000000000
jetton:
$ref: '#/components/schemas/JettonPreview'
ContractDeployAction:
Expand Down Expand Up @@ -6171,9 +6200,11 @@ components:
- megatonfi
amount_in:
type: string
x-js-format: bigint
example: "1660050553"
amount_out:
type: string
x-js-format: bigint
example: "1660050553"
ton_in:
type: integer
Expand Down Expand Up @@ -6617,6 +6648,7 @@ components:
properties:
quantity:
type: string
x-js-format: bigint
example: "597968399"
wallet_address:
$ref: '#/components/schemas/AccountAddress'
Expand Down Expand Up @@ -6727,6 +6759,7 @@ components:
example: "nft_transfer"
op_code:
type: string
x-js-format: bigint
example: "0xdeadbeaf"
decoded_body: { } # Free-form JSON value
mode:
Expand Down Expand Up @@ -6844,6 +6877,7 @@ components:
example: "nano"
balance:
type: string
x-js-format: bigint
example: "1000000000"
decimals:
type: integer
Expand Down Expand Up @@ -6872,6 +6906,7 @@ components:
example: true
total_supply:
type: string
x-js-format: bigint
example: "5887105890579978"
admin:
$ref: '#/components/schemas/AccountAddress'
Expand Down Expand Up @@ -6906,6 +6941,7 @@ components:
$ref: '#/components/schemas/AccountAddress'
balance:
type: string
x-js-format: bigint
example: "168856200518084"
description: balance in the smallest jetton's units
total:
Expand All @@ -6920,12 +6956,14 @@ components:
properties:
custom_payload:
type: string
description: "hex-encoded BoC"
# format: ???
example: "b5ee9c72410212010001b40009460395b521c9251151ae7987e03c544bd275d6cd42c2d157f840beb14d5454b96718000d012205817002020328480101fd7f6a648d4f771d7f0abc1707e4e806b19de1801f65eb8c133a4cfb0c33d847000b22012004052848010147da975b922d89192f4c9b68a640daa6764ec398c93cec025e17f0c1852a711a0009220120061122012007082848010170d9fb0423cbef6c2cf1f3811a2f640daf8c9a326b6f8816c1b993e90d88e2100006220120090a28480101f6df1d75f6b9e45f224b2cb4fc2286d927d47b468b6dbf1fedc4316290ec2ae900042201200b102201200c0f2201200d"
description: "hex-encoded BoC"
state_init:
type: string
description: "hex-encoded BoC"
# format: ???
example: "b5ee9c72410212010001b40009460395b521c9251151ae7987e03c544bd275d6cd42c2d157f840beb14d5454b96718000d012205817002020328480101fd7f6a648d4f771d7f0abc1707e4e806b19de1801f65eb8c133a4cfb0c33d847000b22012004052848010147da975b922d89192f4c9b68a640daa6764ec398c93cec025e17f0c1852a711a0009220120061122012007082848010170d9fb0423cbef6c2cf1f3811a2f640daf8c9a326b6f8816c1b993e90d88e2100006220120090a28480101f6df1d75f6b9e45f224b2cb4fc2286d927d47b468b6dbf1fedc4316290ec2ae900042201200b102201200c0f2201200d"
description: "hex-encoded BoC"
AccountStaking:
type: object
required:
Expand Down Expand Up @@ -7185,7 +7223,8 @@ components:
format: int32
shard:
type: string
example: 800000000000000
# x-js-format: bigint ??
example: "800000000000000"
seqno:
type: integer
example: 30699640
Expand Down
Loading