Skip to main content

IDE Plugin

IDEA Plugin Overview

The EchoAPI-Helper IDEA plugin provided by EchoAPI is highly favored for its features such as quick code scanning, annotation-based information extraction, direct debugging, and API documentation generation. It is an efficient tool for improving development efficiency and conveniently generating interface documentation.

Using EchoAPI Helper

01. Search and Install

Search for EchoAPI in the IDEA editor plugin center and install: EchoAPI-Helper

image.png

02. Plugin Configuration

Before using EchoAPI IDEA, we need to perform some simple configurations in IDEA settings, including setting the cloud domain name and obtaining the request token. These steps are not complicated, and once configured, you can enjoy its convenience for a long time.

Open the IDEA editor, go to Idea - Settings - Other Settings - EchoAPI Config - Authentication. Fill in the corresponding cloud API address according to the EchoAPI.

01.png

Cloud API Address
https://open.echoapi.com

After configuration, obtain the token.

14.png

1.png

1.png

The new version adds new features, including API path settings, environment uploads, and parameter settings.

1. API Path Settings and Environment Upload

Automatically create module names and class annotation directories. The created environment will be associated with the module name's directory. The environment created in the plugin corresponds to the environment in the client (an Idea_ prefix will be automatically added to indicate that this environment was uploaded in the plugin).

1.png

4.png

The module name and class annotations will be uploaded as directories.

5.png

2. Parameter Settings

You can set parameter styles, such as mapping parameters to uppercase, underscore, etc. (the default code follows Alibaba's specifications, with parameters in camel case). Classes that do not need to be processed (e.g., javax.servlet.http.HttpServletRequest). Parameter mapping, mapping parameters to other types (the purpose of this feature is to map interface type parameters to implementation classes).

6.png

After configuration, the plugin will seamlessly integrate into IDEA, becoming a part of daily development work.

03. Quickly Upload Code to EchoAPI

After writing the code, right-click "Upload to EchoAPI" to quickly synchronize the APIs and annotations contained in the source code to EchoAPI and generate accessible API documentation links.

7.png

img_v3_02di_55c8b6ef-15e0-4bcd-9086-9e0c4a28726g.png

04. Quickly Debug Code

After installing EchoAPI Helper, click the right corner icon to open the interface tree management area, where you can perform interface debugging, quick interface location, and other operations. Version 1.0.18 and later adds local debugging environment settings (this feature only sets the environment configuration for local debugging, the uploaded environment is still set on the settings page).

8.png

9.png

05. Search Corresponding Source Code and Interface Tree by API

The right-side interface debugging bar adds a search function to search for corresponding source code and interface tree by API. Search corresponding source code by API:

10.png

Search API in the interface tree by API:

12.png

06. Jump to Corresponding API from Source Code Method

An arrow icon is displayed at the interface code location, clicking it will quickly jump to the corresponding interface list.

13.png

07. Other EchoAPI Helper Features

  • Supports local debugging of APIs in IDEA;
  • Tree-like display of interfaces;
  • Interface search, can search annotations; shortcut key mac: command+\ win: Ctrl+\
  • Interface tree search, can search annotations; shortcut key mac: option+\ win: Alt+\
  • Mutual jump between code and interface tree;
  • Local debugging interface sends history records;
  • Local debugging interface saves input and output parameters and saves record queries;
  • Local debugging can configure Host, global Header;
  • Upload API function after local debugging;
  • Configurable prefix Host for uploads;
  • Supports multiple API upload methods;
  • Supports Swagger2.0 and Swagger3.0 annotations;
  • Custom parameter parsing;
  • Parses API documentation based on Javadoc (Java), KDoc (Kotlin), ScalaDoc (Scala).

IDEA Writing Requirements Java Specification Example

In version, if there are comments on the method, it forms the interface name; if there are no comments, the interface path is the method name;

If there are no input parameter comments, the input parameter comments cannot be generated after uploading to the EchoAPI client.

Supports Swagger3.0

If the input parameter is an object, the object's attributes must use paragraph comments or Swagger to generate comments.

/* 
* This is a class comment
* @author EchoAPI at 2024/08/01 13:48
*/
@RestController
@RequestMapping("api")
public class AController {

/*
* User information
* @author EchoAPI at 2024/8/1 14:14
*/
@Data
public class User {
/*
* id
*/
@ApiModelProperty(value = "id")
private Long id;
/*
* Role list
*/
private List roleList;
/*
* Role object
*/
private Role role;
}
}

Supports importing Swagger3.0 annotations

Contact Us

Email

support@echoapi.com

Discord

EchoAPI Community