Skip to content
Bugwise
Menu

JSON Schema

A JSON document that describes what valid JSON looks like: fields, types, required properties and allowed values.

Definition

Teams use JSON Schema (often generated from an OpenAPI file) to check API responses automatically. A schema test catches renamed or missing fields, wrong types and unexpected fields that a status-code check would miss. Postman can validate a response with pm.response.to.have.jsonSchema(schema).

In practice

A schema that requires "total" to be a number fails when an endpoint suddenly returns "total": "24.99".

Learn it in context

Lessons that use this term.

Related terms

Esc

Type to search the whole site.