Skip to content

autocompletion problem when value is null inside anyOf object #684

Closed
@p-spacek

Description

@p-spacek

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.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions