Common Parameters
Filling in parameters is one of our biggest headaches, especially for many APIs that often have a large number of parameters with the same name and meaning. If you have to enter them manually every time, it will be very time-consuming and inefficient. We can solve this problem through Common Parameters.
Note: Since version 2.0.22, Common Parameters have been upgraded to Data Dictionary, which supports unified and standardized management of fields such as parameter type, default value, and parameter description. You can also quickly select and use them during input.
How to Use the Data Dictionary
We can pre-fill common parameter descriptions, default values, types, example values, enumeration values, and other information in the Data Dictionary, supporting quick import in key-value
, raw-json
, and MysqlDDL
formats.
//key-value, Format: Key:Description
role: User role
name: User name
age: User age
//raw-json, Format: {"Key":"Description"}
{"role": "User role",
"name": "User name",
"age": "User age"}
Wherever you need to input a parameter name, you can quickly select from a dropdown. It supports searching by keyword or remark name directly in the input box. After selecting a parameter, the pre-defined parameter value and description will be automatically filled in, eliminating the need for manual entry.
At the same time, we also provide a set of built-in commonly used parameters in the system, which you can enable simply by toggling the switch.
How to Maintain
To improve development efficiency, we offer three methods to maintain the data dictionary.
Add a New Data Dictionary Entry
Click "Add New" on the data dictionary page to add a common parameter entry in the popup window.
Note: When parameter names are duplicated, you can use the remark name to differentiate them, and you can also search by remark name.
Automatic Description Extraction
When designing or debugging interfaces, all parameter descriptions you fill in will be automatically extracted into the data dictionary and stored as a temporary
state.
Temporary stored data will be lost after refreshing the page. You need to click save to make it permanent.
When a newly entered parameter does not exist in the data dictionary, a Save to Dictionary button will appear for quickly saving it to the dictionary.
Import Data
Supports quick import via key-value
, raw-json
, and MysqlDDL
formats:
//key-value, Format: Key:Description
role: User role
name: User name
age: User age
//raw-json, Format: {"Key":"Description"}
{"role": "User role",
"name": "User name",
"age": "User age"}