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

URL fragment references does not resolve correctly #949

Open
1 of 4 tasks
michaelvanstraten opened this issue Jan 30, 2024 · 0 comments
Open
1 of 4 tasks

URL fragment references does not resolve correctly #949

michaelvanstraten opened this issue Jan 30, 2024 · 0 comments

Comments

@michaelvanstraten
Copy link

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

  1. Create a yaml file
  2. Paste the yaml above
  3. Watch yamlls output

Environment

  • Windows
  • Mac
  • Linux
  • other (please specify)
@michaelvanstraten michaelvanstraten changed the title URL fragment references does not resolve URL fragment references does not resolve correctly Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant