Migrating springfox to springdoc-openapi-ui issue with annotations

Viewed 764

Spring fox:

@ApiOperation(value = "Gets the status for ID",
   consumes = "application/json",
   produces = "application/json",
   response = xyz.class)

Springdoc :

@Operation(summary = "Gets the status for ID",
   consumes = "application/json",
   produces = "application/json",
   response = xyz.class)

Here I'm able to replace value with summary but no idea what to use in place of consumes, produces, response can anyone help?

I tried to use @Tags but it is not working. Could someone suggest a solution to this issue?

1 Answers

I have used @RouterOperation to resolve my issue

  @RouterOperation(operation = @Operation(summary = "Gets the status for ID"),
          consumes = "application/json",
          produces = "application/json",
          parameterTypes = xyz.class)
Related