Clarify "format": "byte" vs "format": "base64" in OAS 3.0.x #3174
Labels
clarification
requests to clarify, but not change, part of the spec
media and encoding
Issues regarding media type support and how to encode data (outside of query/path params)
Milestone
See PR #3167 for a lot of context.
In OAS 3.0.3:
format: byte
for base64-encoded binary data, matching the same section in OAS 2.0format: base64
alongside an example offormat: binary
; there is no sign offormat: byte
multipart
Content mentionsformat: base64
alongsideformat: binary
when talking about defaultContent-Type
values, but does not mentionformat: byte
It's clear that
format: byte
was intended to carry over from OAS 2.0, but thatbase64
is more intuitive and got used everywhere outside of the table of formats.@OAI/tsc I feel like the most sensible thing to do here would be to define both
byte
andbase64
as having the same effect, and note thatbyte
is compatible with OAS 3.0, whilebase64
is analogous to usingcontentEncoding: base64
in OAS 3.1.I'm guessing that adding a format would not be allowed by SemVer, but we could make the argument that the current situation is so confusing that defining both is just a clarification.
The text was updated successfully, but these errors were encountered: