diff --git a/packages/openapi-to-graphql/src/oas_3_tools.ts b/packages/openapi-to-graphql/src/oas_3_tools.ts index 908993db..32287a0f 100644 --- a/packages/openapi-to-graphql/src/oas_3_tools.ts +++ b/packages/openapi-to-graphql/src/oas_3_tools.ts @@ -758,6 +758,22 @@ export function getResponseSchemaAndNames( if (responseContentType) { let responseSchema = responseObject.content[responseContentType].schema + + if (!responseSchema && responseContentType === 'text/plain') { + return { + responseContentType, + statusCode, + responseSchemaNames: { + fromPath: inferResourceNameFromPath(path) + }, + responseSchema: { + description: + 'Placeholder to support operations with no response schema and text/plain response type', + type: 'string' + } + } + } + let fromRef: string if ('$ref' in responseSchema) { fromRef = responseSchema['$ref'].split('/').pop()