JSON Schema is a way to define the structure of a JSON document. It enables typechecking and code intelligence on JSON documents.
Sourcegraph uses the following JSON Schemas:
- Edit the *.schema.json file in this directory.
- Run go generate to update the *_stringdata.json file.
- Commit the changes to both files.
- Run sg start to automatically update TypeScript schema files.
- When the change is ready for release, update the documentation.
- The JSON Schema IDs (URIs) are of the form https://sourcegraph.com/v1/*.schema.json#, but these are not actually valid URLs. This means you generally need to supply them to JSON Schema validation libraries manually instead of having the validator fetch the schema from the web.