0

I want to sort my API method in alphabetical order.

Int the doc it say that you just have to put :

window.swaggerUi = new SwaggerUi({
        // ...
        sorters : "alpha" // or sorter I've tried both
      });

The post is already related here.

But in my case this is not working at all and it is today quite difficult to find an API in swagger-UI.

And if I don't know if I update my swagger-ui version if i need to upgrade swagger too. In this case I cannot do this...

Any ideas ?

Community
  • 1
  • 1
hamdalaye
  • 107
  • 1
  • 12

2 Answers2

0

From their GitHub page, the correct key seems to be apisSorter and not sorters:

window.swaggerUi = new SwaggerUi({
    // (...)
    apisSorter : "alpha"
});
Salem
  • 12,808
  • 4
  • 34
  • 54
  • yes I've seen that, but it doesn't work with my current swagger-ui version. I've forgot to mention that... – hamdalaye May 07 '15 at 07:19
  • @hamdalaye Which swagger-ui version are you using? I can't find that version (1.3.12) on their [releases](https://github.com/swagger-api/swagger-ui/releases) page – Salem May 07 '15 at 08:39
  • I am using version 2.1.0-alpha.7. The 1.3.12 is the swagger-play2.version in my pom.xml : 1.3.12 1.3.12 – hamdalaye May 07 '15 at 09:26
0

Finally I have to upgrade my swaggerUI version, no choice... Thanks you Salem

Community
  • 1
  • 1
hamdalaye
  • 107
  • 1
  • 12