We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug String format (for example date, url, email, etc.) is ignored when it's an item in an array.
Minimal reproduction A minimal OAS document to show this:
openapi: 3.0.0 info: version: 1.0.0 title: Swagger Petstore license: name: MIT servers: - url: 'http://petstore.swagger.io/v1' paths: /example: parameters: [] get: summary: Example tags: [] responses: '200': description: OK content: application/json: schema: type: object properties: date: type: string format: date-time dates: type: array items: type: string format: date-time required: - date - dates
The output is:
const endpoints = makeApi([ { method: "get", path: "/example", alias: "getExample", requestFormat: "json", response: z .object({ date: z.string().datetime({ offset: true }), dates: z.array(z.string()), }) .passthrough(), }, ]);
Expected behavior
When a string is an item in an array it should still have format validation.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
String format (for example date, url, email, etc.) is ignored when it's an item in an array.
Minimal reproduction
A minimal OAS document to show this:
The output is:
Expected behavior
When a string is an item in an array it should still have format validation.
The text was updated successfully, but these errors were encountered: