From 4fe27786f407a0c2b038a68dc1faf6ad966307bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20MARQUES?= Date: Tue, 27 Jun 2017 15:29:07 +0200 Subject: [PATCH 01/11] Adding apisSorter options, taking a string or a function as a configuration value --- .gitignore | 1 + README.md | 6 ++- dev-helpers/index.html | 87 +++++++++++++++--------------- src/core/plugins/spec/selectors.js | 21 +++++--- src/core/utils.js | 5 +- 5 files changed, 67 insertions(+), 53 deletions(-) diff --git a/.gitignore b/.gitignore index 36ccaaa9..2e9dcf9c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ node_modules npm-debug.log* .eslintcache package-lock.json +*.iml diff --git a/README.md b/README.md index eff32bc7..13567ca6 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,10 @@ To use swagger-ui's bundles, you should take a look at the [source of swagger-ui plugins: [ SwaggerUIBundle.plugins.DownloadUrl ], - layout: "StandaloneLayout" + layout: "StandaloneLayout", + docExpansion: "none", + apisSorter: "alpha", + operationsSorter: "method" }) ``` @@ -133,6 +136,7 @@ spec | A JSON object describing the OpenAPI Specification. When used, the `url` validatorUrl | By default, Swagger-UI attempts to validate specs against swagger.io's online validator. You can use this parameter to set a different validator URL, for example for locally deployed validators ([Validator Badge](https://github.com/swagger-api/validator-badge)). Setting it to `null` will disable validation. dom_id | The id of a dom element inside which SwaggerUi will put the user interface for swagger. oauth2RedirectUrl | OAuth redirect URL +apisSorter | Apply a sort to the tag list of each API. It can be 'alpha' (sort by paths alphanumerically) or a function (see Array.prototype.sort() to know how sort function works). Default is the order returned by the server unchanged. operationsSorter | Apply a sort to the operation list of each API. It can be 'alpha' (sort by paths alphanumerically), 'method' (sort by HTTP method) or a function (see Array.prototype.sort() to know how sort function works). Default is the order returned by the server unchanged. configUrl | Configs URL parameterMacro | MUST be a function. Function to set default value to parameters. Accepts two arguments parameterMacro(operation, parameter). Operation and parameter are objects passed for context, both remain immutable diff --git a/dev-helpers/index.html b/dev-helpers/index.html index 9058c220..31c1610f 100644 --- a/dev-helpers/index.html +++ b/dev-helpers/index.html @@ -4,26 +4,26 @@ Swagger UI - - - - + + + + @@ -34,7 +34,7 @@ - + @@ -67,37 +67,38 @@
- - + + diff --git a/src/core/plugins/spec/selectors.js b/src/core/plugins/spec/selectors.js index d8487e89..6d04473c 100644 --- a/src/core/plugins/spec/selectors.js +++ b/src/core/plugins/spec/selectors.js @@ -197,16 +197,21 @@ export const operationsWithTags = createSelector( } ) -export const taggedOperations = ( state ) =>( { getConfigs } ) => { - let { operationsSorter }= getConfigs() +export const taggedOperations = (state) => ({ getConfigs }) => { + let { apisSorter, operationsSorter } = getConfigs(); - return operationsWithTags(state).map((ops, tag) => { - let sortFn = typeof operationsSorter === "function" ? operationsSorter - : sorters.operationsSorter[operationsSorter] - let operations = !sortFn ? ops : ops.sort(sortFn) + return operationsWithTags(state) + .sort((operationA, operationB) => { + let sortFn = (typeof apisSorter === "function" ? apisSorter : sorters.apisSorter[ apisSorter ]); + return (!sortFn ? null : sortFn(operationA, operationB)); + }) + .map((ops, tag) => { + let sortFn = (typeof operationsSorter === "function" ? operationsSorter : sorters.operationsSorter[ operationsSorter ]); + let operations = (!sortFn ? ops : ops.sort(sortFn)); - return Map({tagDetails: tagDetails(state, tag), operations: operations})}) -} + return Map({ tagDetails: tagDetails(state, tag), operations: operations }); + }); +}; export const responses = createSelector( state, diff --git a/src/core/utils.js b/src/core/utils.js index 1412c344..ec3c9fd3 100644 --- a/src/core/utils.js +++ b/src/core/utils.js @@ -562,8 +562,11 @@ export const sorters = { operationsSorter: { alpha: (a, b) => a.get("path").localeCompare(b.get("path")), method: (a, b) => a.get("method").localeCompare(b.get("method")) + }, + apisSorter: { + alpha: (a, b) => a.getIn([0, "operation", "tags", 0]).localeCompare(b.getIn([0, "operation", "tags", 0])) } -} +}; export const buildFormData = (data) => { let formArr = [] From 24bc8c4b85d300428b7fcfab6b93a6e84d2a1721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20MARQUES?= Date: Tue, 27 Jun 2017 16:45:23 +0200 Subject: [PATCH 02/11] Complying with CI --- src/core/plugins/spec/selectors.js | 16 ++++++++-------- src/core/utils.js | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/core/plugins/spec/selectors.js b/src/core/plugins/spec/selectors.js index 6d04473c..782f502a 100644 --- a/src/core/plugins/spec/selectors.js +++ b/src/core/plugins/spec/selectors.js @@ -198,20 +198,20 @@ export const operationsWithTags = createSelector( ) export const taggedOperations = (state) => ({ getConfigs }) => { - let { apisSorter, operationsSorter } = getConfigs(); + let { apisSorter, operationsSorter } = getConfigs() return operationsWithTags(state) .sort((operationA, operationB) => { - let sortFn = (typeof apisSorter === "function" ? apisSorter : sorters.apisSorter[ apisSorter ]); - return (!sortFn ? null : sortFn(operationA, operationB)); + let sortFn = (typeof apisSorter === "function" ? apisSorter : sorters.apisSorter[ apisSorter ]) + return (!sortFn ? null : sortFn(operationA, operationB)) }) .map((ops, tag) => { - let sortFn = (typeof operationsSorter === "function" ? operationsSorter : sorters.operationsSorter[ operationsSorter ]); - let operations = (!sortFn ? ops : ops.sort(sortFn)); + let sortFn = (typeof operationsSorter === "function" ? operationsSorter : sorters.operationsSorter[ operationsSorter ]) + let operations = (!sortFn ? ops : ops.sort(sortFn)) - return Map({ tagDetails: tagDetails(state, tag), operations: operations }); - }); -}; + return Map({ tagDetails: tagDetails(state, tag), operations: operations }) + }) +} export const responses = createSelector( state, diff --git a/src/core/utils.js b/src/core/utils.js index ec3c9fd3..a6705209 100644 --- a/src/core/utils.js +++ b/src/core/utils.js @@ -566,7 +566,7 @@ export const sorters = { apisSorter: { alpha: (a, b) => a.getIn([0, "operation", "tags", 0]).localeCompare(b.getIn([0, "operation", "tags", 0])) } -}; +} export const buildFormData = (data) => { let formArr = [] From 4bfb392e4994064288a6d3b85fb22c319d0e2c6e Mon Sep 17 00:00:00 2001 From: Kyle Shockey Date: Mon, 3 Jul 2017 16:41:10 -0700 Subject: [PATCH 03/11] Undo changed defaults --- README.md | 7 ++----- dev-helpers/index.html | 5 +---- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index a62a18ab..c7f02194 100644 --- a/README.md +++ b/README.md @@ -91,10 +91,7 @@ To use swagger-ui's bundles, you should take a look at the [source of swagger-ui plugins: [ SwaggerUIBundle.plugins.DownloadUrl ], - layout: "StandaloneLayout", - docExpansion: "none", - apisSorter: "alpha", - operationsSorter: "method" + layout: "StandaloneLayout" }) ``` @@ -147,7 +144,7 @@ parameterMacro | MUST be a function. Function to set default value to parameters modelPropertyMacro | MUST be a function. Function to set default values to each property in model. Accepts one argument modelPropertyMacro(property), property is immutable docExpansion | Controls the default expansion setting for the operations and tags. It can be 'list' (expands only the tags), 'full' (expands the tags and operations) or 'none' (expands nothing). The default is 'list'. displayOperationId | Controls the display of operationId in operations list. The default is `false`. -displayRequestDuration | Controls the display of the request duration (in milliseconds) for `Try it out` requests. The default is `false`. +displayRequestDuration | Controls the display of the request duration (in milliseconds) for `Try it out` requests. The default is `false`. ### Plugins diff --git a/dev-helpers/index.html b/dev-helpers/index.html index 31c1610f..b23ec6f8 100644 --- a/dev-helpers/index.html +++ b/dev-helpers/index.html @@ -84,10 +84,7 @@ plugins: [ SwaggerUIBundle.plugins.DownloadUrl ], - layout: "StandaloneLayout", - docExpansion: "none", - apisSorter: "alpha", - operationsSorter: "method" + layout: "StandaloneLayout" }); ui.initOAuth({ From 8ce2b309d84136c827b0d62b6880f2eb7e7bcdcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20MARQUES?= Date: Tue, 4 Jul 2017 09:15:43 +0200 Subject: [PATCH 04/11] Complying with request for changes --- README.md | 27 ++++++++++++--------------- dev-helpers/index.html | 41 ++++++++++++++++++++--------------------- src/core/index.js | 2 ++ 3 files changed, 34 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index a62a18ab..49523da1 100644 --- a/README.md +++ b/README.md @@ -82,20 +82,17 @@ To use swagger-ui's bundles, you should take a look at the [source of swagger-ui ```javascript const ui = SwaggerUIBundle({ - url: "http://petstore.swagger.io/v2/swagger.json", - dom_id: '#swagger-ui', - presets: [ - SwaggerUIBundle.presets.apis, - SwaggerUIStandalonePreset - ], - plugins: [ - SwaggerUIBundle.plugins.DownloadUrl - ], - layout: "StandaloneLayout", - docExpansion: "none", - apisSorter: "alpha", - operationsSorter: "method" - }) + url: "http://petstore.swagger.io/v2/swagger.json", + dom_id: '#swagger-ui', + presets: [ + SwaggerUIBundle.presets.apis, + SwaggerUIStandalonePreset + ], + plugins: [ + SwaggerUIBundle.plugins.DownloadUrl + ], + layout: "StandaloneLayout" + }) ``` #### OAuth2 configuration @@ -140,7 +137,7 @@ spec | A JSON object describing the OpenAPI Specification. When used, the `url` validatorUrl | By default, Swagger-UI attempts to validate specs against swagger.io's online validator. You can use this parameter to set a different validator URL, for example for locally deployed validators ([Validator Badge](https://github.com/swagger-api/validator-badge)). Setting it to `null` will disable validation. dom_id | The id of a dom element inside which SwaggerUi will put the user interface for swagger. oauth2RedirectUrl | OAuth redirect URL -apisSorter | Apply a sort to the tag list of each API. It can be 'alpha' (sort by paths alphanumerically) or a function (see Array.prototype.sort() to know how sort function works). Default is the order returned by the server unchanged. +apisSorter | Apply a sort to the tag list of each API. It can be 'alpha' (sort by paths alphanumerically) or a function (see Array.prototype.sort() to know how sort function works). Default is the order detemrined by Swagger-UI. operationsSorter | Apply a sort to the operation list of each API. It can be 'alpha' (sort by paths alphanumerically), 'method' (sort by HTTP method) or a function (see Array.prototype.sort() to know how sort function works). Default is the order returned by the server unchanged. configUrl | Configs URL parameterMacro | MUST be a function. Function to set default value to parameters. Accepts two arguments parameterMacro(operation, parameter). Operation and parameter are objects passed for context, both remain immutable diff --git a/dev-helpers/index.html b/dev-helpers/index.html index 31c1610f..a528687b 100644 --- a/dev-helpers/index.html +++ b/dev-helpers/index.html @@ -4,26 +4,26 @@ Swagger UI - - - - + + + + @@ -67,14 +67,14 @@
- - + + diff --git a/src/core/index.js b/src/core/index.js index 80335da5..26ab44b4 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -26,6 +26,8 @@ module.exports = function SwaggerUI(opts) { urls: null, layout: "BaseLayout", docExpansion: "list", + apisSorter: "alpha", + operationsSorter: "method", validatorUrl: "https://online.swagger.io/validator", configs: {}, custom: {}, From d031413d92d853fb48b4a4fda50ce6616a86240f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20MARQUES?= Date: Tue, 4 Jul 2017 09:20:55 +0200 Subject: [PATCH 05/11] Fix typo in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 630fefe1..94f874b0 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ spec | A JSON object describing the OpenAPI Specification. When used, the `url` validatorUrl | By default, Swagger-UI attempts to validate specs against swagger.io's online validator. You can use this parameter to set a different validator URL, for example for locally deployed validators ([Validator Badge](https://github.com/swagger-api/validator-badge)). Setting it to `null` will disable validation. dom_id | The id of a dom element inside which SwaggerUi will put the user interface for swagger. oauth2RedirectUrl | OAuth redirect URL -apisSorter | Apply a sort to the tag list of each API. It can be 'alpha' (sort by paths alphanumerically) or a function (see Array.prototype.sort() to know how sort function works). Default is the order detemrined by Swagger-UI. +apisSorter | Apply a sort to the tag list of each API. It can be 'alpha' (sort by paths alphanumerically) or a function (see Array.prototype.sort() to know how sort function works). Default is the order determined by Swagger-UI. operationsSorter | Apply a sort to the operation list of each API. It can be 'alpha' (sort by paths alphanumerically), 'method' (sort by HTTP method) or a function (see Array.prototype.sort() to know how sort function works). Default is the order returned by the server unchanged. configUrl | Configs URL parameterMacro | MUST be a function. Function to set default value to parameters. Accepts two arguments parameterMacro(operation, parameter). Operation and parameter are objects passed for context, both remain immutable From 297ee610384440f65673ed81867894a9dcbf9a2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20MARQUES?= Date: Tue, 11 Jul 2017 21:13:30 +0200 Subject: [PATCH 06/11] Update index.js --- src/core/index.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/core/index.js b/src/core/index.js index 26ab44b4..80335da5 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -26,8 +26,6 @@ module.exports = function SwaggerUI(opts) { urls: null, layout: "BaseLayout", docExpansion: "list", - apisSorter: "alpha", - operationsSorter: "method", validatorUrl: "https://online.swagger.io/validator", configs: {}, custom: {}, From 571d65a5829e5b4d352fe126f251e045a1cef16f Mon Sep 17 00:00:00 2001 From: Kyle Shockey Date: Thu, 13 Jul 2017 20:36:08 -0700 Subject: [PATCH 07/11] apisSorter -> tagsSorter "tags", not "tag", because it sorts the tags themselves, not the content of each tag. --- README.md | 2 +- src/core/index.js | 2 +- src/core/plugins/spec/selectors.js | 4 ++-- src/core/utils.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e8ab9616..d076f377 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ spec | A JSON object describing the OpenAPI Specification. When used, the `url` validatorUrl | By default, Swagger-UI attempts to validate specs against swagger.io's online validator. You can use this parameter to set a different validator URL, for example for locally deployed validators ([Validator Badge](https://github.com/swagger-api/validator-badge)). Setting it to `null` will disable validation. dom_id | The id of a dom element inside which SwaggerUi will put the user interface for swagger. oauth2RedirectUrl | OAuth redirect URL -apisSorter | Apply a sort to the tag list of each API. It can be 'alpha' (sort by paths alphanumerically) or a function (see Array.prototype.sort() to know how sort function works). Default is the order determined by Swagger-UI. +tagsSorter | Apply a sort to the tag list of each API. It can be 'alpha' (sort by paths alphanumerically) or a function (see Array.prototype.sort() to know how sort function works). Default is the order determined by Swagger-UI. operationsSorter | Apply a sort to the operation list of each API. It can be 'alpha' (sort by paths alphanumerically), 'method' (sort by HTTP method) or a function (see Array.prototype.sort() to know how sort function works). Default is the order returned by the server unchanged. configUrl | Configs URL parameterMacro | MUST be a function. Function to set default value to parameters. Accepts two arguments parameterMacro(operation, parameter). Operation and parameter are objects passed for context, both remain immutable diff --git a/src/core/index.js b/src/core/index.js index 80335da5..24bf8d94 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -7,7 +7,7 @@ import * as AllPlugins from "core/plugins/all" import { parseSeach, filterConfigs } from "core/utils" const CONFIGS = [ "url", "urls", "urls.primaryName", "spec", "validatorUrl", "onComplete", "onFailure", "authorizations", "docExpansion", - "apisSorter", "operationsSorter", "supportedSubmitMethods", "dom_id", "defaultModelRendering", "oauth2RedirectUrl", + "tagsSorter", "operationsSorter", "supportedSubmitMethods", "dom_id", "defaultModelRendering", "oauth2RedirectUrl", "showRequestHeaders", "custom", "modelPropertyMacro", "parameterMacro", "displayOperationId" , "displayRequestDuration"] // eslint-disable-next-line no-undef diff --git a/src/core/plugins/spec/selectors.js b/src/core/plugins/spec/selectors.js index a67dc28b..c9b31cf1 100644 --- a/src/core/plugins/spec/selectors.js +++ b/src/core/plugins/spec/selectors.js @@ -201,11 +201,11 @@ export const operationsWithTags = createSelector( ) export const taggedOperations = (state) => ({ getConfigs }) => { - let { apisSorter, operationsSorter } = getConfigs() + let { tagsSorter, operationsSorter } = getConfigs() return operationsWithTags(state) .sort((operationA, operationB) => { - let sortFn = (typeof apisSorter === "function" ? apisSorter : sorters.apisSorter[ apisSorter ]) + let sortFn = (typeof tagsSorter === "function" ? tagsSorter : sorters.tagsSorter[ tagsSorter ]) return (!sortFn ? null : sortFn(operationA, operationB)) }) .map((ops, tag) => { diff --git a/src/core/utils.js b/src/core/utils.js index eb6e0a0e..f4b925f6 100644 --- a/src/core/utils.js +++ b/src/core/utils.js @@ -575,7 +575,7 @@ export const sorters = { alpha: (a, b) => a.get("path").localeCompare(b.get("path")), method: (a, b) => a.get("method").localeCompare(b.get("method")) }, - apisSorter: { + tagsSorter: { alpha: (a, b) => a.getIn([0, "operation", "tags", 0]).localeCompare(b.getIn([0, "operation", "tags", 0])) } } From 1cdc4691f79ae1d32c3ad9c644893068cb3b17fa Mon Sep 17 00:00:00 2001 From: Kyle Shockey Date: Thu, 13 Jul 2017 20:38:56 -0700 Subject: [PATCH 08/11] Add MDN link to Array.prototype.sort() documentation --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d076f377..008b06b9 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ spec | A JSON object describing the OpenAPI Specification. When used, the `url` validatorUrl | By default, Swagger-UI attempts to validate specs against swagger.io's online validator. You can use this parameter to set a different validator URL, for example for locally deployed validators ([Validator Badge](https://github.com/swagger-api/validator-badge)). Setting it to `null` will disable validation. dom_id | The id of a dom element inside which SwaggerUi will put the user interface for swagger. oauth2RedirectUrl | OAuth redirect URL -tagsSorter | Apply a sort to the tag list of each API. It can be 'alpha' (sort by paths alphanumerically) or a function (see Array.prototype.sort() to know how sort function works). Default is the order determined by Swagger-UI. +tagsSorter | Apply a sort to the tag list of each API. It can be 'alpha' (sort by paths alphanumerically) or a function (see [Array.prototype.sort()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) to know how sort function works). Default is the order determined by Swagger-UI. operationsSorter | Apply a sort to the operation list of each API. It can be 'alpha' (sort by paths alphanumerically), 'method' (sort by HTTP method) or a function (see Array.prototype.sort() to know how sort function works). Default is the order returned by the server unchanged. configUrl | Configs URL parameterMacro | MUST be a function. Function to set default value to parameters. Accepts two arguments parameterMacro(operation, parameter). Operation and parameter are objects passed for context, both remain immutable From e6c8eb3c61043e708ac48ec4462f4823be63dc1b Mon Sep 17 00:00:00 2001 From: Kyle Shockey Date: Thu, 13 Jul 2017 21:02:37 -0700 Subject: [PATCH 09/11] Pass tag names to tagsSorter instead of taggedOperations values --- src/core/plugins/spec/selectors.js | 12 +++++++----- src/core/utils.js | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/core/plugins/spec/selectors.js b/src/core/plugins/spec/selectors.js index c9b31cf1..82056b7e 100644 --- a/src/core/plugins/spec/selectors.js +++ b/src/core/plugins/spec/selectors.js @@ -202,12 +202,14 @@ export const operationsWithTags = createSelector( export const taggedOperations = (state) => ({ getConfigs }) => { let { tagsSorter, operationsSorter } = getConfigs() - return operationsWithTags(state) - .sort((operationA, operationB) => { - let sortFn = (typeof tagsSorter === "function" ? tagsSorter : sorters.tagsSorter[ tagsSorter ]) - return (!sortFn ? null : sortFn(operationA, operationB)) - }) + .sortBy( + (val, key) => key, // get the name of the tag to be passed to the sorter + (tagA, tagB) => { + let sortFn = (typeof tagsSorter === "function" ? tagsSorter : sorters.tagsSorter[ tagsSorter ]) + return (!sortFn ? null : sortFn(tagA, tagB)) + } + ) .map((ops, tag) => { let sortFn = (typeof operationsSorter === "function" ? operationsSorter : sorters.operationsSorter[ operationsSorter ]) let operations = (!sortFn ? ops : ops.sort(sortFn)) diff --git a/src/core/utils.js b/src/core/utils.js index f4b925f6..677b8d90 100644 --- a/src/core/utils.js +++ b/src/core/utils.js @@ -576,7 +576,7 @@ export const sorters = { method: (a, b) => a.get("method").localeCompare(b.get("method")) }, tagsSorter: { - alpha: (a, b) => a.getIn([0, "operation", "tags", 0]).localeCompare(b.getIn([0, "operation", "tags", 0])) + alpha: (a, b) => a.localeCompare(b) } } From e2b73ebf2a65e583ab01f6d8ae81027fd5fe551b Mon Sep 17 00:00:00 2001 From: shockey Date: Thu, 13 Jul 2017 21:10:48 -0700 Subject: [PATCH 10/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c82e86d0..3ba6b44e 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ spec | A JSON object describing the OpenAPI Specification. When used, the `url` validatorUrl | By default, Swagger-UI attempts to validate specs against swagger.io's online validator. You can use this parameter to set a different validator URL, for example for locally deployed validators ([Validator Badge](https://github.com/swagger-api/validator-badge)). Setting it to `null` will disable validation. dom_id | The id of a dom element inside which SwaggerUi will put the user interface for swagger. oauth2RedirectUrl | OAuth redirect URL -tagsSorter | Apply a sort to the tag list of each API. It can be 'alpha' (sort by paths alphanumerically) or a function (see [Array.prototype.sort()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) to know how sort function works). Default is the order determined by Swagger-UI. +tagsSorter | Apply a sort to the tag list of each API. It can be 'alpha' (sort by paths alphanumerically) or a function (see [Array.prototype.sort()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) to learn how to write a sort function). Two tag name strings are passed to the sorter for each pass. Default is the order determined by Swagger-UI. operationsSorter | Apply a sort to the operation list of each API. It can be 'alpha' (sort by paths alphanumerically), 'method' (sort by HTTP method) or a function (see Array.prototype.sort() to know how sort function works). Default is the order returned by the server unchanged. configUrl | Configs URL parameterMacro | MUST be a function. Function to set default value to parameters. Accepts two arguments parameterMacro(operation, parameter). Operation and parameter are objects passed for context, both remain immutable From 28912dded3a330fb034a7a78361508c5d6f3deeb Mon Sep 17 00:00:00 2001 From: shockey Date: Thu, 13 Jul 2017 21:14:56 -0700 Subject: [PATCH 11/11] Update index.js --- src/core/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/core/index.js b/src/core/index.js index 23b206c6..fa5db888 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -17,7 +17,6 @@ const CONFIGS = [ "authorizations", "docExpansion", "tagsSorter", - "apisSorter", "maxDisplayedTags", "filter", "operationsSorter",