Skip to content

success message framework #181

Draft
RitoG09 wants to merge 4 commits intohyperjump-io:mainfrom
RitoG09:feature/success-message-framework
Draft

success message framework #181
RitoG09 wants to merge 4 commits intohyperjump-io:mainfrom
RitoG09:feature/success-message-framework

Conversation

@RitoG09
Copy link
Copy Markdown

@RitoG09 RitoG09 commented Mar 15, 2026

Related to: #120 and #159

  • Adds support for success explanations for the required keyword.

  • Adds support for negated success explanations when required appears under not.

  • Introduces a helper (getPassing) that collects success explanations from keyword handlers.

Schema:
{ "not": { "required": ["a"] } }
Instance:
{ "a":1 }
Output: (now)

[
  {
    "message": "Expected a value that doesn't match the 'not' schema",
    "alternatives": [
      [
        {
          "message": "The 'a' property should not be present"
        }
      ]
    ]
  }
]

@jdesrosiers If this direction looks reasonable, my plan is to extend the same mechanism to additional keywords. I need feedback on this and also request the order that i should match to implement it for all required keywords..

@RitoG09 RitoG09 marked this pull request as draft March 15, 2026 19:30
Copy link
Copy Markdown
Collaborator

@jdesrosiers jdesrosiers left a comment

Choose a reason for hiding this comment

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

I don't think a "mode" flag is going to work well in at least some cases. I think we need a whole new passing handler function. But, the negated flag on the passing handler I think should work.

Also, please make sure to run the tests and linter before submitting code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants