Joe
I am using API Gateway 9.2 CR05, I have done this, however for some reason, API Gateway always considers everything in the properties as mandatory, It is not allowing optional values, though I am trying to include only few required values. However the same works perfectly fine using the JSON Schema Validator - Newtonsoft
Here's the screen shot showing that I have only name and company as required and the email is optional, however API Gateway still expects that email must exist:
My JSON Schema:
{ "type": "object", "properties": { "name": {"type": "string"}, "email": {"type": "string"}, "company": {"type": "string"} }, "required": [ "name", "company" ], "additionalProperties": false }
Screen Shot:
Request:
{ "name":"asdfdf", "company":"asfsdfd" }
Response from Gateway still expecting email though it is not a required attribute:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Encoding: gzip
Content-Type: text/plain;charset=UTF-8
Content-Length: 67
Date: Fri, 05 Jan 2018 15:05:01 GMT
Failure: $.email: is missing and it is not optional
Here's the output from JSON Schema Validator tool showing the same schema works here:
Could you please advise on why the validation is failing on Gateway