diff --git a/.changeset/raise_minimum_httpx_version_to_023.md b/.changeset/raise_minimum_httpx_version_to_023.md deleted file mode 100644 index 74ecc6366..000000000 --- a/.changeset/raise_minimum_httpx_version_to_023.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -default: major ---- - -# Raise minimum httpx version to 0.23 diff --git a/.changeset/removed_ability_to_set_an_array_as_a_multipart_body.md b/.changeset/removed_ability_to_set_an_array_as_a_multipart_body.md deleted file mode 100644 index 1d12888ee..000000000 --- a/.changeset/removed_ability_to_set_an_array_as_a_multipart_body.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -default: major ---- - -# Removed ability to set an array as a multipart body - -Previously, when defining a request's body as `multipart/form-data`, the generator would attempt to generate code -for both `object` schemas and `array` schemas. However, most arrays could not generate valid multipart bodies, as -there would be no field names (required to set the `Content-Disposition` headers). - -The code to generate any body for `multipart/form-data` where the schema is `array` has been removed, and any such -bodies will be skipped. This is not _expected_ to be a breaking change in practice, since the code generated would -probably never work. - -If you have a use-case for `multipart/form-data` with an `array` schema, please [open a new discussion](https://github.com/openapi-generators/openapi-python-client/discussions) with an example schema and the desired functional Python code. diff --git a/.changeset/repeat_array_fields_in_multipart_instead_of_serializing_as_json.md b/.changeset/repeat_array_fields_in_multipart_instead_of_serializing_as_json.md deleted file mode 100644 index 072ec3a6c..000000000 --- a/.changeset/repeat_array_fields_in_multipart_instead_of_serializing_as_json.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -default: major ---- - -# Change default multipart array serialization - -Previously, any arrays of values in a `multipart/form-data` body would be serialized as an `application/json` part. -This matches the default behavior specified by OpenAPI and supports arrays of files (`binary` format strings). -However, because this generator doesn't yet support specifying `encoding` per property, this may result in -now-incorrect code when the encoding _was_ explicitly set to `application/json` for arrays of scalar values. - -PR #938 fixes #692. Thanks @micha91 for the fix, @ratgen and @FabianSchurig for testing, and @davidlizeng for the original report... many years ago 😅. diff --git a/CHANGELOG.md b/CHANGELOG.md index 6812b72f2..9707fc8ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,33 @@ 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.25.0 (2025-06-06) + +### Breaking Changes + +- Raise minimum httpx version to 0.23 + +#### Removed ability to set an array as a multipart body + +Previously, when defining a request's body as `multipart/form-data`, the generator would attempt to generate code +for both `object` schemas and `array` schemas. However, most arrays could not generate valid multipart bodies, as +there would be no field names (required to set the `Content-Disposition` headers). + +The code to generate any body for `multipart/form-data` where the schema is `array` has been removed, and any such +bodies will be skipped. This is not _expected_ to be a breaking change in practice, since the code generated would +probably never work. + +If you have a use-case for `multipart/form-data` with an `array` schema, please [open a new discussion](https://github.com/openapi-generators/openapi-python-client/discussions) with an example schema and the desired functional Python code. + +#### Change default multipart array serialization + +Previously, any arrays of values in a `multipart/form-data` body would be serialized as an `application/json` part. +This matches the default behavior specified by OpenAPI and supports arrays of files (`binary` format strings). +However, because this generator doesn't yet support specifying `encoding` per property, this may result in +now-incorrect code when the encoding _was_ explicitly set to `application/json` for arrays of scalar values. + +PR #938 fixes #692. Thanks @micha91 for the fix, @ratgen and @FabianSchurig for testing, and @davidlizeng for the original report... many years ago 😅. + ## 0.24.3 (2025-03-31) ### Features diff --git a/pyproject.toml b/pyproject.toml index fc760c12f..d2ff2c87a 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.24.3" +version = "0.25.0" description = "Generate modern Python clients from OpenAPI" keywords = [ "OpenAPI",