From 06649b3d81d8a0f69ce05319b2537227a0cfe34b Mon Sep 17 00:00:00 2001
From: Lars Johansson <lars.johansson@ess.eu>
Date: Fri, 14 Jul 2023 15:29:53 +0200
Subject: [PATCH] Update sorting of operations and tags in Swagger UI

---
 src/main/resources/application.properties | 8 +++++++-
 src/test/resources/application.properties | 8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index e1a4e4a3..1f7dad03 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -44,7 +44,7 @@ spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
 spring.jpa.hibernate.ddl-auto=none
 spring.jpa.hibernate.show-sql=true
 
-# open api, swagger ui
+# open api
 #     doc
 app.version=0.0.1-SNAPSHOT
 openapi.externaldocs.description=ESS Naming Convention
@@ -66,3 +66,9 @@ openapi.info.description=\
   - Regular expressions are not supported for searches. Regex-like behavior is available with _ underscore, 0 or 1 occurrences of any character, % percent, any number of any character.
 openapi.info.license.name=Copyright (C) 2022 European Spallation Source ERIC.
 openapi.info.title=Naming REST API
+
+# springdoc
+#     sort the operation list of each API
+#     sort the tags
+springdoc.swagger-ui.operationsSorter=method
+springdoc.swagger-ui.tagsSorter=alpha
diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties
index 70ee616d..beac2139 100644
--- a/src/test/resources/application.properties
+++ b/src/test/resources/application.properties
@@ -45,7 +45,7 @@ spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
 spring.jpa.hibernate.ddl-auto=none
 spring.jpa.hibernate.show-sql=true
 
-# open api, swagger ui
+# open api
 #     doc
 app.version=0.0.1-SNAPSHOT
 openapi.externaldocs.description=ESS Naming Convention
@@ -68,6 +68,12 @@ openapi.info.description=\
 openapi.info.license.name=Copyright (C) 2022 European Spallation Source ERIC.
 openapi.info.title=Naming REST API
 
+# springdoc
+#     sort the operation list of each API
+#     sort the tags
+springdoc.swagger-ui.operationsSorter=method
+springdoc.swagger-ui.tagsSorter=alpha
+
 
 # ------------------------------------------------------------------------------
 # Note
-- 
GitLab