Add bin/jaxrs-resteasy-petstore-server.sh

Add sample into samples/petstore/jaxrs-resteasy
Update multipart/form-data ability
This commit is contained in:
Alex
2016-02-04 01:01:28 +06:00
parent d98063083b
commit d2a3492dd1
41 changed files with 1926 additions and 8 deletions

View File

@@ -219,10 +219,19 @@ public class JavaResteasyServerCodegen extends JavaClientCodegen implements Code
@Override
public Map<String, Object> postProcessOperations(Map<String, Object> objs) {
Map<String, Object> operations = (Map<String, Object>) objs.get("operations");
if (operations != null) {
List<CodegenOperation> ops = (List<CodegenOperation>) operations.get("operation");
for (CodegenOperation operation : ops) {
if (operation.hasConsumes == Boolean.TRUE) {
Map<String, String> firstType = operation.consumes.get(0);
if (firstType != null) {
if ("multipart/form-data".equals(firstType.get("mediaType"))) {
operation.isMultipart = Boolean.TRUE;
}
}
}
List<CodegenResponse> responses = operation.responses;
if (responses != null) {
for (CodegenResponse resp : responses) {