Skip to content

MockData

Generate test data and debug dependencies via JMock rules


Replace function expressions in text

POST
/api/v1/mock/text/data

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

查询参数

text*

Mock text

类型string
必填
iterations*

The number of iteration. For more iterations, please use 'EXECUTE' to generate data

类型integer
必填
format"int32"
maximum100
minimum1

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Batch replace function expressions in text

POST
/api/v1/mock/text/data/batch

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

请求体

application/json
JSON
[
{
"outKey": "Greeting",
"text": "Good morning, Mr. @Name()",
"iterations": 0
}
]

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
主体

示例

cURL
JavaScript
PHP
Python

Generate data based on mock function expressions

POST
/api/v1/mock/function/data

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

查询参数

function*

Mock function expression

类型string
必填
iterations*

The number of iteration. For more iterations, please use 'EXECUTE' to generate data

类型integer
必填
format"int32"
maximum100000
minimum1

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Generate data in batch based on mock function expressions

POST
/api/v1/mock/function/data/batch

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

请求体

application/json
JSON
[
{
"outKey": "fullName",
"function": "@Name()",
"iterations": 0
}
]

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
主体

示例

cURL
JavaScript
PHP
Python

Generate mock data script

POST
/api/v1/mock/data/script

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

请求体

application/json

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
主体

示例

cURL
JavaScript
PHP
Python

View mock data script

POST
/api/v1/mock/data/script/content

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

请求体

application/json

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
主体

示例

cURL
JavaScript
PHP
Python

Create execution and generate data

POST
/api/v1/mock/data/execution

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

请求体

application/json

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
主体

示例

cURL
JavaScript
PHP
Python

Query all mock functions

GET
/api/v1/mock/functions

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权

示例

cURL
JavaScript
PHP
Python

Query and reload all mock functions

GET
/api/v1/mock/functions/reload

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权

示例

cURL
JavaScript
PHP
Python

Released under the GPL-3.0 License.