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
With the new addition of Zod 3.23 it introduced the local properties in the datetime.
const schema = z.string().datetime({ local: true }); schema.parse("2022-01-01T12:00:00"); // OK
This will be helpful for parsing ISO8601 date without any Z (Zulu specified).
No response
Adding a flag of local in the lo
createSwaggerZod({ dateConfig: { type: 'false'| 'string' | 'stringOffset' | 'date' | , local: true, }, }),
The text was updated successfully, but these errors were encountered:
Kubb version 2.13.3 will resolve this.
2.13.3
A new type for dateType called stringLocal has been added, see https://docs.kubb.dev/plugins/swagger-zod/#datetype.
dateType
stringLocal
import { defineConfig } from '@kubb/core' import { definePlugin as createSwagger } from '@kubb/swagger' import { definePlugin as createSwaggerZod } from '@kubb/swagger-zod' export default defineConfig({ input: { path: './petStore.yaml', }, output: { path: './src/gen', }, plugins: [ createSwagger({ output: false }), createSwaggerZod({ dateType: 'stringLocal', }), ], })
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
What is the problem this feature would solve?
With the new addition of Zod 3.23 it introduced the local properties in the datetime.
This will be helpful for parsing ISO8601 date without any Z (Zulu specified).
External documents/projects?
No response
What is the feature you are proposing to solve the problem?
Adding a flag of local in the lo
What alternatives have you considered?
No response
The text was updated successfully, but these errors were encountered: