Spring+swagger document cannot be sorted problem resolved

Source: Internet
Author: User

The swagger used in the project to automatically generate documents, encountered a lot of problems after the combination. And for this sort of problem, after looking at the backend Swagger original code, found that depending on the current use of swagger (not springfox, should not be official, many online tutorials are spring combined with swagger, Used directly) although there is a sort of reader but none of them implement the sorting of the document.

To achieve sorting you can start with Swaggerui. In:

      New Swaggerui ({          ...      });

In the above code, we add the sort attribute:

New Swaggerui ({    ...     // can also be a function   // can also be ' alpha ' or a function  });

So the document can be sorted, of course, this seems to be said after swagger2.0 the two properties.

Spring+swagger document cannot be sorted problem resolved

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.