Skip to content

Failure to parse a response with type: file #89

@ajtucker

Description

@ajtucker

I'm trying to return an image as one of the paths in my Swagger API and so following the specs have used a response along the lines of:

  responses:
    200:
      description: Successfully retrieved image
      schema:
        type: file

However, the Swagger parser raises an exception:

com.fasterxml.jackson.core.JsonParseException: None.get (through reference chain: de.zalando.swagger.Schema["type"]) through reference chain: paths → /rps/{id}/image → get → responses → 200 → schema

Is there any other way to return binary data with a given mime-type?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions