Zod type ZodNonEmptyArray is unsupported by OpenAPI
See original GitHub issueIf output uses z.array().notempty
, Open API won’t start with the message Zod type ZodNonEmptyArray is unsupported
ZodUndefined
also does not work
express-zod-api version is 2.3.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
colinhacks/zod: TypeScript-first schema validation ... - GitHub
With Zod, you declare a validator once and Zod will automatically infer the static TypeScript type. It's easy to compose simpler types into...
Read more >asteasolutions/zod-to-openapi - npm
Start using @asteasolutions/zod-to-openapi in your project by running `npm i ... Zod schema types. Supported types; Unsupported types.
Read more >Validate All the Things with Zod - Atomic Spin
Zod allows us to define a schema, infer types from that schema, then validate based on that schema. If the data doesn't match...
Read more >TypeScript-First Schema Validation with Static Type Inference
Zod is a TypeScript-first schema declaration and validation library. I'm using the term "schema" to broadly refer to any data type, from a...
Read more >io-ts vs zod : r/typescript - Reddit
And 3.1 still lacks adoption. We are on a journey from generating code from openapi specs for our self. It went from generating...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@RobinTail, using ‘in’ is not an elegant solution, because the whole code should be wrapped just because we using one union with an optional field. We already wrapping the access to the field value, because it can be undefined. Additional wrapping just to get it works with Openapi it’s not awesome 😃 Thanks anyway! We will try to reopen the issue after the project deadline and prepare a sample.
Dear @RobinTail , while we prepared a project to reproduce the issue you solved it). I do confirm that problem was in zod dependency. After the update, the issue is solved.