Skip to content

Commit 8505c3c

Browse files
dbantyGitHub
and
GitHub
authored
chore: prepare release 0.17.1 (#930)
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 Co-authored-by: GitHub <[email protected]>
1 parent 2247d2f commit 8505c3c

6 files changed

+35
-39
lines changed

.changeset/do_not_stop_generation_for_invalid_enum_values.md

-11
This file was deleted.

.changeset/fix_lists_within_unions.md

-9
This file was deleted.

.changeset/generate_properties_for_some_boolean_enums.md

-13
This file was deleted.

.changeset/simplify_type_checks_for_non_required_unions.md

-5
This file was deleted.

CHANGELOG.md

+34
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,40 @@ Programmatic usage of this project (e.g., importing it as a Python module) and t
1313

1414
The 0.x prefix used in versions for this project is to indicate that breaking changes are expected frequently (several times a year). Breaking changes will increment the minor number, all other changes will increment the patch number. You can track the progress toward 1.0 [here](https://github.com/openapi-generators/openapi-python-client/projects/2).
1515

16+
## 0.17.1 (2024-01-04)
17+
18+
### Features
19+
20+
#### Export `Unset` types from generated `types.py` (#927)
21+
22+
#### Generate properties for some boolean enums
23+
24+
If a schema has both `type = "boolean"` and `enum` defined, a normal boolean property will now be created.
25+
Previously, the generator would error.
26+
27+
Note that the generate code _will not_ correctly limit the values to the enum values. To work around this, use the
28+
OpenAPI 3.1 `const` instead of `enum` to generate Python `Literal` types.
29+
30+
Thanks for reporting #922 @macmoritz!
31+
32+
### Fixes
33+
34+
#### Do not stop generation for invalid enum values
35+
36+
This generator only supports `enum` values that are strings or integers.
37+
Previously, this was handled at the parsing level, which would cause the generator to fail if there were any unsupported values in the document.
38+
Now, the generator will correctly keep going, skipping only endpoints which contained unsupported values.
39+
40+
Thanks for reporting #922 @macmoritz!
41+
42+
#### Fix lists within unions
43+
44+
Fixes #756 and #928. Arrays within unions (which, as of 0.17 includes nullable arrays) would generate invalid code.
45+
46+
Thanks @kgutwin and @diesieben07!
47+
48+
#### Simplify type checks for non-required unions
49+
1650
## 0.17.0 (2023-12-31)
1751

1852
### Breaking Changes

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "openapi-python-client"
3-
version = "0.17.0"
3+
version = "0.17.1"
44
description = "Generate modern Python clients from OpenAPI"
55
repository = "https://github.com/triaxtec/openapi-python-client"
66
license = "MIT"

0 commit comments

Comments
 (0)