{
  "$schema":"https://json-schema.org/draft/2020-12/schema",
  "$id":"https://code-as-usual.invalid/schemas/installation-package-template-catalog-v2.schema.json",
  "title":"Code as Usual versioned package registry",
  "type":"object",
  "additionalProperties":false,
  "required":["format","formatVersion","templates"],
  "properties":{
    "format":{"const":"code-as-usual.installation-package-template-catalog"},
    "formatVersion":{"const":2},
    "templates":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","templateVersion","name","description","templateFormatVersion","href","packageKey","packageVersion","releaseChannel","recommended","platform","sha256"],"properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]*$"},"templateVersion":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$"},"name":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"templateFormatVersion":{"type":"integer","minimum":1},"href":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]*\\.cau-package\\.json$"},"packageKey":{"type":"string","pattern":"^[a-z][a-z0-9._-]{0,119}$"},"packageVersion":{"type":"string","minLength":1},"releaseChannel":{"type":"string","pattern":"^[a-z][a-z0-9._-]{0,39}$"},"recommended":{"type":"boolean"},"platform":{"enum":["all","linux-amd64","linux-arm64"]},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"}}}}
  }
}
