Skip to content

fix: wrap jsonschema.validate in try/catch to handle circular ref - #861

Open
Andris28 wants to merge 2 commits into
pre-release-2.0from
fa/resolve-nima-error
Open

Andris28 wants to merge 2 commits into
pre-release-2.0from
fa/resolve-nima-error

Conversation

@Andris28

Copy link
Copy Markdown
Contributor

PR summary

In this commit we wrap the jsonschema.validate() call in a try/catch.
If the validator throws, because it cannot follow an unresolved circular $ref,
skip that example and log a debug message.

PR Checklist

General checklist

Please make sure that your PR fulfills the following requirements:

  • The commit message follows the Angular Commit Message Guidelines.
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • Dependencies have been updated as needed
  • .secrets.baseline has been updated as needed
  • npm run update-utilities has been run if any files in packages/utilities/src have been updated

Checklist for adding a new validation rule:

  • Added new validation rule definition (packages/ruleset/src/rules/*.js, index.js)
  • If necessary, added new validation rule implementation (packages/ruleset/src/functions/*.js, updated index.js)
  • Added new rule to default configuration (packages/ruleset/src/ibm-oas.js)
  • Added tests for new rule (packages/ruleset/test/*.test.js)
  • Added docs for new rule (docs/ibm-cloud-rules.md)
  • Added scoring rubric entry for new rule (packages/validator/src/scoring-tool/rubric.js)

diatrcz and others added 2 commits September 23, 2026 12:16
Signed-off-by: Lídia Tarcza <100163235+diatrcz@users.noreply.github.com>
Signed-off-by: András Felleg <afelleg@gmail.com>

This branch has not been deployed

No deployments
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