YApi接口文档使用教程:使用YApiUpload上传接口到YApi
YApi官网:
一、YApi上创建项目,获取项目projectId、projectToken
二、项目.idea目录下misc.xml文件中增加Yapi相关配置
在misc下增加如下配置,如下三处需要替换成自己的:
- projectToken:项目token
- projectId:项目Id
- returnClass:接口返回类类型
<component name="yapi">
<option name="projectToken">4b688f187c130fa096894c24f7060084df3d35b91765faa49706b48276fb83e8</option>
<option name="projectId">3159</option>
<option name="yapiUrl">https://apidoc.nioint.com/</option>
<option name="projectType">api</option>
<option name="returnClass">com.nio.insight.optics.response.BaseResponse</option>
</component>
添加后完整的misc如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRedsoftYApiUpload" url="https://apidoc.nioint.com" project-id="3159" token="4b688f187c130fa096894c24f7060084df3d35b91765faa49706b48276fb83e8" data-mode="0" property-naming-strategy="0" enable-basic-scope="false" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
<component name="yapi">
<option name="projectToken">4b688f187c130fa096894c24f7060084df3d35b91765faa49706b48276fb83e8</option>
<option name="projectId">3159</option>
<option name="yapiUrl">https://apidoc.nioint.com/</option>
<option name="projectType">api</option>
<option name="returnClass">com.nio.insight.datafish.response.BaseResponse</option>
</component>
</project>
三、YApiUpload使用方法
Controller右击点击UploadToYapi把接口上传到YApi 如下所示:成功上传接口到YApi 查看YApi生成的接口:
|