Skip to content

Wildcard content-type "*/*" leads to unparsed JSON responses #418

Description

@ahx

Currently openapi_first picks a response parser based on the content-type defined in your OAD. If you specify a content-type like application/json: your response will be parsed with JSON.

When your OAD has a response content-type specified like */* openapi_first current does not parse the response body at all and just returns the plain body (as a String).

This leads to having a response definition like this always failing validation, because a the string (String) is not an object (Hash):

          content:
            "*/*":
              schema:
                type: object

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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