修复返回数组文档不显示问题

1.x
tanghc 5 years ago
parent 46ae5205fa
commit 96f9a489b4
  1. 19
      sop-example/sop-story/sop-story-web/src/main/java/com/gitee/sop/storyweb/controller/AlipayController.java
  2. 4
      sop-example/sop-story/sop-story-web/src/main/java/com/gitee/sop/storyweb/vo/FileUploadVO.java
  3. 1
      sop-website/website-server/src/main/java/com/gitee/sop/websiteserver/controller/SandboxController.java
  4. 138
      sop-website/website-server/src/main/java/com/gitee/sop/websiteserver/manager/SwaggerDocParser.java
  5. 470
      sop-website/website-server/src/main/resources/api.json

@ -17,7 +17,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.Arrays;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* 支付宝服务端假设签名验证通过后到达这里进行具体的业务处理 * 支付宝服务端假设签名验证通过后到达这里进行具体的业务处理
@ -182,6 +184,23 @@ public class AlipayController {
return storyVO; return storyVO;
} }
@ApiOperation(value = "返回数组结果", notes = "返回数组结果")
@ApiMapping(value = "alipay.story.find2")
public List<StoryVO> 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 * @param story

@ -1,5 +1,6 @@
package com.gitee.sop.storyweb.vo; package com.gitee.sop.storyweb.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.ArrayList; import java.util.ArrayList;
@ -25,8 +26,11 @@ public class FileUploadVO {
public FileMeta() { public FileMeta() {
} }
@ApiModelProperty(value = "文件名称", example = "1.txt")
private String filename; private String filename;
@ApiModelProperty(value = "文件大小", example = "109")
private long size; private long size;
@ApiModelProperty(value = "文件内容", example = "啊啊啊")
private String content; private String content;
} }
} }

@ -119,6 +119,7 @@ public class SandboxController {
result.apiResult = responseData; result.apiResult = responseData;
return result; return result;
} catch (Exception e) { } catch (Exception e) {
log.error("请求失败", e);
throw new RuntimeException("请求失败"); throw new RuntimeException("请求失败");
} }
} }

@ -8,7 +8,6 @@ import com.gitee.sop.websiteserver.bean.DocModule;
import com.gitee.sop.websiteserver.bean.DocParameter; import com.gitee.sop.websiteserver.bean.DocParameter;
import com.gitee.sop.websiteserver.bean.DocParserContext; import com.gitee.sop.websiteserver.bean.DocParserContext;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import java.util.ArrayList; import java.util.ArrayList;
@ -138,7 +137,7 @@ public class SwaggerDocParser implements DocParser {
}) })
.collect(Collectors.groupingBy(DocParameter::getModule)); .collect(Collectors.groupingBy(DocParameter::getModule));
collect.entrySet().stream() collect.entrySet()
.forEach(entry -> { .forEach(entry -> {
DocParameter moduleDoc = new DocParameter(); DocParameter moduleDoc = new DocParameter();
moduleDoc.setName(entry.getKey()); moduleDoc.setName(entry.getKey());
@ -147,18 +146,25 @@ public class SwaggerDocParser implements DocParser {
docParameterList.add(moduleDoc); docParameterList.add(moduleDoc);
}); });
List<DocParameter> ret = docParameterList.stream() return docParameterList.stream()
.filter(docParameter -> !docParameter.getName().contains(".")) .filter(docParameter -> !docParameter.getName().contains("."))
.collect(Collectors.toList()); .collect(Collectors.toList());
return ret;
} }
protected List<DocParameter> buildResponseParameterList(JSONObject docInfo, JSONObject docRoot) { protected List<DocParameter> buildResponseParameterList(JSONObject docInfo, JSONObject docRoot) {
String responseRef = getResponseRef(docInfo); RefInfo refInfo = getResponseRefInfo(docInfo);
List<DocParameter> respParameterList = Collections.emptyList(); List<DocParameter> respParameterList = Collections.emptyList();
if (StringUtils.isNotBlank(responseRef)) { if (refInfo != null) {
String responseRef = refInfo.ref;
respParameterList = this.buildDocParameters(responseRef, docRoot); 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; return respParameterList;
} }
@ -170,52 +176,104 @@ public class SwaggerDocParser implements DocParser {
List<DocParameter> docParameterList = new ArrayList<>(); List<DocParameter> docParameterList = new ArrayList<>();
for (String fieldName : fieldNames) { for (String fieldName : fieldNames) {
/* /*
{ {
"description": "分类故事", "description": "分类故事",
"$ref": "#/definitions/StoryVO", "$ref": "#/definitions/StoryVO"
"originalRef": "StoryVO"
} }
*/ */
JSONObject fieldInfo = properties.getJSONObject(fieldName); JSONObject fieldInfo = properties.getJSONObject(fieldName);
DocParameter respParam = fieldInfo.toJavaObject(DocParameter.class); DocParameter docParameter = fieldInfo.toJavaObject(DocParameter.class);
respParam.setName(fieldName); docParameter.setName(fieldName);
docParameterList.add(respParam); docParameterList.add(docParameter);
String originalRef = isArray(fieldInfo) ? getRef(fieldInfo.getJSONObject(fieldName)) : getRef(fieldInfo); RefInfo refInfo = this.getRefInfo(fieldInfo);
if (StringUtils.isNotBlank(originalRef)) { if (refInfo != null) {
List<DocParameter> refs = buildDocParameters(originalRef, docRoot); List<DocParameter> refs = buildDocParameters(refInfo.ref, docRoot);
respParam.setRefs(refs); docParameter.setRefs(refs);
} }
} }
return docParameterList; 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")) return Optional.ofNullable(docInfo.getJSONObject("responses"))
.flatMap(jsonObject -> Optional.ofNullable(jsonObject.getJSONObject("200"))) .flatMap(jsonObject -> Optional.ofNullable(jsonObject.getJSONObject("200")))
.flatMap(jsonObject -> Optional.ofNullable(jsonObject.getJSONObject("schema"))) .flatMap(jsonObject -> Optional.ofNullable(jsonObject.getJSONObject("schema")))
.flatMap(jsonObject -> { .flatMap(schema -> {
// #/definitions/Category RefInfo refInfo = getRefInfo(schema);
String $ref = jsonObject.getString("$ref"); return Optional.ofNullable(refInfo);
if ($ref == null) {
return Optional.empty();
}
int index = $ref.lastIndexOf("/");
if (index > -1) {
$ref = $ref.substring(index + 1);
}
return Optional.of($ref);
}) })
.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;
} }
} }

@ -6,7 +6,7 @@
"title": "故事API", "title": "故事API",
"termsOfService": "文档" "termsOfService": "文档"
}, },
"host": "10.1.30.157:2222", "host": "localhost:2222",
"basePath": "/", "basePath": "/",
"tags": [ "tags": [
{ {
@ -24,13 +24,16 @@
], ],
"paths": { "paths": {
"/alipay.category.get/": { "/alipay.category.get/": {
"get": { "post": {
"tags": [ "tags": [
"故事接口" "故事接口"
], ],
"summary": "获取分类信息", "summary": "获取分类信息",
"description": "演示表格树", "description": "演示表格树",
"operationId": "getCategoryUsingGET", "operationId": "getCategoryUsingPOST",
"consumes": [
"application/json"
],
"produces": [ "produces": [
"*/*" "*/*"
], ],
@ -74,10 +77,12 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/Category", "$ref": "#/definitions/Category"
"originalRef": "Category"
} }
}, },
"201": {
"description": "Created"
},
"401": { "401": {
"description": "Unauthorized" "description": "Unauthorized"
}, },
@ -91,62 +96,96 @@
"deprecated": false, "deprecated": false,
"sop_name": "alipay.category.get", "sop_name": "alipay.category.get",
"sop_version": "1.0" "sop_version": "1.0"
}, }
"head": { },
"/alipay.story.find/": {
"get": {
"tags": [ "tags": [
"故事接口" "故事接口"
], ],
"summary": "获取分类信息", "summary": "获取故事信息",
"description": "演示表格树", "description": "说明接口的详细信息,介绍,用途,注意事项等。",
"operationId": "getCategoryUsingHEAD", "operationId": "getStory2UsingGET",
"consumes": [
"application/json"
],
"produces": [ "produces": [
"*/*" "*/*"
], ],
"parameters": [ "parameters": [
{ {
"name": "categoryName", "name": "id",
"in": "query", "in": "query",
"description": "分类名称", "description": "故事ID",
"required": false, "required": false,
"type": "string", "type": "integer",
"x-example": "娱乐" "format": "int32",
"x-example": 111
}, },
{ {
"name": "story.gmt_create", "name": "name",
"in": "query", "in": "query",
"description": "创建时间", "description": "故事名称",
"required": false, "required": true,
"type": "string", "type": "string",
"format": "date-time", "x-example": "白雪公主"
"x-example": "2019-04-14 19:02:12" }
],
"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", "in": "query",
"description": "故事ID", "description": "故事ID",
"required": false, "required": false,
"type": "integer", "type": "integer",
"format": "int64", "format": "int32",
"x-example": 1 "x-example": 111
}, },
{ {
"name": "story.name", "name": "name",
"in": "query", "in": "query",
"description": "故事名称", "description": "故事名称",
"required": false, "required": true,
"type": "string", "type": "string",
"x-example": "海底小纵队" "x-example": "白雪公主"
} }
], ],
"responses": { "responses": {
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/Category", "$ref": "#/definitions/StoryVO"
"originalRef": "Category"
} }
}, },
"204": { "204": {
@ -160,16 +199,16 @@
} }
}, },
"deprecated": false, "deprecated": false,
"sop_name": "alipay.category.get", "sop_name": "alipay.story.find",
"sop_version": "1.0" "sop_version": "1.0"
}, },
"post": { "post": {
"tags": [ "tags": [
"故事接口" "故事接口"
], ],
"summary": "获取分类信息", "summary": "获取故事信息",
"description": "演示表格树", "description": "说明接口的详细信息,介绍,用途,注意事项等。",
"operationId": "getCategoryUsingPOST", "operationId": "getStory2UsingPOST",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
@ -178,46 +217,28 @@
], ],
"parameters": [ "parameters": [
{ {
"name": "categoryName", "name": "id",
"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",
"in": "query", "in": "query",
"description": "故事ID", "description": "故事ID",
"required": false, "required": false,
"type": "integer", "type": "integer",
"format": "int64", "format": "int32",
"x-example": 1 "x-example": 111
}, },
{ {
"name": "story.name", "name": "name",
"in": "query", "in": "query",
"description": "故事名称", "description": "故事名称",
"required": false, "required": true,
"type": "string", "type": "string",
"x-example": "海底小纵队" "x-example": "白雪公主"
} }
], ],
"responses": { "responses": {
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/Category", "$ref": "#/definitions/StoryVO"
"originalRef": "Category"
} }
}, },
"201": { "201": {
@ -234,16 +255,16 @@
} }
}, },
"deprecated": false, "deprecated": false,
"sop_name": "alipay.category.get", "sop_name": "alipay.story.find",
"sop_version": "1.0" "sop_version": "1.0"
}, },
"put": { "put": {
"tags": [ "tags": [
"故事接口" "故事接口"
], ],
"summary": "获取分类信息", "summary": "获取故事信息",
"description": "演示表格树", "description": "说明接口的详细信息,介绍,用途,注意事项等。",
"operationId": "getCategoryUsingPUT", "operationId": "getStory2UsingPUT",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
@ -252,46 +273,28 @@
], ],
"parameters": [ "parameters": [
{ {
"name": "categoryName", "name": "id",
"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",
"in": "query", "in": "query",
"description": "故事ID", "description": "故事ID",
"required": false, "required": false,
"type": "integer", "type": "integer",
"format": "int64", "format": "int32",
"x-example": 1 "x-example": 111
}, },
{ {
"name": "story.name", "name": "name",
"in": "query", "in": "query",
"description": "故事名称", "description": "故事名称",
"required": false, "required": true,
"type": "string", "type": "string",
"x-example": "海底小纵队" "x-example": "白雪公主"
} }
], ],
"responses": { "responses": {
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/Category", "$ref": "#/definitions/StoryVO"
"originalRef": "Category"
} }
}, },
"201": { "201": {
@ -308,61 +311,43 @@
} }
}, },
"deprecated": false, "deprecated": false,
"sop_name": "alipay.category.get", "sop_name": "alipay.story.find",
"sop_version": "1.0" "sop_version": "1.0"
}, },
"delete": { "delete": {
"tags": [ "tags": [
"故事接口" "故事接口"
], ],
"summary": "获取分类信息", "summary": "获取故事信息",
"description": "演示表格树", "description": "说明接口的详细信息,介绍,用途,注意事项等。",
"operationId": "getCategoryUsingDELETE", "operationId": "getStory2UsingDELETE",
"produces": [ "produces": [
"*/*" "*/*"
], ],
"parameters": [ "parameters": [
{ {
"name": "categoryName", "name": "id",
"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",
"in": "query", "in": "query",
"description": "故事ID", "description": "故事ID",
"required": false, "required": false,
"type": "integer", "type": "integer",
"format": "int64", "format": "int32",
"x-example": 1 "x-example": 111
}, },
{ {
"name": "story.name", "name": "name",
"in": "query", "in": "query",
"description": "故事名称", "description": "故事名称",
"required": false, "required": true,
"type": "string", "type": "string",
"x-example": "海底小纵队" "x-example": "白雪公主"
} }
], ],
"responses": { "responses": {
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/Category", "$ref": "#/definitions/StoryVO"
"originalRef": "Category"
} }
}, },
"204": { "204": {
@ -376,16 +361,16 @@
} }
}, },
"deprecated": false, "deprecated": false,
"sop_name": "alipay.category.get", "sop_name": "alipay.story.find",
"sop_version": "1.0" "sop_version": "1.0"
}, },
"options": { "options": {
"tags": [ "tags": [
"故事接口" "故事接口"
], ],
"summary": "获取分类信息", "summary": "获取故事信息",
"description": "演示表格树", "description": "说明接口的详细信息,介绍,用途,注意事项等。",
"operationId": "getCategoryUsingOPTIONS", "operationId": "getStory2UsingOPTIONS",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
@ -394,46 +379,28 @@
], ],
"parameters": [ "parameters": [
{ {
"name": "categoryName", "name": "id",
"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",
"in": "query", "in": "query",
"description": "故事ID", "description": "故事ID",
"required": false, "required": false,
"type": "integer", "type": "integer",
"format": "int64", "format": "int32",
"x-example": 1 "x-example": 111
}, },
{ {
"name": "story.name", "name": "name",
"in": "query", "in": "query",
"description": "故事名称", "description": "故事名称",
"required": false, "required": true,
"type": "string", "type": "string",
"x-example": "海底小纵队" "x-example": "白雪公主"
} }
], ],
"responses": { "responses": {
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/Category", "$ref": "#/definitions/StoryVO"
"originalRef": "Category"
} }
}, },
"204": { "204": {
@ -447,16 +414,16 @@
} }
}, },
"deprecated": false, "deprecated": false,
"sop_name": "alipay.category.get", "sop_name": "alipay.story.find",
"sop_version": "1.0" "sop_version": "1.0"
}, },
"patch": { "patch": {
"tags": [ "tags": [
"故事接口" "故事接口"
], ],
"summary": "获取分类信息", "summary": "获取故事信息",
"description": "演示表格树", "description": "说明接口的详细信息,介绍,用途,注意事项等。",
"operationId": "getCategoryUsingPATCH", "operationId": "getStory2UsingPATCH",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
@ -465,46 +432,28 @@
], ],
"parameters": [ "parameters": [
{ {
"name": "categoryName", "name": "id",
"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",
"in": "query", "in": "query",
"description": "故事ID", "description": "故事ID",
"required": false, "required": false,
"type": "integer", "type": "integer",
"format": "int64", "format": "int32",
"x-example": 1 "x-example": 111
}, },
{ {
"name": "story.name", "name": "name",
"in": "query", "in": "query",
"description": "故事名称", "description": "故事名称",
"required": false, "required": true,
"type": "string", "type": "string",
"x-example": "海底小纵队" "x-example": "白雪公主"
} }
], ],
"responses": { "responses": {
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/Category", "$ref": "#/definitions/StoryVO"
"originalRef": "Category"
} }
}, },
"204": { "204": {
@ -518,18 +467,18 @@
} }
}, },
"deprecated": false, "deprecated": false,
"sop_name": "alipay.category.get", "sop_name": "alipay.story.find",
"sop_version": "1.0" "sop_version": "1.0"
} }
}, },
"/alipay.story.find/": { "/alipay.story.find2/": {
"get": { "get": {
"tags": [ "tags": [
"故事接口" "故事接口"
], ],
"summary": "获取故事信息", "summary": "返回数组结果",
"description": "说明接口的详细信息,介绍,用途,注意事项等。", "description": "返回数组结果",
"operationId": "getStory2UsingGET", "operationId": "getStory3UsingGET",
"produces": [ "produces": [
"*/*" "*/*"
], ],
@ -556,8 +505,10 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/StoryVO", "type": "array",
"originalRef": "StoryVO" "items": {
"$ref": "#/definitions/StoryVO"
}
} }
}, },
"401": { "401": {
@ -571,16 +522,16 @@
} }
}, },
"deprecated": false, "deprecated": false,
"sop_name": "alipay.story.find", "sop_name": "alipay.story.find2",
"sop_version": "1.0" "sop_version": "1.0"
}, },
"head": { "head": {
"tags": [ "tags": [
"故事接口" "故事接口"
], ],
"summary": "获取故事信息", "summary": "返回数组结果",
"description": "说明接口的详细信息,介绍,用途,注意事项等。", "description": "返回数组结果",
"operationId": "getStory2UsingHEAD", "operationId": "getStory3UsingHEAD",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
@ -610,8 +561,10 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/StoryVO", "type": "array",
"originalRef": "StoryVO" "items": {
"$ref": "#/definitions/StoryVO"
}
} }
}, },
"204": { "204": {
@ -625,16 +578,16 @@
} }
}, },
"deprecated": false, "deprecated": false,
"sop_name": "alipay.story.find", "sop_name": "alipay.story.find2",
"sop_version": "1.0" "sop_version": "1.0"
}, },
"post": { "post": {
"tags": [ "tags": [
"故事接口" "故事接口"
], ],
"summary": "获取故事信息", "summary": "返回数组结果",
"description": "说明接口的详细信息,介绍,用途,注意事项等。", "description": "返回数组结果",
"operationId": "getStory2UsingPOST", "operationId": "getStory3UsingPOST",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
@ -664,8 +617,10 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/StoryVO", "type": "array",
"originalRef": "StoryVO" "items": {
"$ref": "#/definitions/StoryVO"
}
} }
}, },
"201": { "201": {
@ -682,16 +637,16 @@
} }
}, },
"deprecated": false, "deprecated": false,
"sop_name": "alipay.story.find", "sop_name": "alipay.story.find2",
"sop_version": "1.0" "sop_version": "1.0"
}, },
"put": { "put": {
"tags": [ "tags": [
"故事接口" "故事接口"
], ],
"summary": "获取故事信息", "summary": "返回数组结果",
"description": "说明接口的详细信息,介绍,用途,注意事项等。", "description": "返回数组结果",
"operationId": "getStory2UsingPUT", "operationId": "getStory3UsingPUT",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
@ -721,8 +676,10 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/StoryVO", "type": "array",
"originalRef": "StoryVO" "items": {
"$ref": "#/definitions/StoryVO"
}
} }
}, },
"201": { "201": {
@ -739,16 +696,16 @@
} }
}, },
"deprecated": false, "deprecated": false,
"sop_name": "alipay.story.find", "sop_name": "alipay.story.find2",
"sop_version": "1.0" "sop_version": "1.0"
}, },
"delete": { "delete": {
"tags": [ "tags": [
"故事接口" "故事接口"
], ],
"summary": "获取故事信息", "summary": "返回数组结果",
"description": "说明接口的详细信息,介绍,用途,注意事项等。", "description": "返回数组结果",
"operationId": "getStory2UsingDELETE", "operationId": "getStory3UsingDELETE",
"produces": [ "produces": [
"*/*" "*/*"
], ],
@ -775,8 +732,10 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/StoryVO", "type": "array",
"originalRef": "StoryVO" "items": {
"$ref": "#/definitions/StoryVO"
}
} }
}, },
"204": { "204": {
@ -790,16 +749,16 @@
} }
}, },
"deprecated": false, "deprecated": false,
"sop_name": "alipay.story.find", "sop_name": "alipay.story.find2",
"sop_version": "1.0" "sop_version": "1.0"
}, },
"options": { "options": {
"tags": [ "tags": [
"故事接口" "故事接口"
], ],
"summary": "获取故事信息", "summary": "返回数组结果",
"description": "说明接口的详细信息,介绍,用途,注意事项等。", "description": "返回数组结果",
"operationId": "getStory2UsingOPTIONS", "operationId": "getStory3UsingOPTIONS",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
@ -829,8 +788,10 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/StoryVO", "type": "array",
"originalRef": "StoryVO" "items": {
"$ref": "#/definitions/StoryVO"
}
} }
}, },
"204": { "204": {
@ -844,16 +805,16 @@
} }
}, },
"deprecated": false, "deprecated": false,
"sop_name": "alipay.story.find", "sop_name": "alipay.story.find2",
"sop_version": "1.0" "sop_version": "1.0"
}, },
"patch": { "patch": {
"tags": [ "tags": [
"故事接口" "故事接口"
], ],
"summary": "获取故事信息", "summary": "返回数组结果",
"description": "说明接口的详细信息,介绍,用途,注意事项等。", "description": "返回数组结果",
"operationId": "getStory2UsingPATCH", "operationId": "getStory3UsingPATCH",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
@ -883,8 +844,10 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/StoryVO", "type": "array",
"originalRef": "StoryVO" "items": {
"$ref": "#/definitions/StoryVO"
}
} }
}, },
"204": { "204": {
@ -898,7 +861,7 @@
} }
}, },
"deprecated": false, "deprecated": false,
"sop_name": "alipay.story.find", "sop_name": "alipay.story.find2",
"sop_version": "1.0" "sop_version": "1.0"
} }
}, },
@ -939,8 +902,7 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/FileUploadVO", "$ref": "#/definitions/FileUploadVO"
"originalRef": "FileUploadVO"
} }
}, },
"401": { "401": {
@ -996,8 +958,7 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/FileUploadVO", "$ref": "#/definitions/FileUploadVO"
"originalRef": "FileUploadVO"
} }
}, },
"204": { "204": {
@ -1053,8 +1014,7 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/FileUploadVO", "$ref": "#/definitions/FileUploadVO"
"originalRef": "FileUploadVO"
} }
}, },
"201": { "201": {
@ -1113,8 +1073,7 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/FileUploadVO", "$ref": "#/definitions/FileUploadVO"
"originalRef": "FileUploadVO"
} }
}, },
"201": { "201": {
@ -1170,8 +1129,7 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/FileUploadVO", "$ref": "#/definitions/FileUploadVO"
"originalRef": "FileUploadVO"
} }
}, },
"204": { "204": {
@ -1227,8 +1185,7 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/FileUploadVO", "$ref": "#/definitions/FileUploadVO"
"originalRef": "FileUploadVO"
} }
}, },
"204": { "204": {
@ -1284,8 +1241,7 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/FileUploadVO", "$ref": "#/definitions/FileUploadVO"
"originalRef": "FileUploadVO"
} }
}, },
"204": { "204": {
@ -1326,8 +1282,7 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/FileUploadVO", "$ref": "#/definitions/FileUploadVO"
"originalRef": "FileUploadVO"
} }
}, },
"401": { "401": {
@ -1370,8 +1325,7 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/FileUploadVO", "$ref": "#/definitions/FileUploadVO"
"originalRef": "FileUploadVO"
} }
}, },
"204": { "204": {
@ -1414,8 +1368,7 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/FileUploadVO", "$ref": "#/definitions/FileUploadVO"
"originalRef": "FileUploadVO"
} }
}, },
"201": { "201": {
@ -1461,8 +1414,7 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/FileUploadVO", "$ref": "#/definitions/FileUploadVO"
"originalRef": "FileUploadVO"
} }
}, },
"201": { "201": {
@ -1505,8 +1457,7 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/FileUploadVO", "$ref": "#/definitions/FileUploadVO"
"originalRef": "FileUploadVO"
} }
}, },
"204": { "204": {
@ -1549,8 +1500,7 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/FileUploadVO", "$ref": "#/definitions/FileUploadVO"
"originalRef": "FileUploadVO"
} }
}, },
"204": { "204": {
@ -1593,8 +1543,7 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/FileUploadVO", "$ref": "#/definitions/FileUploadVO"
"originalRef": "FileUploadVO"
} }
}, },
"204": { "204": {
@ -1628,8 +1577,7 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/Story", "$ref": "#/definitions/Story"
"originalRef": "Story"
} }
}, },
"401": { "401": {
@ -1663,8 +1611,7 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/Story", "$ref": "#/definitions/Story"
"originalRef": "Story"
} }
}, },
"204": { "204": {
@ -1698,8 +1645,7 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/Story", "$ref": "#/definitions/Story"
"originalRef": "Story"
} }
}, },
"201": { "201": {
@ -1736,8 +1682,7 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/Story", "$ref": "#/definitions/Story"
"originalRef": "Story"
} }
}, },
"201": { "201": {
@ -1771,8 +1716,7 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/Story", "$ref": "#/definitions/Story"
"originalRef": "Story"
} }
}, },
"204": { "204": {
@ -1806,8 +1750,7 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/Story", "$ref": "#/definitions/Story"
"originalRef": "Story"
} }
}, },
"204": { "204": {
@ -1841,8 +1784,7 @@
"200": { "200": {
"description": "OK", "description": "OK",
"schema": { "schema": {
"$ref": "#/definitions/Story", "$ref": "#/definitions/Story"
"originalRef": "Story"
} }
}, },
"204": { "204": {
@ -1872,8 +1814,7 @@
}, },
"story": { "story": {
"description": "分类故事", "description": "分类故事",
"$ref": "#/definitions/StoryVO", "$ref": "#/definitions/StoryVO"
"originalRef": "StoryVO"
} }
}, },
"title": "Category" "title": "Category"
@ -1900,8 +1841,7 @@
"files": { "files": {
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/FileMeta", "$ref": "#/definitions/FileMeta"
"originalRef": "FileMeta"
} }
} }
}, },

Loading…
Cancel
Save