From afe8bb25c865bf9ee98fb8ff0ec9fc5b950005f7 Mon Sep 17 00:00:00 2001 From: "Henry H. Andrews" Date: Wed, 1 May 2024 10:00:04 -0700 Subject: [PATCH] Clarify how to model streaming binary data (3.1.1) Also make the translation from 3.0 binary modeling a subsection, as otherwise the line about streaming either feels randomly inserted into the middle of the section, or feels disconnected when placed after the conversion table. --- versions/3.1.1.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/versions/3.1.1.md b/versions/3.1.1.md index bc88b3b747..495caef477 100644 --- a/versions/3.1.1.md +++ b/versions/3.1.1.md @@ -196,6 +196,9 @@ The `contentMediaType` keyword is redundant if the media type is already set: If the Schema Object will be processed by a non-OAS-aware JSON Schema implementation, it may be useful to include `contentMediaType` even if it is redundant. However, if `contentMediaType` contradicts a relevant Media Type Object or Encoding Object, then `contentMediaType` SHALL be ignored. +The `maxLength` keyword MAY be used to set an expected upper bound on the length of a streaming payload. The keyword can be applied to either string data, including encoded binary data, or to unencoded binary data. For unencoded binary, the length is the number of octets. + +##### Migrating binary descriptions from OAS 3.0 The following table shows how to migrate from OAS 3.0 binary data descriptions, continuing to use `image/png` as the example binary media type: OAS < 3.1 | OAS 3.1 | Comments