Skip to content

Duplicate tags if they are defined on @Operation annotation on swagger-ui #436

Closed
@jamataran

Description

@jamataran

Describe the bug
Duplicate definition when the annotations are given in the interface.

To Reproduce

  1. Define the Interface
public interface AperturaCasoAPI {


    @Operation(summary = "Creación de un nuevo caso",
            tags = {"apertura"},
            requestBody = @RequestBody(description = "Datos del caso", required = true),
            responses = {
                    @ApiResponse(
                            content = @Content(
                                    mediaType = "application/json",
                                    schema = @Schema(implementation = AperturaOutDTO.class))),
                    @ApiResponse(responseCode = "400", description = "Invalid ID supplied"),
                    @ApiResponse(responseCode = "404", description = "Pet not found"),
                    @ApiResponse(responseCode = "405", description = "Datos de entrada incorrectos")}
    )
    ResponseEntity<AperturaOutDTO> apertura(AperturaInDTO aperturaIn);

}
  1. Implement the interface
@RestController
@RequestMapping(value = "/apertura")
public class AperturaCasoRestController implements AperturaCasoAPI {

    @Override
    @PostMapping
    public ResponseEntity<AperturaOutDTO> apertura(AperturaInDTO aperturaIn) {
        return ResponseEntity.ok(AperturaOutDTO.builder().build());
    }
}

Expected behavior

Only one map for apertura endpoint. Actually, swagger-ui is showing two endPoints but only there are one.

Screenshots

image

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions