mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-07 21:54:53 +03:00
feat: add support for x-description to override description of resolved
This commit is contained in:
parent
f3e8ab4f8e
commit
115eddf52e
|
@ -164,6 +164,9 @@ export class OpenAPIParser {
|
||||||
this.exitRef(resolved);
|
this.exitRef(resolved);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
if (obj['x-description']) {
|
||||||
|
return Object.assign({}, resolved, { description: obj['x-description'] });
|
||||||
|
}
|
||||||
return resolved;
|
return resolved;
|
||||||
}
|
}
|
||||||
return obj;
|
return obj;
|
||||||
|
@ -229,9 +232,9 @@ export class OpenAPIParser {
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
.filter(child => child !== undefined) as Array<{
|
.filter(child => child !== undefined) as Array<{
|
||||||
$ref: string | undefined;
|
$ref: string | undefined;
|
||||||
schema: MergedOpenAPISchema;
|
schema: MergedOpenAPISchema;
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
for (const { $ref: subSchemaRef, schema: subSchema } of allOfSchemas) {
|
for (const { $ref: subSchemaRef, schema: subSchema } of allOfSchemas) {
|
||||||
if (
|
if (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user