Skip to content

Incorrect format specified for type string. #273

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

Open
lzemskov opened this issue Mar 4, 2020 · 3 comments
Open

Incorrect format specified for type string. #273

lzemskov opened this issue Mar 4, 2020 · 3 comments

Comments

@lzemskov
Copy link

lzemskov commented Mar 4, 2020

This is from the following page:
https://swagger.io/docs/specification/describing-responses/

ResponseThatReturnsAFile

Description above mentions type:string with format: binary or format: base64.
The latter probably should be format: byte; i was not able to find format: base64 in the section around Data Types: https://swagger.io/specification/#dataTypes

@hkosova
Copy link
Contributor

hkosova commented Mar 5, 2020

OpenAPI Specification is inconsistent on this point. It provides examples of format: base64 here and here, but does not explain how base64 is different from byte.

This issue is discussed in OAI/OpenAPI-Specification#1547.

@lzemskov
Copy link
Author

lzemskov commented Mar 5, 2020

Thank you for the pointer. The comment on that thread seems to imply that there was suppose to be a meeting where the decision would have been made about byte vs base64

The comment i am referring to is from April 2018, almost 2 years ago:
"As per @tsc meeting we are going make a decision between have a byte format or a base64 but not both. "

So if the decision has been made then it's probably worth-while updating the docs accordingly so not to have both formats, otherwise, as some of the other comments point out if feels weird and a bit inconsistent.

In either case this looks to be the same issue as discussed in the issue mentioned above so feel free to update this one make this as a 'Duplicate', 'Close' it or whatever proper flow.

Thanks

@hkosova hkosova self-assigned this May 29, 2020
@hkosova hkosova removed their assignment Apr 4, 2022
@rattrayalex
Copy link

Sounds like base64 should probably be used over byte, but that won't be added to the spec for 3.0.x because 3.1.x obviates the question.

Perhaps the docs should be changed to suggest base64 over byte, and maybe add a footnote for those wondering what byte is that it's ~equivalent to base64?

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

No branches or pull requests

3 participants