From 62364114c3251a0537e9ac5f68b47428a3a7ac88 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Wed, 28 Aug 2024 16:32:25 +0200 Subject: [PATCH 1/3] Additional example for "raw JSON" --- versions/3.1.1.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/versions/3.1.1.md b/versions/3.1.1.md index b76582a24a..cb2b9a3d94 100644 --- a/versions/3.1.1.md +++ b/versions/3.1.1.md @@ -1591,6 +1591,12 @@ content: application/octet-stream: {} ``` +```yaml +# arbitrary JSON without constraints beyond being well-formed: +content: + application/json: {} +``` + These examples apply to either input payloads of file uploads or response payloads. A `requestBody` for submitting a file in a `POST` operation may look like the following example: From cb6c315ad607be14dac2e76c7396758412331f2b Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Wed, 28 Aug 2024 16:44:20 +0200 Subject: [PATCH 2/3] Prevent line-breaks in code --- versions/3.1.1.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/versions/3.1.1.md b/versions/3.1.1.md index cb2b9a3d94..6563916469 100644 --- a/versions/3.1.1.md +++ b/versions/3.1.1.md @@ -267,8 +267,8 @@ The following table shows how to migrate from OAS 3.0 binary data descriptions, | OAS < 3.1 | OAS 3.1 | Comments | | ------------------------------------ | -------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `type: string`
`format: binary` | `contentMediaType: image/png` | if redundant, can be omitted, often resulting in an empty [Schema Object](#schema-object) | -| `type: string`
`format: byte` | `type: string`
`contentMediaType: image/png`
`contentEncoding: base64` | note that `base64url` can be used to avoid re-encoding the base64 string to be URL-safe | +| `type: string`
format: binary | contentMediaType: image/png | if redundant, can be omitted, often resulting in an empty [Schema Object](#schema-object) | +| `type: string`
`format: byte` | `type: string`
`contentMediaType: image/png`
`contentEncoding: base64` | note that `base64url` can be used to avoid re-encoding the base64 string to be URL-safe | ### Rich Text Formatting From 32be102c4cc8a286f9b20107955fd2681e5871df Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Wed, 28 Aug 2024 16:58:04 +0200 Subject: [PATCH 3/3] Feedback from @handrews --- versions/3.1.1.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/versions/3.1.1.md b/versions/3.1.1.md index 6563916469..d32588efb7 100644 --- a/versions/3.1.1.md +++ b/versions/3.1.1.md @@ -267,8 +267,8 @@ The following table shows how to migrate from OAS 3.0 binary data descriptions, | OAS < 3.1 | OAS 3.1 | Comments | | ------------------------------------ | -------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `type: string`
format: binary | contentMediaType: image/png | if redundant, can be omitted, often resulting in an empty [Schema Object](#schema-object) | -| `type: string`
`format: byte` | `type: string`
`contentMediaType: image/png`
`contentEncoding: base64` | note that `base64url` can be used to avoid re-encoding the base64 string to be URL-safe | +| type: string
format: binary | contentMediaType: image/png | if redundant, can be omitted, often resulting in an empty [Schema Object](#schema-object) | +| type: string
format: byte | type: string
contentMediaType: image/png
contentEncoding: base64 | note that `base64url` can be used to avoid re-encoding the base64 string to be URL-safe | ### Rich Text Formatting @@ -1592,7 +1592,7 @@ content: ``` ```yaml -# arbitrary JSON without constraints beyond being well-formed: +# arbitrary JSON without constraints beyond being syntactically valid: content: application/json: {} ```