prism: OAS3 fails to generate text/plain response when no Accept header passed

Describe the bug A clear and concise description of what the bug is.

To Reproduce

====test====
Generate simple plain text response
====spec====
openapi: "3.0.1"
paths:
  "/path":
      get:
        responses:
          '200':
            content:
              text/plain:
                schema:
                  type: string
====server====
mock -p 4010
====command====
curl -i -H "Accept:" http://localhost:4010/path
====expect====
HTTP/1.1 200 OK
content-type: text/plain

string

Actual body equals to “”

Environment (remove any that are not applicable): v3.0.3

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (12 by maintainers)

Most upvoted comments

@taasan yeah ok you’re falling in the first case, where we should probably just take your Accept absence for a Accept: */* //cc @philsturgeon