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

chore: prepare release 0.17.1 #930

Merged
merged 1 commit into from
Jan 4, 2024
Merged

chore: prepare release 0.17.1 #930

merged 1 commit into from
Jan 4, 2024

Conversation

dbanty
Copy link
Collaborator

@dbanty dbanty commented Jan 3, 2024

This PR was created by Knope. Merging it will create a new release

Features

Export Unset types from generated types.py (#927)

Generate properties for some boolean enums

If a schema has both type = "boolean" and enum defined, a normal boolean property will now be created.
Previously, the generator would error.

Note that the generate code will not correctly limit the values to the enum values. To work around this, use the
OpenAPI 3.1 const instead of enum to generate Python Literal types.

Thanks for reporting #922 @macmoritz!

Fixes

Do not stop generation for invalid enum values

This generator only supports enum values that are strings or integers.
Previously, this was handled at the parsing level, which would cause the generator to fail if there were any unsupported values in the document.
Now, the generator will correctly keep going, skipping only endpoints which contained unsupported values.

Thanks for reporting #922 @macmoritz!

Fix lists within unions

Fixes #756 and #928. Arrays within unions (which, as of 0.17 includes nullable arrays) would generate invalid code.

Thanks @kgutwin and @diesieben07!

Simplify type checks for non-required unions

@kgutwin
Copy link
Contributor

kgutwin commented Jan 3, 2024

Would you consider including #929? Hopefully it's a pretty easy bug fix to review. Also, I suggest taking a look at #931 because that's also a bug I uncovered from 0.17.0.

@dbanty dbanty merged commit 8505c3c into main Jan 4, 2024
20 checks passed
@dbanty dbanty deleted the release branch January 4, 2024 01:16
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.

Invalid Code is generated for lists inside a union
2 participants