Swagger注解-@ApiParam

Swagger注解-@ApiParam使用场景在Rest接口上或Rest接口参数前边使用概述为Rest接口参数添加其它元数据(导入到yapi中不会被解析)属性属性名称数据类型默认值说明nameString“”参数名称,参数名称将从filed/method/parameter名称中派生,但你可以覆盖它,路径参数必须始终命名为它们所代表的路径部分valueString“…

大家好,欢迎来到IT知识分享网。Swagger注解-@ApiParam


Swagger注解-@Api
Swagger注解-@ApiOperation
Swagger注解-@ApiImplicitParams 和 @ApiImplicitParam
Swagger注解-@ApiModel 和 @ApiModelProperty
Swagger注解-@ApiResponses 和 @ApiResponse
Swagger注解-@ResponseHeader
Swagger注解-@ApiParam
Swagger注解-@Authorization 和 @AuthorizationScope
Swagger注解-@SwaggerDefinition
Swagger注解-@ExternalDocs
Springboot 集成 Swagger GitHub 地址


使用场景

在 Rest 接口上或 Rest 接口参数前边使用

概述

为 Rest 接口参数添加其它元数据(导入到 yapi 中不会被解析)

属性

属性名称 数据类型 默认值 说明
name String “” 参数名称,参数名称将从 filed/method/parameter 名称中派生,但你可以覆盖它,路径参数必须始终命名为它们所代表的路径部分
value String “” 参数简单描述
defaultValue String “” 描述参数默认值
allowableValues String “” 可接收参数值限制,有三种方式,取值列表,取值范围
required boolean false 是否为必传参数, false:非必传; true:必传
access String “” 参数过滤,请参阅:io.swagger.core.filter.SwaggerSpecFilter
allowMultiple boolean false 指定参数是否可以通过多次出现来接收多个值
hidden boolean false 隐藏参数列表中的参数
example String “” 非请求体(body)类型的单个参数示例
examples Example @Example(value = @ExampleProperty(mediaType = “”, value = “”)) 参数示例,仅适用于请求体类型的请求
type String “” 添加覆盖检测到类型的功能
format String “” 添加提供自定义format格式的功能
allowEmptyValue boolean false 添加将格式设置为空的功能
readOnly boolean false 添加被指定为只读的能力
collectionFormat String “” 添加使用 array 类型覆盖 collectionFormat 的功能

Swagger注解-@Api
Swagger注解-@ApiOperation
Swagger注解-@ApiImplicitParams 和 @ApiImplicitParam
Swagger注解-@ApiModel 和 @ApiModelProperty
Swagger注解-@ApiResponses 和 @ApiResponse
Swagger注解-@ResponseHeader
Swagger注解-@ApiParam
Swagger注解-@Authorization 和 @AuthorizationScope
Swagger注解-@SwaggerDefinition
Swagger注解-@ExternalDocs
Springboot 集成 Swagger GitHub 地址


免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://yundeesoft.com/16340.html

(0)

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

关注微信