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

Request body for binary does not resolve properly when using $ref #776

Open
vishalbd opened this issue Dec 18, 2023 · 1 comment
Open

Request body for binary does not resolve properly when using $ref #776

vishalbd opened this issue Dec 18, 2023 · 1 comment
Labels
bug Something isn't working request-body

Comments

@vishalbd
Copy link

vishalbd commented Dec 18, 2023

This is related to issue #382. This package properly resolves the type of a schema to mode: file when the type is string and the format is binary, but fails to do so if that schema is linked through a $ref. For example,

this works:

requestBody:
  content:
    text/csv:
      schema:
        type: string
        format: binary

but this doesn't:

schemas:
  RequestBody:
    type: string
    format: binary

paths:
  ...
  requestBody:
    content:
      text/csv:
        schema:
          $ref: '#/components/schemas/RequestBody'

In the second example example, the mode of the body is still raw and a random string is generated as an example.

@vishalbd vishalbd changed the title Sample request body for binary does not resolve when using $ref Request body for binary does not resolve properly when using $ref Dec 18, 2023
@VShingala
Copy link
Member

@vishalbd Thanks for reporting the issue! We'll look into this and update here once we have fix ready for this.

@VShingala VShingala added bug Something isn't working request-body labels Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working request-body
Projects
None yet
Development

No branches or pull requests

2 participants