Skip to content

Advanced Usage ​

This page covers advanced features and workflows of EasyApi.

Batch Export ​

You can export APIs from multiple files or an entire module at once:

  1. Select multiple files or a module in the Project view
  2. Right-click > EasyApi > ExportToPostman/ExportMarkdown
  3. All APIs from the selected scope will be exported

API Explorer & Call ​

The API Explorer provides a tree view of all APIs in your project with request editing, response viewing, and export capabilities. It also includes a gutter icon for quick navigation from source code.

See API Explorer & Call for full documentation.

Searching Endpoints ​

Use IntelliJ's Search Everywhere (double-press Shift) to find API endpoints by address, name, path, URL, method prefix, or gRPC URL — with path variable and fuzzy matching support. Endpoints appear under their own APIs tab.

See Searching Endpoints for details.

Copy API URL ​

Right-click a selection and choose EasyApi > Copy API URL to copy the address (METHOD /path) of every endpoint in the selection.

Event Hooks ​

EasyApi provides event hooks that let you customize the parsing process:

EventDescription
api.class.parse.beforeBefore parsing a class as API
api.class.parse.afterAfter parsing a class as API
api.method.parse.beforeBefore parsing a method as API
api.method.parse.afterAfter parsing a method as API
api.param.parse.beforeBefore parsing a parameter
api.param.parse.afterAfter parsing a parameter
json.class.parse.beforeBefore parsing a class as JSON
json.class.parse.afterAfter parsing a class as JSON
json.field.parse.beforeBefore parsing a field as JSON
json.field.parse.afterAfter parsing a field as JSON
http.call.beforeBefore making an HTTP call
http.call.afterAfter an HTTP call completes
export.afterAfter export completes

Custom Export with Groovy ​

You can write Groovy scripts to customize the export process using the script executor:

groovy
// Inspect the current class
logger.info("Class: ${it.name()}")
logger.info("Has @RestController: ${it.hasAnn('org.springframework.web.bind.annotation.RestController')}")

// Get module info
logger.info("Project: ${runtime.projectName()}")
logger.info("Module: ${runtime.module()}")

See Script Tools Reference for all available tools.

Remote Configuration ​

You can store configuration files remotely and have EasyApi load them automatically:

properties
properties.additional=https://raw.githubusercontent.com/your-org/your-repo/main/easyapi.config

See Remote Config for details.

Multiple Return Types ​

You can define multiple possible return types for an API:

java
/**
 * Get user info
 * @return success {@link User} User info
 * @return unauthorized {@link Error} Not authenticated
 */
@GetMapping("/users/{id}")
public Object getUser(@PathVariable Long id) {
    // ...
}

Export Fields to JSON ​

EasyApi can export field definitions from any class to JSON format:

  1. Right-click in a class > EasyApi > FieldsTo* > ToJson / ToJson5 / ToProperties
  2. The field structure will be exported in the selected format

Released under the Apache-2.0 License.