Dynamic variables are parameter values that are automatically generated according to predefined system rules during the running of the API, commonly used for variable references, test simulation data, encryption, etc.
Go to the example value of the request parameter, move the mouse over the input box to display the magic wand icon, and click to start setting dynamic variables.
Dynamic Value Types
Dynamic values support adding reading variables, mock data, fixed values and custom expressions 4 types.
Support referencing environment variables and global variables that have been preset in the current environment, and can also insert a new custom variable.
If you want to randomly generate a random value according to rules in the request, you can choose Mock data, such as generating telephone, email and address.
If you want the example value of the parameter to remain a constant, select Fixed value and input the fixed value in the input value.
If you do not want to expose the fixed value in plain text, you can click the "Add" option to specify an encryption processing function.
If the variables provided by the system do not meet the requirements, you can also use custom expression rules to generate data, supporting the use of
Nunjucks syntax. You can click to see Faker.js for reference.
You can also nest variables, fixed values and mock data that have been set using custom functions.