From e6fb6ee03be2a00bce27baf4e5e8843ecc57c619 Mon Sep 17 00:00:00 2001 From: GitHub Date: Thu, 4 Jan 2024 00:36:20 +0000 Subject: [PATCH] chore: prepare release 0.17.1 --- ...stop_generation_for_invalid_enum_values.md | 11 ------ .changeset/fix_lists_within_unions.md | 9 ----- ...erate_properties_for_some_boolean_enums.md | 13 ------- ...ify_type_checks_for_non_required_unions.md | 5 --- CHANGELOG.md | 34 +++++++++++++++++++ pyproject.toml | 2 +- 6 files changed, 35 insertions(+), 39 deletions(-) delete mode 100644 .changeset/do_not_stop_generation_for_invalid_enum_values.md delete mode 100644 .changeset/fix_lists_within_unions.md delete mode 100644 .changeset/generate_properties_for_some_boolean_enums.md delete mode 100644 .changeset/simplify_type_checks_for_non_required_unions.md diff --git a/.changeset/do_not_stop_generation_for_invalid_enum_values.md b/.changeset/do_not_stop_generation_for_invalid_enum_values.md deleted file mode 100644 index 15729be33..000000000 --- a/.changeset/do_not_stop_generation_for_invalid_enum_values.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -default: patch ---- - -# 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! diff --git a/.changeset/fix_lists_within_unions.md b/.changeset/fix_lists_within_unions.md deleted file mode 100644 index d119fad4b..000000000 --- a/.changeset/fix_lists_within_unions.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -default: patch ---- - -# 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! diff --git a/.changeset/generate_properties_for_some_boolean_enums.md b/.changeset/generate_properties_for_some_boolean_enums.md deleted file mode 100644 index f1f47cd65..000000000 --- a/.changeset/generate_properties_for_some_boolean_enums.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -default: minor ---- - -# 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! diff --git a/.changeset/simplify_type_checks_for_non_required_unions.md b/.changeset/simplify_type_checks_for_non_required_unions.md deleted file mode 100644 index 2bfaee23a..000000000 --- a/.changeset/simplify_type_checks_for_non_required_unions.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: patch ---- - -# Simplify type checks for non-required unions diff --git a/CHANGELOG.md b/CHANGELOG.md index ad6a0de51..7b5bb52a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,40 @@ Programmatic usage of this project (e.g., importing it as a Python module) and t 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). +## 0.17.1 (2024-01-04) + +### 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 + ## 0.17.0 (2023-12-31) ### Breaking Changes diff --git a/pyproject.toml b/pyproject.toml index 7a783873b..5d313f143 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "openapi-python-client" -version = "0.17.0" +version = "0.17.1" description = "Generate modern Python clients from OpenAPI" repository = "https://github.com/triaxtec/openapi-python-client" license = "MIT"