Install
$ agentstack add skill-jovd83-restassured-skill-contracts ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Analyze REST Contracts
1. Load The Contract
- Prefer OpenAPI or Swagger files already in the repo.
- Run
python scripts/extract_openapi_summary.py --inputto produce a normalized summary. - Read [openapi-swagger-analysis.md](references/openapi-swagger-analysis.md) when the contract contains advanced features.
2. Extract Testable Surface
- List paths, methods, tags, and operation IDs.
- List auth schemes and which operations require them.
- List path, query, header, and body parameters.
- List required vs optional request fields.
- List documented status codes, response schemas, and error payloads.
- Use the script output as the baseline summary, then read the raw contract only for unresolved details.
3. Choose The Assertion Mode
- Use
runtime-alignedmode when the suite exists to prove the live service behavior that consumers actually receive. - Use
contract-enforcementmode when the goal is strict specification conformance, drift detection, or contract hardening. - Use
mixedmode when both matter: keep runtime-aligned regression tests separate from contract-enforcement checks. - Record the chosen mode in the coverage plan so implementation and reporting stay consistent.
- Record the dominant OpenAPI tags and any explicit user priority for tags so coverage planning can order work intentionally.
4. Convert To Test Candidates
- Create happy-path candidates for every in-scope operation.
- Create validation candidates for required fields, formats, enums, and boundaries.
- Create authorization candidates from security requirements.
- Create negative candidates from documented
4xxand5xxresponses. - In
contract-enforcementormixedmode, add explicit drift-detection candidates for status, content type, auth, required fields, and schema shape. - Flag undocumented behavior instead of inventing expected results.
- Group candidates by tag before handing them to coverage planning when the contract is tag-rich or the user asked for domain-priority ordering.
5. Merge With Business Requirements
- Prefer business requirements when they are more specific than the contract.
- Flag conflicts instead of silently choosing one source.
- Hand the merged result to
../../coverage_plan/generation/SKILL.md.
5. Examples
- Input:
Derive tests from openapi/orders.yaml.
Output: A normalized matrix of operations, validations, auth rules, and error responses ready for coverage planning.
6. Troubleshooting
- Problem: The contract is YAML and parsing fails.
Fix: Install PyYAML or convert the file to JSON, then rerun the script.
- Problem: The contract omits business rules such as inventory side effects.
Fix: Merge in user stories before finalizing the scenario list.
- Problem: The live runtime already diverges from the contract.
Fix: Choose mixed mode unless the user asked for pure contract enforcement.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: jovd83
- Source: jovd83/restassured-skill
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.