We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc4ea39 commit 6d4563dCopy full SHA for 6d4563d
packages/rtk-query-codegen-openapi/src/generate.ts
@@ -299,7 +299,10 @@ export async function generateApi(
299
const schema = apiGen.getSchemaFromContent(body.content);
300
const type = apiGen.getTypeFromSchema(schema);
301
const schemaName = camelCase(
302
- (type as any).name || getReferenceName(schema) || ('title' in schema && schema.title) || 'body'
+ (type as any).name ||
303
+ getReferenceName(schema) ||
304
+ (typeof schema === 'object' && 'title' in schema && schema.title) ||
305
+ 'body'
306
);
307
const name = generateName(schemaName in queryArg ? 'body' : schemaName, 'body');
308
0 commit comments