Swagger API Tag Description Not Coming

你离开我真会死。 提交于 2019-12-10 11:57:39

问题


I am using below swagger maven depedepncy.

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

Config

public Docket productApi() {
        return new Docket(DocumentationType.SWAGGER_2)
                .select()
                .apis(RequestHandlerSelectors.basePackage("com.it"))
                .build()
                .tags(new Tag("Admin API", "Admin interface to manage users"));
    }

Controller

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

But in swagger-ui, description of the Tag is not coming as Admin interface to manage users

来源:https://stackoverflow.com/questions/55516559/swagger-api-tag-description-not-coming

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!