William Pieri de Lima
William Pieri de Lima
I have a Turborepo setup with a shared components package. Inside that package, I installed nuqs and use it in some components. These components are only consumed inside my main...
@kibertoad the #195 really solves this problem
The `@fastify/swagger` currently uses openapi `v3.0.3` by default when not specified, maybe this is a point to consider
@Bram-dc I tested it and it generated the following warnings in another package which generates typing and functions through OpenAPI: ```typescript ❗️ Transformers warning: schema {"accessScopes":["both"],"items":[{"accessScopes":["both"],"type":"string"},{"type":"enum","accessScopes":["both"],"items" :[{"accessScopes":["both"],"type":"null","const":null}]}],"logicalOperator":"or"} is too complex...
@Bram-dc the problem in this case is exactly in response 201, being the image, where it is being passed as `z.ZodNullable` OpenAPI: ```typescript {"openapi":"3.0.3","info":{"title":"test","description":"test","version":"1.0.0"},"components":{"securitySchemes":{"authorization":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{}},"paths":{"/v1/staff-users":{"post":{"operationId":"createStaffUser","summary":"createStaffUser","tags":["Staff Users"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":"string"},"role":{"type":"string","enum":["Administrador","Comercial","Financeiro","Operacional","Usuário"]},"isAccountExecutive":{"type":"boolean"}},"required":["email","name","role"]}}},"required":true},"security":[{"authorization":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"staffUser":{"type":"object","properties":{"id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"email":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["Administrador","Comercial","Financeiro","Operacional","Usuário"]},"image":{"anyOf":[{"type":"string"},{"nullable":true,"enum":[null]}]},"isAccountExecutive":{"type":"boolean"},"isDisabled":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","email","name","role","image","isAccountExecutive","isDisabled","createdAt","updatedAt"],"additionalProperties":false}},"required":["staffUser"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","properties":{"url":{"type":"string"},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"issues":{"type":"array","items":{}}},"required":["url","method"],"additionalProperties":false}},"required":["error","message","details"],"additionalProperties":false}}}}}}}}} ``` Warning: ```typescript...
@Bram-dc When using `"@marcalexiei/fastify-type-provider-zod": "^1.0.5"` this problem does not occur
@Bram-dc I tested it and the problem remains the same
The issue was actually the symbolic links created in .next/node_modules. Adjusting the compression command solved the problem. Thanks!