mirror of
https://github.com/Redocly/redoc.git
synced 2025-01-31 10:04:08 +03:00
Handle x-secondaryTag in menu generation
This commit is contained in:
parent
d7d8b4d9ec
commit
ab104f3d48
|
@ -92,7 +92,11 @@ export default class SchemaManager {
|
||||||
let definedTags = this._schema.tags;
|
let definedTags = this._schema.tags;
|
||||||
// add tags into map to preserve order
|
// add tags into map to preserve order
|
||||||
for (let tag of definedTags) {
|
for (let tag of definedTags) {
|
||||||
tag2MethodMapping.set(tag.name, {description: tag.description});
|
tag2MethodMapping.set(tag.name, {
|
||||||
|
'description': tag.description,
|
||||||
|
'x-secondaryTag': tag['x-secondaryTag'],
|
||||||
|
'methods': []
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let paths = this._schema.paths;
|
let paths = this._schema.paths;
|
||||||
|
@ -114,7 +118,7 @@ export default class SchemaManager {
|
||||||
tagDetails = {};
|
tagDetails = {};
|
||||||
tag2MethodMapping.set(tag, tagDetails);
|
tag2MethodMapping.set(tag, tagDetails);
|
||||||
}
|
}
|
||||||
if (!tagDetails.methods) tagDetails.methods = [];
|
if (tagDetails['x-secondaryTag']) continue;
|
||||||
tagDetails.methods.push({pointer: methodPointer, summary: methodSummary});
|
tagDetails.methods.push({pointer: methodPointer, summary: methodSummary});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user