Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change base64 to byte in examples #2191

Closed
wants to merge 1 commit into from
Closed

Change base64 to byte in examples #2191

wants to merge 1 commit into from

Conversation

smhc
Copy link

@smhc smhc commented Apr 2, 2020

format is 'byte' not 'base64'.

format is 'byte' not 'base64'.
@smhc smhc changed the title Update 3.0.3.md Change base64 to byte in examples Apr 2, 2020
@hkosova
Copy link
Contributor

hkosova commented Apr 4, 2020

base64 isn't necessarily a mistake. There's an open issue #1547 asking to clarify the difference between byte and base64.

@smhc
Copy link
Author

smhc commented Apr 5, 2020

Comments in that referenced github issue state:

"OpenAPI defines numerous extensions including base64"

However, in the specification it has a section which lists the formats defined by OAS:


The formats defined by the OAS are:

type format Comments
integer int32 signed 32 bits
integer int64 signed 64 bits (a.k.a long)
number float
number double
string
string byte base64 encoded characters
string binary any sequence of octets
boolean
string date As defined by full-date - RFC3339
string date-time As defined by date-time - RFC3339
string password A hint to UIs to obscure input.

in this table, 'base64' is not mentioned. So there is an inconsistency.
If 'base64' is predefined by OAS it should be listed in this table.

If for some reason it doesn't belong in this table, is there a table that does list base64? There is value in having well known, predefined formats, but they need to be made well known.

@handrews
Copy link
Member

This is being addressed as part of PR #2200, which drops "format": "byte" entirely in favor of "contentEncoding": "base64". contentEncoding is more flexible, and compatible with the latest JSON Schema (which will be used in OAS 3.1).

If there will be an OAS 3.0.4, then a decision on byte vs base64 is needed, as tracked by #1547, followed by a PR against the appropriate branch. That issue still has not resolved which of byte or base64 was intended. Since this is not against the right branch for 3.0.4 and it's not clear which value is correct, I'm closing this. We'll need a PR against the right branch depending on the outcome of #1547.

@handrews handrews closed this May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants