krakenjs / hapi-openapi

Build design-driven apis with OpenAPI (formerly swagger) 2.0 and hapi.
Other
211 stars 75 forks source link

Update datetime format to iso standard instead of timestamp #126

Closed Nox-404 closed 6 years ago

Nox-404 commented 6 years ago

Fixes #125

Nox-404 commented 6 years ago

By the way, This might be a breaking change as the change in format might break existing apis ! Also, there is no test cases for the datetime format validation

tlivings commented 6 years ago

Looks fine on the face of it but would love to see a test case added to validate it fixes the issue.

Nox-404 commented 6 years ago

Hi, I'm not sure to get the time to do that... Do you have some hints on how I could test this easily ?

tlivings commented 6 years ago

@Nox-404 the existing tests should provide some examples of testing parameter validation: https://github.com/krakenjs/hapi-openapi/blob/master/test/test-hapi-openapi.js#L285 that would server as a starting point.