mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 07:26:55 +08:00
fix json schema: post json maybe in string type, e.g. '${prepare_post_data()}', '$post_data'
This commit is contained in:
+2
-1
@@ -4,7 +4,8 @@
|
|||||||
|
|
||||||
**Fixed**
|
**Fixed**
|
||||||
|
|
||||||
- fix: jsonschema, variables maybe in string type, e.g. '${get_variables()}'
|
- fix json schema: variables maybe in string type, e.g. '${prepare_variables()}'
|
||||||
|
- fix json schema: post json maybe in string type, e.g. '${prepare_post_data()}', '$post_data'
|
||||||
|
|
||||||
## 2.5.2 (2020-01-02)
|
## 2.5.2 (2020-01-02)
|
||||||
|
|
||||||
|
|||||||
@@ -26,8 +26,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
"pattern": "^\\$.*",
|
||||||
"examples": [
|
"examples": [
|
||||||
"${get_variables()}"
|
"${prepare_variables()}",
|
||||||
|
"${prepare_variables($a, $b)}"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -116,8 +118,21 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"json": {
|
"json": {
|
||||||
"description": "request body in json format",
|
"oneOf": [
|
||||||
"type": "object"
|
{
|
||||||
|
"description": "request body in json format",
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "request body in string format, e.g. '${prepare_json($a, $b)}'",
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^\\$.*",
|
||||||
|
"examples": [
|
||||||
|
"$post_data",
|
||||||
|
"${prepare_post_data($a, $b)}"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"headers": {
|
"headers": {
|
||||||
"description": "request headers",
|
"description": "request headers",
|
||||||
|
|||||||
Reference in New Issue
Block a user