@Path("/samplehub/sample")
@Api(value = "/fetch", description = "Fetch Sample Data")
then in the API declaration, I have:
apiVersion":"1.0.0","swaggerVersion":"1.2","basePath":"http://localhost:8080/samplehub_ws","resourcePath":"/fetch","produces":["application/json","application/xml"],"apis":[{"path":"/fetch/{id}"}
while the resourcePath should point to the API decl (/fetch) and the path in apis array should point to the api itself /samplehub/sample. Due to this issue, I have to use @Api(value="/samplehub/sample"). it would be nice to be able to separate these two especially when using Swagger UI, since it uses the "value" as the name of the API.
Another issue is that Swagger UI, uses the name after the last "/" in the path as the name of the API. Being able to define a display name for APIs when listed in the Swagger UI would be great.
One last thing, is there a way to rename "api-docs" to "resources"?
Thanks,
Sahar
package com.wordnik.swagger.jaxrs.listingimport com.wordnik.swagger.annotations._import com.wordnik.swagger.jaxrs._import javax.ws.rs._import javax.ws.rs.core.MediaType@Path("/api-docs")@Api("/api-docs")@Produces(Array(MediaType.APPLICATION_JSON))class ApiListingResourceJSON extends ApiListingResource