Skip to content
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

adding time schema validation to other interface method schemas #580

Conversation

flothjl
Copy link
Contributor

@flothjl flothjl commented Oct 27, 2023

Addresses #324

After digging into this, it appears a lot of progress has already been made on schema-based validation in #147 but adding some more robust validation by ensuring the timestamp is parseable.

  • updated interface-method schemas that have timestamps without the date-time schema reference
  • added validateTimestamp to ensure timestamps are valid

@codesandbox
Copy link

codesandbox bot commented Oct 27, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@codecov-commenter
Copy link

codecov-commenter commented Oct 27, 2023

Codecov Report

Merging #580 (2ce1e45) into main (bea7bdf) will increase coverage by 0.00%.
Report is 1 commits behind head on main.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #580   +/-   ##
=======================================
  Coverage   97.68%   97.68%           
=======================================
  Files          66       66           
  Lines        7932     7964   +32     
  Branches     1150     1155    +5     
=======================================
+ Hits         7748     7780   +32     
  Misses        178      178           
  Partials        6        6           
Files Coverage Δ
src/core/dwn-error.ts 100.00% <100.00%> (ø)
src/interfaces/events-get.ts 97.61% <100.00%> (+0.05%) ⬆️
src/interfaces/messages-get.ts 98.24% <100.00%> (+0.03%) ⬆️
src/interfaces/permissions-grant.ts 100.00% <100.00%> (ø)
src/interfaces/permissions-request.ts 100.00% <100.00%> (ø)
src/interfaces/permissions-revoke.ts 100.00% <100.00%> (ø)
src/interfaces/protocols-configure.ts 100.00% <100.00%> (ø)
src/interfaces/protocols-query.ts 100.00% <100.00%> (ø)
src/interfaces/records-delete.ts 100.00% <100.00%> (ø)
src/interfaces/records-query.ts 100.00% <100.00%> (ø)
... and 3 more

@flothjl flothjl marked this pull request as ready for review October 27, 2023 19:19
Copy link
Contributor

@thehenrytsai thehenrytsai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good to merge in the first pass!
🙏 🙏 🙏

@thehenrytsai thehenrytsai merged commit fb08183 into decentralized-identity:main Oct 27, 2023
4 checks passed
@EbonyLouis EbonyLouis added the hacktoberfest-accepted Accepted PRs for the hacking month of October label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Accepted PRs for the hacking month of October
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants