You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> [!IMPORTANT]
> Merging this pull request will create this release
## 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 #938fixes#692. Thanks @micha91 for the fix, @ratgen and
@FabianSchurig for testing, and @davidlizeng for the original report...
many years ago 😅.
Co-authored-by: knope-bot[bot] <152252888+knope-bot[bot]@users.noreply.github.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+27Lines changed: 27 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,33 @@ Programmatic usage of this project (e.g., importing it as a Python module) and t
13
13
14
14
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).
15
15
16
+
## 0.25.0 (2025-06-06)
17
+
18
+
### Breaking Changes
19
+
20
+
- Raise minimum httpx version to 0.23
21
+
22
+
#### Removed ability to set an array as a multipart body
23
+
24
+
Previously, when defining a request's body as `multipart/form-data`, the generator would attempt to generate code
25
+
for both `object` schemas and `array` schemas. However, most arrays could not generate valid multipart bodies, as
26
+
there would be no field names (required to set the `Content-Disposition` headers).
27
+
28
+
The code to generate any body for `multipart/form-data` where the schema is `array` has been removed, and any such
29
+
bodies will be skipped. This is not _expected_ to be a breaking change in practice, since the code generated would
30
+
probably never work.
31
+
32
+
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.
33
+
34
+
#### Change default multipart array serialization
35
+
36
+
Previously, any arrays of values in a `multipart/form-data` body would be serialized as an `application/json` part.
37
+
This matches the default behavior specified by OpenAPI and supports arrays of files (`binary` format strings).
38
+
However, because this generator doesn't yet support specifying `encoding` per property, this may result in
39
+
now-incorrect code when the encoding _was_ explicitly set to `application/json` for arrays of scalar values.
40
+
41
+
PR #938 fixes #692. Thanks @micha91 for the fix, @ratgen and @FabianSchurig for testing, and @davidlizeng for the original report... many years ago 😅.
0 commit comments