spingfox-swagger2 description in @Tag not honored

I am using the following version of springfox-swagger2 libraries in my Spring MVC project:

        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>2.8.0</version>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <version>2.8.0</version>
        </dependency>

And I would like to add description to my REST Controller using the following according swagger documentation:

@RestController
@RequestMapping("/admin")
@Api(tags = {"Admin API"})
@SwaggerDefinition(tags = {
    @Tag(name = "Admin API", description = "Admin interface to manage users")
})
public class AdminController {

However the description in tags is not reflected in swagger-ui.

It says the following:

Admin API Admin Controller

Instead of:

Admin API Admin interface to manage users

What I am missing?



Read more here: https://stackoverflow.com/questions/50604176/spingfox-swagger2-description-in-tag-not-honored

Content Attribution

This content was originally published by user1563721 at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: