-
-
Notifications
You must be signed in to change notification settings - Fork 349
New issue
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
Schema allOf generation does not follow Swagger spec #1570
Comments
I think this is similar to #861 |
Sweet! Yes, that looks to be referring to the same issue. Do you know if the maintainers are looking into that still? Pull request looks pretty dead... (In case anyone else has the same issue, I'm just using |
That PR is way out of date. Probably need a new Pr if you are interested . |
Ditto on this as-well^^ |
@MGabr has kindly submitted a PR |
Is there a planned time for the next version? :) I would benefit a lot from the fix and it seems the two remaining PRs for the the milestone are stalled |
I just pinged @anymaniax about a release |
What are the steps to reproduce this issue?
I want to use Orval to generate an API that uses inheritance. But, my subclass' fields are being generated as optional even though I have marked them as required.
What happens?
Orval generates the following:
What were you expecting to happen?
The fields in the subclass
NewTicketNotificationAllOf
should be required. E.g.They actually are generated as required if I manually add
required
in the properties of the allOf. E.g.But I shouldn't have to do that!
NewTicketNotification
already hasticketId
declared as required. This should supersede the non-required property included in the allOf.Any other comments?
Swagger's editor and codegen tool interpret the YAML correctly so I think I have interpreted the spec correctly! (See pictures)
I presume the parser needs a change to use the oneOf/allOf/anyOf key to make properties required (if needed) or leave them alone if they are already required.
What versions are you using?
Latest code built from Github.
System:
OS: Linux 6.5 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
CPU: (12) x64 AMD Ryzen 5 3600X 6-Core Processor
Memory: 2.69 GB / 15.55 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
The text was updated successfully, but these errors were encountered: