[oas3] base64 vs byte
See original GitHub issueThe spec makes numerous references to {format: base64}
(here and here for example). However this format is not defined in either the wright-00 JSON-schema spec, nor in the OAS3 defined data types.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Data Types - Swagger
byte – base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw== binary – binary data, used to describe files (see Files below). However, ...
Read more >OpenAPI Specification v3.1.0 | Introduction, Definitions, & More
The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs.
Read more >Byte array versus Base 64 string in RESTful web service
The wonderful thing about a RESTful interface is that it's just HTTP. So if you expose the "byte array" version via REST, any...
Read more >How to get PSN Account ID 8 bytes base64 - YouTube
Updated video : https://youtu.be/FxcSHJ2kEVA - How to get PSN Account ID 8 bytes base64 hello guys, in this video, i am explaining that...
Read more >How Base64 Encoding Works - seoits.com is for sale
Base64 Encoding Logic Base64 encoding breaks binary data into 6-bit segments of 3 full bytes and represents those as printable characters in ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In OAS 3.1, this can now be handled properly from the JSON Schema perspective. Specifically:
is a base64-endcode string (where base64 is per RFC 4648). You can use any RFC 4648 or RFC 2045 encoding, so
base64url
orquoted-printable
are also valid.If you are encoding a specific media type, such as a PNG file:
Note that the
content*
keywords are informational, and are not validated during JSON Schema validation.For binary transfer, use
or some other media type.
we should probably deprecate
"format": "base64"
and"format": "binary"
in OAS 3.1 although I don’t feel strongly about it. Well… I have lots of strong feelings aboutformat
but that’s a rant for another time.FWIW, my vote is for
base64
. It much more clearly conveys the intent.