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

OAS: Able to infer binary content encoding form media-type when shema is missing or empty #273

Closed
ostridm opened this issue Mar 24, 2025 · 0 comments · Fixed by #274
Closed
Assignees
Labels
Type: enhancement New feature or request.

Comments

@ostridm
Copy link
Contributor

ostridm commented Mar 24, 2025

In OpenAPI 3.0, a file upload is described using type set to string and format set to binary or base64 depending on how the file contents will be encoded. However, in OpenAPI 3.1 it is not needed to use the Schema Object for a binary file in a POST request. See considerations and example

Binary File Upload in OpenAPI 3.0

requestBody:
  content:
    application/octet-stream:
      schema:
        type: string
        format: binary

Binary File Upload in OpenAPI 3.1

requestBody:
  content:
    application/octet-stream: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: enhancement New feature or request.
Projects
None yet
1 participant