v3.2: Support ordered multipart including streaming #4589
+141
−15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes:
multipart/mixed
(and possibly bettermultipart/*
support in general) #3721 (multipart/mixed
in general)multipart/byteranges
for 206 responses #3725 (multipart/byteranges
)application/json
withmultipart/mixed
)This adds support for all
multipart
media types that do not have named parts, including support for streaming such media types. Note thatmultipart/mixed
defines the basic processing rules for allmultipart
types, and implementations that encounter unrecognizedmultipart
subtypes are required to process them asmultipart/mixed
. Therefore support formultipart/mixed
addresses all other subtypes to some degree.This builds on the recent support for sequential media types:
multipart/mixed
and similar meet the definition for a sequential media type, requiring it to be modeled as an array. This does use an expansive definition of "repeating the same structure", where the structure is literally any content with a media type.itemSchema
itemEncoding
is the obvious solution tomultipart/mixed
streams requiring an Encoding Objectmultipart/mixed
payloads, and previously claimed such support from 3.0.0 onwards, without actually supporting it. AddingprefixEncoding
along withitemEncoding
supports this use case with a clear parallel toprefixItems
, which is the schema construct needed to support this case.prefixSchema
field because the streaming use case requires a repetition of the same schema for each item. Therefore all mixed use cases can useschema
andprefixItems
We do not seem to run tests on the 3.2 schemas, and I couldn't quickly figure out how to add that, so we should do that separately and include coverage for this and other new fields.
Also paging @thecheatah, @jeremyfiel