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
fix: generate enum definitions for schemas that use anyOf #1522
base: master
Are you sure you want to change the base?
Conversation
@jamietanna I know there are a few issues similar to this one, but this particular one was easy to address. I looked at the other related issues, but they were not as straightforward. |
@grongor Thanks for your input here. It looks like your diff is very similar to the one I have created. Regarding the discriminator: I haven't looked at this at all, so I am not sure what is going on there. There are a few issues around this type of problem that I found here, but this one fixes #1429 (which is the same as the specific issue I was having). I know @jamietanna was working on a fix to a similar, but different problem, too. |
Signed-off-by: Donnie Adams <donnie@acorn.io>
Sorry for the delay. You can ignore the enum thing (it was an issue with the schema, where the discriminator was marked as optional). As for the rest, if I understand it correctly, your changes make sure that all additional types are returned on call to Here is my fork https://github.com/grongor/oapi-codegen/tree/fix-1429, and the commit specifically 5706088. |
Are you saying that your approach fixes both issues? |
Fixes: #1429