FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Don't lint $ref siblings for default/examples in Draft 7 and older by staging-devin-ai-integration[bot] · Pull Request #609 · sourcemeta-evals/blaze · GitHub

Don't lint $ref siblings for default/examples in Draft 7 and older - #609

Open
staging-devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
evalon/blaze-dont-d06cc3cd
Open

staging-devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
evalon/blaze-dont-d06cc3cd

Conversation

Copy link
Copy Markdown

Respect $ref sibling semantics for default/examples by draft

Summary

This PR makes the ValidDefault and ValidExamples linter rules draft-aware when the keyword appears as a sibling of $ref.

What changed

  • In Draft 7 and older, if a schema object contains both $ref and:

    • default (for ValidDefault), or
    • examples (for ValidExamples)

    the rule now skips linting/transforming that object (because siblings of $ref must be ignored in those drafts).

  • In 2019-09 and 2020-12, the rules continue to lint those siblings and will still remove invalid default / examples values.

Tests added

For both valid_default and valid_examples, new tests cover:

  • Draft-07: sibling is preserved (ignored)
  • 2019-09: invalid sibling is removed
  • 2020-12: invalid sibling is removed

Local verification

  • Ran make configure compile
  • Ran make (including tests); passed

Review & Testing Checklist for Human

  • Confirm the dialect detection via vocabularies (meta-data vocab presence) is the right signal for distinguishing 2019-09+/2020-12 from Draft-07/06/04 in all linter execution paths.
  • Review the new guard in both ValidDefault::condition and ValidExamples::condition to ensure the scope is correct (only $ref sibling cases, no unintended skips).
  • Run/inspect blaze.linter tests (or full make) and verify the new draft-specific cases match expected JSON Schema semantics end-to-end.

Notes

Co-Authored-By: bot_apk <apk@cognition.ai>

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

This branch has not been deployed

No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

0 participants


Back | FazBrowse Home | New Git URL