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.