How to handle negative value validation in json schema

Hi, I’m facing an issue in schema validation. My response is having a negative value for json key but AJV validation is failing by saying “should be number”. I checked schema and its having type as “number”. Can someone help me validating negative values for any json key?

For schema validation which tool you are using
or any other automation tool??

I’m using AJV lib of postman.

Are you sure the value is coming back as a number and not a string? Is the failing value in quotes?

A simple Schema validation tool, although not always perfect, that I use is

Place your schema in the left box and your failing response in the right box.

It will highlight were exactly it is failing and might give some more insight into what is happening.