Manuals / API Testing / Chapter 8
D · Contracts · intermediate · Week 6–7 · Chapter 8 of 11
OpenAPI, schemas & contract testing
OpenAPI (Swagger) describes API contracts. Validate responses against schemas — catch drift before production.
Path progress66%
Step 1 of 4
Read an OpenAPI spec
paths, components/schemas, responses. Petstore is the hello world.
Do this now
Open swagger.io petstore spec. Map 3 endpoints to tests you already wrote.
Was this step clear?
Chapter learning outcomes
- OpenAPI structure
- JSON Schema validation
- Contract vs E2E
- Consumer-driven contracts intro
Clear these before you leave
Side quest
Schema break drill
Remove required field from schema temporarily. Confirm test fails. Restore.