I cannot find any working example, how to achieve the following: I want my API methods in the Swagger-UI sorted either by methods (GET-POST-PUT-DELETE) OR/AND alphabetically
Update for Swagger 3.18.3
window.ui = SwaggerUIBundle({ ... operationsSorter: function (a, b) { var order = {'get': '0', 'post': '1', 'put': '2', 'delete': '3'}; return order[a.get("method")].localeCompare(order[b.get("method")]); }, ... });