swagger-api / swagger-api/swagger.io-docs
"Response That Returns a File" example for base64 uses format: byte
Nobody has claimed this yet.
- Dominant language
- Astro
- Stars
- 1.6k
- Forks
- 407
- Avg merge
- 2m
- Merged PRs (30d)
- 2
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open the Describing Responses page and locate the “Response That Returns a File” section, especially the base64 YAML example. Compare its format value with the surrounding OpenAPI 3.0 guidance, then update the example so the terminology is consistent and verify the rendered documentation shows the corrected value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100