转自:https://swagger.io/docs/specification/describing-parameters/

Parameter Types

OpenAPI 3.0 distinguishes between the following parameter types based on the parameter location. The location is determined by the parameter’s in key, for example, in: query or in: path.

例如:

@ApiOperation(value = "测试借口3", notes = "测试借口3", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(value = "test3", method = RequestMethod.GET)
@ResponseBody
public ResultResponse<String> test3(
@ApiParam(value="颜色") @RequestParam String color
// @ApiParam(value="形状") @Param("shape") String shapeStr ){
// System.out.println(123121);
// return ResultResponse.success("testResult: " + color + "," + shapeStr);
return ResultResponse.success("testResult: " + color + ",");
}

@Apiimplicitparam的paramType的更多相关文章

  1. @ApiImplicitParams、ApiImplicitParam的使用

    @ApiImplicitParam:作用在方法上,表示单独的请求参数 参数: 1. name :参数名. 2. value : 参数的具体意义,作用. 3. required : 参数是否必填. 4. ...

  2. springMvc+swagger整合例子

    Swagger 是一个规范和完整的框架,用于生成.描述.调用和可视化 RESTful 风格的 Web 服务.总体目标是使客户端和文件系统作为服务器以同样的速度来更新.文件的方法,参数和模型紧密集成到服 ...

  3. Swagger 常用注解

    一.Swagger常用注解 1.与模型相关的注解 两个注解: @ApiModel:用在模型类上,对模型类做注释: @ApiModelProperty:用在属性上,对属性做注释 2.与接口相关的注解 六 ...

  4. SpringBoot集成Swagger,Postman,newman,jenkins自动化测试.

    环境:Spring Boot,Swagger,gradle,Postman,newman,jenkins SpringBoot环境搭建. Swagger简介 Swagger 是一款RESTFUL接口的 ...

  5. @ApiImplicitParam注解

    @Api:用在请求的类上,表示对类的说明 tags="说明该类的作用,可以在UI界面上看到的注解" value="该参数没什么意义,在UI界面上也看到,所以不需要配置&q ...

  6. spring boot Swagger2(version=2.7.0) 注解@ApiImplicitParam的属性dataType值为”自定义泛型“应用

    注解: @ApiImplicitParams @ApiImplicitParam    name="需注解的API输入参数", value="接收参数的意义描述" ...

  7. 源码剖析@ApiImplicitParam对@RequestParam的required属性的侵入性

    问题起源 使用SpringCloud构建项目时,使用Swagger生成相应的接口文档是推荐的选项,Swagger能够提供页面访问,直接在网页上调试后端系统的接口, 非常方便.最近却遇到了一个有点困惑的 ...

  8. Swagger中paramType

    paramType:表示参数放在哪个地方    header-->请求参数的获取:@RequestHeader(代码中接收注解)    query-->请求参数的获取:@RequestPa ...

  9. mybatis paramType String Error

    我这么写的 <select id="getHotPlayersByDate" parameterType="java.lang.String" resul ...

随机推荐

  1. 关于PHP开发所需要的工具和环境

    0.notepad++ 一个类型记事本的软件,用来看安装的部署说明命令. 1.虚拟机 在虚拟机里面操作,本机不会被影响. 2.CentOS系统 类似Linux的系统,在里面安装PHP,Nginx,ph ...

  2. jenkins配置过程遇到的问题

    jenkins 搭建完成后,可以浏览器访问: http://localhost:8081/jenkins, 新建任务过程中遇到以下问题: 1. 源码管理不现实git, 只显示无 解决: 插件管理 -  ...

  3. android Fragment 笔记

    Fragment多用于平板中,Fragment当成Activity的一个界面的一个组成部分,Fragment有自己的生命周期,但是必须依托在Activity中. 参考链接 https://develo ...

  4. 编写一个Filter,除继承HttpServlet类外还需要( )。

    A.继承Filter 类 B.实现Filter 接口 C.继承HttpFilter 类 D.实现HttpFilter接口 解答:B

  5. IoC就是IoC,不是什么技术,与GoF一样,是一种 设计模式。

    IoC就是IoC,不是什么技术,与GoF一样,是一种 设计模式. Interface Driven Design接口驱动,接口驱动有很多好处,可以提供不同灵活的子类实现,增加代码稳定和健壮性等等,但是 ...

  6. C# 将RichTextBox中内容的文档以二进制形式存

    private void button1_Click(object sender, EventArgs e)        { System.IO.MemoryStream mstream = new ...

  7. 页面的checkbox框的全选与反选

    if (typeof jQuery == 'undefined') {     alert("请先导入jQuery");} else {    jQuery.extend({    ...

  8. sublime text 删除插件

    1.ctrl+shift+p 输入remove package 选择要删掉的插件即可 2.去掉产生临死文件的插件:phptools

  9. 演示-JQuery中伪元素和伪类选择器

    HTML代码: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www ...

  10. localhost 和 127.0.0.1

    转自:http://ordinarysky.cn/?p=431localhost与127.0.0.1的区别是什么?相信有人会说是本地ip,曾有人说,用127.0.0.1比localhost好,可以减少 ...