Skip to content

Conversation

@JKostov
Copy link

@JKostov JKostov commented Mar 17, 2021

Fixes #376

Signed-off-by: julije.kostov <julijekos@gmail.com>
@Alan-Cha
Copy link
Collaborator

I need to take a closer look later but I believe this is supposed to handle the case of non-application/json.

@JKostov
Copy link
Author

JKostov commented Mar 17, 2021

@Alan-Cha
The problem is when there is no schema in the response type (like the example below) then the responseSchema is undefined on this line and then we get the error from issue #376.

paths:
  "/test":
    get:
      summary: Get string value
      responses:
        "200":
          description: Returns value as a string
          content:
            text/plain:
              example: example

@Alan-Cha
Copy link
Collaborator

I see! In that case, could we just reorganize the code so that we still use this but it checks if a responseSchema exists first?

@JKostov
Copy link
Author

JKostov commented Apr 7, 2021

Yes, it should fix the issue.

Alan-Cha added a commit to Alan-Cha/oasgraph that referenced this pull request Apr 13, 2021
Signed-off-by: Alan Cha <Alan.cha1@ibm.com>
@Alan-Cha Alan-Cha closed this in 82d7bbe Apr 14, 2021
@Alan-Cha
Copy link
Collaborator

@JKostov I've addressed this with #391. Thank you for all your help!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot use plain/text as response type

2 participants