Swagger Codegen Cli

275 views
Skip to first unread message

Sivaram S

unread,
Jan 30, 2017, 12:36:29 AM1/30/17
to Swagger
Hi all,
I am an beginner in Swagger and I have an api.yaml file in a Spring boot based jar and intend to publish this as a reuse library for other Spring Boot Applications.
In my library, I use Swagger Client generation to generate the models and classes to make the REST call.

<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-cli</artifactId>
<version>2.2.1</version>
</dependency>

For logging, I use https://github.com/SAP/cf-java-logging-support as mentioned in the link I use logback associated with this.

The build plugin in my POM.XML is 
<plugin>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/rest-api.yaml</inputSpec>
<language>java</language>

<invokerPackage>com.demo.lib.client.bb</invokerPackage>
<apiPackage>com.demo.lib.client.bb.api</apiPackage>
<modelPackage>com.demo.lib.client.bb.model</modelPackage>
<configOptions>
<dateLibrary>java8</dateLibrary>
</configOptions>


<output>target/generated-sources</output>
</configuration>
</execution>
</executions>
</plugin>


When I build my library, it prints out a  warning like below
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/i064893/.m2/repository/ch/qos/logback/logback-classic/1.1.8/logback-classic-1.1.8.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/i064893/.m2/repository/io/swagger/swagger-codegen-cli/2.2.1/swagger-codegen-cli-2.2.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]

How do I stop this error ? in the application consuming the library it fails in build process.


Thanks in advance !

Regards.

tony tam

unread,
Jan 30, 2017, 12:04:18 PM1/30/17
to swagger-sw...@googlegroups.com
That’s not an error, it’s just an INFO statement and doesn’t harm anything.  There is no error in your message, so please post it if you’re getting one.

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages