From 415e1d50abc0309157672fce0fd695ad7ba99e53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sevket=20G=C3=B6kay?= Date: Sun, 5 Jan 2025 13:14:53 +0100 Subject: [PATCH] ensure consistent OpenAPI controller/endpoint ordering see https://springdoc.org/#properties --- .../java/de/rwth/idsg/steve/config/ApiDocsConfiguration.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/de/rwth/idsg/steve/config/ApiDocsConfiguration.java b/src/main/java/de/rwth/idsg/steve/config/ApiDocsConfiguration.java index 18b36f5e5..2b1d65076 100644 --- a/src/main/java/de/rwth/idsg/steve/config/ApiDocsConfiguration.java +++ b/src/main/java/de/rwth/idsg/steve/config/ApiDocsConfiguration.java @@ -60,6 +60,10 @@ public class ApiDocsConfiguration { System.setProperty("springdoc.swagger-ui.path", "/manager/swagger-ui/index.html"); // We only want REST APIs here (de.rwth.idsg.steve.web.api package) System.setProperty("springdoc.paths-to-match", "/api/**"); + // Sort controllers alphabetically by their path + System.setProperty("springdoc.swagger-ui.tagsSorter", "alpha"); + // Sort endpoints (within a controller) alphabetically by their path + System.setProperty("springdoc.swagger-ui.operationsSorter", "alpha"); } @Bean