Questions tagged [swagger-codegen-maven-plugin]

55 questions
1
vote
1 answer

Swagger doesn't resolve part of the references or resolve for one object but doesn't resolve for another object

I'm trying to generate a Client with swagger. I have a yaml file that have references to another yaml files. All these files are in the same directory. The problem is that part of references are resolved, but part of them are not. For example, in my…
1
vote
2 answers

"swagger-codegen-maven-plugin:3.0.0 or one of its dependencies could not be resolved"

UPDATE: I see on this URL https://repo1.maven.org/maven2/io/swagger/swagger-codegen-maven-plugin/ that the only version of swagger codegen is 3.0.0-rc1 I'm trying to build a REST API with Java/SpringBoot and using the swagger-codegen plugin. I am…
ennth
  • 1,698
  • 5
  • 31
  • 63
1
vote
0 answers

swagger codegen maven overwriting generated file with same name but different case

I am using swagger-codegen-maven-plugin version 2.2.1 to generate stubs using yaml file. I am facing issue here. when i try to generate class with Same name but different case only one file is present in the generated folder. I have below 2…
nikhil
  • 877
  • 3
  • 11
  • 36
1
vote
1 answer

skip gradle files generation when using swagger-codgen-maven-plugin for REST client

I want to skip gradle files creation when I generate REST client using swagger-codgen-maven-plugin, is there an option or a plugin configuration that can be used so that Gradle and associated files are not generated? My…
1
vote
1 answer

How to convert byte[] in to ResponseEntity as appplication/octet-stream

My application is build on SprinBoot, Java Technology I want write API for file download and I am using swagger-codegen-maven-plugin and in the specification its mentioned as below for file download content: application/octect-stream: …
aeroboy
  • 149
  • 4
  • 14
1
vote
0 answers

How to use swagger-codegen of openAPI model with both named properties and properties declared as additionalAttributes

I'm trying to use the swagger-codegen-maven-plugin to generate Java code for an OpenAPI specification which contains the following declaration: type: object properties: state: type: string enum: - aborted -…
priderider
  • 21
  • 1
1
vote
2 answers

Swagger-codegen-maven: Change where files are generated to

I'm currently using swagger-codegen through the maven plugin: https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen-maven-plugin. I've set the place where I want my api files to be generated with the…
user7999116
  • 199
  • 1
  • 12
1
vote
0 answers

Swagger-CodeGen Marker for Package in Java Code generation

I'm using the Swagger Maven Plugin (GitHub). Is it possible for this, the CodeGen itself or another tool for Swagger to add a Marker in the YAML-file that decides which package the class should go? Or the other way around is it possible to change…
1
vote
1 answer

Swagger codegen maven plugin with path variables and request params OpenApi produces not working code

I'm facing a problem with swagger codegen generatered stubs. I have 2 services. First exposes REST api with two methods with path var and request param: @GetMapping(value = "/start/{pathVar}/operators", params = "login") public Operator…
1
vote
1 answer

How to generate maven-jar-plugin 3.1.2 version in pom by swagger-codegen-maven-plugin

I am using swagger-codegen-maven-plugin 2.4.7 version to generate project. it generates maven-jar-plugin 2.6 version, but I need 3.1.2 version. is there a way to generate custom plugin version? generated pom.xml:
Maria Dorohin
  • 355
  • 4
  • 17
1
vote
1 answer

How to regenerate the source spring boot server-code from swagger-codegen-maven-plugin with modified swagger definition

My requirement is that I have to generate the springboot server code from a swagger definition. I have generated the code with the help of below-mentioned command (by using swagger-codegen-cli-2.3.1.jar). java -jar swagger-codegen-cli-2.3.1.jar…
Mohit Mehrotra
  • 201
  • 1
  • 6
  • 12
1
vote
1 answer

Access Swagger codegen model vars in mustache template

I'm trying to create my first custom codegenerator with swagger codegen (Version 2.3.1). My problem is, that I cannot seem to access the "vars" of a model. I'm using the petstore.json sample as input, and the swagger-codegen-maven-plugin for…
0
votes
0 answers

How to use the object location present in AWS s3 as a path while defining the tag in swagger-codegen?

Currently looking into the possible solutions to use the OAS/yaml file present in s3 to be used as the input to the code generator swagger code gen maven plugin tag. When the object Url of the OAS which is stored in s3 is used there is a error…
0
votes
0 answers

How do I get the swagger-codegen-maven-plugin plugin to use the "errorOnUnknownEnum" property?

I'm using the following io.swagger.codegen.v3 swagger-codegen-maven-plugin 3.0.42 In my Swagger plugin configuration, I have set …
0
votes
0 answers

Migrating Swagger-code-gen to openapi-generator-maven-plugin with Mustache: Illegal start of expression ',', ')', or '[' expected

Greetings human beings. I'm trying to migrate application with a several of other libaries from Java 11, Spring-Boot 2.7.x to Java 17, Spring-Boot 3 We also need to migrate swagger-codegen-maven-plugin to openapi-generator-maven-plugin, because we…