v3.2: (Split and smaller!) Support ordered multipart including streaming #4745
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.
**NOTE: This is just the new fields and their description, schema, and schema tests, with several things removed: 1.) the elaborate rules for determining type, which are now in PR #4743, 2.) the examples, which are in PR #4746 so they can be discussed in-depth and updated based on the pending Example Object changes. The contents of this PR are otherwise identical to #4589.
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