{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Image Content Manifest v1 definition",

  "type": ["object", "null"],
  "properties": {
    "metadata": {
      "description": "Information about the Image Content Manifest (ICM) file",
      "type": "object",
      "properties": {
        "icm_version": {
          "description": "ICM Version",
          "type": "integer",
          "default": 1
        },
        "icm_spec": {
          "description": "URL for the ICM specification (this document)",
          "type": "string",
          "example": "https://github.com/containerbuildsystem/atomic-reactor/blob/COMMIT_REF/atomic_reactor/schemas/content_manifest.json"
        },
        "image_layer_index": {
          "description": "Index for the image layer desribed by the current ICM",
          "type": "integer"
        }
      },
      "required": ["icm_version", "icm_spec"],
      "additionalProperties": false
    },
    "image_contents": {
      "description": "Components shipped in the current image",
      "type": "array",
      "items": { "$ref": "#/definitions/component" }
    },
    "content_sets": {
      "description": "Pulp content sets available during the current image build",
      "type": "array",
      "items": { "$ref": "#/definitions/content_set" }
    }
  },
  "required": ["metadata"],
  "additionalProperties": false,

  "definitions": {
    "content_set": {
      "description": "Pulp content set name",
      "type": "string",
      "example": ["nodejs-rpms", "extra-rpms"]
    },
    "purl": {
      "description": "Package URL (purl) as per https://github.com/package-url/purl-spec",
      "type": "string",
      "example": "pkg:golang/github.com%2Frelease-engineering%2Fretrodep%2Fv2@v2.0.2-0.20190619083402-4c2b1944fa5f"
    },
    "dependency": {
      "type": "object",
      "properties": {
        "purl": { "$ref": "#/definitions/purl" }
      },
      "required": ["purl"],
      "additionalProperties": false
    },
    "component": {
      "description": "Component shipped in the current image",
      "type": "object",
      "properties": {
        "purl": { "$ref": "#/definitions/purl" },
        "dependencies": {
          "description": "List of runtime dependencies shipped with the top level component",
          "type": "array",
          "items": { "$ref": "#/definitions/dependency"}
        },
        "sources": {
          "description": "List of build time dependencies used for the component build",
          "type": "array",
          "items": { "$ref": "#/definitions/dependency"}
        }
      },
      "required": ["purl"],
      "additionalProperties": false
    }
  }
}

Add Image Content Manifest definition
Add Image Content Manifest definition

* CLOUDBLD-1115

Signed-off-by: Athos Ribeiro <9cdfc39bfa10853bf9ad64090808d55fee7504ca@redhat.com>
