How to Validate JSON Schema with Postman?
JSON Schema is a vocabulary that allows you to annotate and validate JSON documents.
Learn more at. : https://json-schema.org/
In this video, You will learn
- What is JSON ?
- What is JSON Schema ?
- Why JSON Schema Validation required?
- Basic JSON Schema example
- How to do JSON Schema Validation in Postman Step by step
- Tiny Validator for JSON Schema v4
You can create JSON Schema here : https://jsonschema.net/
What is JSON?
JSON stands for JavaScript Object Notation , It is a lightweight format for storing and transporting data, It is often used when data is sent from a server to a web page and It is "self-describing" and easy to understand
What JSON Schema ?
JSON Schema is a contract for your JSON document that defines the expected data types and format of each field in the response.
Why JSON Schema Validation required?
- Using JSON Schema to construct a model of your API response makes it easier to validate your API is returning the data is should.
- Monitor your API responses, ensuring they adhere to a specified format.
- Get alerted when breaking changes occur.
How to do JSON Schema Validation in Postman Step by Step?
- Generate JSON Schema
- https://jsonschema.net/#/
- Object Assertions and check REQD Properties. We do this so that every element in the JSON becomes mandatory.
- Number Assertions and check Use number, not integer for all numeric instances
- Configure and Test using Postman
How to work with Tiny Validator for JSON Schema v4?
Use json-schema draft v4 to validate simple values and complex objects using a rich validation vocabulary
https://github.com/geraintluff/tv4
5 comments