From 90251daf7e61d6700a6efea7a5e8fea73bae30d7 Mon Sep 17 00:00:00 2001 From: joshua bauer Date: Wed, 10 May 2017 17:18:11 -0700 Subject: [PATCH] Made the swagger resource prefix configurable. --- .../io/sinistral/proteus/server/swagger/Reader.java | 3 ++- .../io/sinistral/proteus/services/BaseService.java | 2 ++ .../sinistral/proteus/services/SwaggerService.java | 7 +++++-- src/main/resources/reference.conf | 13 +++++++++++++ 4 files changed, 22 insertions(+), 3 deletions(-) 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 07e4884..beaec61 100644 --- a/src/main/java/io/sinistral/proteus/server/swagger/Reader.java +++ b/src/main/java/io/sinistral/proteus/server/swagger/Reader.java @@ -7,6 +7,7 @@ import java.lang.reflect.Method; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; +import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -1263,7 +1264,7 @@ private static boolean isValidResponse(Type type) { if( cls != null ) { - if( cls.isAssignableFrom(ServerResponse.class) || cls.isAssignableFrom(CompletableFuture.class)) + if( cls.isAssignableFrom(ServerResponse.class) || cls.isAssignableFrom(CompletableFuture.class) || cls.isAssignableFrom(ByteBuffer.class)) { return false; } diff --git a/src/main/java/io/sinistral/proteus/services/BaseService.java b/src/main/java/io/sinistral/proteus/services/BaseService.java index 2f8bb4a..bacafcd 100644 --- a/src/main/java/io/sinistral/proteus/services/BaseService.java +++ b/src/main/java/io/sinistral/proteus/services/BaseService.java @@ -14,6 +14,8 @@ import com.typesafe.config.Config; /** + * An abstract base class for a Proteus service. + * * @author jbauer * */ diff --git a/src/main/java/io/sinistral/proteus/services/SwaggerService.java b/src/main/java/io/sinistral/proteus/services/SwaggerService.java index f3473d6..aabd887 100644 --- a/src/main/java/io/sinistral/proteus/services/SwaggerService.java +++ b/src/main/java/io/sinistral/proteus/services/SwaggerService.java @@ -61,8 +61,7 @@ public class SwaggerService extends BaseService implements Supplier