{
  "$comment": "GENERATED FILE — DO NOT EDIT DIRECTLY. Source: packages/schemas/src. Regenerate with `npm run generate:json-schema --workspace=@spacecorp/schemas`.",
  "$id": "https://spacecorp.io/schemas/source.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "schema_version": {
      "type": "number",
      "const": 1
    },
    "id": {
      "type": "string",
      "pattern": "^src-[a-z0-9][a-z0-9-]*$"
    },
    "title": {
      "type": "string",
      "minLength": 1
    },
    "source_kind": {
      "type": "string",
      "enum": [
        "manufacturer-documentation",
        "official-documentation",
        "standard",
        "measurement-record",
        "observation-record",
        "specialist-publication",
        "secondary-reference",
        "community-report",
        "web-page",
        "dataset",
        "correspondence"
      ]
    },
    "publisher": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "null"
        }
      ]
    },
    "url": {
      "anyOf": [
        {
          "type": "string",
          "format": "uri"
        },
        {
          "type": "null"
        }
      ]
    },
    "local_reference": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "uri": {
              "type": "string",
              "pattern": "^(repo|archive|drive|url):\\S+$"
            },
            "page": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "section": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "uri"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "retrieved": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "authority_tier": {
      "type": "string",
      "enum": [
        "primary",
        "official",
        "standard",
        "specialist",
        "secondary",
        "community",
        "unknown"
      ]
    },
    "notes": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "schema_version",
    "id",
    "title",
    "source_kind",
    "publisher",
    "url",
    "local_reference",
    "retrieved",
    "authority_tier",
    "notes"
  ],
  "additionalProperties": false
}
