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

feat: add missing schema to openapi docs #26

Merged
merged 4 commits into from
Nov 7, 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
22 changes: 21 additions & 1 deletion packages/api/src/api/api.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export class ApiController {
@ApiOperation({ summary: "Fetch the ABI for a given contract address" })
@ApiQuery({
name: "address",
type: String,
description: "The contract address that has a verified source code",
example: constants.verifiedContractAddress,
required: true,
Expand All @@ -101,6 +102,7 @@ export class ApiController {
@ApiOperation({ summary: "Fetch the source code for a given contract address" })
@ApiQuery({
name: "address",
type: String,
description: "The contract address that has a verified source code",
example: constants.verifiedContractAddress,
required: true,
Expand All @@ -118,6 +120,7 @@ export class ApiController {
@ApiOperation({ summary: "Fetch creation details for a list of contract addresses" })
@ApiQuery({
isArray: true,
type: [String],
explode: false,
name: "contractaddresses",
description: "List of contract addresses, up to 5 at a time",
Expand Down Expand Up @@ -150,6 +153,7 @@ export class ApiController {
@ApiOperation({ summary: "Check source code verification submission status" })
@ApiQuery({
name: "guid",
type: String,
description: "Verification ID",
example: "44071",
required: true,
Expand All @@ -167,6 +171,7 @@ export class ApiController {
@ApiOperation({ summary: "Fetch the status for a given transaction hash" })
@ApiQuery({
name: "txhash",
type: String,
description: "The transaction hash to check the execution status",
example: constants.txHash,
required: true,
Expand All @@ -185,6 +190,7 @@ export class ApiController {
@ApiOperation({ summary: "Fetch the receipt status for a given transaction hash" })
@ApiQuery({
name: "txhash",
type: String,
description: "The transaction hash to check the execution status",
example: constants.txHash,
required: true,
Expand All @@ -202,6 +208,7 @@ export class ApiController {
@ApiOperation({ summary: "Retrieve transactions for a given address" })
@ApiQuery({
name: "address",
type: String,
description: "The address to filter transactions by",
example: constants.address,
required: true,
Expand Down Expand Up @@ -274,6 +281,7 @@ export class ApiController {
})
@ApiQuery({
name: "address",
type: String,
description: "The address to filter internal transactions by",
example: constants.addressWithInternalTx,
required: true,
Expand Down Expand Up @@ -313,6 +321,7 @@ export class ApiController {
})
@ApiQuery({
name: "txhash",
type: String,
description: "The transaction hash to filter internal transaction by",
example: constants.addressTxWithInternalTransfers,
required: true,
Expand Down Expand Up @@ -350,6 +359,7 @@ export class ApiController {
@ApiOperation({ summary: "Retrieve the balance for a given address" })
@ApiQuery({
name: "address",
type: String,
description: "The address to get Ether balance for",
example: constants.address,
required: true,
Expand All @@ -367,6 +377,7 @@ export class ApiController {
@ApiOperation({ summary: "Retrieve the balances for a list of addresses" })
@ApiQuery({
isArray: true,
type: [String],
explode: false,
name: "address",
description: "List of addresses to get Ether balance for",
Expand All @@ -386,12 +397,14 @@ export class ApiController {
@ApiOperation({ summary: "Retrieve token balance for a specific address" })
@ApiQuery({
name: "address",
type: String,
description: "The address to get Token balance for",
example: constants.address,
required: true,
})
@ApiQuery({
name: "contractaddress",
type: String,
description: "The Token contract address to get balance for",
example: constants.erc20TokenAddress,
required: true,
Expand All @@ -409,12 +422,14 @@ export class ApiController {
@ApiOperation({ summary: "Retrieve token transfers for a specific address or token contract" })
@ApiQuery({
name: "address",
type: String,
description: "The address to get transfers for",
example: constants.address,
required: false,
})
@ApiQuery({
name: "contractaddress",
type: String,
description: "The Token contract address to get transfers for",
example: constants.erc20TokenAddress,
required: false,
Expand Down Expand Up @@ -452,12 +467,14 @@ export class ApiController {
@ApiOperation({ summary: "Retrieve NFT transfers for a specific address" })
@ApiQuery({
name: "address",
type: String,
description: "The address to get transfers for",
example: constants.erc721TokenHolderAddress,
required: false,
})
@ApiQuery({
name: "contractaddress",
type: String,
description: "The Token contract address to get transfers for",
example: constants.erc721TokenAddress,
required: false,
Expand Down Expand Up @@ -495,6 +512,7 @@ export class ApiController {
@ApiOperation({ summary: "Get list of Blocks Validated by Address" })
@ApiQuery({
name: "address",
type: String,
description: "The address to get validated blocks by",
example: "0x0000000000000000000000000000000000000000",
required: true,
Expand Down Expand Up @@ -523,7 +541,7 @@ export class ApiController {
})
@ApiQuery({
name: "closest",
type: "string",
type: String,
description: "The closest available block to the provided timestamp, either before or after",
example: "before",
required: false,
Expand Down Expand Up @@ -577,6 +595,7 @@ export class ApiController {
@ApiOperation({ summary: "Retrieve the event logs for an address, with optional filtering by block range" })
@ApiQuery({
name: "address",
type: String,
description: "The address to filter logs by",
example: constants.contractAddressWithLogs,
required: true,
Expand Down Expand Up @@ -615,6 +634,7 @@ export class ApiController {
})
@ApiQuery({
name: "contractaddress",
type: String,
description: "The contract address of the ERC-20/ERC-721 token to retrieve token info",
example: constants.tokenAddress,
required: true,
Expand Down
Loading