diff --git a/src/openapi-registry.ts b/src/openapi-registry.ts index 21fac93..c07550b 100644 --- a/src/openapi-registry.ts +++ b/src/openapi-registry.ts @@ -107,6 +107,8 @@ type ZodObjectWithEffect = ZodObject | ZodPipe; export type RouteParameter = ZodObjectWithEffect | undefined; +export type StatusCode = string | number; + export type RouteConfig = Omit & { method: Method; path: string; @@ -118,7 +120,7 @@ export type RouteConfig = Omit & { headers?: RouteParameter | ZodType[]; }; responses: { - [statusCode: string]: ResponseConfig | ReferenceObject; + [statusCode: StatusCode]: ResponseConfig | ReferenceObject; }; };