Questions tagged [swagger-codegen-maven-plugin]
55 questions
0
votes
2 answers
In Swagger CodeGen, how do you specify a field maximum with decimal places?
We're using Java 11 with the following version of Swagger Codegen
io.swagger.codegen.v3
swagger-codegen-maven-plugin
3.0.35
I have…

Dave
- 15,639
- 133
- 442
- 830
0
votes
0 answers
Swagger-codegen: Getter returns String instead of Enum value
I use the swagger-codegen-maven-plugin to generate Java classes and have trouble with the getter of an entity class field / member which type is an enum. Until version 2.2.3 the getter returns the enum value but with all versions above the getter…

AnnetteC
- 490
- 2
- 5
- 20
0
votes
1 answer
How to specify templateDir in Swagger Codegen (Gradle) for OpenAPI 3.0?
Anyone have any idea how to specify a templateDir for swagger codegen v3? I have attached a snippet of my build.gradle below
Also the setTemplateDir does not do anything so I am guessing thats not an existing method.
My class path is…

xWAV92OdD445CbzcZAEyunk2M06fJi
- 321
- 3
- 5
- 17
0
votes
1 answer
Swagger doesn't generate object from yaml file
I'm new in swagger.
I have a few yaml files and I try to genetare code, using swagger plugin in Intellij.
When I generate it, I have errors cannot find symbol. The symbol that he can't find is
TS29510NnrfNFManagementYamlcomponentsschemasFqdn
But…

Igor_M
- 308
- 2
- 12
0
votes
0 answers
Swagger-generated models have no validation
We use Camel for our application, so I initially thought it was an issue with the Camel plugins, but here's what I've tested with Java and OAS versions:
camel-restdsl-swagger-plugin (Java 8, Java 11, OAS v2.0)
camel-restdsl-openapi-plugin (Java 11,…

Ungeheuer
- 1,393
- 3
- 17
- 32
0
votes
1 answer
Use swagger-codegen in maven and split model into more package
I have two questions:
Is it possible to use swagger-codegen and split model into more packages? Like:
com.petstore.model.goods
com.petstore.model.customers
com.petstore.model.invoices
If this is not possible, which tool do you recommend?

Martin Tuma
- 11
- 2
0
votes
1 answer
Unable to generate classes for swagger
I am using the following config to generate swagger:
java: 6
swagger-codegen-maven-plugin: 2.1.3
io.swagger: 1.5.0
com.fasterxml.jackson.core: 2.7.0
When i run maven install(from intellij), get this error:
[ERROR] Failed to execute goal…

user1318369
- 715
- 5
- 15
- 34
0
votes
0 answers
Mustache file: Convert array of objects to list of comma separated values
I'm trying to use a mustache file to generate my API using the swagger codegen tool (maven plugin: https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen-maven-plugin)
I've created the .mustache file, and I have the…

user7999116
- 199
- 1
- 12
0
votes
1 answer
Swagger Codegen for OAS3
I'm trying to use Swagger Codegen for my OAS3 project.
I have cloned swagger-codegen branch 3.0.0. and when I run the generate command I get the following error:
[main] ERROR io.swagger.parser.SwaggerCompatConverter - failed to read resource…

Omer Nave
- 45
- 1
- 8
0
votes
1 answer
Why is here excess backslashes in "example" property of @ApiModelProperty annotation?
I generate yaml from one api method sourcecode with swagger-maven-plugin:
@ApiModelProperty(value = "Сенсоры устройства", example = "{\"BATTERY\":67, \"VOLUME\":50, \"AIRPLANE\":false, \"ALARM\":true, \"CHARGE\":false, \"MUTE\":false,…

Roman Patrushev
- 81
- 7