Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for swagger-annotations #56

Closed
TuomasKiviaho opened this issue Feb 27, 2015 · 4 comments
Closed

Support for swagger-annotations #56

TuomasKiviaho opened this issue Feb 27, 2015 · 4 comments

Comments

@TuomasKiviaho
Copy link

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.

@TuomasKiviaho
Copy link
Author

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",
  ...
}

@conorroche
Copy link

this has been logged already by issue 12 though is probably a subset of that

@conorroche
Copy link

@TuomasKiviaho note that you can use the @resourcePath tag to override the /root

@TuomasKiviaho
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants