{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/onplana-com/json-schema/onplana-com-proposal-schema.json",
  "title": "Proposal",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/onplana-com-openapi.json#/components/schemas/Proposal",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "title": {
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "stage": {
      "type": "string",
      "enum": [
        "DRAFT",
        "SUBMITTED",
        "PROPOSAL_REVIEW",
        "BUSINESS_CASE",
        "BUSINESS_CASE_REVIEW",
        "PLANNING",
        "PLAN_REVIEW",
        "APPROVED",
        "ACTIVE",
        "ON_HOLD",
        "COMPLETED",
        "REJECTED"
      ]
    },
    "priority": {
      "type": "string",
      "enum": [
        "LOW",
        "MEDIUM",
        "HIGH",
        "CRITICAL"
      ]
    },
    "riskLevel": {
      "type": "string",
      "enum": [
        "LOW",
        "MEDIUM",
        "HIGH"
      ]
    },
    "strategicAlignment": {
      "type": [
        "string",
        "null"
      ]
    },
    "estimatedBudget": {
      "type": [
        "number",
        "null"
      ]
    },
    "estimatedDuration": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Weeks"
    },
    "expectedBenefits": {
      "type": [
        "string",
        "null"
      ]
    },
    "businessJustification": {
      "type": [
        "string",
        "null"
      ]
    },
    "department": {
      "type": [
        "string",
        "null"
      ]
    },
    "sponsorId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "proposedProjectOwnerId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "projectId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "Set when the proposal has been linked or converted to a project."
    },
    "organizationId": {
      "type": "string",
      "format": "uuid"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "id",
    "title",
    "stage",
    "priority",
    "riskLevel",
    "organizationId",
    "createdAt"
  ]
}