freelawproject / courts-db

A database of courts, tests and other experiments
BSD 2-Clause "Simplified" License
58 stars 15 forks source link

Add a JSON Schema #2

Open anseljh opened 4 years ago

anseljh commented 4 years ago

It would be cool to provide a JSON Schema for the court objects. Folks could then more easily do cool stuff like importing that schema right into an OpenAPI Specification document for an API they're developing. We'd also get validation pretty much for free. There are lots of validators out there.

See OpenAPI Specification, Version 3.0.3, § 4.7.24 Schema Object:

Alternatively, any time a Schema Object can be used, a Reference Object can be used in its place. This allows referencing definitions instead of defining them inline.

I can take a first whack at this myself.