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

Implement Pagination for Asset Retrieval #66

Merged
merged 10 commits into from
Nov 27, 2023
227 changes: 175 additions & 52 deletions backend/docs/docs.go

Large diffs are not rendered by default.

224 changes: 174 additions & 50 deletions backend/docs/swagger.json

Large diffs are not rendered by default.

181 changes: 131 additions & 50 deletions backend/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,82 +51,82 @@ definitions:
type: object
entity.Currency:
properties:
anchorAsset:
anchor_asset:
type: string
anchorAssetType:
anchor_asset_type:
type: string
approvalCriteria:
approval_criteria:
type: string
approvalServer:
approval_server:
type: string
attestationOfReserve:
attestation_of_reserve:
type: string
code:
type: string
collateralAddressMessages:
collateral_address_messages:
items:
type: string
type: array
collateralAddressSignatures:
collateral_address_signatures:
items:
type: string
type: array
collateralAddresses:
collateral_addresses:
items:
type: string
type: array
conditions:
type: string
description:
desc:
type: string
displayDecimals:
display_decimals:
type: integer
fixedNumber:
fixed_number:
type: integer
image:
type: string
isAssetAnchored:
is_asset_anchored:
type: boolean
isUnlimited:
is_unlimited:
type: boolean
issuer:
type: string
maxNumber:
max_number:
type: integer
name:
type: string
redemptionInstructions:
redemption_instructions:
type: string
regulated:
type: boolean
type: object
entity.Documentation:
properties:
orgDBA:
ORG_DBA:
type: string
orgDescription:
ORG_DESCRIPTION:
type: string
orgGithub:
ORG_GITHUB:
type: string
orgKeybase:
ORG_KEYBASE:
type: string
orgLogo:
ORG_LOGO:
type: string
orgName:
ORG_NAME:
type: string
orgOfficialEmail:
ORG_OFFICIAL_EMAIL:
type: string
orgPhoneNumber:
ORG_PHONE_NUMBER:
type: string
orgPhoneNumberAttestation:
ORG_PHONE_NUMBER_ATTESTATION:
type: string
orgPhysicalAddress:
ORG_PHYSICAL_ADDRESS:
type: string
orgPhysicalAddressAttestation:
ORG_PHYSICAL_ADDRESS_ATTESTATION:
type: string
orgTwitter:
ORG_TWITTER:
type: string
orgURL:
ORG_URL:
type: string
type: object
entity.Key:
Expand Down Expand Up @@ -197,15 +197,15 @@ definitions:
type: string
github:
type: string
idphotoHash:
id_photo_hash:
type: string
keybase:
type: string
name:
type: string
twitter:
type: string
verificationPhotoHash:
verification_photo_hash:
type: string
type: object
entity.Role:
Expand Down Expand Up @@ -269,35 +269,35 @@ definitions:
type: object
entity.TomlData:
properties:
accounts:
ACCOUNTS:
items:
type: string
type: array
currencies:
CURRENCIES:
items:
$ref: '#/definitions/entity.Currency'
type: array
documentation:
DOCUMENTATION:
$ref: '#/definitions/entity.Documentation'
federationServer:
FEDERATION_SERVER:
type: string
horizonURL:
HORIZON_URL:
type: string
networkPassphrase:
NETWORK_PASSPHRASE:
type: string
principals:
PRINCIPALS:
items:
$ref: '#/definitions/entity.Principal'
type: array
signingKey:
SIGNING_KEY:
type: string
transferServer:
TRANSFER_SERVER:
type: string
validators:
VALIDATORS:
items:
$ref: '#/definitions/entity.Validator'
type: array
version:
VERSION:
type: string
type: object
entity.User:
Expand Down Expand Up @@ -352,15 +352,15 @@ definitions:
type: object
entity.Validator:
properties:
alias:
ALIAS:
type: string
displayName:
DISPLAY_NAME:
type: string
history:
HISTORY:
type: string
host:
HOST:
type: string
publicKey:
PUBLIC_KEY:
type: string
type: object
entity.Vault:
Expand Down Expand Up @@ -774,7 +774,16 @@ paths:
get:
consumes:
- application/json
description: Get all assets
description: Get all assets with optional pagination
parameters:
- description: Page number
in: query
name: page
type: integer
- description: Number of items per page
in: query
name: limit
type: integer
produces:
- application/json
responses:
Expand Down Expand Up @@ -1048,6 +1057,31 @@ paths:
summary: Mint an asset
tags:
- Assets
/assets/toml:
get:
consumes:
- application/json
description: Get TOML data
parameters:
- description: Asset issuer
in: path
name: asset_issuer
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/entity.TomlData'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/v1.response'
summary: Get TOML data
tags:
- Assets
/assets/transfer:
post:
consumes:
Expand Down Expand Up @@ -1146,6 +1180,40 @@ paths:
summary: Create a new contract
tags:
- Contract
/contracts:
get:
consumes:
- application/json
description: Retrieve a list of all contracts, with optional pagination
parameters:
- description: Page number for pagination
in: query
name: page
type: integer
- description: Number of items per page for pagination
in: query
name: limit
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/entity.Contract'
type: array
"400":
description: Invalid query parameters
schema:
$ref: '#/definitions/v1.response'
"500":
description: Internal server error
schema:
$ref: '#/definitions/v1.response'
summary: Get all contracts
tags:
- Contract
/log_transactions:
get:
consumes:
Expand Down Expand Up @@ -1943,7 +2011,16 @@ paths:
get:
consumes:
- application/json
description: Get all vault
description: Retrieve a list of all vaults, with optional pagination
parameters:
- description: Page number for pagination
in: query
name: page
type: integer
- description: Number of items per page for pagination
in: query
name: limit
type: integer
produces:
- application/json
responses:
Expand All @@ -1953,11 +2030,15 @@ paths:
items:
$ref: '#/definitions/entity.Vault'
type: array
"400":
description: Invalid query parameters
schema:
$ref: '#/definitions/v1.response'
"500":
description: Internal Server Error
description: Internal server error
schema:
$ref: '#/definitions/v1.response'
summary: Get all vault
summary: Get all vaults
tags:
- Vault
/wallets:
Expand Down
Loading
Loading