/*
* Copyright (C) 2018 Zhejiang xiaominfo Technology CO.,LTD.
* All rights reserved.
* Official Web Site: http://www.xiaominfo.com.
* Developer Web Site: http://open.xiaominfo.com.
*/
package com.xiaominfo.knife4j.new2;
import cn.hutool.core.util.RandomUtil;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.google.common.collect.Lists;
import com.xiaominfo.knife4j.common.Rest;
import com.xiaominfo.knife4j.common.RestMessage;
import com.xiaominfo.knife4j.domain.resp196.IgnoreP1;
import com.xiaominfo.knife4j.domain.resp196.LongUser;
import com.xiaominfo.knife4j.domain.resp202.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.concurrent.TimeUnit;
/***
*
* @since:swagger-bootstrap-ui 1.0
* @author <a href="mailto:[email protected]">[email protected]</a>
* 2019/12/16 19:42
*/
@Api(tags = "2.0.2版本-20200226")
@ApiSupport(author = "[email protected]",order = 286)
@RestController
@RequestMapping("/api/nxew202")
public class Api202Controller {
@ApiOperation(value = "忽略参数 - 正则-query")
@ApiOperationSupport(order = 25,ignoreParameters = {"name*"})
@GetMapping("/getUserRegular")
public Rest<KRegularDto> getUserRegular(KRegularDto kDto){
Rest<KRegularDto> r=new Rest<>();
r.setData(kDto);
return r;
}
@ApiOperation(value = "忽略参数-正则-body")
@ApiOperationSupport(order = 25,ignoreParameters = {"kRegularDto.name*"})
@GetMapping("/getUserRegularBody")
public Rest<KRegularDto> getUserRegularBody(@RequestBody KRegularDto kRegularDto){
Rest<KRegularDto> r=new Rest<>();
r.setData(kRegularDto);
return r;
}
@ApiOperation(value = "忽略参数")
@ApiOperationSupport(order = 26,ignoreParameters = {"nodes[0]"})
@GetMapping("/getUser221")
public Rest<KDto> getUse1rx(KDto kDto){
Rest<KDto> r=new Rest<>();
r.setData(kDto);
return r;
}
@ApiOperation(value = "忽略参数1")
@ApiOperationSupport(order = 26,ignoreParameters = {"nodes[0].name"})
@GetMapping("/getUser22121")
public Rest<KDto> getUse1r13x(KDto kDto){
Rest<KDto> r=new Rest<>();
r.setData(kDto);
return r;
}
@ApiOperation(value = "忽略参数xx1-json")
@ApiOperationSupport(order = 27,ignoreParameters = {"kDto.nodes"})
@GetMapping("/getUser221x")
public Rest<KDto> getUse1rx1(@RequestBody KDto kDto){
Rest<KDto> r=new Rest<>();
r.setData(kDto);
return r;
}
@ApiOperationSupport(order = 28,ignoreParameters = {"createTimes[0]"})
@ApiOperation(value = "忽略数组类型的参数")
@PostMapping("/Knife4jUser11")
public Rest<Knife4jTime> findAll16(Knife4jTime knife4jTime) {
Rest<Knife4jTime> r=new Rest<>();
r.setData(knife4jTime);
return r;
}
@ApiOperationSupport(order = 29,ignoreParameters = "longUsers.ids")
@ApiOperation(value = "忽略参数值-数组类型")
@PostMapping("/ex4")
public Rest<List<LongUser>> findAll4(@RequestBody List<LongUser> longUsers) {
Rest<List<LongUser>> r=new Rest<>();
r.setData(longUsers);
return r;
}
@ApiOperationSupport(order = 30,ignoreParameters = {"ignoreP1.ignoreLabels[0].code","ignoreP1.longUser.ids"})
@ApiOperation(value = "忽略参数值-JSON类型1")
@PostMapping("/ex3")
public Rest<IgnoreP1> findAll3(@RequestBody IgnoreP1 ignoreP1) {
Rest<IgnoreP1> r=new Rest<>();
r.setData(ignoreP1);
return r;
}
@ApiOperationSupport(order = 30,ignoreParameters = {"ignoreP1.ignoreLabels","ignoreP1.longUser.ids"})
@ApiOperation(value = "忽略参数值-JSON类型2")
@PostMapping("/ex322")
public Rest<IgnoreP1> findAll3223(@RequestBody IgnoreP1 ignoreP1) {
Rest<IgnoreP1> r=new Rest<>();
r.setData(ignoreP1);
return r;
}
@ApiOperationSupport(order = 31,ignoreParameters = "longUser.ids")
@ApiOperation(value = "忽略参数值-JSON类型")
@PostMapping("/ex2")
public Rest<LongUser> findAll1(@RequestBody LongUser longUser) {
Rest<LongUser> r=new Rest<>();
r.setData(longUser);
return r;
}
@ApiOperationSupport(order = 32,ignoreParameters = {"ignoreLabels","longUser.ids"})
@ApiOperation(value = "忽略参数值-Form类型1")
@PostMapping("/ex1")
public Rest<IgnoreP1> findAll12(IgnoreP1 ignoreP1) {
Rest<IgnoreP1> r=new Rest<>();
r.setData(ignoreP1);
return r;
}
@ApiOperationSupport(order = 33,ignoreParameters = "ids")
@ApiOperation(value = "忽略参数值-Form类型")
@PostMapping("/ex")
public Rest<LongUser> findAll(LongUser longUser) {
Rest<LongUser> r=new Rest<>();
r.setData(longUser);
return r;
}
@ApiOperationSupport(order = 40,includeParameters = {"ignoreLabels","longUser.ids"})
@ApiOperation(value = "包含参数值-Form类型1")
@PostMapping("/ex1c")
public Rest<IgnoreP1> findAllc12(IgnoreP1 ignoreP1) {
Rest<IgnoreP1> r=new Rest<>();
r.setData(ignoreP1);
return r;
}
@ApiOperationSupport(order = 41)
@ApiOperation(value = "包含参数值-JSON类型")
@PostMapping("/exc2")
public Rest<LongUser> findAllc1(@RequestBody LongUser ongUser) {
Rest<LongUser> r=new Rest<>();
r.setData(ongUser);
return r;
}
@ApiOperationSupport(order = 42)
@ApiOperation(value = "包含参数值-JSON类型1")
@PostMapping("/exc3")
public Rest<IgnoreP1> findAllc3(@RequestBody IgnoreP1 ignoreP1) {
Rest<IgnoreP1> r=new Rest<>();
r.setData(ignoreP1);
return r;
}
@ApiOperationSupport(order = 43)
@ApiOperation(value = "包含参数值-JSON类型2")
@PostMapping("/exc323")
public Rest<IgnoreP1> findAllc333(@RequestBody IgnoreP1 ignoreP1) {
Rest<IgnoreP1> r=new Rest<>();
r.setData(ignoreP1);
return r;
}
@Operation(summary = "url-form类型枚举下拉框显示-简单枚举11")
@PostMapping(value = "/Knife4jUser",consumes = "application/x-www-form-urlencoded")
public Rest<Knife4jUser> findAll5(Knife4jUser knife4jUser) {
Rest<Knife4jUser> r=new Rest<>();
r.setData(knife4jUser);
return r;
}
@ApiOperation(value = "url-form类型枚举下拉框显示-复杂枚举22")
@PostMapping("/Knife4jUser1")
public Rest<Knife4jUab> findAll6(Knife4jUab knife4jUab) {
Rest<Knife4jUab> r=new Rest<>();
r.setData(knife4jUab);
return r;
}
@ApiOperation(value = "formdata上传附带枚举参数")
@PostMapping("/uploadModel")
public RestMessage uploadModel(UploadEnum uploadEnum){
RestMessage r=new RestMessage();
String content="name:"+uploadEnum.getName()+",enum:"+uploadEnum.getKnife4jType().toString();
r.setData(content);
return r;
}
@ApiOperation(value = "raw-form类型枚举下拉框显示-复杂枚举")
@PostMapping("/Knife4jUser7")
public Rest<Knife4jUab> findAll7(Knife4jUab knife4jUab,@RequestBody Knife4jUser knife4jUser) {
Rest<Knife4jUab> r=new Rest<>();
r.setData(knife4jUab);
System.out.println("user:"+knife4jUser.getName()+",type:"+knife4jUser.getKnife4jType().toString());
return r;
}
@ApiOperation(value = "忽略数组类型的参数-不忽略")
@PostMapping("/Knife4jUser12")
public Rest<Knife4jTime> findAll18(Knife4jTime knife4jTime) {
Rest<Knife4jTime> r=new Rest<>();
r.setData(knife4jTime);
return r;
}
@ApiOperation(value = "GET请求参数编码处理")
@GetMapping("/getU
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
本源码提供了一个基于Java的knife4j与swagger-bootstrap-ui集成框架示例项目设计。项目包含1445个文件,其中包括1110个Java源文件、71个XML文件、46个Gitignore文件、45个YAML文件、37个Markdown文档、30个JSON文件、28个属性文件、21个CMD文件、19个JAR文件和9个HTML文件。这个项目是一个集成框架示例项目,可能包括API文档的生成、展示等功能,适合用于需要集成knife4j和swagger-bootstrap-ui的场景。
资源推荐
资源详情
资源评论


























收起资源包目录





































































































共 1442 条
- 1
- 2
- 3
- 4
- 5
- 6
- 15
资源评论


沐知全栈开发
- 粉丝: 6790
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 背单词微信小程序.zip
- 测量与工程测量-测量工作概述.ppt
- 无线对讲覆盖系统.doc
- 微信小程序 - 王者图鉴.zip
- 很多微信小程序的源码.zip
- 地产项目材料(设备)初选会签表.doc
- 本科生网络课程讲义cn-chapt1.ppt
- 微信小程序 demo for 知晓云 Serverless SDK.zip
- 微信小程序 手势事件.zip
- 白灰窑工程的钢结构制作安装施工组织设计方案.doc
- ONE·一个_图文 微信小程序_开源代码(1).zip
- 微信小程序评分组件.zip
- 工程建设中“两个总包”的法律问题简析.doc
- 微信小程序富文本解析.zip
- 微信小程序开发框架、资源-干货汇总.zip
- 微信开发 Java SDK ,支持包括微信支付,开放平台,小程序,企业微信,视频号,公众号等的后端开发.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
