Swagger Inflector issues

48 views
Skip to first unread message

Venkat Nalla

unread,
Nov 25, 2015, 1:28:21 PM11/25/15
to Swagger
Hi,

I have generated the server side code using swagger-inflector using swagger-codegen-2.1.4 and 2.1.5-SNAPSHOT. I am running in to following issues with both the versions:

1) Incorrect pom.xml
   a) swagger-inflector version 1.0.0-SNAPSHOT is not found in maven repo. I had to change it to version 1.0.0
   b) swagger spec file name is incorrect in pom.xml - which is src/main/swagger/swagger.yaml where as generated code is swagger.json in src/main/swagger folder.

once I fix the pom.xml running in to the following issue. Swagger-inflector is throwing the NoClassDefFoundError - basically it is looking for all lowercase letter class name, actual class's first character is capitalized.

any suggestions on how get around this issue.

Thanks,
Venkat

 


Ron

unread,
Nov 25, 2015, 1:57:15 PM11/25/15
to Swagger
Hi Venkat,

Version 1.0.0 of the inflector was recently released and the templates in the codegen were not updated for it.
Would be great if you could file a ticket on swagger-codegen about the changes you've made (PRs are also welcome).

As for the NCDFE, can you share your yaml and the full stacktrace of the error?

Venkat Nalla

unread,
Nov 30, 2015, 12:10:48 PM11/30/15
to Swagger
Hi Ron,

Added two files 1) test.yaml and 2) error.log

Thanks!
Venkat
error.log
test.yaml

Venkat Nalla

unread,
Dec 10, 2015, 1:42:42 PM12/10/15
to Swagger
Hi Ron,

I have tested with 2.1.5 master, still getting the same error, class not found error. Not sure what I am doing wring. Can you please help?

Thanks,
Venkat

tony tam

unread,
Dec 10, 2015, 2:36:36 PM12/10/15
to swagger-sw...@googlegroups.com
Hi Venkat, I believe your model names should be capitalized, i.e. “Address”, “AddressResponse”, etc.  The inflector code will look for standard java naming syntax.

You can also update your inflector.yaml to point to the lower-case names, but I don’t recommend doing so.


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

Venkat Nalla

unread,
Dec 11, 2015, 1:03:56 PM12/11/15
to Swagger
Hi Tony,

Thanks! it worked.

-Venakt
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages