{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://interchange.stellarview.net/schemas/reading.schema.json",
  "title": "A reading: one point's value at one time",
  "allOf": [{ "$ref": "common.schema.json#/$defs/provenance" }],
  "type": "object",
  "required": ["kind", "reading_id", "event_type", "point", "value", "unit", "at", "quality", "asset", "source", "read_at", "validated_at"],
  "unevaluatedProperties": false,
  "properties": {
    "kind": { "const": "reading" },
    "reading_id": { "$ref": "common.schema.json#/$defs/uuid" },
    "event_type": { "$ref": "common.schema.json#/$defs/event_type_id", "description": "A catalogue type of class reading." },
    "point": { "type": "string", "minLength": 1 },
    "value": { "type": "number" },
    "unit": { "type": "string", "description": "A unit id in the catalogue's units.json." },
    "at": { "$ref": "common.schema.json#/$defs/time" },
    "quality": { "enum": ["good", "uncertain", "bad", "not_sent"] },
    "asset": { "$ref": "common.schema.json#/$defs/asset_ref" },
    "source": true,
    "read_at": true,
    "validated_at": true
  }
}
