Parse DateTime in format that is accepted by Schema Validator
Bruno Muratore
Branch: BrunoMuratore/swagger-request-validator:master
Branch: atlassian/swagger-request-validator:master
Merged
Merged pull request
Merged in BrunoMuratore/swagger-request-validator (pull request #48)
This solves issue #63
Since Schema Validator doesn't accept dates that are valid according to RFC3339, some date times would throw a validation.schema.format error when it shouldn't.
As suggested by James Navin on PR #46, this PR uses the custom RFC3339 formatter to try to parse the date, and if it is valid, parses it in a format that the Schema Validator will accept.
If RFC3339 fails to parse the date, then let the flow continue since the Schema Validator will throw the appropriate error. This is done by using an empty catch block, any suggestion to improve this is welcome.