# jsonSchema validation not matching API schema validation

**URL:** <https://community.postman.com/t/jsonschema-validation-not-matching-api-schema-validation/38442>\
**Category:** Help Hub\
**Tags:** tests, openapi, schemavalidation\
**Created:** [August 23, 2022, 7:03am UTC](https://community.postman.com/t/jsonschema-validation-not-matching-api-schema-validation/38442 "2022-08-23T07:03:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alejandrosanchezfms](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@alejandrosanchezfms](https://community.postman.com/u/alejandrosanchezfms)\
**Post date:** [August 23, 2022, 7:03am UTC](https://community.postman.com/t/jsonschema-validation-not-matching-api-schema-validation/38442/1 "2022-08-23T07:03:24Z")

</div>

_My question_:  
I am having problems when I try to copy the schema from the API definition, to be validated in the postman test using JsonSchema.

It seems that the API schema validation is on 3.0.x compared to JsonSchema is testing against 3.1

the reason I say this, is that the jsonSchema test fails when I have `nullable: true`

And my API schema fails when I have  
“anyOf”: [  
{  
“type”: “number”  
},  
{  
“type”: “null”  
}  
]

_Details (like screenshots)_:

 ![image](https://us1.discourse-cdn.com/getpostman/original/2X/9/964cb7e224436de37161bf2cf62017b5c9662987.png)

vs

 ![image](https://us1.discourse-cdn.com/getpostman/original/2X/4/4c0c39567d14c39241b34d15b8bd140e584e1a81.png)

_How I found the problem_:  
I found this by looking into reading into different documentation for JSON schemas, and supported types
