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

swagger-maven-plugin: OPERATION annotation with multiple TAGS does not correctly generate openapi.json using inheritance in Java

Open anadal-fundaciobit opened this issue 5 months ago • 0 comments

I have two classes that implement the same operation defined with Swagger annotations in a Java interface. I define two tags using the @Operation annotation. The problem is that the operation is duplicated in each Service where I use them.

INTERFACE: Image

SERVICE 1: Image

SERVICE 2: Image

Swagger-maven-plugin definition (pom.xml): Image

SWAGGER UI SERVICE 1: Image

SWAGGER UI SERVICE 2: Image

I am using io.swagger.core.v3::swagger-maven-plugin::2.2.20 and java 11

openapi_signature_v1.json

Source code with workaround to work: https://github.com/GovernIB/portafib/tree/portafib-3.0/api-interna

anadal-fundaciobit avatar May 05 '25 08:05 anadal-fundaciobit