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
kubb
2.2.0
MacOS
@tanstack-query
MSW
React
Vue
@kubb/swagger-zod
ZodGenerator ignores minLength and maxLength for string properties like this:
... "properties": { "username": { "maxLength": 100, "minLength": 5, "type": "string" } }, ...
Every time
import { z } from 'zod' export const addUserRequestSchema = z.object({ username: z.string().min(5).max(100) })
{ "openapi": "3.0.1", "info": { "title": "SystemsCrm.Api", "version": "1.0" }, "paths": { "/api/users": { "post": { "requestBody": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/AddUserRequest" } ] } } }, "required": true } }, } }, "components": { "schemas": { "AddUserRequest": { "required": [ "username" ], "type": "object", "properties": { "username": { "maxLength": 100, "minLength": 5, "type": "string" } }, "additionalProperties": false } } } }
No response
The text was updated successfully, but these errors were encountered:
stijnvanhulle
Successfully merging a pull request may close this issue.
What version of
kubb
is running?2.2.0
What platform is your computer?
MacOS
What version of external packages are you using(
@tanstack-query
,MSW
,React
,Vue
, ...)@kubb/swagger-zod
What steps can reproduce the bug?
ZodGenerator ignores minLength and maxLength for string properties like this:
How often does this bug happen?
Every time
What is the expected behavior?
Swagger/OpenAPI file?
Additional information
No response
The text was updated successfully, but these errors were encountered: