Swagger-codegen: [JAVA] Rest-assured library not found in versions 3.0.x

Created on 8 Mar 2019  路  6Comments  路  Source: swagger-api/swagger-codegen

Description

I want to generate my Java sdk using the rest-assured library. This was available in 2.4.x but seems to have disappeared in 3.0.x.

Error:

[ERROR] Failed to execute goal io.swagger.codegen.v3:swagger-codegen-maven-plugin:3.0.5:generate (default) on project api: Execution default of goal io.swagger.codegen.v3:swagger-codegen-maven-plugin:3.0.5:generate failed: Unknown library: rest-assured
[ERROR] Available libraries:
[ERROR] jersey1
[ERROR] feign
[ERROR] jersey2
[ERROR] okhttp-gson
[ERROR] retrofit
[ERROR] retrofit2
[ERROR] resttemplate
[ERROR] resteasy
[ERROR] vertx
[ERROR] google-api-client
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.

Plugin configuration:

<plugin>
  <groupId>io.swagger.codegen.v3</groupId>
  <artifactId>swagger-codegen-maven-plugin</artifactId>
  <version>3.0.5</version>
  <executions>
    <execution>
      <phase>compile</phase>
      <goals>
        <goal>generate</goal>
      </goals>
      <configuration>
        <output>xxx</output>
        <inputSpec>xxx</inputSpec>
        <language>java</language>
        <groupId>xxx</groupId>
        <artifactId>xxx</artifactId>
        <artifactVersion>xxx</artifactVersion>
        <invokerPackage>xxx</invokerPackage>
        <apiPackage>xxx</apiPackage>
        <modelPackage>xxx</modelPackage>
        <generateApiTests>false</generateApiTests>
        <configOptions>
          <dateLibrary>joda</dateLibrary>
        </configOptions>
        <library>rest-assured</library>
      </configuration>
    </execution>
  </executions>
</plugin>
Swagger-codegen version

2.4.0 (http://central.maven.org/maven2/io/swagger/swagger-codegen-maven-plugin/2.4.0/)

3.0.0 (http://central.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-maven-plugin/3.0.0/)

3.0.5 (http://central.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-maven-plugin/3.0.5/)

Swagger declaration file content or url
Command line used for generation

mvn clean install -DskipTests=true

Steps to reproduce

Run the command line command shown above

Related issues/PRs
Suggest a fix/enhancement

Most helpful comment

Hello guys! Could you please add rest-assured support for latest version 3.0.x ? I need to use swagger plugin on my project.

All 6 comments

Do you have any information regarding this? Indeed in version 3.0.7 this is still not the case.

Do you have any information regarding this? Indeed in version 3.0.7 this is still not the case.

I join to this question!
Guys, how i can you rest-assured to generate java client ?

Has anyone found a solution?

Has anyone found a solution?

@Dmitry-QA you can try https://github.com/OpenAPITools/openapi-generator, it support rest-assured.

Regards

Sent with GitHawk

Hello guys! Could you please add rest-assured support for latest version 3.0.x ? I need to use swagger plugin on my project.

Hello guys! Could you please add rest-assured support for latest version 3.0.x ? I need to use swagger plugin on my project.

@daniilmatafonov latest version 4.x
Regards

Sent with GitHawk

Was this page helpful?
0 / 5 - 0 ratings