This commit is contained in:
Jens-Wolfhard Schicke-Uffmann 2022-07-01 18:31:06 +08:00 committed by GitHub
commit 890cc33786
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -241,6 +241,7 @@ export class OpenAPIParser {
schema: MergedOpenAPISchema;
}>;
const subSchemaTitles: string[] = [];
for (const { $ref: subSchemaRef, schema: subSchema } of allOfSchemas) {
const {
type,
@ -331,6 +332,14 @@ export class OpenAPIParser {
// receiver.title = JsonPointer.baseName(subSchemaRef);
}
}
if (subSchema.title !== undefined) {
subSchemaTitles.push(subSchema.title);
}
}
if (receiver.title === undefined && subSchemaTitles.length) {
receiver.title = subSchemaTitles.join('+');
}
return receiver;