From 9aeae2a901531a85198e065bd2973e62640c0a9f Mon Sep 17 00:00:00 2001 From: Etienne Donneger Date: Thu, 27 Jun 2024 11:54:02 -0400 Subject: [PATCH] Fix return type definition for `/chains` --- src/types/zod.gen.ts | 1 + src/typespec/openapi3.tsp | 1 + tsp-output/@typespec/openapi3/openapi.json | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/src/types/zod.gen.ts b/src/types/zod.gen.ts index 2cca130..dbde56b 100644 --- a/src/types/zod.gen.ts +++ b/src/types/zod.gen.ts @@ -128,6 +128,7 @@ export const get_Usage_chains = { response: z.object({ data: z.array( z.object({ + chain: SupportedChains, block_num: z.number(), }), ), diff --git a/src/typespec/openapi3.tsp b/src/typespec/openapi3.tsp index 5111946..8077a94 100644 --- a/src/typespec/openapi3.tsp +++ b/src/typespec/openapi3.tsp @@ -113,6 +113,7 @@ interface Usage { @route("/chains") @get chains(...PaginationQueryParams): APIResponse>; diff --git a/tsp-output/@typespec/openapi3/openapi.json b/tsp-output/@typespec/openapi3/openapi.json index 76ec6dd..9c45c1e 100644 --- a/tsp-output/@typespec/openapi3/openapi.json +++ b/tsp-output/@typespec/openapi3/openapi.json @@ -68,12 +68,16 @@ "items": { "type": "object", "properties": { + "chain": { + "$ref": "#/components/schemas/SupportedChains" + }, "block_num": { "type": "integer", "format": "uint64" } }, "required": [ + "chain", "block_num" ] }