Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ismailmustafa
Copy link

This PR adds:

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

@kylef
Copy link
Owner

kylef commented Aug 20, 2020

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

@ismailmustafa
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants