yaml-language-server
yaml-language-server copied to clipboard
"Missing property" is reported for one of required properties
Describe the bug
I have yaml files with a custom schema (see below) where a "Missing property" problem is reported with the extension versions 1.0 and above. Earlier versions worked fine.
exmaple-schema.yml:
# yaml-language-server: $schema=http://json-schema.org/draft-07/schema
$schema: http://json-schema.org/draft-07/schema
type: object
additionalProperties: false
properties:
columns:
title: Contains column definitions
type: object
patternProperties:
"^[a-zA-Z]+$":
title: A column definition
type: object
additionalProperties: false
properties:
int:
title: Integer column type
type: "null"
long:
title: Long column type
type: "null"
id:
title: Identity column
type: "null"
unique:
title: Defines single column database unique constraint
type: "null"
oneOf:
- required:
- int
- required:
- long
example.yml:
# yaml-language-server: $schema=./example-schema.yml
columns:
ColumnA: { int, id }
ColumnB: { long, unique }
ColumnC: { int: null, unique}
Expected Behavior
No problems should be reported for "int" and "long" properties. Please note, this works good for "id" and "unique" properties.
Current Behavior

Steps to Reproduce
- Ensure, newest version is installed of the extension
- Save and open the above example files
Environment
- [X] Windows
- [ ] Mac
- [ ] Linux
- [ ] other (please specify)
I confirm, the fix is working good with version 1.6 on my machine. Thank you guys! 👍