I have some services that are implemented in jax-rs within grails and i am having some challenges getting swagger to work properly. My services are defined as follows:
@Path('/api/1.0.0/event')
@Api(value = "/api/1.0.0/event", description = "Operations about Event")
@Consumes(['application/json'])
@Produces(['application/json'])
My Jersey path is
/api
/api/**
I have defined the swagger config as:
'swagger.api.basepath':'
http://localhost:8080/amp/api/1.0.0','api.version':"1.0"
I access the service via the url
http://localhost:8080/amp/api/1.0.0/eventI do not use the .json ending to my service names
When i deploy I initially get an error that
SEVERE: Producing media type conflict.
And this occurs on my GET method. If I comment out the GET method the error goes away.
I also cannot access the resources.json at any combination of the URLS
So my questions are:
1. How to I access my service with out the .json extension and still get Swagger to work
2. How do I deal with my media type conflict error
3. Where do I go to in order to access the resources.json file
If I comment out my GET method and use the .json ending to my service url I get some valid documentation.
Here are the versions I am using
runtime ("com.wordnik:swagger-jaxrs_2.9.1:1.0.1"){
excludes 'stax-api'
}
runtime "com.wordnik:swagger-core_2.9.1:1.0.1"
Thanks
Scott Ryan