fix/extension versions#111
Conversation
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
| Use this extension only with JSON Schema versions before 2019-09; 2019-09 and later define [`$anchor`](https://json-schema.org/draft/2019-09/json-schema-core#anchor) directly. | ||
|
|
There was a problem hiding this comment.
This is only truly needed in OAS 3.0 schemas. Prior to the introduction of $anchor: foo, earlier drafts could achieve the same thing with $id: "#foo" (post-draft-04) or id: "#foo" (draft-04).
There was a problem hiding this comment.
but wouldn't doing so be "confusing" for mechanical conversions?
There was a problem hiding this comment.
@baywet what is the scenario that leads to this being relevant for anything other than OAS 3.0? 3.1+ defaualt to draft 2020-12, and at least so far, by definition that means there are no unsupported keywords to worry about.
OAS 3.0 doesn't use a standard JSON Schema draft, much less allow you to switch them, so there's no point talking about those for OAS 3.0.
We don't want to encourage using any prefix outside of OAS 3.0. For OAS 3.1+, it should be completely unnecessary. For JSON Schema outside of OAS, it would go against how such things are handled there, and create a retroactively-inserted pseudo-standard.
The best thing to do here is advise that these are used only with OAS 3.0.
There was a problem hiding this comment.
I think I misunderstood the previous comment. I thought you wanted me to add some kind of guidance about using $id/id for earlier versions? But instead you simply want to add the OpenAPI version this is relevant?
Co-authored-by: Vincent Biret <vincentbiret@hotmail.com>
Co-authored-by: Mike Kistler <mkistler82@gmail.com>
follow up to #102, #98, #88, #86, #84