{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/calypsoai-com/json-schema/calypsoai-com-patch-project-body-schema.json",
  "title": "PatchProjectBody",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/calypsoai-com-projects-api-openapi.yml#/components/schemas/PatchProjectBody",
  "properties": {
    "config": {
      "anyOf": [
        {
          "$ref": "#/$defs/ProjectConfig"
        },
        {
          "type": "null"
        }
      ],
      "description": "New config for the project. Partial configurations are accepted."
    },
    "deploymentStatus": {
      "anyOf": [
        {
          "$ref": "#/$defs/ProjectDeploymentStatus"
        },
        {
          "type": "null"
        }
      ],
      "description": "New deployment status for the project."
    },
    "friendlyId": {
      "anyOf": [
        {
          "maxLength": 100,
          "minLength": 1,
          "pattern": "^[a-zA-Z0-9-_]+$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The name can be used to identify the project instead of the id. It is case-sensitive, unique and can only contain letters, numbers and dashes.",
      "title": "Friendlyid"
    },
    "name": {
      "anyOf": [
        {
          "maxLength": 100,
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Name"
    }
  },
  "type": "object",
  "$defs": {
    "ProjectConfig": {
      "properties": {
        "id": {
          "anyOf": [
            {
              "format": "uuid",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Id"
        },
        "packages": {
          "default": [],
          "description": "Packages configured for the project",
          "items": {
            "$ref": "#/$defs/ProjectConfigScanner"
          },
          "title": "Packages",
          "type": "array"
        },
        "providers": {
          "default": [],
          "description": "Providers available to the project",
          "items": {
            "$ref": "#/$defs/ProjectConfigProvider"
          },
          "title": "Providers",
          "type": "array"
        },
        "scanners": {
          "default": [],
          "description": "Guardrails configured for the project",
          "items": {
            "$ref": "#/$defs/ProjectConfigScanner"
          },
          "title": "Scanners",
          "type": "array"
        }
      },
      "title": "ProjectConfig",
      "type": "object"
    },
    "ProjectConfigProvider": {
      "properties": {
        "capabilities": {
          "anyOf": [
            {
              "items": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/ProviderCapability"
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "type": "array",
              "uniqueItems": true
            },
            {
              "type": "null"
            }
          ],
          "title": "Capabilities"
        },
        "default": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Default"
        },
        "enabled": {
          "title": "Enabled",
          "type": "boolean"
        },
        "id": {
          "anyOf": [
            {
              "format": "uuid",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name"
        },
        "type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Type"
        }
      },
      "required": [
        "enabled"
      ],
      "title": "ProjectConfigProvider",
      "type": "object"
    },
    "ProjectConfigScanner": {
      "properties": {
        "blocking": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Blocking"
        },
        "direction": {
          "anyOf": [
            {
              "$ref": "#/$defs/ScannerDirection"
            },
            {
              "const": "",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Direction"
        },
        "enabled": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Enabled"
        },
        "flagMessage": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Flagmessage"
        },
        "force": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Force"
        },
        "id": {
          "format": "uuid",
          "title": "Id",
          "type": "string"
        },
        "mode": {
          "anyOf": [
            {
              "$ref": "#/$defs/ScanMode"
            },
            {
              "type": "null"
            }
          ]
        },
        "version": {
          "anyOf": [
            {
              "format": "uuid",
              "type": "string"
            },
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "maxLength": 100,
              "minLength": 1,
              "pattern": "^[a-zA-Z0-9-_]+$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Version"
        }
      },
      "required": [
        "id"
      ],
      "title": "ProjectConfigScanner",
      "type": "object"
    },
    "ProjectDeploymentStatus": {
      "enum": [
        "live",
        "draft"
      ],
      "title": "ProjectDeploymentStatus",
      "type": "string"
    },
    "ProviderCapability": {
      "enum": [
        "chat",
        "red_team",
        "siem",
        "openai_chat",
        "openai_responses",
        "anthropic_messages",
        "google_generate_content"
      ],
      "title": "ProviderCapability",
      "type": "string"
    },
    "ScanMode": {
      "enum": [
        "block",
        "audit",
        "redact"
      ],
      "title": "ScanMode",
      "type": "string"
    },
    "ScannerDirection": {
      "enum": [
        "both",
        "request",
        "response"
      ],
      "title": "ScannerDirection",
      "type": "string"
    }
  }
}