Star

Created With

linkJSON Schema File

Validate the response body using an external JSON Schema file.

Both JSON and YAML files are supported.

NOTE: All $refs are dynamically de-referenced automatically, both locally and remotely.

linkRoot Schema

Use an external file from the root-level schema.

1link - name: get users

2link request:

3link path: /users

4link method: get

5link response:

6link json_schema:

7link type: file

8link $ref: static/schemas/users.json # path to the expected schema file



linkSub-Property

Validate against some sub-property within a schema file by using a JSON Pointer in the $ref

💡 HINT: this is very useful if you already have an Open API / Swagger spec since

1link - name: get users

2link request:

3link path: /users

4link method: get

5link response:

6link json_schema:

7link type: file

8link # uses property $.components.schemas.users

9link # within file 'static/schemas/open-api.json'

10link $ref: 'static/schemas/open-api.yml#/components/schemas/users'

💡 NOTE: paths containing a forward slash can be URL-encoded as %2F



See also:



JSON Schema FileRoot SchemaSub-Property

Home

Getting Startedchevron_right
Basicschevron_right
Requestchevron_right

Request Basics Headers Cookies Query Parameters Path Parameters

Payload Bodychevron_right

File Uploads Auto-Retry Additional Options

Response Validationchevron_right

Overview

Assertionschevron_right

Status Code Headers & Cookies

Bodychevron_right
Hooks & JSchevron_right

Overview

Function Typeschevron_right
Suite-Level Hookschevron_right
Spec-Level Hookschevron_right
Contextchevron_right
DRY & Reusing Specschevron_right
Command Line Interface (CLI)chevron_right