JSONSchema.swift icon indicating copy to clipboard operation
JSONSchema.swift copied to clipboard

Add date, time, and date-time validators as well as Carthage support

Open ismailmustafa opened this issue 5 years ago • 2 comments

This PR adds:

  • Validators for date, time, and date-time. These validators for the RFC 3339 standard.
  • Carthage support

ismailmustafa avatar Aug 19 '20 19:08 ismailmustafa

I'm not sure that the formats used here for date-time, date, time match what is specified in the relevant specifications. Could you please enable the tests for these formats so we can see what the test suite will say. Just need to remove the lines in the relevant "excluding" block for each validator and then the test suite will verify them from https://github.com/json-schema-org/JSON-Schema-Test-Suite/blob/master/tests/draft2019-09/optional/format/date-time.json and co:

https://github.com/kylef/JSONSchema.swift/blob/master/Tests/JSONSchemaTests/JSONSchemaCases.swift#L103-L104 https://github.com/kylef/JSONSchema.swift/blob/master/Tests/JSONSchemaTests/JSONSchemaCases.swift#L114 https://github.com/kylef/JSONSchema.swift/blob/master/Tests/JSONSchemaTests/JSONSchemaCases.swift#L137-L138 https://github.com/kylef/JSONSchema.swift/blob/master/Tests/JSONSchemaTests/JSONSchemaCases.swift#L149

kylef avatar Aug 20 '20 17:08 kylef

Absolutely! I wasn't sure either, but wanted to open this up for discussion. I'll go ahead and enable those tests.

ismailmustafa avatar Aug 21 '20 15:08 ismailmustafa