Closed TuomasKiviaho closed 9 years ago
My API path is just a slash because I use web application context paths instead. I use @Api("/foobar")
to override the JAX-RS path for documentation but currently I end up with the following. I guess that root
is to overcome filesystem problems caused by empty name, but instead it would be nice if swagger-annotations could be used prior falling back to this.
{
"swaggerVersion" : "1.2",
"apiVersion" : "0",
"basePath" : "http://localhost:8080/javadoc",
"apis" : [ {
"path" : "/root.{format}"
} ]
}
{
apiVersion" : "0",
"swaggerVersion" : "1.2",
"basePath" : "http://localhost:8080/javadoc",
"resourcePath" : "/root",
...
}
this has been logged already by issue 12 though is probably a subset of that
@TuomasKiviaho note that you can use the @resourcePath tag to override the /root
I'll close this issue as start to track the #12 then (sorry about the duplicate) and thanks for the pointer to javadoc tag. Too bad that I'm still relying on swagger on some areas so I'd be forced to duplicate the descriptions.
It would be nice if swagger annotations could be used alongside JAX-RS, JAXB and validation annotations. These might overlap slightly because with
@ApiParam
you can declare@Min/@Max
as well as declare@GET/@PUT/@POST
... These cases have been documented quite well and I guess this annotation would be used for notes (when available) instead of javadoc. This would minimize transition efforts from swagger-jaxrs to doclet and ensure better interoperability between the both approaches.