Closed zbyte64 closed 2 years ago
I looked into this more and I am was right that our API library responds with a content type for NO_CONTENT: https://github.com/spec-first/connexion/pull/322/files
🤦
Thanks for filing this issue and also providing a fix. Your suggestion is very sensible.
Describe the bug Unable to use an OpenAPI endpoint that has no return type.
To Reproduce Steps to reproduce the behavior:
createGraphQLSchema
to export a graphql executor with the optionfillEmptyResponses: true
Expected behavior
Either for the operation to return successfully with text or undefined return type OR for
createGraphQLSchema
to fail early ifresponseContentType
is undefinedScreenshots
Server will respond with:
If it's swagger schema looks like:
Additional context From what I've seen this happens when we call
responseContentType.includes
andresponseContentType
is undefined. This appears to happen when the source schema does not define a ref or schema.