Refference JSON schema from "define" API YAML file in Postman instead of creating a variable with actual JSON

Viewed 147

I have an API in Postman that has defined JSON schemas for every request\response. I also have a collection of tests that i use for testing this API. But I don't know how to connect these two substances(things) I have been searching for a solution for quite a while now and havent found an example set-up or a tutorial how? instead of creating a variable with actual schema in my test collection, I want to reuse already existing schema from API by $ref or some other link method.

This is my first question here, writing it just cause i haven't found a proper answer but functionality that i seek sounds really basic and logical.

1 Answers

Update from Valentin Despa:

"Please note that the API definition is written in a specification like Open API (or similar). It is not the same as the JSON schema which refers to the response body only."

So we can't validate response using that schema.

Related