forked from loafle/openapi-generator-original
use file.separator, minor code format enhancement (#5844)
This commit is contained in:
parent
6d9e862381
commit
77c14bca39
@ -9,6 +9,7 @@ import io.swagger.models.Swagger;
|
|||||||
import io.swagger.models.properties.*;
|
import io.swagger.models.properties.*;
|
||||||
|
|
||||||
import javax.validation.constraints.Null;
|
import javax.validation.constraints.Null;
|
||||||
|
import java.io.File;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
public class PistacheServerCodegen extends DefaultCodegen implements CodegenConfig {
|
public class PistacheServerCodegen extends DefaultCodegen implements CodegenConfig {
|
||||||
@ -139,8 +140,7 @@ public class PistacheServerCodegen extends DefaultCodegen implements CodegenConf
|
|||||||
if (methodResponse.getSchema() != null) {
|
if (methodResponse.getSchema() != null) {
|
||||||
CodegenProperty cm = fromProperty("response", methodResponse.getSchema());
|
CodegenProperty cm = fromProperty("response", methodResponse.getSchema());
|
||||||
op.vendorExtensions.put("x-codegen-response", cm);
|
op.vendorExtensions.put("x-codegen-response", cm);
|
||||||
if(cm.datatype == "HttpContent")
|
if(cm.datatype == "HttpContent") {
|
||||||
{
|
|
||||||
op.vendorExtensions.put("x-codegen-response-ishttpcontent", true);
|
op.vendorExtensions.put("x-codegen-response-ishttpcontent", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -206,9 +206,6 @@ public class PistacheServerCodegen extends DefaultCodegen implements CodegenConf
|
|||||||
}
|
}
|
||||||
op.vendorExtensions.put("x-codegen-pistache-consumesJson", consumeJson);
|
op.vendorExtensions.put("x-codegen-pistache-consumesJson", consumeJson);
|
||||||
op.vendorExtensions.put("x-codegen-pistache-isParsingSupported", isParsingSupported);
|
op.vendorExtensions.put("x-codegen-pistache-isParsingSupported", isParsingSupported);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return objs;
|
return objs;
|
||||||
@ -331,7 +328,7 @@ public class PistacheServerCodegen extends DefaultCodegen implements CodegenConf
|
|||||||
* when the class is instantiated
|
* when the class is instantiated
|
||||||
*/
|
*/
|
||||||
public String modelFileFolder() {
|
public String modelFileFolder() {
|
||||||
return outputFolder + "/model";
|
return (outputFolder + "/model").replace("/", File.separator);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -340,11 +337,11 @@ public class PistacheServerCodegen extends DefaultCodegen implements CodegenConf
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String apiFileFolder() {
|
public String apiFileFolder() {
|
||||||
return outputFolder + "/api";
|
return (outputFolder + "/api").replace("/", File.separator);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String implFileFolder() {
|
private String implFileFolder() {
|
||||||
return outputFolder + "/" + implFolder;
|
return (outputFolder + "/" + implFolder).replace("/", File.separator);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user