Skip to content

Release 0.25.0 #1267

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 6, 2025
Merged

Release 0.25.0 #1267

merged 1 commit into from
Jun 6, 2025

Conversation

knope-bot[bot]
Copy link
Contributor

@knope-bot knope-bot bot commented Jun 6, 2025

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 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 😅.

@knope-bot knope-bot bot force-pushed the knope/release branch from 85c552f to 5c51ae4 Compare June 6, 2025 01:35
@dbanty dbanty enabled auto-merge June 6, 2025 01:36
@dbanty dbanty added this pull request to the merge queue Jun 6, 2025
Merged via the queue into main with commit 61b6c54 Jun 6, 2025
21 checks passed
@dbanty dbanty deleted the knope/release branch June 6, 2025 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Array of files in multipart/form-data is not handled correctly
1 participant