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

Fragment resolution from #512 doesn't always work #522

Closed
1 of 4 tasks
mgabeler-lee-6rs opened this issue Aug 10, 2021 · 0 comments
Closed
1 of 4 tasks

Fragment resolution from #512 doesn't always work #522

mgabeler-lee-6rs opened this issue Aug 10, 2021 · 0 comments
Milestone

Comments

@mgabeler-lee-6rs
Copy link

Describe the bug

The work done by @evidolob in #512 doesn't seem to work for several folks, including myself and @remcohaszing:

Based on Remco's comment, it also seems to vary by the specific schema URL used.

Expected Behavior

The PR should allow validating files against a sub-set of an upstream URL based on a fragment identifier

Current Behavior

For some people it works, and for others it doesn't. It's unclear what the difference is, and how to debug this

Steps to Reproduce

  1. Create example.yaml as below
  2. Observe the errors -- it is validating against the JSON schema represented by the top level URL, instead of validating against the sub-schema identified by the fragment

example.yaml:

# yaml-language-server: $schema=https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.0/schema.json#/definitions/Schema
type: object

Errors I see:
image

Environment

  • Windows
  • Mac
  • Linux
  • other (please specify)
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

2 participants