CoverageJSON is compatible with OpenAPI JSON schema :-)

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.
"""

Jeremy.

[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