From ab104f3d48385fe09e2518766caa04290d55c53f Mon Sep 17 00:00:00 2001 From: Roman Gotsiy Date: Fri, 30 Oct 2015 09:41:42 +0200 Subject: [PATCH] Handle x-secondaryTag in menu generation --- lib/utils/SchemaManager.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/utils/SchemaManager.js b/lib/utils/SchemaManager.js index 1c6d750a..e70109f6 100644 --- a/lib/utils/SchemaManager.js +++ b/lib/utils/SchemaManager.js @@ -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}); } }