Closed
Description
Describe the bug
Duplicate definition when the annotations are given in the interface.
To Reproduce
- 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);
}
- 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
Additional context
N/A