Skip to content

Commit 7470d8a

Browse files
authored
Add OAS guidance for bytes fields (AEP-140) (#376)
1 parent 029ab09 commit 7470d8a

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

aep/general/0140/aep.md.j2

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,21 @@ base64-encode a field into a `string` field.
138138

139139
{% tab oas %}
140140

141-
**Note:** OAS guidance not yet written.
141+
When sending binary data over the wire, the field name **should** be suffixed
142+
with "\_bytes". The contents of the field **should** be base64-encoded over the
143+
wire. The field **should** be annotated with `contentEncoding: base64` and
144+
**may** include `contentMediaType` to specify the media type of the binary
145+
data.
146+
147+
For example:
148+
149+
```yaml
150+
profile_image_bytes:
151+
type: string
152+
contentEncoding: base64
153+
contentMediaType: image/png
154+
description: The user's profile image as a base64-encoded PNG.
155+
```
142156

143157
{% endtabs %}
144158

0 commit comments

Comments
 (0)