forked from loafle/openapi-generator-original
property renames
This commit is contained in:
parent
d5e62086c8
commit
cab4ffa286
@ -22,11 +22,11 @@ import com.wordnik.swagger.models.Swagger;
|
||||
|
||||
public class ClientOptInput {
|
||||
private ClientOpts opts;
|
||||
private Swagger model;
|
||||
private Swagger swagger;
|
||||
protected CodegenConfig config;
|
||||
|
||||
public ClientOptInput model(Swagger model) {
|
||||
this.setModel(model);
|
||||
public ClientOptInput swagger(Swagger swagger) {
|
||||
this.setSwagger(swagger);
|
||||
return this;
|
||||
}
|
||||
public ClientOptInput opts(ClientOpts opts) {
|
||||
@ -49,11 +49,11 @@ public class ClientOptInput {
|
||||
return opts;
|
||||
}
|
||||
|
||||
public void setModel(Swagger model) {
|
||||
this.model = model;
|
||||
public void setSwagger(Swagger swagger) {
|
||||
this.swagger = swagger;
|
||||
}
|
||||
|
||||
public Swagger getModel() {
|
||||
return model;
|
||||
public Swagger getSwagger() {
|
||||
return swagger;
|
||||
}
|
||||
}
|
@ -39,7 +39,7 @@ public class Codegen extends DefaultGenerator {
|
||||
try{
|
||||
codegenInput
|
||||
.opts(clientArgs)
|
||||
.model(swagger);
|
||||
.swagger(swagger);
|
||||
|
||||
new Codegen().opts(codegenInput).generate();
|
||||
}
|
||||
|
@ -381,6 +381,8 @@ public class DefaultCodegen {
|
||||
if(languageSpecificPrimitives().contains(type))
|
||||
property.isPrimitiveType = true;
|
||||
}
|
||||
if("id".equals(property.name))
|
||||
Json.prettyPrint(property);
|
||||
return property;
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ public class DefaultGenerator implements Generator {
|
||||
public Generator opts(ClientOptInput opts) {
|
||||
this.opts = opts;
|
||||
|
||||
this.swagger = opts.getModel();
|
||||
this.swagger = opts.getSwagger();
|
||||
ClientOpts clientOpts = opts.getOpts();
|
||||
this.config = opts.getConfig();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user