-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
Fixes ISO 8601 timestamp validation #490
base: main
Are you sure you want to change the base?
Conversation
Opened #832 for this issue because I didn't see this PR. It looks like it needs rebased though. |
The regex used to perform timestamp validation fails to parse valid timestamps that do not have fractional seconds (e.g. `2020-04-14T19:54:46Z`). This change (1) updates the regex to account for this and (2) moves the regex into a global variable so it lives in one place. The new regex is sourced from Ch 4.7 in `Regular Expressions Cookbook` 2e by Goyvaerts and Levithan. note - From what I can tell Postman only allows strings in environment variables so I cannot simply put the validation function there.
6f12044
to
c832b7f
Compare
✅ Deploy Preview for realworld-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Hey @abonander, I rebased the PR. Could you review the changes by running the JSON file on your project? |
@geromegrignon Sorry for the delay. I pulled the branch but I am unable to run the tests and have them actually point at my local instance. I try running with
Strangely enough, however, this doesn't seem to occur on |
api/Conduit.postman_collection.json
Outdated
"variable": [ | ||
{ | ||
"key": "APIURL", | ||
"value": "https://api.realworld.io/api" | ||
}, | ||
{ | ||
"key": "USERNAME", | ||
"value": "ggrignon1234" | ||
}, | ||
{ | ||
"key": "PASSWORD", | ||
"value": "123456" | ||
}, | ||
{ | ||
"key": "EMAIL", | ||
"value": "[email protected]" | ||
} | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@geromegrignon looks like this is overriding the values passed in by the script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abonander sorry i was away from the project for a while, I fixed it in case you still have some interest in this project :)
c832b7f
to
b7054cd
Compare
The regex used to perform timestamp validation fails to parse valid
timestamps that do not have fractional seconds (e.g.
2020-04-14T19:54:46Z
).This change (1) updates the regex to account for this and (2) moves the regex
into a global variable so it lives in one place.
The new regex is sourced from Ch 4.7 in
Regular Expressions Cookbook
2eby Goyvaerts and Levithan.
note - From what I can tell Postman only allows strings in environment
variables so I cannot simply put the validation function there.