Skip to content

Cannot use plain/text as response type #376

Open
@JKostov

Description

@JKostov

Describe the bug
When using plain/text as a response type there is an error: TypeError: Cannot use 'in' operator to search for '$ref' in undefined

To Reproduce

Method getResponseSchemaAndNames for the following specification doesn't work properly.

openapi: 3.0.3
info:
  version: v1
  title: Plain text example
paths:
  "/test":
    get:
      summary: Get string value
      responses:
        "200":
          description: Returns value as a string
          content:
            text/plain:
              example: example

Expected behavior
It should return string as a response type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions