api-contract-testing

Validate REST API contracts against OpenAPI specifications and JSON Schema.

1|Updated Aug 26, 2025
One-click install
npx skills add https://github.com/PlaneInABottle/configs --skill api-contract-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-contract-testing
Source: https://github.com/PlaneInABottle/configs/tree/main/agents/.agents/skills/api-contract-testing
Command: npx skills add https://github.com/PlaneInABottle/configs --skill api-contract-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Validates REST API contracts against OpenAPI specifications and JSON Schema to ensure API conformance and prevent contract drift.

Core Features & Use Cases

  • OpenAPI spec validation and linting to detect contract issues early.
  • JSON Schema-based request/response validation for runtime correctness.
  • Negative testing and status-code verification to ensure proper error handling and behavior.
  • API contract checks against the spec to maintain alignment during development and testing.

Quick Start

Lint your OpenAPI file and run a basic API test against a sample base URL to validate contracts.

Frequently Asked Questions about api-contract-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate REST API contracts against an OpenAPI specification?

You validate REST API contracts by linting OpenAPI specifications and running runtime request/response checks against JSON Schema to ensure API conformance and prevent contract drift.

What is API contract testing and when do I need it?

API contract testing is the validation of REST API endpoints against OpenAPI specifications. You need it during API development and testing workflows to maintain alignment and prevent contract drift.

How do I automate negative testing and HTTP status-code verification for REST APIs?

Automate negative testing and status-code verification by applying structured checks against OpenAPI specifications to ensure proper error handling and correct HTTP status-code behavior across endpoints.

Can I use JSON Schema to validate API request and response payloads at runtime?

Yes, JSON Schema-based validation checks runtime API request and response correctness. It enforces schema compliance to ensure API payloads conform to the defined OpenAPI contract.

Does this approach detect contract drift during API development?

Yes, contract drift is detected through OpenAPI spec validation and regression checks across endpoints. Linting identifies contract issues early to maintain alignment during development and testing.