Open wiz-tajima opened 1 year ago
@wiz-tajima thank you for reporting. I'd definitely have to investigate this to give a full answer since this is a generic logic that we use everywhere across the "generator". I'd have to figure out if description is the only invalid field or if there are any. And what should be the correct way to handle those (if it is incorrect to start with)
I often assign a schema with "shape", but sometimes it will make building wrong allOf schema. For example, I've written this zod schema:
and registry this. Then, it will build this strange allOf:
This isn't correct OpenApi schema, so this makes wrong when pass for a library: orval.
I've researched the matter, and I found dubious behavior on function named "generateSimpleSchema". generateSimpleSchema has this code:
And I found the variable "newMetadata", can be assigned description.
I think description mustn't be included in allOf. How can I do to resolve this problem?