diff --git a/sop-test/src/test/java/com/gitee/sop/test/AlipayClientPostTest.java b/sop-test/src/test/java/com/gitee/sop/test/AlipayClientPostTest.java index 1ab624b0..cba529a5 100644 --- a/sop-test/src/test/java/com/gitee/sop/test/AlipayClientPostTest.java +++ b/sop-test/src/test/java/com/gitee/sop/test/AlipayClientPostTest.java @@ -15,9 +15,34 @@ import java.util.Map; public class AlipayClientPostTest extends TestBase { String url = "http://localhost:8081"; - String appId = "2019032617262200001"; + String appId = "20201224791621120804519936"; // 平台提供的私钥 - String privateKey = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCXJv1pQFqWNA/++OYEV7WYXwexZK/J8LY1OWlP9X0T6wHFOvxNKRvMkJ5544SbgsJpVcvRDPrcxmhPbi/sAhdO4x2PiPKIz9Yni2OtYCCeaiE056B+e1O2jXoLeXbfi9fPivJZkxH/tb4xfLkH3bA8ZAQnQsoXA0SguykMRZntF0TndUfvDrLqwhlR8r5iRdZLB6F8o8qXH6UPDfNEnf/K8wX5T4EB1b8x8QJ7Ua4GcIUqeUxGHdQpzNbJdaQvoi06lgccmL+PHzminkFYON7alj1CjDN833j7QMHdPtS9l7B67fOU/p2LAAkPMtoVBfxQt9aFj7B8rEhGCz02iJIBAgMBAAECggEARqOuIpY0v6WtJBfmR3lGIOOokLrhfJrGTLF8CiZMQha+SRJ7/wOLPlsH9SbjPlopyViTXCuYwbzn2tdABigkBHYXxpDV6CJZjzmRZ+FY3S/0POlTFElGojYUJ3CooWiVfyUMhdg5vSuOq0oCny53woFrf32zPHYGiKdvU5Djku1onbDU0Lw8w+5tguuEZ76kZ/lUcccGy5978FFmYpzY/65RHCpvLiLqYyWTtaNT1aQ/9pw4jX9HO9NfdJ9gYFK8r/2f36ZE4hxluAfeOXQfRC/WhPmiw/ReUhxPznG/WgKaa/OaRtAx3inbQ+JuCND7uuKeRe4osP2jLPHPP6AUwQKBgQDUNu3BkLoKaimjGOjCTAwtp71g1oo+k5/uEInAo7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rRz\n" + + "DeNrXVeTTwUcWQIKpanstCVI/f5yRxWD7EkRVxLrJR70EuJ8r0NwAXgNAoGAWcYi\n" + + "atFrWPQxySNbrJOjzQWpbdVl6iw/Y9QrhzNd228bDmO97mCXgLSrNCtoncCoBvQi\n" + + "/HCsOGKe7Pf1JrrXQpmdE/eKUD4S2+m4I+AOd+U2y7cNSWStdcifq+rkaqDSXNw0\n" + + "NV+VyY6JLOWkI/OAqYKVBFsb6uNUjzEioANQwu8CgYEApE2ozFSIP8vrKj6avhfK\n" + + "qp4FXgXMYP6rv/XkpcH4YsQLHw5iOhJPSYwKcCB8zqNmVxQprOJuRTTAAHPm6DZH\n" + + "CN+izw4/s6XbwOQ7E4PfqrBj3srD8pOe1WekGQ05LrLm+oEoQlPYmHB/hyrZA2uY\n" + + "prI1pe7GDnajEzPDv4xq+Nk="; /** 参数 类型 是否必填 最大长度 描述 示例值 diff --git a/sop-website/sop-website-server/src/main/java/com/gitee/sop/websiteserver/manager/SwaggerDocParser.java b/sop-website/sop-website-server/src/main/java/com/gitee/sop/websiteserver/manager/SwaggerDocParser.java index c212e7e8..321da8fa 100644 --- a/sop-website/sop-website-server/src/main/java/com/gitee/sop/websiteserver/manager/SwaggerDocParser.java +++ b/sop-website/sop-website-server/src/main/java/com/gitee/sop/websiteserver/manager/SwaggerDocParser.java @@ -160,8 +160,10 @@ public class SwaggerDocParser implements DocParser { JSONObject schema = fieldJson.getJSONObject("schema"); if (schema != null) { RefInfo refInfo = getRefInfo(schema); - List parameterList = this.buildDocParameters(refInfo.ref, docRoot, true); - docParameterList.addAll(parameterList); + if (refInfo != null) { + List parameterList = this.buildDocParameters(refInfo.ref, docRoot, true); + docParameterList.addAll(parameterList); + } } else { DocParameter docParameter = fieldJson.toJavaObject(DocParameter.class); docParameterList.add(docParameter);