Skip to content

Change base64 to byte in examples - #2191

Closed
smhc wants to merge 1 commit into
OAI:masterfrom
smhc:patch-1
Closed

Change base64 to byte in examples#2191
smhc wants to merge 1 commit into
OAI:masterfrom
smhc:patch-1

Conversation

@smhc

@smhcsmhc commented Apr 2, 2020

Copy link
Copy Markdown

format is 'byte' not 'base64'.

format is 'byte' not 'base64'.
@smhcsmhc changed the title Update 3.0.3.mdChange base64 to byte in examplesApr 2, 2020
@hkosova

Copy link
Copy Markdown
Contributor

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

@smhc

smhc commented Apr 5, 2020

Copy link
Copy Markdown
Author

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:

typeformatComments
integerint32signed 32 bits
integerint64signed 64 bits (a.k.a long)
numberfloat
numberdouble
string
stringbytebase64 encoded characters
stringbinaryany sequence of octets
boolean
stringdateAs defined by full-date - RFC3339
stringdate-timeAs defined by date-time - RFC3339
stringpasswordA 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
Copy Markdown
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.

Sign up for freeto 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

@smhc@hkosova@handrews