Skip to content

Commit 9e621e2

Browse files
committed
Temp: workaround for extenral bug, with todo.
1 parent da73c67 commit 9e621e2

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

example/endpoints/retrieve-user.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ export const retrieveUserEndpoint = defaultEndpointsFactory
2929
output: z.object({
3030
id: z.int().nonnegative(),
3131
name: z.string(),
32-
features: feature.array(),
32+
/**
33+
* @todo rm .optional() when external bug fixed
34+
* @link https://github.com/colinhacks/zod/issues/4592
35+
*/
36+
features: feature.array().optional(),
3337
}),
3438
handler: async ({ input: { id }, options: { method }, logger }) => {
3539
logger.debug(`Requested id: ${id}, method ${method}`);

example/example.client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type GetV1UserRetrievePositiveVariant1 = {
1717
data: {
1818
id: number;
1919
name: string;
20-
features: Type1[];
20+
features?: Type1[] | undefined;
2121
};
2222
};
2323

example/example.documentation.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ paths:
4646
required:
4747
- id
4848
- name
49-
- features
5049
additionalProperties: false
5150
required:
5251
- status

0 commit comments

Comments
 (0)