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

[BUG] avroSchema does not resolve #545

Open
2 tasks done
publicvirtualvoid opened this issue Jun 6, 2024 · 6 comments
Open
2 tasks done

[BUG] avroSchema does not resolve #545

publicvirtualvoid opened this issue Jun 6, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@publicvirtualvoid
Copy link

Describe the bug.

The v3 JSON Schema is not valid because one of the $refs doesn't resolve

$ref '/definitions/avroSchema' in 'https://github.com/asyncapi/spec-json-schemas/raw/master/schemas/3.0.0.json' can not be resolved.YAML(768)

http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json gives a 404

Expected behavior

The spec should fully resolve including refs.

Screenshots

not relevant

How to Reproduce

  1. Navigate to http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json
  2. Observe 404

OR:

  1. Install YAML VSCode extension
  2. Add # yaml-language-server: $schema=https://github.com/asyncapi/spec-json-schemas/raw/master/schemas/3.0.0.json as first line
  3. Observe error in Problems list

🥦 Browser

None

👀 Have you checked for similar open issues?

  • I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue ?

No, someone else can work on it

@publicvirtualvoid publicvirtualvoid added the bug Something isn't working label Jun 6, 2024
Copy link

github-actions bot commented Jun 6, 2024

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@jonaslagoni
Copy link
Sponsor Member

@publicvirtualvoid thanks for the issue, use the following instead:

# yaml-language-server: $schema=https://github.com/asyncapi/spec-json-schemas/raw/master/schemas/3.0.0-without-$id.json

The problem is mainly the yaml language server not understanding where to pickup a bundled compound schema. Although the definitions should also be exposed of course.

@publicvirtualvoid
Copy link
Author

Perfect, thanks so much!

@derberg
Copy link
Member

derberg commented Jun 13, 2024

hmm, but you should not have to put yaml-language-server in your yaml manually 🤔 we publish proper schema in SchemaStore

@jonaslagoni
Copy link
Sponsor Member

@derberg if the filename is not asyncapi.json or a matching one then it wont work automatically 🙂

Copy link
Member

derberg commented Jun 24, 2024

ah yes, did not figure that is a problem of person that reported the problem

@publicvirtualvoid have a look at https://github.com/asyncapi/spec/tree/master/examples#file-naming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants