swagger4jaxrs and resources plugin interference and response class schemas not generating?

10 views
Skip to first unread message

Alex Shneyderman

unread,
Jul 24, 2014, 9:06:03 AM7/24/14
to grails-de...@googlegroups.com
Hi, 

grails 2.3.11, resources plugin 1.2.8, swagger4jaxrs plugin 0.2, jaxrs plugin 0.10

I got two questions:

1. It seems that the mere presence of resources plugin causes showRestApi page not show up correctly (the links to .js and .css files are not generated correctly). Removing resources plugin from the list of dependencies seems to eliminate the problem. Is there a way to keep the resources plugin and still being abel to generate correct links to swagger assets? I went through the plugin code and aside from making changes to the plugin itself there does not seem to be a way. Am I missing something obvious?

2. response class in the ApiOperation annotation does not seem to produce type descriptor. So,

@GET
@ApiOperation(response = Application.class)
def get() {
   ok new Application()
}

I would expect swagger core to introspect Application class (I tried both groovy and java based classes for models) and produce response model based off that introspection. However, except for the name of the class itself nothing gets displayed on the screen. I wonder if anyone had to deal with this besides me?

Cheers,
Alex.
Reply all
Reply to author
Forward
0 new messages