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

Protocol action "of" validation #520

Merged

Conversation

flothjl
Copy link
Contributor

@flothjl flothjl commented Sep 27, 2023

Fixes #507
Moving protocol action rule "of" validation to javascript to improve error messaging.

Debated trying to leverage an ajv plugin to help improve error messaging during schema validation, but a couple of things stood out:

  1. Would require changing configurations for Ajv instance to return all errors in a validation instead of stopping after the first error.
  2. A lot of the groundwork for this type of validation on $actions was added recently with Authorize RecordsRead with globalRole #512

@codesandbox
Copy link

codesandbox bot commented Sep 27, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@flothjl flothjl marked this pull request as ready for review September 27, 2023 16:18
@flothjl flothjl changed the title conditional property validation Protocol action "of" validation Sep 27, 2023
@EbonyLouis
Copy link
Contributor

@flothjl Just a heads-up: To be eligible for the official Hacktoberfest prizes, PRs need to be merged on or after October 1st. Would you like to wait until then or merge it now?

to be eligible for Hacktoberfest's official prizes make sure you're registered, registration is now open. Reach out if you need any help 🥳

diehuxx
diehuxx previously approved these changes Sep 28, 2023
Copy link

@diehuxx diehuxx left a comment

Choose a reason for hiding this comment

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

Thanks @flothjl -- @thehenrytsai and I made a small change and merged main. Like @EbonyLouis said, if you want to be part of the Hacktoberfest thing, we'll wait to merge this until Sunday Oct 1st. Or feel free to merge it sooner, it's up to you.

@flothjl
Copy link
Contributor Author

flothjl commented Sep 28, 2023

@diehuxx @EbonyLouis I'm really okay either way here. It doesn't look like I have rights to merge. If waiting until 10/1 helps TBD's Hacktoberfest 🍁 standings I can just reopen the PR on Sunday, otherwise I'm fine if y'all just merge now :).

* main:
  decentralized-identity#439 - Return `authorization` in queries and reads (decentralized-identity#523)
  decentralized-identity#439 - Turned `authorization` property from a JWS into a container object (decentralized-identity#518)
  npm audit fix get-func-name (decentralized-identity#521)
@diehuxx diehuxx merged commit 9e86e41 into decentralized-identity:main Sep 29, 2023
3 checks passed
@flothjl flothjl deleted the flothjl/action-rule-validation branch September 29, 2023 22:48
@EbonyLouis EbonyLouis added the hacktoberfest-accepted Accepted PRs for the hacking month of October label Oct 4, 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.

Missing of keyword in protocol action rules leads to confusing error
4 participants