From 66e47e5cbe651aae9eeeca9fdb4ba76b6a3877c7 Mon Sep 17 00:00:00 2001 From: joshua bauer Date: Tue, 10 Apr 2018 16:54:13 -0700 Subject: [PATCH] More tag sorting. --- .../java/io/sinistral/proteus/server/swagger/Reader.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/io/sinistral/proteus/server/swagger/Reader.java b/src/main/java/io/sinistral/proteus/server/swagger/Reader.java index ddb3871..f68d15b 100644 --- a/src/main/java/io/sinistral/proteus/server/swagger/Reader.java +++ b/src/main/java/io/sinistral/proteus/server/swagger/Reader.java @@ -457,6 +457,14 @@ private Swagger read(Class cls, String parentPath, String parentMethod, boole } } } + + List swaggerTags = new ArrayList(swagger.getTags()); + + swaggerTags.sort( (a,b) -> { + return a.getName().compareTo(b.getName()); + }); + + swagger.setTags(swaggerTags); return swagger; }