{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "pytemplate-hub index.json",
  "description": "The data behind the hub's site. Every string comes from pack authors.",
  "type": "object",
  "properties": {
    "format": {
      "const": 1
    },
    "built_on": {
      "type": "string",
      "format": "date"
    },
    "categories": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "label"
        ],
        "additionalProperties": false
      }
    },
    "packs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "owner": {
            "type": "string"
          },
          "repository": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "categories": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "enum": [
                "cli",
                "library",
                "web",
                "worker",
                "data",
                "ai",
                "quant"
              ]
            }
          },
          "keywords": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "stars": {
            "type": [
              "integer",
              "null"
            ]
          },
          "latest": {
            "type": [
              "string",
              "null"
            ]
          },
          "versions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tag": {
                  "type": "string"
                },
                "commit": {
                  "type": "string"
                },
                "digest": {
                  "type": "string"
                },
                "pack_version": {
                  "type": "string"
                },
                "license": {
                  "type": "string"
                },
                "checked_with": {
                  "type": "string"
                },
                "checked_on": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date"
                },
                "profiles": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "lifecycle": {
                        "enum": [
                          "passed",
                          "not-run"
                        ]
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "description": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "kind": {
                        "enum": [
                          "cli",
                          "library",
                          "service",
                          null
                        ]
                      },
                      "supported_python": {
                        "type": [
                          "array",
                          "null"
                        ],
                        "items": {
                          "type": "string"
                        }
                      },
                      "dependencies": {
                        "type": [
                          "array",
                          "null"
                        ],
                        "items": {
                          "type": "string"
                        }
                      },
                      "security_posture": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "lifecycle",
                      "name",
                      "description",
                      "kind",
                      "supported_python",
                      "dependencies",
                      "security_posture"
                    ],
                    "additionalProperties": false
                  }
                },
                "reviewed_by": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "yanked": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tier": {
                  "enum": [
                    "listed",
                    "reviewed"
                  ]
                }
              },
              "required": [
                "tag",
                "commit",
                "digest",
                "pack_version",
                "license",
                "checked_with",
                "checked_on",
                "profiles",
                "reviewed_by",
                "yanked",
                "tier"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "owner",
          "repository",
          "name",
          "description",
          "categories",
          "keywords",
          "stars",
          "latest",
          "versions"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "format",
    "built_on",
    "categories",
    "packs"
  ],
  "additionalProperties": false
}
