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 {
|
public class ClientOptInput {
|
||||||
private ClientOpts opts;
|
private ClientOpts opts;
|
||||||
private Swagger model;
|
private Swagger swagger;
|
||||||
protected CodegenConfig config;
|
protected CodegenConfig config;
|
||||||
|
|
||||||
public ClientOptInput model(Swagger model) {
|
public ClientOptInput swagger(Swagger swagger) {
|
||||||
this.setModel(model);
|
this.setSwagger(swagger);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
public ClientOptInput opts(ClientOpts opts) {
|
public ClientOptInput opts(ClientOpts opts) {
|
||||||
@ -49,11 +49,11 @@ public class ClientOptInput {
|
|||||||
return opts;
|
return opts;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setModel(Swagger model) {
|
public void setSwagger(Swagger swagger) {
|
||||||
this.model = model;
|
this.swagger = swagger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Swagger getModel() {
|
public Swagger getSwagger() {
|
||||||
return model;
|
return swagger;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -39,7 +39,7 @@ public class Codegen extends DefaultGenerator {
|
|||||||
try{
|
try{
|
||||||
codegenInput
|
codegenInput
|
||||||
.opts(clientArgs)
|
.opts(clientArgs)
|
||||||
.model(swagger);
|
.swagger(swagger);
|
||||||
|
|
||||||
new Codegen().opts(codegenInput).generate();
|
new Codegen().opts(codegenInput).generate();
|
||||||
}
|
}
|
||||||
|
@ -381,6 +381,8 @@ public class DefaultCodegen {
|
|||||||
if(languageSpecificPrimitives().contains(type))
|
if(languageSpecificPrimitives().contains(type))
|
||||||
property.isPrimitiveType = true;
|
property.isPrimitiveType = true;
|
||||||
}
|
}
|
||||||
|
if("id".equals(property.name))
|
||||||
|
Json.prettyPrint(property);
|
||||||
return property;
|
return property;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ public class DefaultGenerator implements Generator {
|
|||||||
public Generator opts(ClientOptInput opts) {
|
public Generator opts(ClientOptInput opts) {
|
||||||
this.opts = opts;
|
this.opts = opts;
|
||||||
|
|
||||||
this.swagger = opts.getModel();
|
this.swagger = opts.getSwagger();
|
||||||
ClientOpts clientOpts = opts.getOpts();
|
ClientOpts clientOpts = opts.getOpts();
|
||||||
this.config = opts.getConfig();
|
this.config = opts.getConfig();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user