AnsweredAssumed Answered

Validate JSON Schema assertion is not validating the date-time format

Question asked by suhas.mv on Jun 26, 2018
Latest reply on Jul 3, 2018 by Mark_HE

I am using Gateway Version 9.0. I have created a JSON Shema as per the Draft -2 (draft-zyp-json-schema-02 - JSON Schema: core definitions and terminology ) to validate a date-time field as below. 

 

JSON Schema:

    {
      "$schema": "http://json-schema.org/draft-04/schema#",
         "type": "object",
            "properties": {
               "myDateTime": {
                          "type": "string",
                         "minLength": 1,
                         "format": "date-time"
                  }         

      }}

   

I was expecting "Validate JSON Schema" assertion to fail against the below JSON Request, But it didn't.

 

JSON Request:

    { "myDateTime": "thisisnotvalid" }

Outcomes