Schema validation tv4 return true at all times

Using tv4 to validate schema. The result returns true almost at any time.

Steps to reproduce:

  1. Generate schema here:
  2. Copy the schema to the local variable.
  3. I did a small change in the schema in object status I changed the attribute type to be an integer, it was string originally.
    The result is: Postman returns true


var schema = pm.variables.get("schema"); 
var JsoneData=JSON.parse(responseBody); 
//var result=tv4.validateResult(JsoneData, schema); 

pm.test('Schema is valid', function() { 
    pm.expect(tv4.validate(JsoneData, schema)); 

Hey @subramanya.raj,

What’s the response body for this?

I would recommend using Ajv over tv4 within Postman - There have been a few questions around this module recently with some extra information about how it could be used.