Skip to content

feat(ls): convert JSON Schema to OAS 3.0 when dereferencing - #5323

Open
robert-hebel-sb wants to merge 2 commits into
feat/publish-converter-packagefrom
feat/convert-schema-oas30
Open

robert-hebel-sb wants to merge 2 commits into
feat/publish-converter-packagefrom
feat/convert-schema-oas30

Conversation

@robert-hebel-sb

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The change has an unwired public parameter and a failing valid-anchor test, with additional coverage gaps in the conversion tests.

4 open issues
What changed in this PR

Adds optional JSON Schema 2020-12-to-OpenAPI 3.0 conversion to the language service dereferencing workflow, including external schema references, fixtures, and regression tests.

Changes:

  • Integrates the converter into dereferencing through the conversion context.
  • Adds JSON and YAML fixtures covering schema conversion and external references.
  • Adds tests for conversion, dereferencing, error handling, and OpenAPI version behavior.
  • Updates package dependencies and the lockfile.
File Description
packages/​apidom-ls/​test/​fixtures/​deref/​json-schema-2020-12/​root.yaml Adds a JSON Schema 2020-12 YAML fixture for external dereferencing and conversion tests.
packages/​apidom-ls/​test/​fixtures/​deref/​json-schema-2020-12/​root.json Adds a JSON Schema 2020-12 JSON fixture containing an anchored schema.
packages/​apidom-ls/​test/​deref-convert-json-schema.ts Adds tests for JSON Schema conversion during dereferencing, including references, errors, and OpenAPI version handling.
packages/​apidom-ls/​src/​services/​deref/​deref-service.ts Adds optional JSON Schema-to-OpenAPI 3.0 conversion before dereferencing.
packages/​apidom-ls/​src/​apidom-language-types.ts Extends dereference types and the language-service API with conversion configuration.
packages/​apidom-ls/​package.json Adds the ApiDOM converter as a language-service dependency.
package-lock.json Records the new converter dependency and its locked transitive packages.

Review effort: Lite

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Active issues remain, including a critical HTTPS-policy regression that could let untrusted documents fetch schemas over plaintext HTTP, plus an interface mismatch and an ineffective test.

1 open issue
4 resolved since last review

Review effort: Lite

@robert-hebel-sb
robert-hebel-sb requested a lite review from Copilot November 26, 2026 19:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

A critical active finding remains because deref-service.ts contains syntactically invalid conversion code with an undeclared variable and omits required arguments, preventing compilation and conversion of external-reference fixtures.

1 open issue
1 resolved since last review

Review effort: Lite

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Runtime verification is needed to validate cross-package conversion and dereference behavior, particularly for external and circular references.

No open issues 🎉

1 resolved since last review

Review effort: Lite

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

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants