From 48b70cfa8106cfb1353e37fef13db4b8426663d7 Mon Sep 17 00:00:00 2001 From: Philipp Kaiser Date: Mon, 17 Feb 2020 16:06:47 +0100 Subject: [PATCH] #421 Always use InputStream and StreamingOuput for type "any" --- .../jaxrs/generator/builders/resources/ResourceBuilder.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/raml-to-jaxrs/jaxrs-code-generator/src/main/java/org/raml/jaxrs/generator/builders/resources/ResourceBuilder.java b/raml-to-jaxrs/jaxrs-code-generator/src/main/java/org/raml/jaxrs/generator/builders/resources/ResourceBuilder.java index 974c59238..bc93b3353 100644 --- a/raml-to-jaxrs/jaxrs-code-generator/src/main/java/org/raml/jaxrs/generator/builders/resources/ResourceBuilder.java +++ b/raml-to-jaxrs/jaxrs-code-generator/src/main/java/org/raml/jaxrs/generator/builders/resources/ResourceBuilder.java @@ -209,8 +209,7 @@ private void createParamteter(MethodSpec.Builder methodSpec, GRequest gRequest, return; } - if (gRequest.type().name().equals("any") && "application/octet-stream".equals(gRequest.mediaType())) { - + if (gRequest.type().name().equals("any")) { TypeName typeName = ClassName.get(InputStream.class); methodSpec.addParameter(ParameterSpec.builder(typeName, "entity").build()); } else { @@ -450,7 +449,7 @@ public ResponseClassExtension apply(@Nullable Collection