Skip to content

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

@vishalbd

Description

@vishalbd

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.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions