JSONSchema.swift
JSONSchema.swift copied to clipboard
Add date, time, and date-time validators as well as Carthage support
This PR adds:
- Validators for date, time, and date-time. These validators for the RFC 3339 standard.
- Carthage support
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
Absolutely! I wasn't sure either, but wanted to open this up for discussion. I'll go ahead and enable those tests.