Handle x-secondaryTag in menu generation

This commit is contained in:
Roman Gotsiy 2015-10-30 09:41:42 +02:00
parent d7d8b4d9ec
commit ab104f3d48

View File

@ -92,7 +92,11 @@ export default class SchemaManager {
let definedTags = this._schema.tags;
// add tags into map to preserve order
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;
@ -114,7 +118,7 @@ export default class SchemaManager {
tagDetails = {};
tag2MethodMapping.set(tag, tagDetails);
}
if (!tagDetails.methods) tagDetails.methods = [];
if (tagDetails['x-secondaryTag']) continue;
tagDetails.methods.push({pointer: methodPointer, summary: methodSummary});
}
}