Merge branch 'master' into eureka

eureka
tanghc 4 years ago
commit c5e39ded8a
  1. 12
      doc/docs/files/10087_自定义返回结果.md
  2. 2
      sop-website/sop-website-server/src/main/java/com/gitee/sop/websiteserver/manager/SwaggerDocParser.java

@ -109,17 +109,7 @@ public class SopGatewayApplication {
## 不合并结果
如果不希望对结果进行合并,可设置`ApiConfig.getInstance().setMergeResult(false);`
如果不希望对结果进行合并,可在application.properties中设置`sop.api-config.merge-result=false`
```java
public class SopGatewayApplication {
public static void main(String[] args) {
ApiConfig.getInstance().setMergeResult(false);
SpringApplication.run(SopGatewayApplication.class, args);
}
}
```
这样,网关最终返回结果即为微服务端的返回结果。

@ -160,8 +160,10 @@ public class SwaggerDocParser implements DocParser {
JSONObject schema = fieldJson.getJSONObject("schema");
if (schema != null) {
RefInfo refInfo = getRefInfo(schema);
if (refInfo != null) {
List<DocParameter> parameterList = this.buildDocParameters(refInfo.ref, docRoot, true);
docParameterList.addAll(parameterList);
}
} else {
DocParameter docParameter = fieldJson.toJavaObject(DocParameter.class);
docParameterList.add(docParameter);

Loading…
Cancel
Save