mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
5.0
This commit is contained in:
@@ -17,10 +17,10 @@ import java.nio.charset.StandardCharsets;
|
||||
public class SwaggerPlugin {
|
||||
|
||||
/**
|
||||
* 推送文档,前提:把<code>doc-plugin.json</code>文件复制到resources下
|
||||
* 推送文档,前提:把<code>doc.json</code>文件复制到resources下
|
||||
*/
|
||||
public static void pushDoc() {
|
||||
pushDoc("doc-plugin.json");
|
||||
pushDoc("doc.json");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -58,7 +58,6 @@ import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.Method;
|
||||
@@ -352,12 +351,12 @@ public class SwaggerPluginService {
|
||||
if (apiOperation.hidden()) {
|
||||
throw new HiddenException("Hidden API(@ApiOperation.hidden=true):" + apiOperation.value());
|
||||
}
|
||||
if (existsApiIgnore) {
|
||||
ApiIgnore apiIgnore = method.getAnnotation(ApiIgnore.class);
|
||||
if (apiIgnore != null) {
|
||||
throw new IgnoreException("Ignore API(@ApiIgnore):" + apiOperation.value());
|
||||
}
|
||||
}
|
||||
// if (existsApiIgnore) {
|
||||
// ApiIgnore apiIgnore = method.getAnnotation(ApiIgnore.class);
|
||||
// if (apiIgnore != null) {
|
||||
// throw new IgnoreException("Ignore API(@ApiIgnore):" + apiOperation.value());
|
||||
// }
|
||||
// }
|
||||
return doBuildDocItem(requestInfoBuilder);
|
||||
}
|
||||
|
||||
@@ -918,12 +917,12 @@ public class SwaggerPluginService {
|
||||
if (api != null && api.hidden()) {
|
||||
throw new HiddenException("Hidden doc(@Api.hidden=true):" + api.value());
|
||||
}
|
||||
if (existsApiIgnore) {
|
||||
ApiIgnore apiIgnore = AnnotationUtils.findAnnotation(controllerClass, ApiIgnore.class);
|
||||
if (apiIgnore != null) {
|
||||
throw new IgnoreException("Ignore doc(@ApiIgnore):" + controllerClass.getName());
|
||||
}
|
||||
}
|
||||
// if (existsApiIgnore) {
|
||||
// ApiIgnore apiIgnore = AnnotationUtils.findAnnotation(controllerClass, ApiIgnore.class);
|
||||
// if (apiIgnore != null) {
|
||||
// throw new IgnoreException("Ignore doc(@ApiIgnore):" + controllerClass.getName());
|
||||
// }
|
||||
// }
|
||||
String name, description;
|
||||
int position = 0;
|
||||
if (api == null) {
|
||||
|
Reference in New Issue
Block a user