asyncapi/spec-json-schemas

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

smoya opened this issue · 10 comments

smoya commented

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

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

char0n commented

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 commented

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.

Then this issue is solved, right?

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 ❤️

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

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

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?

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