Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

additionalItems does not support $ref #408

Closed
1 of 4 tasks
unional opened this issue Feb 20, 2021 · 1 comment · Fixed by #433
Closed
1 of 4 tasks

additionalItems does not support $ref #408

unional opened this issue Feb 20, 2021 · 1 comment · Fixed by #433
Milestone

Comments

@unional
Copy link

unional commented Feb 20, 2021

Describe the bug

The additionalItems should support schema including $ref

{
  "$schema": "http://json-schema.org/draft-07/schema",
  "type": "object",
  "properties": {
    "test": {
      "$ref": "#/definitions/Recur"
    }
  },
  "definitions": {
    "Recur": {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "and"
          ]
        }
      ],
      "additionalItems": {
        "$ref": "#/definitions/Recur"
      }
    }
  }
}

VSCode Json Language Service used to have the same problem and is recently fixed:
microsoft/vscode-json-languageservice#69

So it is working on the json side:
image

Expected Behavior

schema including $ref should be supported for additionalItems for Tuple Validation:
https://json-schema.org/understanding-json-schema/reference/array.html#id6

Current Behavior

image

Steps to Reproduce

Environment

  • Windows
  • Mac
  • Linux
  • other (please specify)
@unional
Copy link
Author

unional commented Feb 20, 2021

Reference:
redhat-developer/vscode-yaml#435

@evidolob evidolob added this to the 0.17.0 milestone Mar 3, 2021
@evidolob evidolob modified the milestones: 0.17.0, 0.18.0 Mar 24, 2021
evidolob added a commit to evidolob/yaml-language-server that referenced this issue Mar 31, 2021
evidolob added a commit that referenced this issue Apr 1, 2021
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 a pull request may close this issue.

2 participants