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 #435

Closed
1 of 4 tasks
unional opened this issue Feb 19, 2021 · 1 comment
Closed
1 of 4 tasks

additionalItems does not support $ref #435

unional opened this issue Feb 19, 2021 · 1 comment
Assignees
Labels
Milestone

Comments

@unional
Copy link

unional commented Feb 19, 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)
@evidolob
Copy link
Collaborator

evidolob commented Apr 6, 2021

@evidolob evidolob closed this as completed Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants