{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/wso2/main/json-schema/wso2-policy-adherence-list-schema.json",
  "title": "PolicyAdherenceList",
  "description": "Policy adherence status of a list of policies.",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/wso2-policy-adherence-api-openapi.yml#/components/schemas/PolicyAdherenceList",
  "type": "object",
  "properties": {
    "count": {
      "type": "integer",
      "description": "Number of policies returned."
    },
    "list": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PolicyAdherenceStatus"
      }
    },
    "pagination": {
      "$ref": "#/$defs/Pagination"
    }
  },
  "$defs": {
    "ArtifactComplianceSummaryForPolicy": {
      "type": "object",
      "description": "Summary of compliance of artifacts evaluated against a specific policy.",
      "properties": {
        "compliant": {
          "type": "integer",
          "description": "Number of compliant artifacts."
        },
        "nonCompliant": {
          "type": "integer",
          "description": "Number of non-compliant artifacts."
        }
      }
    },
    "Pagination": {
      "title": "Pagination",
      "type": "object",
      "properties": {
        "offset": {
          "type": "integer"
        },
        "limit": {
          "type": "integer"
        },
        "total": {
          "type": "integer"
        },
        "next": {
          "type": "string",
          "description": "Link to the next subset of resources qualified.\nEmpty if no more resources are to be returned.\n"
        },
        "previous": {
          "type": "string",
          "description": "Link to the previous subset of resources qualified.\nEmpty if current subset is the first subset returned.\n"
        }
      }
    },
    "PolicyAdherenceStatus": {
      "type": "object",
      "description": "Provides adherence status of a policy.",
      "properties": {
        "id": {
          "type": "string",
          "description": "UUID of the policy."
        },
        "name": {
          "type": "string",
          "description": "Name of the policy."
        },
        "status": {
          "type": "string",
          "description": "Status of the policy's governance compliance.",
          "enum": [
            "FOLLOWED",
            "VIOLATED",
            "UNAPPLIED"
          ]
        },
        "artifactComplianceSummary": {
          "$ref": "#/$defs/ArtifactComplianceSummaryForPolicy"
        }
      }
    }
  }
}