* Fixed Issue5162 consumes in GET-Methods

* Fixed Issue5613

* Ran the shell scripts under bin

* Tab removed
This commit is contained in:
davidgri 2017-06-04 18:38:43 +02:00 committed by wing328
parent 9bc8f37aa6
commit 00f2dc422d
13 changed files with 18 additions and 4 deletions

View File

@ -869,11 +869,13 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
hasFormParameters = true; hasFormParameters = true;
} }
} }
//only add content-Type if its no a GET-Method
if(path.getGet() != null || ! operation.equals(path.getGet())){
String defaultContentType = hasFormParameters ? "application/x-www-form-urlencoded" : "application/json"; String defaultContentType = hasFormParameters ? "application/x-www-form-urlencoded" : "application/json";
String contentType = operation.getConsumes() == null || operation.getConsumes().isEmpty() String contentType = operation.getConsumes() == null || operation.getConsumes().isEmpty() ? defaultContentType : operation.getConsumes().get(0);
? defaultContentType : operation.getConsumes().get(0);
String accepts = getAccept(operation);
operation.setVendorExtension("x-contentType", contentType); operation.setVendorExtension("x-contentType", contentType);
}
String accepts = getAccept(operation);
operation.setVendorExtension("x-accepts", accepts); operation.setVendorExtension("x-accepts", accepts);
} }
} }

View File

@ -0,0 +1 @@
2.2.3-SNAPSHOT

View File

@ -0,0 +1 @@
2.2.3-SNAPSHOT

View File

@ -0,0 +1 @@
2.2.3-SNAPSHOT

View File

@ -0,0 +1 @@
2.2.3-SNAPSHOT

View File

@ -0,0 +1 @@
2.2.3-SNAPSHOT

View File

@ -0,0 +1 @@
2.2.3-SNAPSHOT

View File

@ -0,0 +1 @@
2.2.3-SNAPSHOT

View File

@ -0,0 +1 @@
2.2.3-SNAPSHOT

View File

@ -0,0 +1 @@
2.2.3-SNAPSHOT

View File

@ -0,0 +1 @@
2.2.3-SNAPSHOT

View File

@ -0,0 +1 @@
2.2.3-SNAPSHOT

View File

@ -0,0 +1 @@
2.2.3-SNAPSHOT