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

2.0.0-rc1.json (and -without-$id) JSON Schema is invalid #455

Closed
smoya opened this issue Nov 28, 2023 · 10 comments · Fixed by #537
Closed

2.0.0-rc1.json (and -without-$id) JSON Schema is invalid #455

smoya opened this issue Nov 28, 2023 · 10 comments · Fixed by #537
Labels
bug Something isn't working

Comments

@smoya
Copy link
Member

smoya commented Nov 28, 2023

You can use an external JSON Schema validator in order to see if those files are valid or not.
I've test it, and both seem invalid.

Originally posted by @smoya in #452 (comment)

I believe that rc1 was created having as metaschema the Draft-04, because then it seems valid.
But for some reason, most probably because of #454, the $schema field points to the draft-07.

Can any owner answer if 2.0.0-rc1 version was based on JSON Schema Draft-04? I believe it is, as the Schema definition uses Draft-04. But need to confirm.

Pinging owners: @fmvilas @derberg @dalelane @char0n
cc @jonaslagoni

@derberg
Copy link
Member

derberg commented Nov 28, 2023

v2 was suppose to be valid against draft 7

see the schema for rc1 when it was still in the same repo that the spec -> https://github.com/asyncapi/spec/blob/2.0.0-rc1/versions/next/schema.json#L3

AnimeshKumar923 added a commit to AnimeshKumar923/asyncapi-spec-json-schemas that referenced this issue Nov 28, 2023
Changes:

- added the function temporarily to avoid validation failure
  due to these two files

- The schemas version are incorrect in these and needs to be fixed

Issue concerning fixing of the described issue:
1. asyncapi#454
2. asyncapi#455
@char0n
Copy link
Collaborator

char0n commented Nov 28, 2023

I assumed that v2 was supposed to be done in JSON Schema Draft 7 (07), due to the simple fact that the AsyncAPI 2.x primarily uses Draft 7 as well.

All the definitions uses proper JSON Schema identification using $schema keyword. If it doesn't validate against Draft 7, it just needs to be fixed. It's probably remnants from creating it from v1?

"$schema": "http://json-schema.org/draft-07/schema#"

@smoya
Copy link
Member Author

smoya commented Nov 29, 2023

I assumed that v2 was supposed to be done in JSON Schema Draft 7 (07), due to the simple fact that the AsyncAPI 2.x primarily uses Draft 7 as well.

Howerver, I would never make such assumption based on that. We are talking about release candidates and not final versions.
In fact, if you check the Schema Object definition in rc1, you see references to JSON Schema Draft-04 that don't exist in rc2. See https://github.com/asyncapi/spec-json-schemas/blob/master/schemas/2.0.0-rc1.json#L373-L443

Anyway, rc1 was created with Draft-07 indeed, as demonstrated by @derberg in the previous comment.

@derberg
Copy link
Member

derberg commented Nov 30, 2023

Then this issue is solved, right?

Copy link
Member

derberg commented Dec 19, 2023

@smoya ?

Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Apr 18, 2024
@smoya
Copy link
Member Author

smoya commented Apr 18, 2024

This issue is still valid. Both schemas are invalid against Draft-07

@smoya smoya added bug Something isn't working and removed stale labels Apr 18, 2024
Copy link
Member

derberg commented Apr 18, 2024

these are really old schemas, not even of main release but RC
instead of fixing them I vote to remove them

@smoya
Copy link
Member Author

smoya commented Apr 19, 2024

these are really old schemas, not even of main release but RC instead of fixing them I vote to remove them

I like to delete things.

Pinging the rest of maintainers (which includes as well some maintainers from the spec repo): @fmvilas @dalelane @char0n @GreenRover @jonaslagoni @Pakisan WDYT?

@dalelane
Copy link
Collaborator

agreed - I've got no objection to removing release candidates

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

Successfully merging a pull request may close this issue.

5 participants