IDEA plugin is new! Generating interface documentation is that fast!

When there is a need for interface docking, development finally no longer has to worry about the difficulty of writing API documents, and there is no need to rewrite interface documents one by one! Install this IDEA plug-in to import documents into Postcat in one step.
What was updated?

 

This plug-in is simple to operate and easy to use, allowing developers to save the work of writing API documents and focus more on development. The plug-in analyzes user comments for interface analysis, and finally generates interface documents and uploads them to the Postcat server, enabling developers to manage and share APIs on Postcat, improving collaboration capabilities and development speed.
 

What is the difference with Swagger?

 
The Postcat plugin will not invade the code, and there is no need to add any jar package dependencies
 
The plug-in analyzes user comments for interface analysis, and finally generates interface documents and uploads them to the Postcat server, enabling developers to manage and share APIs on Postcat, improving collaboration capabilities and development speed.
 
Postcat provides a variety of extended annotations, such as @path , @url , @method , @name , @hidden and @required , which can be customized or compatible with existing annotations in the setting interface.
 
In addition, Postcat also provides a comment generation function . For classes and methods with no or only a few comments, developers do not need to manually add them. This function can analyze the meaning of method fields and automatically generate comments. Developers only need to check or fine-tune according to actual scenarios to generate a relatively complete API document.
 
If the original annotations are insufficient, Postcat will add additional annotations . When removing annotations, only those extended annotations provided by Postcat will be removed, and the user's own annotations will not be destroyed. At the same time, developers can also use the "intent" function to locally generate plug-in comments, and make adjustments and modifications.
 
Postcat provides a variety of API upload methods, which are convenient for developers to use in different scenarios:
  • For existing projects that use Postcat for the first time, developers can use Tools the group Upload Project Api Doc to complete the project-level interface upload.
  • For the Controller created under new requirements, after completing the interface definition, the developer can right-click the menu and select Upload All Api to upload all files at a single file level, so that there are documents before logic, and the front-end and back-end work will no longer be serially blocked.
  • For the modification of some individual interfaces, there is no need to upload all of them. Developers can right-click the menu and select Upload Api Function . This function will display the interface information of the current editing class, and provide interface preview and interface selection interface, so that users can check the need to update or The uploaded target API performs information check and upload.
 

How to install and configure?

 
IDEA version needs to be greater than IntelliJ IDEA 2022.03
Search in IDEA "Settings-Plug-In-Marketplace" Postcat and find Postcat the plug- in installation. At the same time, it can also be downloaded and installed in the IDEA plug-in market . When the local IDEA is not automatically awakened, you can directly drag the zip package into IDEA to complete the installation/update.
  1. Fill in the configuration information

The configuration information needs to be filled in for the first upload, and the configuration information items are independent.
Ways to obtain configuration information: Log in to Postcat and enter the project to obtain Token, WorkspaceID, and ProjectID.
  1. Server is filled in by default: https://postcat.com/api, users do not need to modify
  2. Token acquisition
    3. Get WorkspaceID and ProjectID
Enter the project settings page, click the "question mark" on the right side of the project name

 

  1.  

     

    4. StringType determines the string type of the input and output parameters. Only when the parameter name conforms to the hump specification at the beginning will the change be found. The preview window can see the result of the change

1. When the parameter is named , select camelCase, it is userInfo still the default option userInfo
2. When the parameter name userInfo , select lower_underscore, it will become user_info
3. When the parameter name userInfo , select UPPER_UNDERSCORE, it will become USER_INFO
  1. Precautions

  1. Before parsing and uploading, please ensure that IDEA has been built in the project and related dependencies have been downloaded.
  2. It is strongly recommended to use the comments defined by the plug-in. The plug-in has a powerful function of generating comments. It is strongly recommended to generate the comments of the plug-in before editing and uploading. The comments can also be customized in the settings.
  3. When the plug-in annotations are not recognized, there is only partial support for annotations of Spring MVC , , and Swagger.v2 . Swagger(OpenAPI).v3 To avoid missing required parameters, it is recommended to use plugin annotations.
  4. The function of generating annotations will only provide some simple support for annotations of Spring MVC , and Swagger.v2 , without allowing you to rewrite them. Swagger(OpenAPI).v3
  5. HTTP The interface judges only through routing and request methods to perform overlay update processing
  6. For the API that has been uploaded, it has been manually modified on the web. It is not recommended to use the upload function, because the plug-in upload will overwrite the previous content.
  7. After generating/hand typing the plug-in javadoc, the interface uri, request method (GET/POST), etc. have been modified, and the plug-in javadoc needs to be manually modified, otherwise the plug-in will still recognize the old plug-in javadoc information.
  8. The automatically generated class annotations will be uploaded by default 默认分组 , please fill in the real group by yourself, and the group will be identified by name.
    1. For multi-level groups, . separate . For example, if you need to transfer the interface to the group 第三方 under the group , fill in the third party.user for group-name. 用户
  9. @group-name Comments are supported at the method level and are not generated by default. You can manually add them to method comments, and the plug-in will help you save the current method into the corresponding group.
  10. For project-level api scanning and uploading, [Tools -> Upload Project Api Doc] see the top menu for specific usage rules 项目级上传 .
  11. Generated class @required annotations , and will only javax.validation.constraints.NotNull be generated for fields with annotations.
  12. It is not recommended to use @remark annotations , the plugin retains the recognition function and stitches the content into the field description, and the generated class annotations will not be automatically generated.
  13. By default @PathVariable , the POST method recognizes the parameter as the Formdata type by default, and the GET method recognizes the parameter as the query type by default.
  14. // The marked comment cannot be recognized, please use /** */ the mark .

Learn about Postcat:

 
Postcat  is a powerful open source, cross-platform (Windows, Mac, Linux, Browsers...) API development and testing tool that supports REST, Websocket and other protocols (soon to support GraphQL, gRPC, TCP, UDP), helping you accelerate the completion of API Development and testing work.
 

Postcat core functions:

  1. API document management: visualize API design and generate API documents  
  2. API testing: automatic generation of test parameters, automatic generation of test cases, visual data editing  
  3. Plug-in expansion: Many plug-ins extend product functions and create an API development platform that belongs to you and your team
  4. Mock: Automatically generate Mock according to documents, or create custom Mock to meet complex scenarios
  5. Team collaboration: It can not only realize API sharing but also create cloud space to collaborate together
 

Advantages of Postcat:

  1. Test without login: save the tedious operation of verifying login
  2. Simple interface: no redundant functions and complicated options
  3. Free: small and medium teams and personal use
  4. Rich plug-ins: support up to 22 plug-ins for data migration, themes, API security, etc.
  5. Domestic: Can better understand the needs of domestic users, and communicate with the development team without barriers
  6. Perfect user documentation: follow the operation to get started quickly
 

More Issues! More Feedback!

 
If you have any questions during use, you can submit an Issue online (this open source method is strongly recommended), and the question itself is already contributing to the community:
 
https://github.com/Postcatlab/postcat/issues
 
 
 
 

If you like it, you might as well support it with Star

 
This project is open source, if you think this project is not bad, you might as well click a Star to support it!
 
Github :
https://github.com/Postcatlab/postcat
 
Gitee:
https://gitee.com/eolink_admin/postcat

 

 

Guess you like

Origin www.oschina.net/news/234383/postcat-idea