IssueRaiser

[json] support meta-schema features

Issue Type: <b>Bug</b> So basically I have a VS Code extension that provides JSON file validation based on the built in JSON validator. The schema that I'm validating against (OpenAPI 3.1.x) uses meta-schema features, i.e. `$dynamicRef`, which I also need to use, since I reference the OpenAPI schema. When defining a custom schema like the following, I get a warning stating that the validator doesn't support meta-schema features yet. Needless to say, validation does really not work. When using normal `$ref`, most of the schema work but not properties that use `$dynamicRef`. So I'm forced to reference the schema by `$dynamicRef` as well. ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "OpenApiPathObject", "type": "object", "additionalProperties": { "$dynamicRef": "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json#/$defs/path-item-or-reference" } } ``` ``` The schema uses meta-schema features ($dynamicRef) that are not yet supported by the validator. ``` I'm using VS Code 1.69.0 and changed the required engine of my extension to ^1.68.0, which should include support for schema verion Draft 2020-12 as stated in the May 2022 release notes. What are my options here and how can I come around this warning? Here's an excerpt of the extension package.json ```json ... "engines": { "vscode": "^1.68.0" }, ... ``` VS Code version: Code 1.69.0 (92d25e35d9bf1a6b16f7d0758f25d48ace11e5b9, 2022-07-07T05:28:

Posted by proohit on Jul 16, 2022, 10:16 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,500 issues0 comments

support (Other)

[json] support meta-schema features

proohitJul 16, 2022, 10:16 AM

Issue Type: <b>Bug</b> So basically I have a VS Code extension that provides JSON file validation based on the built in JSON validator. The schema that I'm validating against (OpenAPI 3.1.x) uses meta-schema features, i.e. `$dynamicRef`, which I also need to use, since I reference the OpenAPI schema. When defining a custom schema like the following, I get a warning stating that the validator doesn't support meta-schema features yet. Needless to say, validation does really not work. When using normal `$ref`, most of the schema work but not properties that use `$dynamicRef`. So I'm forced to reference the schema by `$dynamicRef` as well. ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "OpenApiPathObject", "type": "object", "additionalProperties": { "$dynamicRef": "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json#/$defs/path-item-or-reference" } } ``` ``` The schema uses meta-schema features ($dynamicRef) that are not yet supported by the validator. ``` I'm using VS Code 1.69.0 and changed the required engine of my extension to ^1.68.0, which should include support for schema verion Draft 2020-12 as stated in the May 2022 release notes. What are my options here and how can I come around this warning? Here's an excerpt of the extension package.json ```json ... "engines": { "vscode": "^1.68.0" }, ... ``` VS Code version: Code 1.69.0 (92d25e35d9bf1a6b16f7d0758f25d48ace11e5b9, 2022-07-07T05:28:

Comments (0)

No comments yet. Start the discussion.

Comment on this issue