Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to change the order/sorting of endpoints is not supported #288

Open
PhlipTIP opened this issue Oct 16, 2023 · 0 comments
Open

Option to change the order/sorting of endpoints is not supported #288

PhlipTIP opened this issue Oct 16, 2023 · 0 comments

Comments

@PhlipTIP
Copy link

PhlipTIP commented Oct 16, 2023

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}}
  })```
PhlipTIP added a commit to PhlipTIP/gin-swagger that referenced this issue Oct 16, 2023
PhlipTIP added a commit to PhlipTIP/gin-swagger that referenced this issue Oct 16, 2023
PhlipTIP added a commit to PhlipTIP/gin-swagger that referenced this issue Oct 16, 2023
PhlipTIP added a commit to PhlipTIP/gin-swagger that referenced this issue Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant