Skip to content

YApi Settings

IDE Settings

Configure YApi settings in the IDE:

Settings > Other Settings > EasyApi > YApi

SettingDescription
Yapi ServerYApi server address
TokensProject tokens in module=token format (one per line)
Export ModeHow to handle existing APIs on export (see below)
Request body JSON5Use JSON5 format for request body (default: off)
Response body JSON5Use JSON5 format for response body (default: off)

Additional options in the General tab:

SettingDefaultDescription
Enable URL TemplatingtrueEnable URL templating for path parameters
Switch NoticetrueShow notification when switching YApi project

Getting a YApi Token

  1. Log in to YApi
  2. Go to project settings
  3. Copy the project Token

Token Format

Tokens are specified as module=token pairs, one per line in the IDE Tokens field. The module name is used to match APIs to the correct YApi project.

Export Mode

ModeDescription
ALWAYS_UPDATEAlways update existing APIs (default)
NEVER_UPDATENever update existing APIs
ALWAYS_ASKShow a dialog to ask whether to override each API
UPDATE_IF_CHANGEDUpdate only when the API content has changed

Config File Rules

The following rules can be set in config files (.easy.api.config):

RuleDescription
yapi.projectSet the YApi project for API grouping
yapi.export.beforeEvent before YApi export
yapi.save.beforeEvent before saving to YApi
yapi.save.afterEvent after saving to YApi

YApi Mock

EasyYapi supports syncing field mock rules to the YApi Mock service.

See YApi Mock for details.

Released under the Apache-2.0 License.