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

autocompletion problem when value is null inside anyOf object #684

Closed
p-spacek opened this issue Mar 22, 2022 · 0 comments · Fixed by #759
Closed

autocompletion problem when value is null inside anyOf object #684

p-spacek opened this issue Mar 22, 2022 · 0 comments · Fixed by #759
Assignees
Labels
Milestone

Comments

@p-spacek
Copy link
Contributor

Describe the bug

when schema contains anyOf objects with null type, other types are ignored on value completion.

{
  "anyOf": [
    {
      "properties": {
        "prop": {
          "const": "const value"
        }
      }
    },
    {
      "properties": {
        "prop": {
          "type": "null"
        }
      }
    }
  ]
}

yaml

prop: #cursor here

Expected Behavior

autocompletion should suggest null and const value

Current Behavior

autocompletion suggest only null

image

note that problem is probably in doc.getMatchingSchemas(schema.schema); where prop: is equivalent to prop: null so the only correct schema is the one with null type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants