Re: swagger-jersey-jaxrs genereates duplicate operationIds when using inheritance

2016-09-08 Thread alex . rhomberg
Here's a simple demo: public abstract class BaseClass { /** * Get some strings */ @GET public List getStrings() { return Arrays.asList("somestring", "someotherstring"); } } @Api @Path("/subclass1") public class SubClass1 extends BaseClass {} @Api @Path("/subclass2") public class SubCla

Re: swagger-jersey-jaxrs genereates duplicate operationIds when using inheritance

2016-09-07 Thread tony tam
There are different issues here and that’s jumbling up the solution. I suggest creating either a simple project or sharing your definition so this can be helped along. > On Sep 7, 2016, at 3:54 AM, alex.rhomb...@temet.ch wrote: > > I tried setting a nickname in the base class, but that same ni

Re: swagger-jersey-jaxrs genereates duplicate operationIds when using inheritance

2016-09-07 Thread alex . rhomberg
I tried setting a nickname in the base class, but that same nickname was then used in all subclasses, so it again resulted in duplicate operationIds. Would I have to @Override the methods in the subclasses, just to be able to set different nicknames? *Shouldn't the generated default operationId

Re: swagger-jersey-jaxrs genereates duplicate operationIds when using inheritance

2016-09-06 Thread tony tam
You can use the “nickname” attribute in the @ApiOperation annotation, see here: https://github.com/swagger-api/swagger-core/blob/master/modules/swagger-annotations/src/main/java/io/swagger/annotations/ApiOperation.java

swagger-jersey-jaxrs genereates duplicate operationIds when using inheritance

2016-09-06 Thread alex . rhomberg
I use swagger-jersey-jaxrs to generation swagger.json from my JAX-RS interface with annotations. To define the REST interface for several objects, I use inheritance, with services defined in base classes that are available in several subclasses. Now the generated swagger.json correctly shows the