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

"Response That Returns a File" example for base64 uses format: byte #351

Open
Akhlys opened this issue Jun 13, 2024 · 0 comments
Open

"Response That Returns a File" example for base64 uses format: byte #351

Akhlys opened this issue Jun 13, 2024 · 0 comments

Comments

@Akhlys
Copy link

Akhlys commented Jun 13, 2024

On the Describing Responses page, section "Response That Returns a File", the text mentions "OpenAPI 3.0 defines file input/output content as type: string with format: binary or format: base64". In the code example for the base64 variant meanwhile is this:

   paths:
      /users/me:
        get:
          summary: Returns user information
          responses:
            '200':
              description: A JSON object containing user name and avatar
              content:
                application/json:
                  schema:
                    type: object
                    properties:
                      username:
                        type: string
                      avatar:          # <-- image embedded into JSON
                        type: string
                        format: byte ### ISSUE ###
                        description: Base64-encoded contents of the avatar image

Maybe I'm mistaken, but pretty sure that should be "format: base64" there.

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

1 participant