Repository navigation
feat(ls): convert JSON Schema to OAS 3.0 when dereferencing - #5323
robert-hebel-sb wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
🟡 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
72ea310 to
969f9df
Compare
There was a problem hiding this comment.
🟡 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
90cfc32 to
c438870
Compare
There was a problem hiding this comment.
🟡 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
c438870 to
0f3079a
Compare



No description provided.