Skip to content

Commit

Permalink
修改自动生成接口文档范围
Browse files Browse the repository at this point in the history
(cherry picked from commit ff58a1d)
  • Loading branch information
EightMonth committed Jan 5, 2024
1 parent b31aa29 commit 654676d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.jeecg.config;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.Paths;
Expand Down Expand Up @@ -38,6 +39,10 @@ public GroupedOpenApi swaggerOpenApi() {
return GroupedOpenApi.builder()
.group("default")
.packagesToScan("org.jeecg")
// 剔除以下几个包路径的接口生成文档
.packagesToExclude("org.jeecg.modules.drag", "org.jeecg.modules.online", "org.jeecg.modules.jmreport")
// 加了Operation注解的方法,才生成接口文档
.addOpenApiMethodFilter(method -> method.isAnnotationPresent(Operation.class))
.build();
}

Expand Down

0 comments on commit 654676d

Please sign in to comment.