From 9662ad7b1e6d2686ca09bff634f3691f7465819e Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Tue, 1 Dec 2015 00:29:01 +0200 Subject: [PATCH] Rename x-secondaryTag to x-traitTag --- demo/swagger.json | 4 ++-- lib/components/Method/method.js | 2 +- lib/utils/SchemaManager.js | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/demo/swagger.json b/demo/swagger.json index 74a51584..8c431103 100644 --- a/demo/swagger.json +++ b/demo/swagger.json @@ -17,7 +17,7 @@ "basePath": "/v2", "tags": [{ "name": "Pagination", - "x-secondaryTag": true, + "x-traitTag": true, "description": "Sometimes you just can't get enough. For this reason, we've provided a convenient way to access more data in any request for sequential data. Simply call the url in the next_url parameter and we'll respond with the next set of data.\n```json\n{\n ...\n \"pagination\": {\n \"next_url\": \"https://api.instagram.com/v1/tags/puppy/media/recent?access_token=fb2e77d.47a0479900504cb3ab4a1f626d174d2d&max_id=13872296\",\n \"next_max_id\": \"13872296\"\n }\n}\n```\n On views where pagination is present, we also support the `count` parameter. Simply set this to the number of items you'd like to receive. Note that the default values should be fine for most applications - but if you decide to increase this number there is a maximum value defined on each endpoint.", "externalDocs": { "description": "Find out more", @@ -25,7 +25,7 @@ } },{ "name": "JSONP", - "x-secondaryTag": true, + "x-traitTag": true, "description": "If you're writing an AJAX application, and you'd like to wrap our response with a callback, all you have to do is specify a callback parameter with any API call:\n```\n https://api.instagram.com/v1/tags/coffee/media/recent?access_token=fb2e77d.47a0479900504cb3ab4a1f626d174d2d&callback=callbackFunction\n```\nWould respond with:\n```js\ncallbackFunction({\n ...\n});\n```", "externalDocs": { "description": "Find out more", diff --git a/lib/components/Method/method.js b/lib/components/Method/method.js index 1cc01986..1df50d25 100644 --- a/lib/components/Method/method.js +++ b/lib/components/Method/method.js @@ -31,7 +31,7 @@ export default class Method extends BaseComponent { filterMainTags(tags) { var tagsMap = this.schemaMgr.getTagsMap(); - return tags.filter(tag => tagsMap[tag] && tagsMap[tag]['x-secondaryTag']); + return tags.filter(tag => tagsMap[tag] && tagsMap[tag]['x-traitTag']); } findBodyParam() { diff --git a/lib/utils/SchemaManager.js b/lib/utils/SchemaManager.js index f1b32582..15d53624 100644 --- a/lib/utils/SchemaManager.js +++ b/lib/utils/SchemaManager.js @@ -101,7 +101,7 @@ export default class SchemaManager { for (let tag of tags) { tagsMap[tag.name] = { description: tag.description, - 'x-secondaryTag': tag['x-secondaryTag'] + 'x-traitTag': tag['x-traitTag'] }; } @@ -117,7 +117,7 @@ export default class SchemaManager { for (let tag of definedTags) { tag2MethodMapping.set(tag.name, { 'description': tag.description, - 'x-secondaryTag': tag['x-secondaryTag'], + 'x-traitTag': tag['x-traitTag'], 'methods': [] }); } @@ -141,7 +141,7 @@ export default class SchemaManager { tagDetails = {}; tag2MethodMapping.set(tag, tagDetails); } - if (tagDetails['x-secondaryTag']) continue; + if (tagDetails['x-traitTag']) continue; if (!tagDetails.methods) tagDetails.methods = []; tagDetails.methods.push({pointer: methodPointer, summary: methodSummary}); }