Giter Site home page Giter Site logo

yapiideauploadplugin's Introduction

目的

减少yapi 录入时间,通过工具反向规范代码注释,和代码整洁

下载地址

1:github
2:idea 插件库
更新速度 github>idea 插件库

支持语言

java,spring

单个&批量

单个上传选中方法名称
批量上传选中类名

支持接口

目前 dubbo 接口/api

支持yapi 的版本

1.5.0+

支持idea 版本

2017+

使用方式

查看 wiki

感谢

感谢以下同学提交的代码(排名不分先后)

  • @24kpure
  • @sun7132568
  • @zouzou6321
  • @zhanyao
  • @Planeswalker23

yapiideauploadplugin's People

Contributors

24kpure avatar furioncs avatar qbb-dev avatar sun7132568 avatar xujiaji avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yapiideauploadplugin's Issues

缺少 rt-sources.jar

版本号

~ 1.7.4

什么问题

~ can not find sources java:D:/Program Files/Java/jdk1.8.0_191/jre/lib/rt-sources.jar

如何复现此问题

~ 升级了最新版的ide。然后插件市场搜索不到插件了,从github上下载了行的jar包
导入之后就出现了这个问题。
在点击 【UploadToYapi】之后报错

16:49	can not find sources java:D:/Program Files/Java/jdk1.8.0_191/jre/lib/rt-sources.jar

16:49	sorry ,upload api error cause:服务器出错...

D:/Program Files/Java/jdk1.8.0_191/jre/lib/ 路径下面只有 rt.jar并没有rt-sources.jar

接口定义 (如果可以的话,请上传请求对象和响应对象)

~

idea 版本

2019.2

入参的生成有问题

版本号

~ 1.6.6

什么问题

~入参的生成有问题

如何复现此问题

~

接口定义 (如果可以的话,请上传请求对象和响应对象)

image

image

~

idea 版本

2018.2.4

通过路径获得接口是否存在

版本号

~
yapi 1.8.3
插件 1.7.2

什么问题

~
代码中/api/interface/getbypath接口的调用,yapi貌似没有提供该接口?还是我版本太低

如何复现此问题

~

接口定义 (如果可以的话,请上传请求对象和响应对象)

~

idea 版本

2019.2

文件上传接口生成文旦异常

版本号

1.7.0

什么问题

文件上传接口生成文旦异常

如何复现此问题

~

接口定义 (如果可以的话,请上传请求对象和响应对象)

定义一个 public RestResult importExcel(@RequestParam("file") MultipartFile[] file),生成文档是报 Convert to JSON failed.
~

idea 版本

IntelliJ IDEA 2017.2
Build #IU-172.3317.76, built on July 15, 2017
Licensed to Administrator

JRE: 1.8.0_152-release-915-b5 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 7 6.1

空指针异常

版本号

~

什么问题

~
java.lang.NullPointerException
at com.qbb.build.BuildJsonForYapi.actionPerformedList(BuildJsonForYapi.java:98)
at com.qbb.interaction.UploadToYapi.actionPerformed(UploadToYapi.java:118)
at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:261)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:278)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$0(ActionMenuItem.java:292)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:283)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:107)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:282)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:111)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransaction$1(TransactionGuardImpl.java:111)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:120)
at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:121)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:111)
at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:524)
at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:35)
at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:546)
at java.awt.Component.processMouseEvent(Component.java:6550)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3325)
at java.awt.Component.processEvent(Component.java:6315)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4899)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4721)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4721)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:766)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:739)
at java.awt.EventQueue$4.run(EventQueue.java:737)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:736)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:729)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:674)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:373)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

如何复现此问题

~

接口定义 (如果可以的话,请上传请求对象和响应对象)

~
image

idea 版本

dubbo接口上传信息不全

版本号

~ 1.7.2

什么问题

~上次dubbo接口,参数的备注没有上传

如何复现此问题

~ 随便测试一个dubbo接口即可

接口定义 (如果可以的话,请上传请求对象和响应对象)

~ 第一种: Msg getOrder(String username, String orderId);
这种情况下,上传的body内容中没有具体的参数名称,如下
[
{
"java.lang.String": "String"
},
{
"java.lang.String": "String"
}
]
第二种:Msg getOrder(UserInfo info);
UserInfo 具体信息为:
public class UserInfo {
/**
用户姓名
/
String username;
/

*订单编号
*/
String orderId;

/*** get set 忽略***/
}

这种情况下, 上传的body内容中没有具体的参数注释
[
{
"com.dubbo.req.GetOrderReq": {
"username": "String",
"orderId": "String"
}
}
]

idea 版本

2019.1.4

支持map返回吗

版本号

~

什么问题

~
支持解析map返回吗,如果支持怎么用 我看其他issues有提到过对象支持// 这个怎么结合notnull使用

如何复现此问题

~

接口定义 (如果可以的话,请上传请求对象和响应对象)

~

idea 版本

返回值的生成有问题

版本号

~ 1.6.6

什么问题

~返回值生成有问题

如何复现此问题

~

接口定义 (如果可以的话,请上传请求对象和响应对象)

controller
image

resultData返回类
image

生成的返回值没有HotlineSessionDetailVO对应的属性
image

~

idea 版本

2018.2.4

无法根据返回类型获取属性值的情况

版本号

~ 1.6.6

接口定义 (如果可以的话,请上传请求对象和响应对象)

在这种情况下,无法根据ResponseEntity获取到属性值,从而生成接口,是否考虑:在有注释的情况下,以注释为主?

image

~

idea 版本

内部类和泛型类有没有支持的计划?

版本号

~ 1.7.3

什么问题

~内部类和泛型类有没有支持的计划?

如何复现此问题

~

接口定义 (如果可以的话,请上传请求对象和响应对象)

/**
 * 内部类生成的接口文档
 * @param userNos
 * @return
 */
List<BaseUserVo> selectByNoIn4(BaseUserParam.ListBaseUser userNos);

[
{
"com.newboss.api.base.dto.query.BaseUserParam.ListBaseUser": []
}
]

/**
 * 泛型类直接报错
 * @param pageRequest
 * @return
 */
List<BaseUserVo> listBaseUser(PageRequest<BaseUserParam.ListBaseUser> pageRequest);

java.lang.NullPointerException
at com.qbb.build.BuildJsonForDubbo.actionPerformed(BuildJsonForDubbo.java:175)
at com.qbb.build.BuildJsonForDubbo.actionPerformedList(BuildJsonForDubbo.java:88)
at com.qbb.interaction.UploadToYapi.actionPerformed(UploadToYapi.java:98)
at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:265)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:282)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$0(ActionMenuItem.java:292)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:265)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:107)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:282)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:111)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:82)
at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransaction$1(TransactionGuardImpl.java:106)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:115)
at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:121)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:111)
at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:524)
at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:35)
at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:546)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6651)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
at java.desktop/java.awt.Component.processEvent(Component.java:6416)
at java.desktop/java.awt.Container.processEvent(Container.java:2263)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5026)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4858)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4858)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:878)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:823)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:466)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:704)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:465)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
~

idea 版本

idea 一键上传接口到yapi插件使用报错(服务器出错)

版本号

~ YapiUpload v1.7.4

什么问题

~idea上传接口到yapi时报错:sorry ,upload api error cause:服务器出错...

如何复现此问题

~ 1、在idea安装YapiUpload 插件并重启idea
2、在.idea 文件夹下的misc.xml 中配置信息
3、选中controller 类中的方法名称或类名,右击YapiUpload(alt+u快捷键)
4、idea提示:sorry ,upload api error cause:服务器出错...

接口定义 (如果可以的话,请上传请求对象和响应对象)

~

idea 版本

2019.1

怎么添加tag标签 和@menu标签的多级分类

版本号

~
1.8.3

什么问题

~
注释怎么添加tag标签
怎么使用@menu多级分类 貌似class上面添加注解和method上面添加注解后不是class/method这样的分类目录显示在yapi的,

如何复现此问题

~

接口定义 (如果可以的话,请上传请求对象和响应对象)

~

idea 版本

2019.2

返回值解析问题

版本号

~
1.6.7

什么问题

~
包含多层次泛型类时 只能获取第一层泛型

如何复现此问题

~

接口定义 (如果可以的话,请上传请求对象和响应对象)

image
image

~

idea 版本

返回值为泛型错误

版本号

1.7.6

什么问题

返回值为泛型,接口无法解析里面的对象

如何复现此问题

    /**
     * 获取客户详情
     *
     * @param id 客户的id
     * @return
     */
    @GetMapping("/{id}")
    public DataResponse<CustomerVo> get(@PathVariable String id) {
        return new DataResponse<>(ResponseCode.SUCCESS, customerService.getById(id));
    }
名称 类型 是否必须 默认值 备注 其他信息
data object 非必须   D 备注: D
code int 非必须     mock: @integer
message String 非必须     mock: @string

无法展开CustomerVo对象,其中data就是泛型字段

接口定义 (如果可以的话,请上传请求对象和响应对象)

如上

idea 版本

2019.02.04专业版

上传提示 找不到rt-sources.jar,但是上传成功

版本号

~ jdk 1.8.0-172
yapiUpload-1.6.8
IntelliJ IDEA 2019.1.3 (Ultimate Edition)
JRE: 11.0.2+9-b159.60 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.5

什么问题

~上传提示 can not find sources java:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/lib/rt-sources.jar
但是接口上传成功

请求参数丢失

版本号

~ 1.6.7

接口定义 (如果可以的话,请上传请求对象和响应对象)

image
image

没有生成请求参数
~

idea 版本

2018.2.4

可以生成mock吗

版本号

~

什么问题

~

如何复现此问题

~

接口定义 (如果可以的话,请上传请求对象和响应对象)

~

idea 版本

空指针异常

版本号

~
1.6.8

什么问题

~
image

如何复现此问题

~
由于使用的是jiaoyu教育版激活方式,右击上传,直接报空指针异常。
于是在另外一个版本上测试,非教育版,采用破解方式激活的IDEA,没有报错。一切正常!

接口定义 (如果可以的话,请上传请求对象和响应对象)

~

idea 版本

image

请求参数丢失2

版本号

~ 1.6.7

接口定义 (如果可以的话,请上传请求对象和响应对象)

image

image

GET请求封装对象参数问题

版本号

v1.6.8

什么问题

GET请求时 参数使用封装对象不能导入接口文档

如何复现此问题

    /**
 * 获取用户分页列表
 * @param param {@link UserAo}
 * @return
 */
@GetMapping("/user")
public ResponseAo<PageInfo<UserVo>> pageData(@RequestParam UserAo param){
	log.info("==> API: 获取用户分页列表");
	return ResponseAo.success(userService.findPage(param));
}

接口定义 (如果可以的话,请上传请求对象和响应对象)

~

idea 版本

~

期待需求

如果觉得目前插件有任何需要改进的地方或者未满足的需求 请在这里留言

model 属性 注释 支持 //

版本号

~

什么问题

model 属性 注释 支持 //
对于成员变量我一般用// 进行注释。如果成员变量页用/** */进行注释的话代码可读性会比较差
纯属个人看法

如何复现此问题

~

接口定义 (如果可以的话,请上传请求对象和响应对象)

~

idea 版本

未知问题

版本号

~
最新版

什么问题

~
sorry ,upload api error cause:请求参数 data 应当有必需属性 catid

如何复现此问题

~
sorry ,upload api error cause:请求参数 data 应当有必需属性 catid

接口定义 (如果可以的话,请上传请求对象和响应对象)

~

idea 版本

201801

希望能改进以下几个问题

1.方法上的@XxxMapping没有设置value默认使用Controller的映射时上传报upload api error cause,希望能改成默认使用Controller的api地址,以下为报错方法例子:
@PostMapping
public BaseResponse insert(@validated(InsertGroup.class) @requestbody BusinessInfoVO vo)
2.一些接口里必须请求参数上传到yapi后无法标志“是否必须"tag为是,建议可以读下JSR的校验注解,再根据注解中的group判定是否必传(个人业务场景可能出现一个VO增改通用,根据group确定是否必传,这个可能有点复杂)
@NotNull(groups = UpdateGroup.class)
@null(groups = InsertGroup.class)
private Long id;
3.备注中含小于号"<"时会自动忽略至下一大于号,如“BaseResponse<List>”上传到yapi成了BaseResponse>,站在前后端分离的角度个人认为可以忽略备注上传这一项,因为前端无需关注我们的方法是如何定义的,只需关注url、参数与返回值

@DeleteMapping注解的接口不能发布到yapi上

版本号

~1.6.8

什么问题

~@DeleteMapping注解的接口不能发布到yapi上

如何复现此问题

@DeleteMapping注解的接口不能发布到yapi上,改成@RequestMapping(method=RequestMethod.DELETE,...)就可以

接口定义 (如果可以的话,请上传请求对象和响应对象)

20190611145604
image

idea 版本

~2019.1

BUG反馈

V1.7.2

~

生成的接口模板在yapi系统删除后,此类无法再次生成

~

在yapi系统里删除已生成的接口,然后再次全类生成,此ID应该不存在了,可是提交上去的任然是此ID

~

接口定义 (如果可以的话,请上传请求对象和响应对象)

~

idea 版本

please check config,[projectToken,projectId,yapiUrl,projectType]

版本号

~ 1.7.6

什么问题

~please check config,[projectToken,projectId,yapiUrl,projectType]

如何复现此问题

~

moduleName1,moduleName2

<component name="moduleName1">
    <option name="moduleName1.projectToken">aaax1</option>
    <option name="moduleName1.projectId">16</option>
    <option name="moduleName1.yapiUrl">https://xxx.com</option>
    <option name="moduleName1.projectType">api</option>
</component>


<component name="moduleName2">
    <option name="moduleName2.projectToken">xxxx2</option>
    <option name="moduleName2.projectId">20</option>
    <option name="moduleName2.yapiUrl">https://xxx.com</option>
    <option name="moduleName2.projectType">api</option>
</component>

接口定义 (如果可以的话,请上传请求对象和响应对象)

~

idea 版本

idea 上传出错get config error:1

版本号

Version: 1.7.4

什么问题

上传报错:get config error:1

如何复现此问题

alt+u 快捷键

接口定义 (如果可以的话,请上传请求对象和响应对象)

misc.xml配置

moduleName1


f50caefa125eb0f5bdd666b4cfdbc37c46a78984f9651e41c28260ac3b748046
18
http://10.200.172.214:3000
api
.Resul



idea 版本

2017.1.2

menu删除后不会重新生成

版本号

~ 1.6.9

什么问题

~ 管理后台删除分类,上传删除分类的名称,不会重新新建分类

如何复现此问题

~ 比如
/** *@description: 测试控制器 *@menu test */
先upload这个test,然后删除这个分类,在重新upload,不会生产这个test分类

接口定义 (如果可以的话,请上传请求对象和响应对象)

~

idea 版本

2019.1.3

前端无法获取mock数据(严重)

版本号

~ 1.6.7

什么问题

~可能是类型的原因,导致前端无法获取mock数据

image

image

前端并没有long类型,或者enum类型,手动从yapi页面上修改类型后,数组依然不返回值(ps:已经设置了数组最小个数)

空指针异常

版本号

~ 1.7.4
IntelliJ IDEA 2019.2.3 (Ultimate Edition)
Build #IU-192.6817.14, built on September 24, 2019
Runtime version: 11.0.4+10-b304.69 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.5

什么问题

~空指针

如何复现此问题

~ 上传接口时出现。

接口定义 (如果可以的话,请上传请求对象和响应对象)

`/**
* 功能: 增加用户反馈.
*


* 需要的参数和参数含义
*


* userno 用户编号
* content 反馈内容
* image1 图片1的地址
* image2 图片2的地址
* image3 图片3的地址
* contact 联系方式
*/
@RequestMapping("/feedback")
public ResponseData create(@RequestBody String body) {
ResponseData rd = new ResponseData(ErrorCode.SUCCESS);
try {

        // 转成json
        JSONObject param = JSONObject.parseObject(body);
        String userno = param.getString(RequestKey.USER_NO);
        String content = param.getString(RequestKey.CONTENT);
        String image1 = param.getString(RequestKey.IMAGE1);
        String image2 = param.getString(RequestKey.IMAGE2);
        String image3 = param.getString(RequestKey.IMAGE3);
        String contact = param.getString(RequestKey.CONTACT);

        rd = systemService.feedback(userno, content, image1, image2, image3, contact);

    }  catch (Exception e) {
        rd.setErrorCode(ErrorCode.FAIL.value());
        log.error(" list 异常", e);
    }
    return rd;
}`

~

返回数据异常

版本号

~ V1.7.4

什么问题

~无法返回正确的数据

如何复现此问题

~

接口定义 (如果可以的话,请上传请求对象和响应对象)

package com.feeling.msp.service.customer.controller;

import com.alibaba.fastjson.JSONObject;
import com.feeling.msp.service.base.service.IQueryService;
import com.feeling.msp.service.customer.form.LoginForm;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import java.util.Map;

@RestController
public class LoginController {
@resource(name = "loginService")
IQueryService loginService;

/**
 * @description: 登录
 * @param: [LoginForm]
 * @menu: 公共接口
 * @return: jsonObject
 * @date: 2019/09/11
 */
@RequestMapping(value = "/Login",method = RequestMethod.POST)
public JSONObject login(@Valid @RequestBody LoginForm loginRequest, HttpServletRequest request){
    Map<String,?> map = loginService.handle(request,loginRequest);
    JSONObject jsonObject = new JSONObject();
    jsonObject.putAll(map);
    return jsonObject;
}

}

~

idea 版本

2019.2

sorry ,upload api error cause:请求参数 data 应当有必需属性 catid

版本号

~
1.7.4

什么问题

~
上传接口提示必须配置必需属性 catid

如何复现此问题

~
在接口名上alt+u上传接口时提示的
image
image

接口定义 (如果可以的话,请上传请求对象和响应对象)

~

idea 版本

2018.1.5

请问,在哪配置catid? 普通的api接口,非dubbo接口。

按类上传空指针问题

版本号

1.7.5

什么问题

控制器使用构造器注入,构造器是public,使用按类上传功能报空指针异常

java.lang.NullPointerException
	at com.qbb.build.BuildJsonForYapi.actionPerformedList(BuildJsonForYapi.java:77)
	at com.qbb.interaction.UploadToYapi.actionPerformed(UploadToYapi.java:136)
	at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:265)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:282)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$0(ActionMenuItem.java:292)
	at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:265)
	at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:107)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:282)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:111)
	at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:82)
	at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransaction$1(TransactionGuardImpl.java:106)
	at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:115)
	at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:121)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:111)
	at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:524)
	at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:35)
	at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:546)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6651)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
	at java.desktop/java.awt.Component.processEvent(Component.java:6416)
	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5026)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4858)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2773)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4858)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:878)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:823)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:466)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:704)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:465)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

如何复现此问题

控制器使用构造函数,按类上传会报空指针(但是按接口上传是成功的)

接口定义 (如果可以的话,请上传请求对象和响应对象)

@RestController
@RequestMapping("/customer")
public class CustomerController {

    private final LeadServiceImpl leadService;
    private final CustomerServiceImpl customerService;

    public CustomerController(LeadServiceImpl leadService, CustomerServiceImpl customerService) {
        this.leadService = leadService;
        this.customerService = customerService;
    }

idea 版本

2019.2.4

过滤某个字段

版本号

~ 1.8.0

什么问题

~有些字段是网关分析请求头 然后传给接口的 客户端请求不需要携带

如何复现此问题

~

接口定义 (如果可以的话,请上传请求对象和响应对象)

~

idea 版本

枚举的建议

版本号

~ 1.6.7

什么问题

~如果类型是枚举的话,建议将整个枚举类放在注释中

接口定义 (如果可以的话,请上传请求对象和响应对象)

image

image

image

参数缺失 false

版本号

~ 1.6.8

什么问题

~ 参数缺失
image

如何复现此问题

~

接口定义 (如果可以的话,请上传请求对象和响应对象)

~

idea 版本

2019.1.3

1.7.4+版本报错

版本号

~
1.7.4+

什么问题

~
上传时提示配置错误
get config error:Index 1 out of bounds for length 1

如何复现此问题

~

接口定义 (如果可以的话,请上传请求对象和响应对象)

~

idea 版本

IntelliJ IDEA 2019.2.4 (Ultimate Edition)
Build #IU-192.7142.36, built on October 29, 2019
Licensed to Gu Xinyan
Subscription is active until October 29, 2020
For educational use only.
Runtime version: 11.0.4+10-b304.77 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.1
GC: ParNew, ConcurrentMarkSweep
Memory: 1979M
Cores: 12
Registry:
Non-Bundled Plugins: Lombook Plugin, YapiUpload, cn.yiiguxing.plugin.translate, com.alibaba.p3c.smartfox, mobi.hsz.idea.gitignore, com.kukido.eclipser, BashSupport, MavenRunHelper, edu.umontreal.hatchery

字段是否必须 如何识别

版本号

~ 1.8.0

什么问题

~ 字段是否必须 如何识别

如何复现此问题

~

接口定义 (如果可以的话,请上传请求对象和响应对象)

~

idea 版本

2019.2.3

StackOverflowError

版本号

1.7.4

什么问题

null
java.lang.StackOverflowError
	at com.qbb.build.BuildJsonForYapi.addFilePaths(BuildJsonForYapi.java:935)
	at com.qbb.build.BuildJsonForYapi.getCollect(BuildJsonForYapi.java:914)
	at com.qbb.build.BuildJsonForYapi.getField(BuildJsonForYapi.java:854)
	at com.qbb.build.BuildJsonForYapi.getFields(BuildJsonForYapi.java:718)
	at com.qbb.build.BuildJsonForYapi.getCollect(BuildJsonForYapi.java:912)
	at com.qbb.build.BuildJsonForYapi.getField(BuildJsonForYapi.java:854)
	at com.qbb.build.BuildJsonForYapi.getFields(BuildJsonForYapi.java:718)
	at com.qbb.build.BuildJsonForYapi.getCollect(BuildJsonForYapi.java:912)
	at com.qbb.build.BuildJsonForYapi.getField(BuildJsonForYapi.java:854)
	...

还有另外一个controller生成的时候报错:

null
java.lang.StackOverflowError
	at com.intellij.util.CachedValueBase.getUpToDateOrNull(CachedValueBase.java:107)
	at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:214)
	at com.intellij.psi.impl.PsiCachedValue.getValueWithLock(PsiCachedValue.java:60)
	at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:38)
	at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:136)
	at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:126)
	at com.intellij.psi.impl.ScopedClassHierarchy.getHierarchy(ScopedClassHierarchy.java:102)
	at com.intellij.psi.impl.ScopedClassHierarchy.getSuperClassSubstitutor(ScopedClassHierarchy.java:110)
	at com.intellij.psi.impl.JavaClassSupersImpl.getSuperSubstitutorWithCaching(JavaClassSupersImpl.java:114)
	at com.intellij.psi.impl.JavaClassSupersImpl.getSuperClassSubstitutor(JavaClassSupersImpl.java:74)
	at com.intellij.psi.impl.InheritanceImplUtil.isInheritor(InheritanceImplUtil.java:41)
	at com.intellij.psi.impl.compiled.ClsClassImpl.isInheritor(ClsClassImpl.java:512)
	at com.intellij.psi.util.PsiUtil.substituteType(PsiUtil.java:1108)
	at com.intellij.psi.util.PsiUtil.substituteTypeParameter(PsiUtil.java:1084)
	at com.intellij.psi.util.PsiUtil.extractIterableTypeParameter(PsiUtil.java:1064)
	at com.qbb.build.BuildJsonForYapi.getField(BuildJsonForYapi.java:850)
	at com.qbb.build.BuildJsonForYapi.getFields(BuildJsonForYapi.java:718)
	at com.qbb.build.BuildJsonForYapi.getCollect(BuildJsonForYapi.java:912)
	at com.qbb.build.BuildJsonForYapi.getField(BuildJsonForYapi.java:854)
	...

如何复现此问题

~

接口定义 (如果可以的话,请上传请求对象和响应对象)

~

idea 版本

IntelliJ IDEA 2018.1.3 (Ultimate Edition)
Build #IU-181.4892.42, built on May 8, 2018

Subscription is active until January 7, 2020
JRE: 1.8.0_152-release-1136-b38 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.