Generate API tests
generate_api_testsGenerate contract tests for selected or all API endpoints, validating status codes and JSON schemas with pytest/httpx or Java REST Assured (JUnit 5), and return test files for writing.
Instructions
Generate contract tests (status + JSON schema) for some or all endpoints: pytest + httpx, or Java REST Assured (JUnit 5). Returns the files; write them with write_test.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"spec": "<spec>"
},
"name": "generate_api_tests"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes | ||
| endpoints | No | ||
| framework | No | pytest | |
| java_package | No | contract |