API Changes
- Replace API paths `/call-args`, `/call-args-list` and `/call-count` with `/request-body`, `/request-body-list` and `/request-count`.
Stub Configuration JSON File Format Changes
- Replace field `code` with `status_code` in stub configuration JSON. Also replace attribute `code` with `status_code` in class `Response`.
Fixes
- Validate method name when loading configuration JSON. E.g. `TypeError: 'post': unsupported method`
- Added new 400 status responses for `PUT /config` in case of invalid configuration object.
json
{
"status": 400,
"type": "json-decode-error",
"title": "Error decoding JSON object",
"detail": "JSONDecodeError: Expecting value: line 1 column 1 (char 0)."
}
{
"status": 400,
"type": "missing-property-error",
"title": "Missing required property",
"detail": "'defaults': missing required property."
}
{
"status": 400,
"type": "unexpected-property-error",
"title": "Unexpected property",
"detail": "TypeError: 'code' must be <class 'int'> but it is actually <class 'str'>."
}
Other
- Update `stub_config.json` demo file.