{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/calypsoai-com/json-schema/calypsoai-com-get-scanner-packages-response-schema.json",
  "title": "GetScannerPackagesResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/calypsoai-com-scanner-packages-api-openapi.yml#/components/schemas/GetScannerPackagesResponse",
  "properties": {
    "next": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Cursor to the next page, if any.",
      "title": "Next"
    },
    "packages": {
      "description": "Packages matching the given filter criteria.",
      "items": {
        "$ref": "#/$defs/ScannerPackage"
      },
      "title": "Packages",
      "type": "array"
    },
    "prev": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Cursor to the previous page, if any.",
      "title": "Prev"
    }
  },
  "required": [
    "packages"
  ],
  "type": "object",
  "$defs": {
    "InternalScannerSource": {
      "properties": {
        "type": {
          "const": "internal",
          "default": "internal",
          "title": "Type",
          "type": "string"
        }
      },
      "title": "InternalScannerSource",
      "type": "object"
    },
    "RemediationScannerSource": {
      "properties": {
        "sourceId": {
          "format": "uuid",
          "title": "Sourceid",
          "type": "string"
        },
        "type": {
          "const": "remediation",
          "default": "remediation",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "sourceId"
      ],
      "title": "RemediationScannerSource",
      "type": "object"
    },
    "ScannerAvailability": {
      "properties": {
        "global": {
          "default": false,
          "description": "If True guardrail can be used by all projects",
          "title": "Global",
          "type": "boolean"
        },
        "projectIds": {
          "default": [],
          "items": {
            "format": "uuid",
            "type": "string"
          },
          "title": "Projectids",
          "type": "array",
          "uniqueItems": true
        }
      },
      "title": "ScannerAvailability",
      "type": "object"
    },
    "ScannerDirection": {
      "enum": [
        "both",
        "request",
        "response"
      ],
      "title": "ScannerDirection",
      "type": "string"
    },
    "ScannerPackage": {
      "properties": {
        "availability": {
          "$ref": "#/$defs/ScannerAvailability",
          "default": {
            "global": false,
            "projectIds": []
          }
        },
        "direction": {
          "$ref": "#/$defs/ScannerDirection"
        },
        "id": {
          "format": "uuid",
          "title": "Id",
          "type": "string"
        },
        "name": {
          "title": "Name",
          "type": "string"
        },
        "performanceScannerIds": {
          "anyOf": [
            {
              "items": {
                "format": "uuid",
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Performancescannerids"
        },
        "projectId": {
          "anyOf": [
            {
              "format": "uuid",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Projectid"
        },
        "scannerCounts": {
          "additionalProperties": {
            "type": "integer"
          },
          "default": {},
          "title": "Scannercounts",
          "type": "object"
        },
        "scannerIds": {
          "items": {
            "format": "uuid",
            "type": "string"
          },
          "title": "Scannerids",
          "type": "array"
        },
        "source": {
          "oneOf": [
            {
              "$ref": "#/$defs/InternalScannerSource"
            },
            {
              "$ref": "#/$defs/ZipScannerSource"
            },
            {
              "$ref": "#/$defs/VendorScannerSource"
            },
            {
              "$ref": "#/$defs/RemediationScannerSource"
            }
          ],
          "title": "Source"
        },
        "vendored": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ],
          "default": false,
          "title": "Vendored"
        }
      },
      "required": [
        "id",
        "name",
        "source",
        "direction",
        "scannerIds"
      ],
      "title": "ScannerPackage",
      "type": "object"
    },
    "VendorScannerSource": {
      "properties": {
        "type": {
          "const": "vendor",
          "default": "vendor",
          "title": "Type",
          "type": "string"
        }
      },
      "title": "VendorScannerSource",
      "type": "object"
    },
    "ZipScannerSource": {
      "properties": {
        "type": {
          "const": "zip",
          "default": "zip",
          "title": "Type",
          "type": "string"
        }
      },
      "title": "ZipScannerSource",
      "type": "object"
    }
  }
}