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.12.5
Windows, use WSL
@tanstack-query
MSW
React
Vue
"zod": "^3.22.4"
My OpenApi 3.1
... "LoginDto": { "type": [ "object" ], "properties": { "identifier": { "type": [ "string" ], "minLength": 3, "maxLength": 40 }, "password": { "type": [ "string" ], "minLength": 8, "maxLength": 20 } }, "required": [ "identifier", "password" ] }, ...
My Kubb config:
... createSwaggerZod({ output: { path: './zod', }, group: { type: 'tag' }, }), ...
I recieved:
export const loginDtoSchema = z.object({ identifier: z.string(), password: z.string(), });
Every time
export const loginDtoSchema = z.object({ identifier: z.string().min(3).max(40), password: z.string().min(8).max(20), });
{ "openapi": "3.1.0", "paths": { "/api/auth/login": { "post": { "operationId": "AuthController_login", "summary": "Login user", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginResponseDto" } } } } }, "tags": [ "auth" ] } }, }, "info": { "title": "", "description": "", "version": "0.0.1", "contact": { } }, "tags": [ { "name": "profiles", "description": "" } ], "servers": [], "components": { "securitySchemes": { "bearer": { "scheme": "bearer", "bearerFormat": "JWT", "type": "http" } }, "schemas": { "LoginDto": { "type": [ "object" ], "properties": { "identifier": { "type": [ "string" ], "minLength": 3, "maxLength": 40 }, "password": { "type": [ "string" ], "minLength": 8, "maxLength": 20 } }, "required": [ "identifier", "password" ] }, "LoginResponseDto": { "type": [ "object" ], "properties": { "accessToken": { "type": [ "string" ] } }, "required": [ "accessToken" ] } } } }
I notice that such bug have already appeared and was fixed: #770 (comment) , but I got it. And similar one was with an array: #806 (comment)
The text was updated successfully, but these errors were encountered:
@shatynska We still have some issues with OpenAPI 3.1.0, same for this one. I will have a look later this week to resolve this :)
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
What version of
kubb
is running?2.12.5
What platform is your computer?
Windows, use WSL
What version of external packages are you using(
@tanstack-query
,MSW
,React
,Vue
, ...)"zod": "^3.22.4"
What steps can reproduce the bug?
My OpenApi 3.1
My Kubb config:
I recieved:
How often does this bug happen?
Every time
What is the expected behavior?
Swagger/OpenAPI file?
Additional information
I notice that such bug have already appeared and was fixed: #770 (comment) , but I got it.
And similar one was with an array: #806 (comment)
The text was updated successfully, but these errors were encountered: