From 199cb67fa314346ad7595f120f27a99d25e1e73b Mon Sep 17 00:00:00 2001 From: tanghc Date: Tue, 4 Aug 2020 13:55:44 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=94=AF=E6=8C=81swagger=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 6 + sop-common/sop-service-common/pom.xml | 2 +- .../swagger/CustomModelToSwaggerMapper.java | 20 + .../CustomSwaggerParameterBuilder.java | 127 ++ .../DocumentationPluginsManagerExt.java | 8 + .../servercommon/swagger/SwaggerSupport.java | 16 + .../Example1001_BaseController.java | 4 +- .../storyweb/controller/param/StoryParam.java | 5 +- .../gitee/sop/websiteserver/bean/DocItem.java | 4 + .../manager/SwaggerDocParser.java | 3 +- sop-website/src/main/resources/api.json | 1947 ----------------- 11 files changed, 190 insertions(+), 1952 deletions(-) create mode 100644 sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/swagger/CustomModelToSwaggerMapper.java create mode 100644 sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/swagger/CustomSwaggerParameterBuilder.java delete mode 100644 sop-website/src/main/resources/api.json diff --git a/pom.xml b/pom.xml index c760cfd0..23e2d066 100644 --- a/pom.xml +++ b/pom.xml @@ -65,6 +65,7 @@ 27.1-jre 1.5.21 2.9.2 + 2.9.2 1.16.9 @@ -121,6 +122,11 @@ swagger-annotations ${swagger.version} + + io.springfox + springfox-swagger2 + ${springfox-swagger2.version} + net.oschina.durcframework diff --git a/sop-common/sop-service-common/pom.xml b/sop-common/sop-service-common/pom.xml index 34f7df4e..70eb1034 100644 --- a/sop-common/sop-service-common/pom.xml +++ b/sop-common/sop-service-common/pom.xml @@ -60,7 +60,7 @@ io.springfox - springfox-spring-web + springfox-swagger2 true diff --git a/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/swagger/CustomModelToSwaggerMapper.java b/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/swagger/CustomModelToSwaggerMapper.java new file mode 100644 index 00000000..0f2c9a64 --- /dev/null +++ b/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/swagger/CustomModelToSwaggerMapper.java @@ -0,0 +1,20 @@ +package com.gitee.sop.servercommon.swagger; + +import io.swagger.models.parameters.Parameter; +import springfox.documentation.swagger2.mappers.ServiceModelToSwagger2MapperImpl; + +import java.util.Comparator; +import java.util.List; +import java.util.stream.Collectors; + +public class CustomModelToSwaggerMapper extends ServiceModelToSwagger2MapperImpl { + + @Override + protected List parameterListToParameterList(List list) { + // list需要根据order|postion排序 + list = list.stream() + .sorted(Comparator.comparingInt(springfox.documentation.service.Parameter::getOrder)) + .collect(Collectors.toList()); + return super.parameterListToParameterList(list); + } +} diff --git a/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/swagger/CustomSwaggerParameterBuilder.java b/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/swagger/CustomSwaggerParameterBuilder.java new file mode 100644 index 00000000..b3e4974b --- /dev/null +++ b/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/swagger/CustomSwaggerParameterBuilder.java @@ -0,0 +1,127 @@ +package com.gitee.sop.servercommon.swagger; + +import com.google.common.base.Function; +import com.google.common.base.Optional; +import com.google.common.base.Strings; +import com.google.common.collect.Lists; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiParam; +import springfox.documentation.builders.ParameterBuilder; +import springfox.documentation.service.AllowableListValues; +import springfox.documentation.service.AllowableValues; +import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spi.schema.EnumTypeDeterminer; +import springfox.documentation.spi.service.ExpandedParameterBuilderPlugin; +import springfox.documentation.spi.service.contexts.ParameterExpansionContext; +import springfox.documentation.spring.web.DescriptionResolver; +import springfox.documentation.swagger.common.SwaggerPluginSupport; +import springfox.documentation.swagger.readers.parameter.Examples; +import springfox.documentation.swagger.schema.ApiModelProperties; + +import java.util.Arrays; +import java.util.List; + +import static springfox.documentation.swagger.common.SwaggerPluginSupport.SWAGGER_PLUGIN_ORDER; + +/** + * Created by wujie on 2019/2/16. + * 自定义ExpandedParameterBuilderPlugin,主要是修正源码query传入请求参数postion无效 + * 这里,将postion赋值给order + * + * https://blog.csdn.net/qq_38316721/article/details/103908793 + */ +public class CustomSwaggerParameterBuilder implements ExpandedParameterBuilderPlugin { + + private final DescriptionResolver descriptions; + private final EnumTypeDeterminer enumTypeDeterminer; + + public CustomSwaggerParameterBuilder( + DescriptionResolver descriptions, + EnumTypeDeterminer enumTypeDeterminer) { + this.descriptions = descriptions; + this.enumTypeDeterminer = enumTypeDeterminer; + } + + @Override + public void apply(ParameterExpansionContext context) { + Optional apiModelPropertyOptional = context.findAnnotation(ApiModelProperty.class); + if (apiModelPropertyOptional.isPresent()) { + fromApiModelProperty(context, apiModelPropertyOptional.get()); + } + Optional apiParamOptional = context.findAnnotation(ApiParam.class); + if (apiParamOptional.isPresent()) { + fromApiParam(context, apiParamOptional.get()); + } + } + + @Override + public boolean supports(DocumentationType delimiter) { + return SwaggerPluginSupport.pluginDoesApply(delimiter); + } + + private void fromApiParam(ParameterExpansionContext context, ApiParam apiParam) { + String allowableProperty = Strings.emptyToNull(apiParam.allowableValues()); + AllowableValues allowable = allowableValues( + Optional.fromNullable(allowableProperty), + context.getFieldType().getErasedType()); + + maybeSetParameterName(context, apiParam.name()) + .description(descriptions.resolve(apiParam.value())) + .defaultValue(apiParam.defaultValue()) + .required(apiParam.required()) + .allowMultiple(apiParam.allowMultiple()) + .allowableValues(allowable) + .parameterAccess(apiParam.access()) + .hidden(apiParam.hidden()) + .scalarExample(apiParam.example()) + .complexExamples(Examples.examples(apiParam.examples())) + .order(SWAGGER_PLUGIN_ORDER) + .build(); + } + + private void fromApiModelProperty(ParameterExpansionContext context, ApiModelProperty apiModelProperty) { + String allowableProperty = Strings.emptyToNull(apiModelProperty.allowableValues()); + AllowableValues allowable = allowableValues( + Optional.fromNullable(allowableProperty), + context.getFieldType().getErasedType()); + + maybeSetParameterName(context, apiModelProperty.name()) + .description(descriptions.resolve(apiModelProperty.value())) + .required(apiModelProperty.required()) + .allowableValues(allowable) + .parameterAccess(apiModelProperty.access()) + .hidden(apiModelProperty.hidden()) + .scalarExample(apiModelProperty.example()) + //源码这里是: SWAGGER_PLUGIN_ORDER,需要修正 + .order(apiModelProperty.position()) + .build(); + } + + private ParameterBuilder maybeSetParameterName(ParameterExpansionContext context, String parameterName) { + if (!Strings.isNullOrEmpty(parameterName)) { + context.getParameterBuilder().name(parameterName); + } + return context.getParameterBuilder(); + } + + private AllowableValues allowableValues(final Optional optionalAllowable, Class fieldType) { + + AllowableValues allowable = null; + if (enumTypeDeterminer.isEnum(fieldType)) { + allowable = new AllowableListValues(getEnumValues(fieldType), "LIST"); + } else if (optionalAllowable.isPresent()) { + allowable = ApiModelProperties.allowableValueFromString(optionalAllowable.get()); + } + return allowable; + } + + private List getEnumValues(final Class subject) { + return Lists.transform(Arrays.asList(subject.getEnumConstants()), new Function() { + @Override + public String apply(final Object input) { + return input.toString(); + } + }); + } +} + \ No newline at end of file diff --git a/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/swagger/DocumentationPluginsManagerExt.java b/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/swagger/DocumentationPluginsManagerExt.java index b138c3de..a7ed04f3 100644 --- a/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/swagger/DocumentationPluginsManagerExt.java +++ b/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/swagger/DocumentationPluginsManagerExt.java @@ -4,6 +4,7 @@ import com.gitee.sop.servercommon.annotation.Open; import com.gitee.sop.servercommon.bean.ServiceConfig; import com.google.common.base.Optional; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.springframework.core.annotation.Order; import springfox.documentation.service.Operation; import springfox.documentation.service.StringVendorExtension; @@ -21,6 +22,7 @@ public class DocumentationPluginsManagerExt extends DocumentationPluginsManager private static final String SOP_NAME = "sop_name"; private static final String SOP_VERSION = "sop_version"; private static final String MODULE_ORDER = "module_order"; + private static final String API_ORDER = "api_order"; @Override public Operation operation(OperationContext operationContext) { @@ -50,6 +52,12 @@ public class DocumentationPluginsManagerExt extends DocumentationPluginsManager } } vendorExtensions.add(new StringVendorExtension(MODULE_ORDER, String.valueOf(order))); + Optional apiOperationOptional = operationContext.findAnnotation(ApiOperation.class); + int methodOrder = 0; + if (apiOperationOptional.isPresent()) { + methodOrder = apiOperationOptional.get().position(); + } + vendorExtensions.add(new StringVendorExtension(API_ORDER, String.valueOf(methodOrder))); } private String buildVersion(String version) { diff --git a/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/swagger/SwaggerSupport.java b/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/swagger/SwaggerSupport.java index 023c9c2a..6897293c 100644 --- a/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/swagger/SwaggerSupport.java +++ b/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/swagger/SwaggerSupport.java @@ -8,6 +8,8 @@ import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.service.ApiInfo; import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spi.schema.EnumTypeDeterminer; +import springfox.documentation.spring.web.DescriptionResolver; import springfox.documentation.spring.web.plugins.Docket; /** @@ -27,6 +29,20 @@ public abstract class SwaggerSupport { return new DocumentationPluginsManagerExt(); } + @Bean + @Primary + public CustomModelToSwaggerMapper customModelToSwaggerMapper() { + return new CustomModelToSwaggerMapper(); + } + + @Bean + @Primary + public CustomSwaggerParameterBuilder customSwaggerParameterBuilder( + DescriptionResolver descriptions, + EnumTypeDeterminer enumTypeDeterminer) { + return new CustomSwaggerParameterBuilder(descriptions, enumTypeDeterminer); + } + @Bean public Docket createRestApi() { return getDocket(); diff --git a/sop-example/sop-story/src/main/java/com/gitee/sop/storyweb/controller/Example1001_BaseController.java b/sop-example/sop-story/src/main/java/com/gitee/sop/storyweb/controller/Example1001_BaseController.java index 6b1abe50..e3ab5752 100644 --- a/sop-example/sop-story/src/main/java/com/gitee/sop/storyweb/controller/Example1001_BaseController.java +++ b/sop-example/sop-story/src/main/java/com/gitee/sop/storyweb/controller/Example1001_BaseController.java @@ -41,7 +41,7 @@ public class Example1001_BaseController { } // 基础用法 - @ApiOperation(value = "获取故事信息", notes = "获取故事信息的详细信息") + @ApiOperation(value = "获取故事信息(首位)", notes = "获取故事信息的详细信息", position = -100/* position默认0,值越小越靠前 */) @Open("story.get") @RequestMapping("/get/v1") public StoryResult get_v1(StoryParam param) { @@ -81,7 +81,7 @@ public class Example1001_BaseController { } // 返回数组结果 - @ApiOperation(value = "返回数组结果", notes = "返回数组结果") + @ApiOperation(value = "返回数组结果(第二)", notes = "返回数组结果", position = -99) @Open("story.list") @RequestMapping("/list/v1") public List getStory3(StoryParam story) { diff --git a/sop-example/sop-story/src/main/java/com/gitee/sop/storyweb/controller/param/StoryParam.java b/sop-example/sop-story/src/main/java/com/gitee/sop/storyweb/controller/param/StoryParam.java index 875a50aa..6095f7c9 100644 --- a/sop-example/sop-story/src/main/java/com/gitee/sop/storyweb/controller/param/StoryParam.java +++ b/sop-example/sop-story/src/main/java/com/gitee/sop/storyweb/controller/param/StoryParam.java @@ -13,6 +13,9 @@ public class StoryParam { @NotBlank(message = "name不能为空") @Length(max = 20, message = "name长度不能超过20") - @ApiModelProperty(value = "故事名称", required = true, example = "白雪公主") + @ApiModelProperty(value = "故事名称", required = true, example = "白雪公主", position = 3) private String name; + + @ApiModelProperty(value = "备注 (第二)", example = "xx", position = 2) + private String remark; } \ No newline at end of file diff --git a/sop-website/src/main/java/com/gitee/sop/websiteserver/bean/DocItem.java b/sop-website/src/main/java/com/gitee/sop/websiteserver/bean/DocItem.java index 2f68b9ef..5a6236b6 100644 --- a/sop-website/src/main/java/com/gitee/sop/websiteserver/bean/DocItem.java +++ b/sop-website/src/main/java/com/gitee/sop/websiteserver/bean/DocItem.java @@ -22,8 +22,12 @@ public class DocItem { private Collection produces; + /** 模块顺序 */ private int moduleOrder; + /** 文档顺序 */ + private int apiOrder; + List requestParameters; List responseParameters; diff --git a/sop-website/src/main/java/com/gitee/sop/websiteserver/manager/SwaggerDocParser.java b/sop-website/src/main/java/com/gitee/sop/websiteserver/manager/SwaggerDocParser.java index f47e3c21..95240efd 100644 --- a/sop-website/src/main/java/com/gitee/sop/websiteserver/manager/SwaggerDocParser.java +++ b/sop-website/src/main/java/com/gitee/sop/websiteserver/manager/SwaggerDocParser.java @@ -61,7 +61,7 @@ public class SwaggerDocParser implements DocParser { } } - docItems.sort(Comparator.comparing(DocItem::getNameVersion)); + docItems.sort(Comparator.comparing(DocItem::getApiOrder).thenComparing(DocItem::getNameVersion)); List docModuleList = docItems.stream() .collect(Collectors.groupingBy(DocItem::getModule)) @@ -122,6 +122,7 @@ public class SwaggerDocParser implements DocParser { docItem.setMultiple(docInfo.getString("multiple") != null); docItem.setProduces(docInfo.getJSONArray("produces").toJavaList(String.class)); docItem.setModuleOrder(NumberUtils.toInt(docInfo.getString("module_order"), 0)); + docItem.setApiOrder(NumberUtils.toInt(docInfo.getString("api_order"), 0)); String moduleName = this.buildModuleName(docInfo, docRoot); docItem.setModule(moduleName); List docParameterList = this.buildRequestParameterList(docInfo, docRoot); diff --git a/sop-website/src/main/resources/api.json b/sop-website/src/main/resources/api.json deleted file mode 100644 index 1c5ad911..00000000 --- a/sop-website/src/main/resources/api.json +++ /dev/null @@ -1,1947 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "description": "文档描述", - "version": "1.0", - "title": "故事API", - "termsOfService": "文档" - }, - "host": "10.1.30.157:2222", - "basePath": "/", - "tags": [ - { - "name": "故事接口", - "description": "Alipay Controller" - }, - { - "name": "故事接口2", - "description": "Story 2 Controller" - }, - { - "name": "文件上传", - "description": "File Upload Demo Controller" - } - ], - "paths": { - "/alipay.category.get/": { - "get": { - "tags": [ - "故事接口" - ], - "summary": "获取分类信息", - "description": "演示表格树", - "operationId": "getCategoryUsingGET", - "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", - "in": "query", - "description": "故事ID", - "required": false, - "type": "integer", - "format": "int64", - "x-example": 1 - }, - { - "name": "story.name", - "in": "query", - "description": "故事名称", - "required": false, - "type": "string", - "x-example": "海底小纵队" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Category", - "originalRef": "Category" - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - }, - "deprecated": false, - "sop_name": "alipay.category.get", - "sop_version": "1.0" - }, - "head": { - "tags": [ - "故事接口" - ], - "summary": "获取分类信息", - "description": "演示表格树", - "operationId": "getCategoryUsingHEAD", - "consumes": [ - "application/json" - ], - "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", - "in": "query", - "description": "故事ID", - "required": false, - "type": "integer", - "format": "int64", - "x-example": 1 - }, - { - "name": "story.name", - "in": "query", - "description": "故事名称", - "required": false, - "type": "string", - "x-example": "海底小纵队" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Category", - "originalRef": "Category" - } - }, - "204": { - "description": "No Content" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "deprecated": false, - "sop_name": "alipay.category.get", - "sop_version": "1.0" - }, - "post": { - "tags": [ - "故事接口" - ], - "summary": "获取分类信息", - "description": "演示表格树", - "operationId": "getCategoryUsingPOST", - "consumes": [ - "application/json" - ], - "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", - "in": "query", - "description": "故事ID", - "required": false, - "type": "integer", - "format": "int64", - "x-example": 1 - }, - { - "name": "story.name", - "in": "query", - "description": "故事名称", - "required": false, - "type": "string", - "x-example": "海底小纵队" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Category", - "originalRef": "Category" - } - }, - "201": { - "description": "Created" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - }, - "deprecated": false, - "sop_name": "alipay.category.get", - "sop_version": "1.0" - }, - "put": { - "tags": [ - "故事接口" - ], - "summary": "获取分类信息", - "description": "演示表格树", - "operationId": "getCategoryUsingPUT", - "consumes": [ - "application/json" - ], - "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", - "in": "query", - "description": "故事ID", - "required": false, - "type": "integer", - "format": "int64", - "x-example": 1 - }, - { - "name": "story.name", - "in": "query", - "description": "故事名称", - "required": false, - "type": "string", - "x-example": "海底小纵队" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Category", - "originalRef": "Category" - } - }, - "201": { - "description": "Created" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - }, - "deprecated": false, - "sop_name": "alipay.category.get", - "sop_version": "1.0" - }, - "delete": { - "tags": [ - "故事接口" - ], - "summary": "获取分类信息", - "description": "演示表格树", - "operationId": "getCategoryUsingDELETE", - "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", - "in": "query", - "description": "故事ID", - "required": false, - "type": "integer", - "format": "int64", - "x-example": 1 - }, - { - "name": "story.name", - "in": "query", - "description": "故事名称", - "required": false, - "type": "string", - "x-example": "海底小纵队" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Category", - "originalRef": "Category" - } - }, - "204": { - "description": "No Content" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "deprecated": false, - "sop_name": "alipay.category.get", - "sop_version": "1.0" - }, - "options": { - "tags": [ - "故事接口" - ], - "summary": "获取分类信息", - "description": "演示表格树", - "operationId": "getCategoryUsingOPTIONS", - "consumes": [ - "application/json" - ], - "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", - "in": "query", - "description": "故事ID", - "required": false, - "type": "integer", - "format": "int64", - "x-example": 1 - }, - { - "name": "story.name", - "in": "query", - "description": "故事名称", - "required": false, - "type": "string", - "x-example": "海底小纵队" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Category", - "originalRef": "Category" - } - }, - "204": { - "description": "No Content" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "deprecated": false, - "sop_name": "alipay.category.get", - "sop_version": "1.0" - }, - "patch": { - "tags": [ - "故事接口" - ], - "summary": "获取分类信息", - "description": "演示表格树", - "operationId": "getCategoryUsingPATCH", - "consumes": [ - "application/json" - ], - "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", - "in": "query", - "description": "故事ID", - "required": false, - "type": "integer", - "format": "int64", - "x-example": 1 - }, - { - "name": "story.name", - "in": "query", - "description": "故事名称", - "required": false, - "type": "string", - "x-example": "海底小纵队" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Category", - "originalRef": "Category" - } - }, - "204": { - "description": "No Content" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "deprecated": false, - "sop_name": "alipay.category.get", - "sop_version": "1.0" - } - }, - "/alipay.story.find/": { - "get": { - "tags": [ - "故事接口" - ], - "summary": "获取故事信息", - "description": "说明接口的详细信息,介绍,用途,注意事项等。", - "operationId": "getStory2UsingGET", - "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "id", - "in": "query", - "description": "故事ID", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 111 - }, - { - "name": "name", - "in": "query", - "description": "故事名称", - "required": true, - "type": "string", - "x-example": "白雪公主" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/StoryVO", - "originalRef": "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": "id", - "in": "query", - "description": "故事ID", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 111 - }, - { - "name": "name", - "in": "query", - "description": "故事名称", - "required": true, - "type": "string", - "x-example": "白雪公主" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/StoryVO", - "originalRef": "StoryVO" - } - }, - "204": { - "description": "No Content" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "deprecated": false, - "sop_name": "alipay.story.find", - "sop_version": "1.0" - }, - "post": { - "tags": [ - "故事接口" - ], - "summary": "获取故事信息", - "description": "说明接口的详细信息,介绍,用途,注意事项等。", - "operationId": "getStory2UsingPOST", - "consumes": [ - "application/json" - ], - "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "id", - "in": "query", - "description": "故事ID", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 111 - }, - { - "name": "name", - "in": "query", - "description": "故事名称", - "required": true, - "type": "string", - "x-example": "白雪公主" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/StoryVO", - "originalRef": "StoryVO" - } - }, - "201": { - "description": "Created" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - }, - "deprecated": false, - "sop_name": "alipay.story.find", - "sop_version": "1.0" - }, - "put": { - "tags": [ - "故事接口" - ], - "summary": "获取故事信息", - "description": "说明接口的详细信息,介绍,用途,注意事项等。", - "operationId": "getStory2UsingPUT", - "consumes": [ - "application/json" - ], - "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "id", - "in": "query", - "description": "故事ID", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 111 - }, - { - "name": "name", - "in": "query", - "description": "故事名称", - "required": true, - "type": "string", - "x-example": "白雪公主" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/StoryVO", - "originalRef": "StoryVO" - } - }, - "201": { - "description": "Created" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - }, - "deprecated": false, - "sop_name": "alipay.story.find", - "sop_version": "1.0" - }, - "delete": { - "tags": [ - "故事接口" - ], - "summary": "获取故事信息", - "description": "说明接口的详细信息,介绍,用途,注意事项等。", - "operationId": "getStory2UsingDELETE", - "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "id", - "in": "query", - "description": "故事ID", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 111 - }, - { - "name": "name", - "in": "query", - "description": "故事名称", - "required": true, - "type": "string", - "x-example": "白雪公主" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/StoryVO", - "originalRef": "StoryVO" - } - }, - "204": { - "description": "No Content" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "deprecated": false, - "sop_name": "alipay.story.find", - "sop_version": "1.0" - }, - "options": { - "tags": [ - "故事接口" - ], - "summary": "获取故事信息", - "description": "说明接口的详细信息,介绍,用途,注意事项等。", - "operationId": "getStory2UsingOPTIONS", - "consumes": [ - "application/json" - ], - "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "id", - "in": "query", - "description": "故事ID", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 111 - }, - { - "name": "name", - "in": "query", - "description": "故事名称", - "required": true, - "type": "string", - "x-example": "白雪公主" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/StoryVO", - "originalRef": "StoryVO" - } - }, - "204": { - "description": "No Content" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "deprecated": false, - "sop_name": "alipay.story.find", - "sop_version": "1.0" - }, - "patch": { - "tags": [ - "故事接口" - ], - "summary": "获取故事信息", - "description": "说明接口的详细信息,介绍,用途,注意事项等。", - "operationId": "getStory2UsingPATCH", - "consumes": [ - "application/json" - ], - "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "id", - "in": "query", - "description": "故事ID", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 111 - }, - { - "name": "name", - "in": "query", - "description": "故事名称", - "required": true, - "type": "string", - "x-example": "白雪公主" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/StoryVO", - "originalRef": "StoryVO" - } - }, - "204": { - "description": "No Content" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "deprecated": false, - "sop_name": "alipay.story.find", - "sop_version": "1.0" - } - }, - "/demo.file.upload/": { - "get": { - "tags": [ - "文件上传" - ], - "summary": "文件上传例1", - "description": "上传文件demo", - "operationId": "file1UsingGET", - "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "file1", - "in": "query", - "description": "文件1", - "required": true, - "type": "file" - }, - { - "name": "file2", - "in": "query", - "description": "文件2", - "required": true, - "type": "file" - }, - { - "name": "remark", - "in": "query", - "required": false, - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - }, - "deprecated": false, - "sop_name": "demo.file.upload", - "sop_version": "1.0" - }, - "head": { - "tags": [ - "文件上传" - ], - "summary": "文件上传例1", - "description": "上传文件demo", - "operationId": "file1UsingHEAD", - "consumes": [ - "application/json" - ], - "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "file1", - "in": "query", - "description": "文件1", - "required": true, - "type": "file" - }, - { - "name": "file2", - "in": "query", - "description": "文件2", - "required": true, - "type": "file" - }, - { - "name": "remark", - "in": "query", - "required": false, - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" - } - }, - "204": { - "description": "No Content" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "deprecated": false, - "sop_name": "demo.file.upload", - "sop_version": "1.0" - }, - "post": { - "tags": [ - "文件上传" - ], - "summary": "文件上传例1", - "description": "上传文件demo", - "operationId": "file1UsingPOST", - "consumes": [ - "application/json" - ], - "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "file1", - "in": "query", - "description": "文件1", - "required": true, - "type": "file" - }, - { - "name": "file2", - "in": "query", - "description": "文件2", - "required": true, - "type": "file" - }, - { - "name": "remark", - "in": "query", - "required": false, - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" - } - }, - "201": { - "description": "Created" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - }, - "deprecated": false, - "sop_name": "demo.file.upload", - "sop_version": "1.0" - }, - "put": { - "tags": [ - "文件上传" - ], - "summary": "文件上传例1", - "description": "上传文件demo", - "operationId": "file1UsingPUT", - "consumes": [ - "application/json" - ], - "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "file1", - "in": "query", - "description": "文件1", - "required": true, - "type": "file" - }, - { - "name": "file2", - "in": "query", - "description": "文件2", - "required": true, - "type": "file" - }, - { - "name": "remark", - "in": "query", - "required": false, - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" - } - }, - "201": { - "description": "Created" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - }, - "deprecated": false, - "sop_name": "demo.file.upload", - "sop_version": "1.0" - }, - "delete": { - "tags": [ - "文件上传" - ], - "summary": "文件上传例1", - "description": "上传文件demo", - "operationId": "file1UsingDELETE", - "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "file1", - "in": "query", - "description": "文件1", - "required": true, - "type": "file" - }, - { - "name": "file2", - "in": "query", - "description": "文件2", - "required": true, - "type": "file" - }, - { - "name": "remark", - "in": "query", - "required": false, - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" - } - }, - "204": { - "description": "No Content" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "deprecated": false, - "sop_name": "demo.file.upload", - "sop_version": "1.0" - }, - "options": { - "tags": [ - "文件上传" - ], - "summary": "文件上传例1", - "description": "上传文件demo", - "operationId": "file1UsingOPTIONS", - "consumes": [ - "application/json" - ], - "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "file1", - "in": "query", - "description": "文件1", - "required": true, - "type": "file" - }, - { - "name": "file2", - "in": "query", - "description": "文件2", - "required": true, - "type": "file" - }, - { - "name": "remark", - "in": "query", - "required": false, - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" - } - }, - "204": { - "description": "No Content" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "deprecated": false, - "sop_name": "demo.file.upload", - "sop_version": "1.0" - }, - "patch": { - "tags": [ - "文件上传" - ], - "summary": "文件上传例1", - "description": "上传文件demo", - "operationId": "file1UsingPATCH", - "consumes": [ - "application/json" - ], - "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "file1", - "in": "query", - "description": "文件1", - "required": true, - "type": "file" - }, - { - "name": "file2", - "in": "query", - "description": "文件2", - "required": true, - "type": "file" - }, - { - "name": "remark", - "in": "query", - "required": false, - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" - } - }, - "204": { - "description": "No Content" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "deprecated": false, - "sop_name": "demo.file.upload", - "sop_version": "1.0" - } - }, - "/demo.file.upload2/": { - "get": { - "tags": [ - "文件上传" - ], - "summary": "文件上传例2", - "description": "可上传多个文件", - "operationId": "file2UsingGET", - "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "remark", - "in": "query", - "required": false, - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - }, - "deprecated": false, - "multiple": "multiple", - "sop_name": "demo.file.upload2", - "sop_version": "1.0" - }, - "head": { - "tags": [ - "文件上传" - ], - "summary": "文件上传例2", - "description": "可上传多个文件", - "operationId": "file2UsingHEAD", - "consumes": [ - "application/json" - ], - "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "remark", - "in": "query", - "required": false, - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" - } - }, - "204": { - "description": "No Content" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "deprecated": false, - "multiple": "multiple", - "sop_name": "demo.file.upload2", - "sop_version": "1.0" - }, - "post": { - "tags": [ - "文件上传" - ], - "summary": "文件上传例2", - "description": "可上传多个文件", - "operationId": "file2UsingPOST", - "consumes": [ - "application/json" - ], - "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "remark", - "in": "query", - "required": false, - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" - } - }, - "201": { - "description": "Created" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - }, - "deprecated": false, - "multiple": "multiple", - "sop_name": "demo.file.upload2", - "sop_version": "1.0" - }, - "put": { - "tags": [ - "文件上传" - ], - "summary": "文件上传例2", - "description": "可上传多个文件", - "operationId": "file2UsingPUT", - "consumes": [ - "application/json" - ], - "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "remark", - "in": "query", - "required": false, - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" - } - }, - "201": { - "description": "Created" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - }, - "deprecated": false, - "multiple": "multiple", - "sop_name": "demo.file.upload2", - "sop_version": "1.0" - }, - "delete": { - "tags": [ - "文件上传" - ], - "summary": "文件上传例2", - "description": "可上传多个文件", - "operationId": "file2UsingDELETE", - "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "remark", - "in": "query", - "required": false, - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" - } - }, - "204": { - "description": "No Content" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "deprecated": false, - "multiple": "multiple", - "sop_name": "demo.file.upload2", - "sop_version": "1.0" - }, - "options": { - "tags": [ - "文件上传" - ], - "summary": "文件上传例2", - "description": "可上传多个文件", - "operationId": "file2UsingOPTIONS", - "consumes": [ - "application/json" - ], - "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "remark", - "in": "query", - "required": false, - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" - } - }, - "204": { - "description": "No Content" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "deprecated": false, - "multiple": "multiple", - "sop_name": "demo.file.upload2", - "sop_version": "1.0" - }, - "patch": { - "tags": [ - "文件上传" - ], - "summary": "文件上传例2", - "description": "可上传多个文件", - "operationId": "file2UsingPATCH", - "consumes": [ - "application/json" - ], - "produces": [ - "*/*" - ], - "parameters": [ - { - "name": "remark", - "in": "query", - "required": false, - "type": "string" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/FileUploadVO", - "originalRef": "FileUploadVO" - } - }, - "204": { - "description": "No Content" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "deprecated": false, - "multiple": "multiple", - "sop_name": "demo.file.upload2", - "sop_version": "1.0" - } - }, - "/story2/getStory4": { - "get": { - "tags": [ - "故事接口2" - ], - "summary": "获取故事信息2", - "description": "获取故事信息2的详细信息", - "operationId": "storygetUsingGET", - "produces": [ - "*/*" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Story", - "originalRef": "Story" - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - }, - "deprecated": false, - "sop_name": "story2.getStory4", - "sop_version": "1.4" - }, - "head": { - "tags": [ - "故事接口2" - ], - "summary": "获取故事信息2", - "description": "获取故事信息2的详细信息", - "operationId": "storygetUsingHEAD", - "consumes": [ - "application/json" - ], - "produces": [ - "*/*" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Story", - "originalRef": "Story" - } - }, - "204": { - "description": "No Content" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "deprecated": false, - "sop_name": "story2.getStory4", - "sop_version": "1.4" - }, - "post": { - "tags": [ - "故事接口2" - ], - "summary": "获取故事信息2", - "description": "获取故事信息2的详细信息", - "operationId": "storygetUsingPOST", - "consumes": [ - "application/json" - ], - "produces": [ - "*/*" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Story", - "originalRef": "Story" - } - }, - "201": { - "description": "Created" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - }, - "deprecated": false, - "sop_name": "story2.getStory4", - "sop_version": "1.4" - }, - "put": { - "tags": [ - "故事接口2" - ], - "summary": "获取故事信息2", - "description": "获取故事信息2的详细信息", - "operationId": "storygetUsingPUT", - "consumes": [ - "application/json" - ], - "produces": [ - "*/*" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Story", - "originalRef": "Story" - } - }, - "201": { - "description": "Created" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not Found" - } - }, - "deprecated": false, - "sop_name": "story2.getStory4", - "sop_version": "1.4" - }, - "delete": { - "tags": [ - "故事接口2" - ], - "summary": "获取故事信息2", - "description": "获取故事信息2的详细信息", - "operationId": "storygetUsingDELETE", - "produces": [ - "*/*" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Story", - "originalRef": "Story" - } - }, - "204": { - "description": "No Content" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "deprecated": false, - "sop_name": "story2.getStory4", - "sop_version": "1.4" - }, - "options": { - "tags": [ - "故事接口2" - ], - "summary": "获取故事信息2", - "description": "获取故事信息2的详细信息", - "operationId": "storygetUsingOPTIONS", - "consumes": [ - "application/json" - ], - "produces": [ - "*/*" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Story", - "originalRef": "Story" - } - }, - "204": { - "description": "No Content" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "deprecated": false, - "sop_name": "story2.getStory4", - "sop_version": "1.4" - }, - "patch": { - "tags": [ - "故事接口2" - ], - "summary": "获取故事信息2", - "description": "获取故事信息2的详细信息", - "operationId": "storygetUsingPATCH", - "consumes": [ - "application/json" - ], - "produces": [ - "*/*" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Story", - "originalRef": "Story" - } - }, - "204": { - "description": "No Content" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - } - }, - "deprecated": false, - "sop_name": "story2.getStory4", - "sop_version": "1.4" - } - } - }, - "definitions": { - "Category": { - "type": "object", - "properties": { - "categoryName": { - "type": "string", - "example": "娱乐", - "description": "分类名称" - }, - "story": { - "description": "分类故事", - "$ref": "#/definitions/StoryVO", - "originalRef": "StoryVO" - } - }, - "title": "Category" - }, - "FileMeta": { - "type": "object", - "properties": { - "content": { - "type": "string" - }, - "filename": { - "type": "string" - }, - "size": { - "type": "integer", - "format": "int64" - } - }, - "title": "FileMeta" - }, - "FileUploadVO": { - "type": "object", - "properties": { - "files": { - "type": "array", - "items": { - "$ref": "#/definitions/FileMeta", - "originalRef": "FileMeta" - } - } - }, - "title": "FileUploadVO" - }, - "Story": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "name": { - "type": "string" - } - }, - "title": "Story" - }, - "StoryVO": { - "type": "object", - "properties": { - "gmt_create": { - "type": "string", - "format": "date-time", - "example": "2019-04-14 19:02:12", - "description": "创建时间" - }, - "id": { - "type": "integer", - "format": "int64", - "example": 1, - "description": "故事ID" - }, - "name": { - "type": "string", - "example": "海底小纵队", - "description": "故事名称" - } - }, - "title": "StoryVO" - } - } -} \ No newline at end of file From a20c3fa14cbae3d094e00e246766991f0805b4e5 Mon Sep 17 00:00:00 2001 From: tanghc Date: Tue, 4 Aug 2020 14:10:41 +0800 Subject: [PATCH 2/2] 4.0.2 --- changelog.md | 4 ++++ sop-admin/sop-admin-server/pom.xml | 2 +- sop-auth/pom.xml | 2 +- sop-common/sop-bridge-eureka/pom.xml | 4 ++-- sop-common/sop-bridge-nacos/pom.xml | 4 ++-- sop-common/sop-gateway-common/pom.xml | 2 +- sop-common/sop-service-common/pom.xml | 2 +- sop-example/sop-springmvc/pom.xml | 2 +- sop-example/sop-story/pom.xml | 2 +- sop-gateway/pom.xml | 2 +- sop-website/pom.xml | 2 +- 11 files changed, 16 insertions(+), 12 deletions(-) diff --git a/changelog.md b/changelog.md index 50362f4e..27ea95c3 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ # changelog +## 4.0.2 + +- 支持swagger排序(position属性) + ## 4.0.1 - 修复超大文本无法请求BUG(设置`spring.codec.max-in-memory-size`无效) diff --git a/sop-admin/sop-admin-server/pom.xml b/sop-admin/sop-admin-server/pom.xml index 013e38fb..f49439d7 100644 --- a/sop-admin/sop-admin-server/pom.xml +++ b/sop-admin/sop-admin-server/pom.xml @@ -24,7 +24,7 @@ com.gitee.sop sop-bridge-nacos - 4.0.1-SNAPSHOT + 4.0.2-SNAPSHOT diff --git a/sop-auth/pom.xml b/sop-auth/pom.xml index db4ccb16..c6406bf2 100644 --- a/sop-auth/pom.xml +++ b/sop-auth/pom.xml @@ -25,7 +25,7 @@ com.gitee.sop sop-service-common - 4.0.1-SNAPSHOT + 4.0.2-SNAPSHOT diff --git a/sop-common/sop-bridge-eureka/pom.xml b/sop-common/sop-bridge-eureka/pom.xml index a62bcc41..f367b7a9 100644 --- a/sop-common/sop-bridge-eureka/pom.xml +++ b/sop-common/sop-bridge-eureka/pom.xml @@ -10,7 +10,7 @@ 4.0.0 - 4.0.1-SNAPSHOT + 4.0.2-SNAPSHOT sop-bridge-eureka @@ -18,7 +18,7 @@ com.gitee.sop sop-gateway-common - 4.0.1-SNAPSHOT + 4.0.2-SNAPSHOT diff --git a/sop-common/sop-bridge-nacos/pom.xml b/sop-common/sop-bridge-nacos/pom.xml index 49d7125f..822b8234 100644 --- a/sop-common/sop-bridge-nacos/pom.xml +++ b/sop-common/sop-bridge-nacos/pom.xml @@ -10,7 +10,7 @@ 4.0.0 - 4.0.1-SNAPSHOT + 4.0.2-SNAPSHOT sop-bridge-nacos @@ -18,7 +18,7 @@ com.gitee.sop sop-gateway-common - 4.0.1-SNAPSHOT + 4.0.2-SNAPSHOT diff --git a/sop-common/sop-gateway-common/pom.xml b/sop-common/sop-gateway-common/pom.xml index 58801797..0346be41 100644 --- a/sop-common/sop-gateway-common/pom.xml +++ b/sop-common/sop-gateway-common/pom.xml @@ -11,7 +11,7 @@ 4.0.0 sop-gateway-common - 4.0.1-SNAPSHOT + 4.0.2-SNAPSHOT jar diff --git a/sop-common/sop-service-common/pom.xml b/sop-common/sop-service-common/pom.xml index 70eb1034..91d00021 100644 --- a/sop-common/sop-service-common/pom.xml +++ b/sop-common/sop-service-common/pom.xml @@ -12,7 +12,7 @@ 4.0.0 sop-service-common - 4.0.1-SNAPSHOT + 4.0.2-SNAPSHOT jar diff --git a/sop-example/sop-springmvc/pom.xml b/sop-example/sop-springmvc/pom.xml index c5b4ba25..959313eb 100644 --- a/sop-example/sop-springmvc/pom.xml +++ b/sop-example/sop-springmvc/pom.xml @@ -26,7 +26,7 @@ com.gitee.sop sop-service-common - 4.0.1-SNAPSHOT + 4.0.2-SNAPSHOT diff --git a/sop-example/sop-story/pom.xml b/sop-example/sop-story/pom.xml index 1f4fb6c9..e0fe48be 100644 --- a/sop-example/sop-story/pom.xml +++ b/sop-example/sop-story/pom.xml @@ -19,7 +19,7 @@ com.gitee.sop sop-service-common - 4.0.1-SNAPSHOT + 4.0.2-SNAPSHOT diff --git a/sop-gateway/pom.xml b/sop-gateway/pom.xml index 07c9b40d..fb315931 100644 --- a/sop-gateway/pom.xml +++ b/sop-gateway/pom.xml @@ -24,7 +24,7 @@ com.gitee.sop sop-bridge-nacos - 4.0.1-SNAPSHOT + 4.0.2-SNAPSHOT diff --git a/sop-website/pom.xml b/sop-website/pom.xml index 30d098f2..f51225ce 100644 --- a/sop-website/pom.xml +++ b/sop-website/pom.xml @@ -25,7 +25,7 @@ com.gitee.sop sop-bridge-nacos - 4.0.1-SNAPSHOT + 4.0.2-SNAPSHOT