From e7b68cf24b4c1f081f05bce4d22322a45e6ce257 Mon Sep 17 00:00:00 2001 From: "knope-bot[bot]" <152252888+knope-bot[bot]@users.noreply.github.com> Date: Sat, 7 Sep 2024 21:53:47 +0000 Subject: [PATCH] Release 0.21.5 --- ...fault_values_for_properties_of_any_type.md | 5 ---- .changeset/improved_property_merging.md | 20 ------------- .changeset/no_properties_fix.md | 7 ----- CHANGELOG.md | 29 +++++++++++++++++++ pyproject.toml | 2 +- 5 files changed, 30 insertions(+), 33 deletions(-) delete mode 100644 .changeset/allow_default_values_for_properties_of_any_type.md delete mode 100644 .changeset/improved_property_merging.md delete mode 100644 .changeset/no_properties_fix.md diff --git a/.changeset/allow_default_values_for_properties_of_any_type.md b/.changeset/allow_default_values_for_properties_of_any_type.md deleted file mode 100644 index 9b1a93bf7..000000000 --- a/.changeset/allow_default_values_for_properties_of_any_type.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: patch ---- - -# Allow default values for properties of `Any` type diff --git a/.changeset/improved_property_merging.md b/.changeset/improved_property_merging.md deleted file mode 100644 index 68f3b9ed4..000000000 --- a/.changeset/improved_property_merging.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -default: minor ---- - -# Improved property-merging behavior with `allOf` - -When using `allOf` to extend a base object type, `openapi-python-client` is now able to handle some kinds of modifications to an existing property that would have previously caused an error: - -- Overriding attributes that do not affect validation, such as `description`. -- Combining properties that this generator ignores, like `maxLength` or `pattern`. -- Combining a generic numeric type with `int` (resulting in `int`). -- Adding a `format` to a string. -- Combining `any` with a specific type (resulting in that specific type). -- Adding or overriding a `default` - -> [!NOTE] -> `pattern` and `max_length` are no longer fields on `StringProperty`, which may impact custom templates. - -This also fixes a bug where properties of inline objects (as opposed to references) were not using the -merge logic, but were simply overwriting previous definitions of the same property. diff --git a/.changeset/no_properties_fix.md b/.changeset/no_properties_fix.md deleted file mode 100644 index 9b38ad1ba..000000000 --- a/.changeset/no_properties_fix.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -default: patch ---- - -# Produce valid code for an object that has no properties at all - -Fixed by PR #1109. Thanks @eli-bl! diff --git a/CHANGELOG.md b/CHANGELOG.md index fba4067f0..cba930eed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,35 @@ 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.21.5 (2024-09-07) + +### Features + +#### Improved property-merging behavior with `allOf` + +When using `allOf` to extend a base object type, `openapi-python-client` is now able to handle some kinds of modifications to an existing property that would have previously caused an error: + +- Overriding attributes that do not affect validation, such as `description`. +- Combining properties that this generator ignores, like `maxLength` or `pattern`. +- Combining a generic numeric type with `int` (resulting in `int`). +- Adding a `format` to a string. +- Combining `any` with a specific type (resulting in that specific type). +- Adding or overriding a `default` + +> [!NOTE] +> `pattern` and `max_length` are no longer fields on `StringProperty`, which may impact custom templates. + +This also fixes a bug where properties of inline objects (as opposed to references) were not using the +merge logic, but were simply overwriting previous definitions of the same property. + +### Fixes + +- Allow default values for properties of `Any` type + +#### Produce valid code for an object that has no properties at all + +Fixed by PR #1109. Thanks @eli-bl! + ## 0.21.4 (2024-08-25) ### Fixes diff --git a/pyproject.toml b/pyproject.toml index e2058e058..6e196ec39 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ dependencies = [ "typing-extensions>=4.8.0,<5.0.0", ] name = "openapi-python-client" -version = "0.21.4" +version = "0.21.5" description = "Generate modern Python clients from OpenAPI" keywords = [ "OpenAPI",