Skip to content

Commit

Permalink
Fix return type definition for /chains (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
0237h authored Jun 27, 2024
1 parent dfb76a5 commit e358396
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/types/zod.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export const get_Usage_chains = {
response: z.object({
data: z.array(
z.object({
chain: SupportedChains,
block_num: z.number(),
}),
),
Expand Down
1 change: 1 addition & 0 deletions src/typespec/openapi3.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ interface Usage {
@route("/chains")
@get
chains(...PaginationQueryParams): APIResponse<UsageResponse<{
chain: SupportedChains,
block_num: BlockInfo.block_num;
}[]>>;

Expand Down
4 changes: 4 additions & 0 deletions tsp-output/@typespec/openapi3/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,16 @@
"items": {
"type": "object",
"properties": {
"chain": {
"$ref": "#/components/schemas/SupportedChains"
},
"block_num": {
"type": "integer",
"format": "uint64"
}
},
"required": [
"chain",
"block_num"
]
}
Expand Down

0 comments on commit e358396

Please sign in to comment.