forked from loafle/openapi-generator-original
Issue5613 (#5616)
* Fixed Issue5162 consumes in GET-Methods * Fixed Issue5613 * Ran the shell scripts under bin * Tab removed
This commit is contained in:
parent
9bc8f37aa6
commit
00f2dc422d
@ -869,11 +869,13 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
hasFormParameters = true;
|
||||
}
|
||||
}
|
||||
String defaultContentType = hasFormParameters ? "application/x-www-form-urlencoded" : "application/json";
|
||||
String contentType = operation.getConsumes() == null || operation.getConsumes().isEmpty()
|
||||
? defaultContentType : operation.getConsumes().get(0);
|
||||
//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 contentType = operation.getConsumes() == null || operation.getConsumes().isEmpty() ? defaultContentType : operation.getConsumes().get(0);
|
||||
operation.setVendorExtension("x-contentType", contentType);
|
||||
}
|
||||
String accepts = getAccept(operation);
|
||||
operation.setVendorExtension("x-contentType", contentType);
|
||||
operation.setVendorExtension("x-accepts", accepts);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1 @@
|
||||
2.2.3-SNAPSHOT
|
@ -0,0 +1 @@
|
||||
2.2.3-SNAPSHOT
|
@ -0,0 +1 @@
|
||||
2.2.3-SNAPSHOT
|
@ -0,0 +1 @@
|
||||
2.2.3-SNAPSHOT
|
@ -0,0 +1 @@
|
||||
2.2.3-SNAPSHOT
|
@ -0,0 +1 @@
|
||||
2.2.3-SNAPSHOT
|
@ -0,0 +1 @@
|
||||
2.2.3-SNAPSHOT
|
@ -0,0 +1 @@
|
||||
2.2.3-SNAPSHOT
|
@ -0,0 +1 @@
|
||||
2.2.3-SNAPSHOT
|
@ -0,0 +1 @@
|
||||
2.2.3-SNAPSHOT
|
@ -0,0 +1 @@
|
||||
2.2.3-SNAPSHOT
|
@ -0,0 +1 @@
|
||||
2.2.3-SNAPSHOT
|
Loading…
x
Reference in New Issue
Block a user