Swagger注解-@ApiImplicitParams 和 @ApiImplicitParam


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 地址


@ApiImplicitParams

使用场景

在 Rest 接口方法上使用来指定请求参数

概述

在 Rest 接口方法上使用来指定请求参数

属性

属性名称数据类型默认值说明
valueApiImplicitParam[]API 可用的参数列表

@ApiImplicitParam

使用场景

场景一:在 Rest 接口上单独使用

@ApiImplicitParam 在 Rest 接口上单独使用的时候,表示单个请求参数

场景二:在 Rest 接口上和 @ApiImplicitParams 组合使用

@ApiImplicitParam 在 Rest 接口上和 @ApiImplicitParams 组合时候,表示多个请求参数

概述

表示 Rest 接口的单个请求参数,可与 @ApiImplicitParams 组合使用来表示多个请求参数

属性

属性名称数据类型默认值说明
nameString“”参数名称(实体类字段名称)
valueString“”参数简要说明
defaultValueString“”描述参数的默认值
allowableValuesString“”限制此参数接收的值,可使用的值或值得范围
requiredbooleanfalse指定是否为必填参数,false:非必传参数; true:必传参数
accessString“”参数过滤,参考: io.swagger.core.filter.SwaggerSpecFilte
allowMultiplebooleanfalse指定参数是否可以通过多次出现来接收多个值
dataTypeString“”参数的数据类型,可以使类名或原始数据类型
dataTypeClassClass<?>Void.class参数的类,如果提供则覆盖 dataType
paramTypeString“”参数的参数类型,有效值为 path, query, body, header, form
exampleString“”非请求体(body)参数的单个请求示例
examplesExample@Example(value = @ExampleProperty(mediaType = “”, value = “”))参数示例,仅适用于 BodyParameters(请求体类型的)
typeString“”添加覆盖检测到的类型的功能
formatString“”添加提供自定义格式的功能
allowEmptyValuebooleanfalse添加将 format 设置为空的功能
readOnlybooleanfalse添加被指定为只读的能力
collectionFormatString“”添加使用 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 地址


  • 5
    点赞
  • 24
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值