Skip to content

Commit d7eb0d4

Browse files
authored
Merge pull request #4055 from ralfhandl/3.1.1-example-for-raw-JSON-as-message-body
3.1.1: example for "raw JSON" as message body
2 parents 8d677fe + 32be102 commit d7eb0d4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

versions/3.1.1.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,8 @@ The following table shows how to migrate from OAS 3.0 binary data descriptions,
267267

268268
| OAS < 3.1 | OAS 3.1 | Comments |
269269
| ------------------------------------ | -------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
270-
| `type: string`<br />`format: binary` | `contentMediaType: image/png` | if redundant, can be omitted, often resulting in an empty [Schema Object](#schema-object) |
271-
| `type: string`<br />`format: byte` | `type: string`<br />`contentMediaType: image/png`<br />`contentEncoding: base64` | note that `base64url` can be used to avoid re-encoding the base64 string to be URL-safe |
270+
| <code style="white-space:nowrap">type: string</code><br /><code style="white-space:nowrap">format: binary</code> | <code style="white-space:nowrap">contentMediaType: image/png</code> | if redundant, can be omitted, often resulting in an empty [Schema Object](#schema-object) |
271+
| <code style="white-space:nowrap">type: string</code><br /><code style="white-space:nowrap">format: byte</code> | <code style="white-space:nowrap">type: string</code><br /><code style="white-space:nowrap">contentMediaType: image/png</code><br /><code style="white-space:nowrap">contentEncoding: base64</code> | note that `base64url` can be used to avoid re-encoding the base64 string to be URL-safe |
272272

273273
### Rich Text Formatting
274274

@@ -1591,6 +1591,12 @@ content:
15911591
application/octet-stream: {}
15921592
```
15931593

1594+
```yaml
1595+
# arbitrary JSON without constraints beyond being syntactically valid:
1596+
content:
1597+
application/json: {}
1598+
```
1599+
15941600
These examples apply to either input payloads of file uploads or response payloads.
15951601

15961602
A `requestBody` for submitting a file in a `POST` operation may look like the following example:

0 commit comments

Comments
 (0)