From 96f9a489b426e367c72b13ef4aba7aa072046de4 Mon Sep 17 00:00:00 2001 From: tanghc Date: Mon, 26 Aug 2019 17:09:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=BF=94=E5=9B=9E=E6=95=B0?= =?UTF-8?q?=E7=BB=84=E6=96=87=E6=A1=A3=E4=B8=8D=E6=98=BE=E7=A4=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../storyweb/controller/AlipayController.java | 19 + .../gitee/sop/storyweb/vo/FileUploadVO.java | 4 + .../controller/SandboxController.java | 1 + .../manager/SwaggerDocParser.java | 138 +++-- .../src/main/resources/api.json | 470 ++++++++---------- 5 files changed, 327 insertions(+), 305 deletions(-) diff --git a/sop-example/sop-story/sop-story-web/src/main/java/com/gitee/sop/storyweb/controller/AlipayController.java b/sop-example/sop-story/sop-story-web/src/main/java/com/gitee/sop/storyweb/controller/AlipayController.java index d7b1aab9..58158a45 100644 --- a/sop-example/sop-story/sop-story-web/src/main/java/com/gitee/sop/storyweb/controller/AlipayController.java +++ b/sop-example/sop-story/sop-story-web/src/main/java/com/gitee/sop/storyweb/controller/AlipayController.java @@ -17,7 +17,9 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; +import java.util.Arrays; import java.util.Date; +import java.util.List; /** * 支付宝服务端,假设签名验证通过后,到达这里进行具体的业务处理。 @@ -182,6 +184,23 @@ public class AlipayController { return storyVO; } + @ApiOperation(value = "返回数组结果", notes = "返回数组结果") + @ApiMapping(value = "alipay.story.find2") + public List getStory3(StoryParam story) { + int index = 0; + StoryVO storyVO = new StoryVO(); + storyVO.id = 1L; + storyVO.name = "白雪公主, index:" + index++; + storyVO.gmt_create = new Date(); + + StoryVO storyVO2 = new StoryVO(); + storyVO2.id = 1L; + storyVO2.name = "白雪公主, index:" + index++; + storyVO2.gmt_create = new Date(); + + return Arrays.asList(storyVO, storyVO2); + } + /** * 演示文档表格树 * @param story diff --git a/sop-example/sop-story/sop-story-web/src/main/java/com/gitee/sop/storyweb/vo/FileUploadVO.java b/sop-example/sop-story/sop-story-web/src/main/java/com/gitee/sop/storyweb/vo/FileUploadVO.java index 6367cb08..fcfafad7 100644 --- a/sop-example/sop-story/sop-story-web/src/main/java/com/gitee/sop/storyweb/vo/FileUploadVO.java +++ b/sop-example/sop-story/sop-story-web/src/main/java/com/gitee/sop/storyweb/vo/FileUploadVO.java @@ -1,5 +1,6 @@ package com.gitee.sop.storyweb.vo; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.ArrayList; @@ -25,8 +26,11 @@ public class FileUploadVO { public FileMeta() { } + @ApiModelProperty(value = "文件名称", example = "1.txt") private String filename; + @ApiModelProperty(value = "文件大小", example = "109") private long size; + @ApiModelProperty(value = "文件内容", example = "啊啊啊") private String content; } } diff --git a/sop-website/website-server/src/main/java/com/gitee/sop/websiteserver/controller/SandboxController.java b/sop-website/website-server/src/main/java/com/gitee/sop/websiteserver/controller/SandboxController.java index 794770d4..25a20024 100644 --- a/sop-website/website-server/src/main/java/com/gitee/sop/websiteserver/controller/SandboxController.java +++ b/sop-website/website-server/src/main/java/com/gitee/sop/websiteserver/controller/SandboxController.java @@ -119,6 +119,7 @@ public class SandboxController { result.apiResult = responseData; return result; } catch (Exception e) { + log.error("请求失败", e); throw new RuntimeException("请求失败"); } } diff --git a/sop-website/website-server/src/main/java/com/gitee/sop/websiteserver/manager/SwaggerDocParser.java b/sop-website/website-server/src/main/java/com/gitee/sop/websiteserver/manager/SwaggerDocParser.java index 7c5a99b8..0d7dc8ae 100644 --- a/sop-website/website-server/src/main/java/com/gitee/sop/websiteserver/manager/SwaggerDocParser.java +++ b/sop-website/website-server/src/main/java/com/gitee/sop/websiteserver/manager/SwaggerDocParser.java @@ -8,7 +8,6 @@ import com.gitee.sop.websiteserver.bean.DocModule; import com.gitee.sop.websiteserver.bean.DocParameter; import com.gitee.sop.websiteserver.bean.DocParserContext; import com.google.common.collect.Sets; -import org.apache.commons.lang.StringUtils; import org.springframework.beans.BeanUtils; import java.util.ArrayList; @@ -138,7 +137,7 @@ public class SwaggerDocParser implements DocParser { }) .collect(Collectors.groupingBy(DocParameter::getModule)); - collect.entrySet().stream() + collect.entrySet() .forEach(entry -> { DocParameter moduleDoc = new DocParameter(); moduleDoc.setName(entry.getKey()); @@ -147,18 +146,25 @@ public class SwaggerDocParser implements DocParser { docParameterList.add(moduleDoc); }); - List ret = docParameterList.stream() + return docParameterList.stream() .filter(docParameter -> !docParameter.getName().contains(".")) .collect(Collectors.toList()); - - return ret; } protected List buildResponseParameterList(JSONObject docInfo, JSONObject docRoot) { - String responseRef = getResponseRef(docInfo); + RefInfo refInfo = getResponseRefInfo(docInfo); List respParameterList = Collections.emptyList(); - if (StringUtils.isNotBlank(responseRef)) { + if (refInfo != null) { + String responseRef = refInfo.ref; respParameterList = this.buildDocParameters(responseRef, docRoot); + // 如果返回数组 + if (refInfo.isArray) { + DocParameter docParameter = new DocParameter(); + docParameter.setName("items"); + docParameter.setType("array"); + docParameter.setRefs(respParameterList); + respParameterList = Collections.singletonList(docParameter); + } } return respParameterList; } @@ -170,52 +176,104 @@ public class SwaggerDocParser implements DocParser { List docParameterList = new ArrayList<>(); for (String fieldName : fieldNames) { /* - { - "description": "分类故事", - "$ref": "#/definitions/StoryVO", - "originalRef": "StoryVO" + { + "description": "分类故事", + "$ref": "#/definitions/StoryVO" } */ JSONObject fieldInfo = properties.getJSONObject(fieldName); - DocParameter respParam = fieldInfo.toJavaObject(DocParameter.class); - respParam.setName(fieldName); - docParameterList.add(respParam); - String originalRef = isArray(fieldInfo) ? getRef(fieldInfo.getJSONObject(fieldName)) : getRef(fieldInfo); - if (StringUtils.isNotBlank(originalRef)) { - List refs = buildDocParameters(originalRef, docRoot); - respParam.setRefs(refs); + DocParameter docParameter = fieldInfo.toJavaObject(DocParameter.class); + docParameter.setName(fieldName); + docParameterList.add(docParameter); + RefInfo refInfo = this.getRefInfo(fieldInfo); + if (refInfo != null) { + List refs = buildDocParameters(refInfo.ref, docRoot); + docParameter.setRefs(refs); } } return docParameterList; } - protected boolean isArray(JSONObject fieldInfo) { - return "array".equalsIgnoreCase(fieldInfo.getString("type")); - } - - private String getRef(JSONObject fieldInfo) { - return Optional.ofNullable(fieldInfo) - .map(jsonObject -> jsonObject.getString("originalRef")) - .orElse(null); - } - protected String getResponseRef(JSONObject docInfo) { + /** + * 简单对象返回: + * "responses": { + * "200": { + * "description": "OK", + * "schema": { + * "$ref": "#/definitions/FileUploadVO" + * } + * }, + * "401": { + * "description": "Unauthorized" + * }, + * "403": { + * "description": "Forbidden" + * }, + * "404": { + * "description": "Not Found" + * } + * } + * 纯数组返回: + * "responses": { + * "200": { + * "description": "OK", + * "schema": { + * "type": "array", + * "items": { + * "$ref": "#/definitions/StoryVO" + * } + * } + * }, + * "401": { + * "description": "Unauthorized" + * }, + * "403": { + * "description": "Forbidden" + * }, + * "404": { + * "description": "Not Found" + * } + * } + * @param docInfo + * @return + */ + protected RefInfo getResponseRefInfo(JSONObject docInfo) { return Optional.ofNullable(docInfo.getJSONObject("responses")) .flatMap(jsonObject -> Optional.ofNullable(jsonObject.getJSONObject("200"))) .flatMap(jsonObject -> Optional.ofNullable(jsonObject.getJSONObject("schema"))) - .flatMap(jsonObject -> { - // #/definitions/Category - String $ref = jsonObject.getString("$ref"); - if ($ref == null) { - return Optional.empty(); - } - int index = $ref.lastIndexOf("/"); - if (index > -1) { - $ref = $ref.substring(index + 1); - } - return Optional.of($ref); + .flatMap(schema -> { + RefInfo refInfo = getRefInfo(schema); + return Optional.ofNullable(refInfo); }) - .orElse(""); + .orElse(null); + } + + private RefInfo getRefInfo(JSONObject jsonObject) { + String $ref; + boolean isArray = "array".equals(jsonObject.getString("type")); + if (isArray) { + $ref = jsonObject.getJSONObject("items").getString("$ref"); + } else { + // #/definitions/Category + $ref = jsonObject.getString("$ref"); + } + if ($ref == null) { + return null; + } + int index = $ref.lastIndexOf("/"); + if (index > -1) { + $ref = $ref.substring(index + 1); + } + RefInfo refInfo = new RefInfo(); + refInfo.isArray = isArray; + refInfo.ref = $ref; + return refInfo; + } + + private static class RefInfo { + private boolean isArray; + private String ref; } } diff --git a/sop-website/website-server/src/main/resources/api.json b/sop-website/website-server/src/main/resources/api.json index 1c5ad911..9a298be3 100644 --- a/sop-website/website-server/src/main/resources/api.json +++ b/sop-website/website-server/src/main/resources/api.json @@ -6,7 +6,7 @@ "title": "故事API", "termsOfService": "文档" }, - "host": "10.1.30.157:2222", + "host": "localhost:2222", "basePath": "/", "tags": [ { @@ -24,13 +24,16 @@ ], "paths": { "/alipay.category.get/": { - "get": { + "post": { "tags": [ "故事接口" ], "summary": "获取分类信息", "description": "演示表格树", - "operationId": "getCategoryUsingGET", + "operationId": "getCategoryUsingPOST", + "consumes": [ + "application/json" + ], "produces": [ "*/*" ], @@ -74,10 +77,12 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Category", - "originalRef": "Category" + "$ref": "#/definitions/Category" } }, + "201": { + "description": "Created" + }, "401": { "description": "Unauthorized" }, @@ -91,62 +96,96 @@ "deprecated": false, "sop_name": "alipay.category.get", "sop_version": "1.0" - }, - "head": { + } + }, + "/alipay.story.find/": { + "get": { "tags": [ "故事接口" ], - "summary": "获取分类信息", - "description": "演示表格树", - "operationId": "getCategoryUsingHEAD", - "consumes": [ - "application/json" - ], + "summary": "获取故事信息", + "description": "说明接口的详细信息,介绍,用途,注意事项等。", + "operationId": "getStory2UsingGET", "produces": [ "*/*" ], "parameters": [ { - "name": "categoryName", + "name": "id", "in": "query", - "description": "分类名称", + "description": "故事ID", "required": false, - "type": "string", - "x-example": "娱乐" + "type": "integer", + "format": "int32", + "x-example": 111 }, { - "name": "story.gmt_create", + "name": "name", "in": "query", - "description": "创建时间", - "required": false, + "description": "故事名称", + "required": true, "type": "string", - "format": "date-time", - "x-example": "2019-04-14 19:02:12" + "x-example": "白雪公主" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/StoryVO" + } }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + } + }, + "deprecated": false, + "sop_name": "alipay.story.find", + "sop_version": "1.0" + }, + "head": { + "tags": [ + "故事接口" + ], + "summary": "获取故事信息", + "description": "说明接口的详细信息,介绍,用途,注意事项等。", + "operationId": "getStory2UsingHEAD", + "consumes": [ + "application/json" + ], + "produces": [ + "*/*" + ], + "parameters": [ { - "name": "story.id", + "name": "id", "in": "query", "description": "故事ID", "required": false, "type": "integer", - "format": "int64", - "x-example": 1 + "format": "int32", + "x-example": 111 }, { - "name": "story.name", + "name": "name", "in": "query", "description": "故事名称", - "required": false, + "required": true, "type": "string", - "x-example": "海底小纵队" + "x-example": "白雪公主" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Category", - "originalRef": "Category" + "$ref": "#/definitions/StoryVO" } }, "204": { @@ -160,16 +199,16 @@ } }, "deprecated": false, - "sop_name": "alipay.category.get", + "sop_name": "alipay.story.find", "sop_version": "1.0" }, "post": { "tags": [ "故事接口" ], - "summary": "获取分类信息", - "description": "演示表格树", - "operationId": "getCategoryUsingPOST", + "summary": "获取故事信息", + "description": "说明接口的详细信息,介绍,用途,注意事项等。", + "operationId": "getStory2UsingPOST", "consumes": [ "application/json" ], @@ -178,46 +217,28 @@ ], "parameters": [ { - "name": "categoryName", - "in": "query", - "description": "分类名称", - "required": false, - "type": "string", - "x-example": "娱乐" - }, - { - "name": "story.gmt_create", - "in": "query", - "description": "创建时间", - "required": false, - "type": "string", - "format": "date-time", - "x-example": "2019-04-14 19:02:12" - }, - { - "name": "story.id", + "name": "id", "in": "query", "description": "故事ID", "required": false, "type": "integer", - "format": "int64", - "x-example": 1 + "format": "int32", + "x-example": 111 }, { - "name": "story.name", + "name": "name", "in": "query", "description": "故事名称", - "required": false, + "required": true, "type": "string", - "x-example": "海底小纵队" + "x-example": "白雪公主" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Category", - "originalRef": "Category" + "$ref": "#/definitions/StoryVO" } }, "201": { @@ -234,16 +255,16 @@ } }, "deprecated": false, - "sop_name": "alipay.category.get", + "sop_name": "alipay.story.find", "sop_version": "1.0" }, "put": { "tags": [ "故事接口" ], - "summary": "获取分类信息", - "description": "演示表格树", - "operationId": "getCategoryUsingPUT", + "summary": "获取故事信息", + "description": "说明接口的详细信息,介绍,用途,注意事项等。", + "operationId": "getStory2UsingPUT", "consumes": [ "application/json" ], @@ -252,46 +273,28 @@ ], "parameters": [ { - "name": "categoryName", - "in": "query", - "description": "分类名称", - "required": false, - "type": "string", - "x-example": "娱乐" - }, - { - "name": "story.gmt_create", - "in": "query", - "description": "创建时间", - "required": false, - "type": "string", - "format": "date-time", - "x-example": "2019-04-14 19:02:12" - }, - { - "name": "story.id", + "name": "id", "in": "query", "description": "故事ID", "required": false, "type": "integer", - "format": "int64", - "x-example": 1 + "format": "int32", + "x-example": 111 }, { - "name": "story.name", + "name": "name", "in": "query", "description": "故事名称", - "required": false, + "required": true, "type": "string", - "x-example": "海底小纵队" + "x-example": "白雪公主" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Category", - "originalRef": "Category" + "$ref": "#/definitions/StoryVO" } }, "201": { @@ -308,61 +311,43 @@ } }, "deprecated": false, - "sop_name": "alipay.category.get", + "sop_name": "alipay.story.find", "sop_version": "1.0" }, "delete": { "tags": [ "故事接口" ], - "summary": "获取分类信息", - "description": "演示表格树", - "operationId": "getCategoryUsingDELETE", + "summary": "获取故事信息", + "description": "说明接口的详细信息,介绍,用途,注意事项等。", + "operationId": "getStory2UsingDELETE", "produces": [ "*/*" ], "parameters": [ { - "name": "categoryName", - "in": "query", - "description": "分类名称", - "required": false, - "type": "string", - "x-example": "娱乐" - }, - { - "name": "story.gmt_create", - "in": "query", - "description": "创建时间", - "required": false, - "type": "string", - "format": "date-time", - "x-example": "2019-04-14 19:02:12" - }, - { - "name": "story.id", + "name": "id", "in": "query", "description": "故事ID", "required": false, "type": "integer", - "format": "int64", - "x-example": 1 + "format": "int32", + "x-example": 111 }, { - "name": "story.name", + "name": "name", "in": "query", "description": "故事名称", - "required": false, + "required": true, "type": "string", - "x-example": "海底小纵队" + "x-example": "白雪公主" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Category", - "originalRef": "Category" + "$ref": "#/definitions/StoryVO" } }, "204": { @@ -376,16 +361,16 @@ } }, "deprecated": false, - "sop_name": "alipay.category.get", + "sop_name": "alipay.story.find", "sop_version": "1.0" }, "options": { "tags": [ "故事接口" ], - "summary": "获取分类信息", - "description": "演示表格树", - "operationId": "getCategoryUsingOPTIONS", + "summary": "获取故事信息", + "description": "说明接口的详细信息,介绍,用途,注意事项等。", + "operationId": "getStory2UsingOPTIONS", "consumes": [ "application/json" ], @@ -394,46 +379,28 @@ ], "parameters": [ { - "name": "categoryName", - "in": "query", - "description": "分类名称", - "required": false, - "type": "string", - "x-example": "娱乐" - }, - { - "name": "story.gmt_create", - "in": "query", - "description": "创建时间", - "required": false, - "type": "string", - "format": "date-time", - "x-example": "2019-04-14 19:02:12" - }, - { - "name": "story.id", + "name": "id", "in": "query", "description": "故事ID", "required": false, "type": "integer", - "format": "int64", - "x-example": 1 + "format": "int32", + "x-example": 111 }, { - "name": "story.name", + "name": "name", "in": "query", "description": "故事名称", - "required": false, + "required": true, "type": "string", - "x-example": "海底小纵队" + "x-example": "白雪公主" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Category", - "originalRef": "Category" + "$ref": "#/definitions/StoryVO" } }, "204": { @@ -447,16 +414,16 @@ } }, "deprecated": false, - "sop_name": "alipay.category.get", + "sop_name": "alipay.story.find", "sop_version": "1.0" }, "patch": { "tags": [ "故事接口" ], - "summary": "获取分类信息", - "description": "演示表格树", - "operationId": "getCategoryUsingPATCH", + "summary": "获取故事信息", + "description": "说明接口的详细信息,介绍,用途,注意事项等。", + "operationId": "getStory2UsingPATCH", "consumes": [ "application/json" ], @@ -465,46 +432,28 @@ ], "parameters": [ { - "name": "categoryName", - "in": "query", - "description": "分类名称", - "required": false, - "type": "string", - "x-example": "娱乐" - }, - { - "name": "story.gmt_create", - "in": "query", - "description": "创建时间", - "required": false, - "type": "string", - "format": "date-time", - "x-example": "2019-04-14 19:02:12" - }, - { - "name": "story.id", + "name": "id", "in": "query", "description": "故事ID", "required": false, "type": "integer", - "format": "int64", - "x-example": 1 + "format": "int32", + "x-example": 111 }, { - "name": "story.name", + "name": "name", "in": "query", "description": "故事名称", - "required": false, + "required": true, "type": "string", - "x-example": "海底小纵队" + "x-example": "白雪公主" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Category", - "originalRef": "Category" + "$ref": "#/definitions/StoryVO" } }, "204": { @@ -518,18 +467,18 @@ } }, "deprecated": false, - "sop_name": "alipay.category.get", + "sop_name": "alipay.story.find", "sop_version": "1.0" } }, - "/alipay.story.find/": { + "/alipay.story.find2/": { "get": { "tags": [ "故事接口" ], - "summary": "获取故事信息", - "description": "说明接口的详细信息,介绍,用途,注意事项等。", - "operationId": "getStory2UsingGET", + "summary": "返回数组结果", + "description": "返回数组结果", + "operationId": "getStory3UsingGET", "produces": [ "*/*" ], @@ -556,8 +505,10 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/StoryVO", - "originalRef": "StoryVO" + "type": "array", + "items": { + "$ref": "#/definitions/StoryVO" + } } }, "401": { @@ -571,16 +522,16 @@ } }, "deprecated": false, - "sop_name": "alipay.story.find", + "sop_name": "alipay.story.find2", "sop_version": "1.0" }, "head": { "tags": [ "故事接口" ], - "summary": "获取故事信息", - "description": "说明接口的详细信息,介绍,用途,注意事项等。", - "operationId": "getStory2UsingHEAD", + "summary": "返回数组结果", + "description": "返回数组结果", + "operationId": "getStory3UsingHEAD", "consumes": [ "application/json" ], @@ -610,8 +561,10 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/StoryVO", - "originalRef": "StoryVO" + "type": "array", + "items": { + "$ref": "#/definitions/StoryVO" + } } }, "204": { @@ -625,16 +578,16 @@ } }, "deprecated": false, - "sop_name": "alipay.story.find", + "sop_name": "alipay.story.find2", "sop_version": "1.0" }, "post": { "tags": [ "故事接口" ], - "summary": "获取故事信息", - "description": "说明接口的详细信息,介绍,用途,注意事项等。", - "operationId": "getStory2UsingPOST", + "summary": "返回数组结果", + "description": "返回数组结果", + "operationId": "getStory3UsingPOST", "consumes": [ "application/json" ], @@ -664,8 +617,10 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/StoryVO", - "originalRef": "StoryVO" + "type": "array", + "items": { + "$ref": "#/definitions/StoryVO" + } } }, "201": { @@ -682,16 +637,16 @@ } }, "deprecated": false, - "sop_name": "alipay.story.find", + "sop_name": "alipay.story.find2", "sop_version": "1.0" }, "put": { "tags": [ "故事接口" ], - "summary": "获取故事信息", - "description": "说明接口的详细信息,介绍,用途,注意事项等。", - "operationId": "getStory2UsingPUT", + "summary": "返回数组结果", + "description": "返回数组结果", + "operationId": "getStory3UsingPUT", "consumes": [ "application/json" ], @@ -721,8 +676,10 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/StoryVO", - "originalRef": "StoryVO" + "type": "array", + "items": { + "$ref": "#/definitions/StoryVO" + } } }, "201": { @@ -739,16 +696,16 @@ } }, "deprecated": false, - "sop_name": "alipay.story.find", + "sop_name": "alipay.story.find2", "sop_version": "1.0" }, "delete": { "tags": [ "故事接口" ], - "summary": "获取故事信息", - "description": "说明接口的详细信息,介绍,用途,注意事项等。", - "operationId": "getStory2UsingDELETE", + "summary": "返回数组结果", + "description": "返回数组结果", + "operationId": "getStory3UsingDELETE", "produces": [ "*/*" ], @@ -775,8 +732,10 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/StoryVO", - "originalRef": "StoryVO" + "type": "array", + "items": { + "$ref": "#/definitions/StoryVO" + } } }, "204": { @@ -790,16 +749,16 @@ } }, "deprecated": false, - "sop_name": "alipay.story.find", + "sop_name": "alipay.story.find2", "sop_version": "1.0" }, "options": { "tags": [ "故事接口" ], - "summary": "获取故事信息", - "description": "说明接口的详细信息,介绍,用途,注意事项等。", - "operationId": "getStory2UsingOPTIONS", + "summary": "返回数组结果", + "description": "返回数组结果", + "operationId": "getStory3UsingOPTIONS", "consumes": [ "application/json" ], @@ -829,8 +788,10 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/StoryVO", - "originalRef": "StoryVO" + "type": "array", + "items": { + "$ref": "#/definitions/StoryVO" + } } }, "204": { @@ -844,16 +805,16 @@ } }, "deprecated": false, - "sop_name": "alipay.story.find", + "sop_name": "alipay.story.find2", "sop_version": "1.0" }, "patch": { "tags": [ "故事接口" ], - "summary": "获取故事信息", - "description": "说明接口的详细信息,介绍,用途,注意事项等。", - "operationId": "getStory2UsingPATCH", + "summary": "返回数组结果", + "description": "返回数组结果", + "operationId": "getStory3UsingPATCH", "consumes": [ "application/json" ], @@ -883,8 +844,10 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/StoryVO", - "originalRef": "StoryVO" + "type": "array", + "items": { + "$ref": "#/definitions/StoryVO" + } } }, "204": { @@ -898,7 +861,7 @@ } }, "deprecated": false, - "sop_name": "alipay.story.find", + "sop_name": "alipay.story.find2", "sop_version": "1.0" } }, @@ -939,8 +902,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" + "$ref": "#/definitions/FileUploadVO" } }, "401": { @@ -996,8 +958,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" + "$ref": "#/definitions/FileUploadVO" } }, "204": { @@ -1053,8 +1014,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" + "$ref": "#/definitions/FileUploadVO" } }, "201": { @@ -1113,8 +1073,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" + "$ref": "#/definitions/FileUploadVO" } }, "201": { @@ -1170,8 +1129,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" + "$ref": "#/definitions/FileUploadVO" } }, "204": { @@ -1227,8 +1185,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" + "$ref": "#/definitions/FileUploadVO" } }, "204": { @@ -1284,8 +1241,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" + "$ref": "#/definitions/FileUploadVO" } }, "204": { @@ -1326,8 +1282,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" + "$ref": "#/definitions/FileUploadVO" } }, "401": { @@ -1370,8 +1325,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" + "$ref": "#/definitions/FileUploadVO" } }, "204": { @@ -1414,8 +1368,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" + "$ref": "#/definitions/FileUploadVO" } }, "201": { @@ -1461,8 +1414,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" + "$ref": "#/definitions/FileUploadVO" } }, "201": { @@ -1505,8 +1457,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" + "$ref": "#/definitions/FileUploadVO" } }, "204": { @@ -1549,8 +1500,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" + "$ref": "#/definitions/FileUploadVO" } }, "204": { @@ -1593,8 +1543,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" + "$ref": "#/definitions/FileUploadVO" } }, "204": { @@ -1628,8 +1577,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Story", - "originalRef": "Story" + "$ref": "#/definitions/Story" } }, "401": { @@ -1663,8 +1611,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Story", - "originalRef": "Story" + "$ref": "#/definitions/Story" } }, "204": { @@ -1698,8 +1645,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Story", - "originalRef": "Story" + "$ref": "#/definitions/Story" } }, "201": { @@ -1736,8 +1682,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Story", - "originalRef": "Story" + "$ref": "#/definitions/Story" } }, "201": { @@ -1771,8 +1716,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Story", - "originalRef": "Story" + "$ref": "#/definitions/Story" } }, "204": { @@ -1806,8 +1750,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Story", - "originalRef": "Story" + "$ref": "#/definitions/Story" } }, "204": { @@ -1841,8 +1784,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Story", - "originalRef": "Story" + "$ref": "#/definitions/Story" } }, "204": { @@ -1872,8 +1814,7 @@ }, "story": { "description": "分类故事", - "$ref": "#/definitions/StoryVO", - "originalRef": "StoryVO" + "$ref": "#/definitions/StoryVO" } }, "title": "Category" @@ -1900,8 +1841,7 @@ "files": { "type": "array", "items": { - "$ref": "#/definitions/FileMeta", - "originalRef": "FileMeta" + "$ref": "#/definitions/FileMeta" } } },