Meta-Defining JSON Schema inside of an openAPI spec (Version 3.0.2) #3302
-
The following definition of a json_schema is found in an openAPI specification I'm currently working with:
This is then being referenced to be used in multiple parts of the document to describe the JSON responses of the API. (Here's a link to the entire document https://api.openeo.org/) To my understanding this was done in an attempt to mimic JSON Schema dialects introduced in 3.1.0. I believe this to not only be superfluous, as all the functionality that is needed is already covered by the inherent existence of the openAPI version of the JSON Schema (https://spec.openapis.org/oas/v3.0.2#schema-object), but also strictly unsupported because of the use of $id and $schema, which are covered by JSON Schema (https://json-schema.org/), hence their inclusion in this meta-implementation of it, but not supported in the context of a openAPI document (openapi-core library fails at validating this spec because of the inclusion of the $id property). I was discussing this with the person who made this specific specification and he told me that I was wrong in thinking this and I should ask the openAPI community itself. (Open-EO/openeo-api#499) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
That's not what it looks like to me. The response to some of the requests are JSON Schemas. For example, if you request However, OpenAPI needs to be able to describe that response. It needs an OpenAPI dialect schema that describes the standard JSON Schema schema in the response. That's all The only time a standard JSON Schema appears in the OpenAPI document, is under the OpenAPI |
Beta Was this translation helpful? Give feedback.
-
{ |
Beta Was this translation helpful? Give feedback.
-
This was answered, closing. |
Beta Was this translation helpful? Give feedback.
That schema doesn't use
$id
or$schema
as a keyword. Those are property names.Yes, other resour…