W3C home > Mailing lists > Public > public-sdwig@w3.org > July 2019

CoverageJSON is compatible with OpenAPI JSON schema :-)

From: Tandy, Jeremy <jeremy.tandy@metoffice.gov.uk>
Date: Tue, 30 Jul 2019 10:36:04 +0000
To: "public-sdwig@w3.org" <public-sdwig@w3.org>
Message-ID: <DB6PR0101MB22771BF4334B18C6C0DBF3CFA2DC0@DB6PR0101MB2277.eurprd01.prod.exchangelabs.com>
Good morning all -

I was talking with my Met Office colleague, Mark Burgoyne, about using OpenAPI JSON schemas to fully describe the query and response for the "Weather on the Web" APIs he's currently working on. Originally, he thought that the CoverageJSON specification needed amending to enable the coverage payloads to be described using OpenAPI schemas. It turns out, this isn't the case. He's managed to fully describe his APIs and the coverage responses using OpenAPI schemas to the point where off-the-shelf tools are able to automatically build code that generates the queries and parses the response.

Good news! This means less work to amend CoverageJSON.

Here's what Mark sent me this morning to explain:

OpenAPI JSON Schemas are based a subset of the  JSON Schema Specification Wright Draft 00 [1] (aka Draft 5)  (with custom extensions). One of those extensions is the concept of Dictionaries [2] which are able to describe the structure of the Parameter and Range sections of CoverageJSON which are the two sections which can't be described by pure JSON Schema.


[1]: https://tools.ietf.org/html/draft-wright-json-schema-00#section-4.2
[2]: https://swagger.io/docs/specification/data-models/dictionaries/
Received on Tuesday, 30 July 2019 10:36:30 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:31:01 UTC