swagger-core icon indicating copy to clipboard operation
swagger-core copied to clipboard

Inherited from interface @GET @POST @DELETE annotations are not detected

Open sgri opened this issue 13 years ago • 4 comments

When a JAX-RS method type annotation (@GET @POST @DELETE) is defined on interface, then Swagger displays error "SwaggerOperation list is missing httpMethod"

This is an artificial limitation, because Jersey detects the above annotations properly. This limitation forces the implementing class to duplicate annotations.

@Path("/library") @Produces("application/json") public interface LibraryResource{ @GET List list(); }

sgri avatar Dec 12 '12 10:12 sgri

I was wrong, Jersey 1.16 doesn't respect inherited from interface annotation as well, closing issue.

sgri avatar Dec 12 '12 15:12 sgri

We are using spring Jersey 1.16 and annotation inheritence works, but swagger is not able to pick the annotations.

sprasadjha avatar Jan 17 '13 18:01 sprasadjha

I have the same problem... did you find the the solution?

PabloEzequiel avatar Jul 18 '15 00:07 PabloEzequiel

@PabloEzequiel - are you using a version that was released in 2012? If so, it's time to upgrade.

webron avatar Jul 19 '15 14:07 webron