Swagger API Operations Ordering

后端 未结 2 705
野趣味
野趣味 2020-12-20 14:37

How do I sort my operation by method alphabetically e.g. DELETE, GET, POST, PUT.

I have read from

2条回答
  •  鱼传尺愫
    2020-12-20 15:37

    @Bean
    public UiConfiguration uiConfig() {
        return UiConfigurationBuilder
                .builder()
                .operationsSorter(OperationsSorter.METHOD)
                .build();
    }
    

    This works for me. I'm using Spring Boot 2.2.0.M6, Swagger UI 2.9.2

提交回复
热议问题