当前位置:网站首页>Apifox, is your API interface document rolled up like this?
Apifox, is your API interface document rolled up like this?
2022-07-07 02:34:00 【51CTO】
Under the development of the current mainstream front-end and back-end separation mode , To have a API Interface documents and concise interface documents are very necessary .Apifox Of API Interface document is one of the most intimate interface documents I have ever met with programmers , He not only solved the development pain points I encountered , And this interface document is very powerful , Roll it up !

Now there are so many API Interface documentation tools emerge in endlessly ,swagger、yapi、Knife4j wait . But they all have some drawbacks . For example, our back-end students most often use swagger-ui, But it has the following pain points :
The submission parameters are JSON Can't format , Wrong parameters, trouble finding , The returned result cannot be folded , It's too long to see
swagger-ui It is very difficult to use when the number of interfaces increases , There is not even a category menu

And in the recent technology community, I found Apifox This API Interface tools . It is equivalent to an integration Postman + Swagger + Mock + JMeter A tool for , Not only free, but also the interface document function is very powerful .
1.1 How to generate an online API Interface document
1.1.1 First step
Come first Apifox The official website of Apifox client . Of course! , Use it directly web The version does not hinder our subsequent operation steps .

Open the client or web Log in at the end , Sign up for a new account .

2.1.2 The second step
Better presentation , Now simulate a jeetcg-Boot An open source project that separates the front end from the back end . This project has a customized interface document , You can export some OpenApi、Markdown The format of the document , Then you can use the exported interface document to demonstrate how to connect to Apifox Online documentation provided .

If the current student is not similar swagger It doesn't matter if the document is in the format of , because Apifox Support 21 Import methods of three formats .
hold jeetcg-boot The interface document of the project exports a OpenApi.json The file of , adopt Apifox The import function of has transferred the interface of my current project to Apifox above


Simple steps , Successfully transplanted to Apifox It is managed above .
Here is a compliment Apifox The design is really beautiful , The typesetting is also comfortable , For my appearance control .
2.1.3 The third step
Through the Share online Click on our new share


Fill in the information , Click Save to generate an online interface document of our project url. Copy the currently generated online interface document link , Open our project interface document .


2.2 Apifox What are the online interface documentation for “ magic ”( advantage )
2.2.1 Run the interface directly in the document
Careful students must have found that there is a running button on the right side of the document after selecting an interface , Click this button , An operation interface for execution is displayed , After clicking send, we can see that the returned result is just like the format of the returned response of our interface . What is called is what we use when we choose to generate the interface Cloud mock Environmental Science , So the data shown here is made up of mock Give us the generated false data .
and mock The interface called in the environment also facilitates the front-end programmers to develop the back-end first , It will not be blocked by the students at the back end .

2.2.2 Generate 13 Request sample code in languages
Some programming language icons in the middle of the document . What are they all for ??

As a front-end programmer, i , Naturally use javascript Let's introduce to the students . It opens at javascript Icon we found a line below tab Offer choices , I believe that students who are also front-end programmers before the article are no strangers , These are exactly js Common request methods and select each method tab The following editor will have code to call the current interface using this method . The first time I saw this function, I was stunned , And this kind of intimate interaction ??
2.2.3 Generate model code
The generated model code is mainly the model code generated for the corresponding parameters returned .

What type of model code needs to be generated , It depends on the needs of the students , To configure .
3、 ... and 、Apifox Share details of interface documents online
Apifox The interface document is really for the sake of programmer efficiency and convenience .
3.1.1 Interface connection can be directly clicked to copy :

3.1.2 The overall layout of the document
The overall layout of the document is left-right structure , Then our programmers can check whether there are any parameters that do not meet the requirements by comparing the parameters left and right when they need to run tests when reading this document , It is different from swagger The parameter is up and the request is down , Need to move up and down , The convenience is greatly reduced .
3.1.3 Batch edit parameters at run time
In the operation interface, we sometimes have a large number of request parameters that may need to be changed temporarily. Go to the toilet , It is also a painful thing to test if you change the table one by one , and Apifox It provides a batch editing interaction, which makes it easier for developers to achieve their goals

Have used Apifox I believe it will be the details of this software ,API Interface document I'm impressed by the powerful functions ! The mission of a software tool must be for the convenience of users , Simplify the operation of users everywhere to make the work more efficient , This is the performance of a good tool .
Experience on official website : https://www.apifox.cn/?utm_source=Bob
边栏推荐
- pgpool-II和pgpoolAdmin的使用
- [leetcode]Search for a Range
- 【论文阅读|深读】RolNE: Improving the Quality of Network Embedding with Structural Role Proximity
- 遇到慢SQL该怎么办?(下)
- wzoi 1~200
- 【论文阅读|深读】 GraphSAGE:Inductive Representation Learning on Large Graphs
- leetcode:5. Longest palindrome substring [DP + holding the tail of timeout]
- Tiflash source code reading (IV) design and implementation analysis of tiflash DDL module
- 【Unity】升级版·Excel数据解析,自动创建对应C#类,自动创建ScriptableObject生成类,自动序列化Asset文件
- #yyds干货盘点# 解决名企真题:最大差值
猜你喜欢

C # / vb. Net supprime le filigrane d'un document word

老板被隔离了

电气工程及其自动化

Pioneer of Web3: virtual human

How to build a 32core raspberry pie cluster from 0 to 1
![[paper reading | deep reading] anrl: attributed network representation learning via deep neural networks](/img/06/17acf9958228cce5d80ada3275ad24.png)
[paper reading | deep reading] anrl: attributed network representation learning via deep neural networks

1 -- Xintang nuc980 nuc980 porting uboot, starting from external mx25l
![[unity] upgraded version · Excel data analysis, automatically create corresponding C classes, automatically create scriptableobject generation classes, and automatically serialize asset files](/img/20/f7fc2204ca165dcea4af25cb054e9b.png)
[unity] upgraded version · Excel data analysis, automatically create corresponding C classes, automatically create scriptableobject generation classes, and automatically serialize asset files

15million employees are easy to manage, and the cloud native database gaussdb makes HR office more efficient

运维管理系统有哪些特色
随机推荐
数字滚动增加效果
[C # notes] use file stream to copy files
数论 --- 快速幂、快速幂求逆元
Web3's need for law
你不可不知道的Selenium 8种元素定位方法,简单且实用
The cities research center of New York University recruits master of science and postdoctoral students
dotConnect for DB2数据提供者
Pgadmin4 of PostgreSQL graphical interface tool
[leetcode]Search for a Range
Metaforce force meta universe development and construction - fossage 2.0 system development
Overall query process of PostgreSQL
Collection recommandée!! Quel plug - in de gestion d'état flutter est le plus fort? Regardez le classement des manons de l'île, s'il vous plaît!
unity 自定义webgl打包模板
Introduction to FLIR blackfly s industrial camera
软件测试——Jmeter接口测试之常用断言
FLIR blackfly s usb3 industrial camera: how to use counters and timers
Processus général de requête pour PostgreSQL
记一次JAP查询导致OOM的问题分析
1个月增长900w+播放!总结B站顶流恰饭的2个新趋势
Ali yunyili: how does yunyuansheng solve the problem of reducing costs and improving efficiency?