Swagger-codegen 2.1.0-M2 Released!

522 views
Skip to first unread message

Ron

unread,
Apr 7, 2015, 11:04:08 AM4/7/15
to swagger-sw...@googlegroups.com
We're happy to announce the next milestone release of swagger-codegen!

swagger-codegen 2.1.0-M2

This version of swagger codegen has improved support for client generation as well as new target support. Thanks to community contributions, we now have added support for the following clients:

  • async-scala
  • Ruby
  • csharp

We also are excited to provide support for spring-mvc with the new springfox project.

You can run the codegen locally, online via http://generator.swagger.io or interactively in http://editor.swagger.io

Usage notes

There are several new targets in the root project. You can now run integration-tests by running:

mvn integration-test -Psamples

which will, assuming you have the necessary compilers, etc installed, run tests against the generated clients.

Notable features

#444 updated nodejs server generator to support 2.0 specs
#437 updated executable jar for better usability
#225 updated objective-c generator to include AFNetworking 2.0+
#41 added HTTP patch support
#514 java codegen supporting array parameters in query, path, header
#552 added support for parsing reusable parameters
#448 support for maps in generated clients
#440 added async scala client generator
#191 Objective-c file uploads

Notable bug fixes

#577 support newlines, quotes in descriptions, general text
#503 support for invalid character in language name generation
#497 NPE with resource path : /
#557 issues generating jaxrs servers from example specs
#380 support for windows builds


Venkat Nalla

unread,
Apr 22, 2015, 10:16:21 AM4/22/15
to swagger-sw...@googlegroups.com
Hi Ron, Does it support code generation for JAX-RS 2.0?

Ron Ratovsky

unread,
Apr 22, 2015, 10:23:59 AM4/22/15
to swagger-sw...@googlegroups.com
The current template for JAX-RS client or server utilize Jersey 1 which means JAX-RS 1.0.

However, it would be fairly easy to adapt the templates or create new ones to satisfy the JAX-RS 2.0 requirement.

--
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.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

RashMin Gadhavi

unread,
May 4, 2015, 12:02:11 PM5/4/15
to swagger-sw...@googlegroups.com

We implement Restful API with Sub resources.
For example 
http://localhost/Resource1/subresource1
Another is 
http://localhost/Resource1/IntermediateResource1/subresource1

But the Resource1 and IntermediateResource1 do not have concrete implementations. So I can not apply @APIOperations and @ApiParam.

When I apply annotations at subresource1 - I get duplicate API paths.

How to handle this? Does below release handle these cases?



On Tuesday, April 7, 2015 at 11:04:08 AM UTC-4, Ron wrote:

Ron Ratovsky

unread,
May 4, 2015, 12:03:19 PM5/4/15
to swagger-sw...@googlegroups.com
As this is unrelated to the topic, please create a separate topic for the problem you have.

--
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.

Alexander Chávez

unread,
May 11, 2015, 6:28:14 PM5/11/15
to swagger-sw...@googlegroups.com
Although on https://github.com/swagger-api/swagger-codegen it shows that this version of Codegen supports Swagger Spec 1.0, 1.1, 1.2, and 2.0, the online tools don't support any spec other than 2.0?

tony tam

unread,
May 11, 2015, 8:20:20 PM5/11/15
to swagger-sw...@googlegroups.com, alexn...@gmail.com
Only the swagger-editor doesn't support older swagger versions.   Online codegen does.

priyanka

unread,
May 20, 2015, 3:24:54 PM5/20/15
to swagger-sw...@googlegroups.com, alexn...@gmail.com
Hi Tony,


I have tried to run petstore sample project present under spring-mvc in swagger-codegen using spring fox, but the application is not working. 
My project is running is with spring 4.1 version with jdk 1.6 in tomcat. 

Currently exception i am running is no such Method error: com.wordnik.swagger.models.ModelImpl.example

Anyway to run the sample applictaion

tony tam

unread,
May 20, 2015, 3:37:43 PM5/20/15
to swagger-sw...@googlegroups.com, priyank...@gmail.com, alexn...@gmail.com
Hi, please do the following.

* In http://editor.swagger.io open the default petstore by choosing file/open example/petsture_full.yaml
* Choose Generate Server/Spring MVC
* Unpack the downloaded zip file, cd into it.
* Run this:

mvn clean package jetty:run

* Open http://localhost:8002/v2/api-docs to see the swagger-json

priyanka

unread,
May 20, 2015, 4:06:59 PM5/20/15
to swagger-sw...@googlegroups.com, alexn...@gmail.com, priyank...@gmail.com
hi tony,

followed the below steps but received the below error .   for 'com.wordnik:swagger-jersey-jaxrs:jar:1.5.3-M1-SNAPSHOT'.


[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24.739 s
[INFO] Finished at: 2015-05-21T01:34:37+05:30
[INFO] Final Memory: 7M/17M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project swagger-spring-mvc-server: Could not r
esolve dependencies for project io.swagger:swagger-spring-mvc-server:jar:1.0.0:
Could not find artifact com.wordnik:swagger-jersey-jaxrs:jar:1.5.3-M1-SNAPSHOT i
elp 1]

priyanka

unread,
May 21, 2015, 3:42:03 PM5/21/15
to swagger-sw...@googlegroups.com, alexn...@gmail.com
hi, the issue got resolved :)

but i have added one method under "PetsApi' class to print Hello message. But the swagger is not able to judge the method and including it api-docs
code :@ApiOperation(value = "/hello", notes = "Returns Hello String")
    @ApiResponses(value = {
      @ApiResponse(code = 200, message = "Hello Response"),
      @ApiResponse(code = 0, message = "unexpected error") })
    @RequestMapping(value = "/hello", produces = { "text/html" },method = RequestMethod.GET)
    public String sayHello()
        throws io.swagger.api.NotFoundException {
        // do some magic!
        return "Welcome to Swagger";
    }
 is something else is required?

vipin gupta

unread,
May 28, 2015, 1:29:25 PM5/28/15
to swagger-sw...@googlegroups.com
Hi All,

I  downloaded the latest zip file from https://github.com/swagger-api/swagger-codegen .  I am running with  java 7 on Mac. When i am running ./bin/java-petstore.sh, I am getting this error.  Could you please help me to resolve this error .


Exception in thread "main" java.lang.SecurityException: no manifiest section for signature file entry javax/activation/MimeType.class

at sun.security.util.SignatureFileVerifier.verifySection(SignatureFileVerifier.java:446)

at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:297)

at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:240)

at java.util.jar.JarVerifier.processEntry(JarVerifier.java:317)

at java.util.jar.JarVerifier.update(JarVerifier.java:228)

at java.util.jar.JarFile.initializeVerifier(JarFile.java:348)

at java.util.jar.JarFile.getInputStream(JarFile.java:415)

at sun.misc.URLClassPath$JarLoader$2.getInputStream(URLClassPath.java:775)

at sun.misc.Resource.cachedInputStream(Resource.java:77)

at sun.misc.Resource.getByteBuffer(Resource.java:160)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:436)

at java.net.URLClassLoader.access$100(URLClassLoader.java:71)

at java.net.URLClassLoader$1.run(URLClassLoader.java:361)

at java.net.URLClassLoader$1.run(URLClassLoader.java:355)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:354)

at java.lang.ClassLoader.loadClass(ClassLoader.java:425)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)

at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)





On Tuesday, April 7, 2015 at 11:04:08 AM UTC-4, Ron wrote:
Reply all
Reply to author
Forward
0 new messages