Skip to content

Commit 35394f4

Browse files
author
springdoc
authored
Merge pull request #199 from devnied/add-sort-config
Allow Operations and Tags sort in application configuration
2 parents 80bc5a7 + abfe924 commit 35394f4

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

springdoc-openapi-common/src/main/java/org/springdoc/core/SwaggerUiConfigProperties.java

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ public class SwaggerUiConfigProperties {
2121
// could be used to filter the tagged operations that are shown.
2222
private String filter;
2323

24+
// Apply a sort to the operation list of each API
25+
private String operationsSorter;
26+
// Apply a sort to the tag list of each API
27+
private String tagsSorter;
28+
2429
// Enables or disables deep linking for tags and operations.
2530
private Boolean deepLinking;
2631
// Controls the display of operationId in operations list.
@@ -57,6 +62,8 @@ public Map<String, String> getConfigParameters() {
5762
put("maxDisplayedTags", maxDisplayedTags, params);
5863
put("showExtensions", showExtensions, params);
5964
put("showCommonExtensions", showCommonExtensions, params);
65+
put("operationsSorter", operationsSorter, params);
66+
put("tagsSorter", tagsSorter, params);
6067
return params;
6168
}
6269

@@ -173,4 +180,20 @@ public Boolean getShowCommonExtensions() {
173180
public void setShowCommonExtensions(Boolean showCommonExtensions) {
174181
this.showCommonExtensions = showCommonExtensions;
175182
}
176-
}
183+
184+
public String getOperationsSorter() {
185+
return operationsSorter;
186+
}
187+
188+
public void setOperationsSorter(String operationsSorter) {
189+
this.operationsSorter = operationsSorter;
190+
}
191+
192+
public String getTagsSorter() {
193+
return tagsSorter;
194+
}
195+
196+
public void setTagsSorter(String tagsSorter) {
197+
this.tagsSorter = tagsSorter;
198+
}
199+
}

0 commit comments

Comments
 (0)