{
  "$ref": "#/definitions/CGManifest",
  "$schema": "http://json-schema.org/draft-04/schema#",
  "definitions": {
    "CGManifest": {
      "properties": {
        "registrations": {
          "items": {
            "$ref": "#/definitions/Registration"
          },
          "type": "array"
        },
        "version": {
          "type": "integer"
        }
      },
      "required": ["registrations", "version"],
      "title": "CGManifest",
      "type": "object"
    },
    "Registration": {
      "title": "Registration",
      "type": "object",
      "properties": {
        "component": {
          "$ref": "#/definitions/Component"
        },
        "dependencyRoots": {
          "items": {
            "$ref": "#/definitions/Component"
          },
          "type": "array"
        },
        "developmentDependency": {
          "type": "boolean"
        }
      },
      "required": ["component"]
    },
    "Component": {
      "title": "Component",
      "type": "object",
      "oneOf": [
        {
          "$ref": "#/definitions/Cargo"
        },
        {
          "$ref": "#/definitions/Git"
        },
        {
          "$ref": "#/definitions/Go"
        },
        {
          "$ref": "#/definitions/Linux"
        },
        {
          "$ref": "#/definitions/Maven"
        },
        {
          "$ref": "#/definitions/Npm"
        },
        {
          "$ref": "#/definitions/NuGet"
        },
        {
          "$ref": "#/definitions/Other"
        },
        {
          "$ref": "#/definitions/Pip"
        },
        {
          "$ref": "#/definitions/Pod"
        },
        {
          "$ref": "#/definitions/RubyGems"
        },
        {
          "$ref": "#/definitions/VCPKG"
        }
      ]
    },
    "Cargo": {
      "title": "Cargo",
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": ["cargo"]
        },
        "cargo": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": ["name", "version"]
        }
      },
      "required": ["type", "cargo"]
    },
    "Git": {
      "title": "Git",
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": ["git"]
        },
        "git": {
          "type": "object",
          "properties": {
            "commitHash": {
              "type": "string"
            },
            "repositoryUrl": {
              "type": "string",
              "format": "uri"
            }
          },
          "required": ["commitHash", "repositoryUrl"]
        }
      },
      "required": ["type", "git"]
    },
    "Go": {
      "title": "Go",
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": ["go"]
        },
        "go": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": ["name", "version"]
        }
      },
      "required": ["type", "go"]
    },
    "Linux": {
      "title": "Linux",
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": ["linux"]
        },
        "linux": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "version": {
              "type": "string"
            },
            "distribution": {
              "type": "string"
            },
            "release": {
              "type": "string"
            },
            "key-URL": {
              "type": "string",
              "format": "uri"
            },
            "pool-URL": {
              "type": "string",
              "format": "uri"
            }
          },
          "required": ["name", "version", "distribution", "release"]
        }
      },
      "required": ["type", "linux"]
    },
    "Maven": {
      "title": "Maven",
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": ["maven"]
        },
        "maven": {
          "type": "object",
          "properties": {
            "groupId": {
              "type": "string"
            },
            "artifactId": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": ["groupId", "artifactId", "version"]
        }
      },
      "required": ["type", "maven"]
    },
    "Npm": {
      "title": "Npm",
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": ["npm"]
        },
        "npm": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": ["name", "version"]
        }
      },
      "required": ["type", "npm"]
    },
    "NuGet": {
      "title": "NuGet",
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": ["nuget"]
        },
        "nuget": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": ["name", "version"]
        }
      },
      "required": ["type", "nuget"]
    },
    "Other": {
      "title": "Other",
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": ["other"]
        },
        "other": {
          "title": "Other",
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "version": {
              "type": "string"
            },
            "downloadUrl": {
              "format": "uri",
              "type": "string"
            },
            "hash": {
              "type": "string"
            }
          },
          "required": ["name", "version", "downloadUrl", "hash"]
        }
      },
      "required": ["type", "other"]
    },
    "Pip": {
      "title": "Pip",
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": ["pip"]
        },
        "pip": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": ["name", "version"]
        }
      },
      "required": ["type", "pip"]
    },
    "Pod": {
      "title": "Pod",
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": ["pod"]
        },
        "pod": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": ["name", "version"]
        }
      },
      "required": ["type", "pod"]
    },
    "RubyGems": {
      "title": "RubyGems",
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": ["rubygems"]
        },
        "rubygems": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": ["name", "version"]
        }
      },
      "required": ["type", "rubygems"]
    },
    "VCPKG": {
      "title": "VCPKG",
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": ["vcpkg"]
        },
        "vcpkg": {
          "type": "object",
          "properties": {
            "spdxId": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "version": {
              "type": "string"
            },
            "downloadLocation": {
              "type": "string"
            },
            "triplet": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "portVersion": {
              "type": "integer"
            }
          },
          "required": ["spdxId", "name"]
        }
      },
      "required": ["type", "vcpkg"]
    }
  },
  "id": "https://json.schemastore.org/component-detection-manifest.json",
  "title": "Component Detection manifest"
}
