{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/oracle/main/json-schema/oracle-remediation-run-schema.json",
  "title": "RemediationRun",
  "description": "A remediation run represents an execution of a Remediation Recipe to detect and fix vulnerabilities based on current state of the \nVulnerabilities curated in the Knowledge Base.\nA Run can be triggered manually or when a new CVE is discovered.\n",
  "x-generated": "2026-10-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oracle-applicationdependencymanagement-api-openapi.yml#/components/schemas/RemediationRun",
  "properties": {
    "compartmentId": {
      "description": "The compartment Oracle Cloud Identifier ([OCID](/Content/General/Concepts/identifiers.htm)) of the remediation run.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "currentStageType": {
      "description": "The type of the current stage of the remediation run.",
      "enum": [
        "DETECT",
        "RECOMMEND",
        "VERIFY",
        "APPLY"
      ],
      "type": "string",
      "x-obmcs-top-level-enum": "#/definitions/RemediationRunStageType"
    },
    "definedTags": {
      "additionalProperties": {
        "additionalProperties": {
          "description": "The value of the tag. Only string, integer and boolean types are supported.\n",
          "type": "object"
        },
        "description": "Key-value pair representing predefined tags' keys and values scoped to a namespace.\nExample: `{\"bar-key\": \"value\"}`\n",
        "type": "object"
      },
      "description": "Defined tags for this resource. Each key is predefined and scoped to a namespace.\nExample: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`\n",
      "type": "object"
    },
    "displayName": {
      "description": "The name of the remediation run.",
      "format": "x-obmcs-ascii-identifier",
      "pattern": "^[a-zA-Z_](-?[a-zA-Z_0-9])*$",
      "type": "string"
    },
    "freeformTags": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only.\nExample: `{\"bar-key\": \"value\"}`\n",
      "type": "object"
    },
    "id": {
      "description": "The Oracle Cloud Identifier ([OCID](/Content/General/Concepts/identifiers.htm)) of the remediation run.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "lifecycleState": {
      "description": "The current lifecycle state of the remediation run.",
      "enum": [
        "ACCEPTED",
        "CANCELED",
        "CANCELING",
        "FAILED",
        "IN_PROGRESS",
        "SUCCEEDED",
        "DELETING",
        "DELETED"
      ],
      "type": "string"
    },
    "remediationRecipeId": {
      "description": "The Oracle Cloud Identifier ([OCID](/Content/General/Concepts/identifiers.htm)) of the Remediation Recipe.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "remediationRunSource": {
      "description": "The source that triggered the Remediation Recipe.",
      "enum": [
        "MANUAL",
        "KNOWLEDGE_BASE"
      ],
      "type": "string"
    },
    "stages": {
      "description": "The list of remediation run stage summaries.",
      "items": {
        "$ref": "#/$defs/StageSummary"
      },
      "type": "array"
    },
    "systemTags": {
      "additionalProperties": {
        "additionalProperties": {
          "description": "The value of the tag. Only string, integer and boolean types are supported.\n",
          "type": "object"
        },
        "description": "Key-value pair representing system tags' keys and values scoped to a namespace.\nExample: `{\"bar-key\": \"value\"}`\n",
        "type": "object"
      },
      "description": "Usage of system tag keys. These predefined keys are scoped to namespaces.\nExample: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}`\n",
      "type": "object"
    },
    "timeCreated": {
      "description": "The creation date and time of the remediation run (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)).",
      "format": "date-time",
      "type": "string"
    },
    "timeFinished": {
      "description": "The date and time of the finish of the remediation run (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)).",
      "format": "date-time",
      "type": "string"
    },
    "timeStarted": {
      "description": "The date and time of the start of the remediation run (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)).",
      "format": "date-time",
      "type": "string"
    },
    "timeUpdated": {
      "description": "The date and time the remediation run was last updated (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)).",
      "format": "date-time",
      "type": "string"
    }
  },
  "required": [
    "id",
    "remediationRecipeId",
    "remediationRunSource",
    "timeCreated",
    "timeUpdated",
    "compartmentId",
    "lifecycleState",
    "freeformTags",
    "definedTags"
  ],
  "type": "object",
  "$defs": {
    "StageSummary": {
      "description": "stage summary of a remediation run. A stage is one step of a remediation run.",
      "properties": {
        "summary": {
          "description": "Information about the current step within the given stage.",
          "type": "string"
        },
        "timeCreated": {
          "description": "The creation date and time of the stage (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)).",
          "format": "date-time",
          "type": "string"
        },
        "timeFinished": {
          "description": "The date and time of the finish of the stage (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)).",
          "format": "date-time",
          "type": "string"
        },
        "timeStarted": {
          "description": "The date and time of the start of the stage (formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339)).",
          "format": "date-time",
          "type": "string"
        },
        "type": {
          "description": "The type of stage.",
          "enum": [
            "DETECT",
            "RECOMMEND",
            "VERIFY",
            "APPLY"
          ],
          "type": "string",
          "x-obmcs-top-level-enum": "#/definitions/RemediationRunStageType"
        }
      },
      "required": [
        "timeCreated",
        "type"
      ],
      "type": "object"
    }
  }
}