Permalink
Browse files

apidocs - removing api-docs relatedOperations when targetting 'string…

…' type
  • Loading branch information...
fcamblor committed Sep 3, 2017
1 parent 5ba615b commit fcb821db8c7356ff52d9d01016c31e43a57c82d1
Showing with 4 additions and 2 deletions.
  1. +4 −2 restx-apidocs/src/main/java/restx/apidocs/ApiDeclarationRoute.java
@@ -103,9 +103,11 @@ public ApiDeclarationRoute(@Named(FrontObjectMapperFactory.WRITER_NAME) ObjectWr
Set<OperationReference> related = new LinkedHashSet<>(operation.relatedOperations);
// add related by type
related.addAll(operationsByType.get(getTargetType(operation.responseClass)));
if(!"string".equals(getTargetType(operation.responseClass))){
related.addAll(operationsByType.get(getTargetType(operation.responseClass)));
}
Optional<OperationParameterDescription> bodyParameter = operation.findBodyParameter();
if (bodyParameter.isPresent()) {
if (bodyParameter.isPresent() && !"string".equals(bodyParameter.get().dataType)) {
related.addAll(operationsByType.get(getTargetType(bodyParameter.get().dataType)));
}

0 comments on commit fcb821d

Please sign in to comment.