docs: adds a json schema namespace#110
Conversation
| The `x-{{page.slug}}-` prefix is reserved for OpenAPI Specification Extensions that mirror JSON Schema keywords when targeting OpenAPI versions or JSON Schema dialects where those keywords are not directly available. | ||
|
|
||
| Extensions in this namespace are registered in the [OpenAPI Extension Registry](../extension/), like the `x-oai-` and `x-oas-` namespaces. | ||
| {% endcapture %} |
There was a problem hiding this comment.
Can we make a note that, strictly speaking, x- prefixes are only required in 3.0 or earlier? For 3.1+, OAD authors should check their tool documentation to find out whether they support x- schema keywords or some other mechanism for accessing keywords from later drafts (which, IIRC, some JSON Schema implementations do, at least for some keywords).
There was a problem hiding this comment.
@handrews are you suggesting that we also reserve the jsonschema namespace (with no "x-")? I suppose we could do that, but I think that would mean that extensions in that namespace could only be used in OpenAPI 3.1 or later, and I don't think any of the extensions currently proposed or approved fall in to this category.
There was a problem hiding this comment.
@mikekistler no, I mean tht some JSON Schema implementations will just allow, say, propertyNames with draft-04 even though it wasn't introduced until later.
Although come to think of it, this wouldn't be a problem in 3.1+ unless you had already set jsonSchemaDialect to something like draft-04, and if you wanted to use later keywords you wouldn't do that, so... yeah, never mind.
I see some extension entries say something like "used when targeting OpenAPI versions prior to 3.2", so I think this whole namespace should have "used when targeting OpenAPI versions prior to 3.1" on it, and that would be sufficient. Ignore all the rest of what I said.
There was a problem hiding this comment.
| The `x-{{page.slug}}-` prefix is reserved for OpenAPI Specification Extensions that mirror JSON Schema keywords when targeting OpenAPI versions or JSON Schema dialects where those keywords are not directly available. | |
| Extensions in this namespace are registered in the [OpenAPI Extension Registry](../extension/), like the `x-oai-` and `x-oas-` namespaces. | |
| {% endcapture %} | |
| The `x-{{page.slug}}-` prefix is reserved for OpenAPI Specification Extensions that mirror JSON Schema keywords when targeting OpenAPI versions prior to 3.1 or JSON Schema dialects where those keywords are not directly available. | |
| Extensions in this namespace are registered in the [OpenAPI Extension Registry](../extension/), like the `x-oai-` and `x-oas-` namespaces. | |
| {% endcapture %} |
does that work?
follow up to #85, #86, #88, #87, #84, #89, #97, #96, #95, #94, #93, #92, #91, #90