The window.onload function for swaggerUI that contains the config does not support config for the operationsSorter value which handles the option to sort the endpoints either by method or alphabetically.
referencing the operationsSorter defined in the swagger.io docs
// Build a system
const ui = SwaggerUIBundle({
url: "{{.URL}}",
dom_id: '#swagger-ui',
validatorUrl: null,
oauth2RedirectUrl: {{.Oauth2RedirectURL}},
persistAuthorization: {{.PersistAuthorization}},
**//Proposed solution to add the operationsSorter when injecting config**
operationsSorter: "method",
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout",
docExpansion: "{{.DocExpansion}}",
deepLinking: {{.DeepLinking}},
defaultModelsExpandDepth: {{.DefaultModelsExpandDepth}}
})```
The window.onload function for swaggerUI that contains the config does not support config for the operationsSorter value which handles the option to sort the endpoints either by method or alphabetically.
referencing the operationsSorter defined in the swagger.io docs