Skip to content
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 enum in anyOf #1207

Merged
merged 6 commits into from Aug 29, 2023
Merged

Fix enum in anyOf #1207

merged 6 commits into from Aug 29, 2023

Conversation

ShouheiNishi
Copy link
Contributor

Fix for #1189

@ShouheiNishi ShouheiNishi marked this pull request as ready for review August 24, 2023 04:44
@jamietanna jamietanna modified the milestones: v1.14.0, v1.15.0 Aug 29, 2023
@jamietanna jamietanna merged commit a839952 into deepmap:master Aug 29, 2023
4 checks passed
@ShouheiNishi ShouheiNishi deleted the fix-enum-in-anyOf branch August 30, 2023 00:27
debuggerpk pushed a commit to breuHQ/oapi-codegen that referenced this pull request Sep 18, 2023
…1207)

As mentioned in deepmap#1189, we're seeing issues when trying to generate an
enum type in an `anyOf`, which fails due to trying to reference a type
that hasn't been generated.

This fixes it by determining if there's a type that needs to be
referenced or created.

We can also add `allOf` and `oneOf` to validate the generation is
correct.

Closes deepmap#1189.

Co-authored-by: Jamie Tanna <jamie@jamietanna.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants