我有一个带有Swagger的微服务。 我现在需要将Swagger拆分为3个不同的URL,每个URL公开一部分可用api(user1获取所有api,user2获取80%,依此类推-根据api的注释)
我有一个运行正常的Swagger配置(Config,Dockets,html文件)
我的文案:
@Bean
public Docket api() {
List<SecurityScheme> securityScheme = new ArrayList<>();
securityScheme.add(new ApiKey("Authorization", "authorization", "header"));
return new Docket(DocumentationType.SWAGGER_2)
.groupName("Example-Api")
.apiInfo(apiInfo())
.select()
.apis(RequestHandlerSelectors.basePackage("com.example.core"))
.paths(PathSelectors.any())
.build()
.securitySchemes(securityScheme);
}
private ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title("Example API")
.description("Example.")
.termsOfServiceUrl("http://www.example.com")
.license("Example License")
.licenseUrl("License url")
.version("Example 2.0")
.build();
}
我希望能够拥有3个不同的页面:
(我可以假设需要3个不同的记录纸吗?)
(我不能使用下拉菜单,我需要有3个不同的页面)