yaml-language-server
yaml-language-server copied to clipboard
URL fragment references does not resolve correctly
Describe the bug
The URL fragments in schema URL feature does not work as expected. Take, for example, following YAML file referencing and Open API schema fragment.
# yaml-language-server: $schema=https://github.com/OAI/OpenAPI-Specification/raw/main/schemas/v3.1/schema.json#/$defs/parameter
name: token
in: header
description: token to be passed as a header
required: true
schema:
type: array
items:
type: integer
format: int64
style: simple
Here is a reference
to the parameter object.
Instead of validation the object using the fragment, it validates it using the base object in the schema.
Expected Behavior
I would expect yamlls
to resolve the fragment and use the objects' definition as its base for validation.
Steps to Reproduce
- Create a yaml file
- Paste the yaml above
- Watch
yamlls
output
Environment
- [ ] Windows
- [x] Mac
- [ ] Linux
- [ ] other (please specify)