Commit 61b6c54
authored
Release 0.25.0 (#1267)
> [!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 #938 fixes #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>1 parent 5c51ae4 commit 61b6c54
File tree
5 files changed
+28
-33
lines changed- .changeset
5 files changed
+28
-33
lines changedThis file was deleted.
Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 0 additions & 12 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
16 | 43 | | |
17 | 44 | | |
18 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
0 commit comments