Forum Discussion

Petziferum's avatar
Petziferum
Occasional Visitor
4 years ago

Migrating from Springfox -> @ApiResponse Annotation Problems

I actually try to migrate a Project from Springfox to Springdoc.

 

Within the Controller we have the old Annotaion Type for @ApiResponse wich look like this:

```

@ApiResponse(code = 200, message = "OK", response = String.class, responseContainer = "list")

```

The documentation is not very helpful with the properties "response" and "responseContainer". How can I write them in the new Way of springdoc?

 

I tried this for the response:

@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class)), ref = "list"

 

Is this Right???

 

response ---> content...

and

responseContainer ---> ref

 

Is there any good Documentation about Spring Class Annotations?

No RepliesBe the first to reply