{
  "components": {
    "schemas": {
      "ApprovalRequest": {
        "properties": {
          "action": {
            "pattern": "\\S",
            "type": "string"
          },
          "approvedBy": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "action"
        ],
        "type": "object"
      },
      "EnrollRequest": {
        "properties": {
          "acceptedRecommendation": {
            "type": "boolean"
          },
          "programId": {
            "$ref": "#/components/schemas/UUID"
          },
          "ventureId": {
            "$ref": "#/components/schemas/UUID"
          }
        },
        "required": [
          "ventureId",
          "programId"
        ],
        "type": "object"
      },
      "FounderProfileRequest": {
        "properties": {
          "district": {
            "maxLength": 100,
            "type": "string"
          },
          "phone": {
            "maxLength": 20,
            "pattern": "^$|^(?=(?:\\D*\\d){8,15}\\D*$)\\+?[0-9(][0-9 ()\\-]*$",
            "type": "string"
          }
        },
        "type": "object"
      },
      "RegisterFounderRequest": {
        "properties": {
          "district": {
            "type": "string"
          },
          "email": {
            "pattern": "\\S",
            "type": "string"
          },
          "name": {
            "pattern": "\\S",
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "problem": {
            "type": "string"
          },
          "sector": {
            "pattern": "\\S",
            "type": "string"
          },
          "solution": {
            "type": "string"
          },
          "teamSize": {
            "exclusiveMinimum": true,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "ventureName": {
            "pattern": "\\S",
            "type": "string"
          }
        },
        "required": [
          "name",
          "email",
          "ventureName",
          "sector"
        ],
        "type": "object"
      },
      "TrlAssessmentRequest": {
        "properties": {
          "responses": {
            "items": {
              "$ref": "#/components/schemas/TrlResponse"
            },
            "maxItems": 9,
            "minItems": 9,
            "type": "array"
          },
          "ventureId": {
            "$ref": "#/components/schemas/UUID"
          }
        },
        "required": [
          "ventureId",
          "responses"
        ],
        "type": "object"
      },
      "TrlResponse": {
        "properties": {
          "dimension": {
            "pattern": "\\S",
            "type": "string"
          },
          "score": {
            "format": "int32",
            "maximum": 5,
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "dimension"
        ],
        "type": "object"
      },
      "UUID": {
        "format": "uuid",
        "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}",
        "type": "string"
      },
      "VentureRequest": {
        "properties": {
          "businessModel": {
            "type": "string"
          },
          "name": {
            "pattern": "\\S",
            "type": "string"
          },
          "problem": {
            "type": "string"
          },
          "sector": {
            "pattern": "\\S",
            "type": "string"
          },
          "solution": {
            "type": "string"
          },
          "teamSize": {
            "format": "int32",
            "maximum": 10000,
            "minimum": 1,
            "type": "integer"
          },
          "trlLevel": {
            "format": "int32",
            "maximum": 9,
            "minimum": 1,
            "type": "integer"
          },
          "websiteUrl": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "sector"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "keycloak-bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Access token issued by the Keycloak realm `startupos`. Send it as `Authorization: Bearer <token>`. A missing, expired or invalid token returns 401; a valid token without the required role returns 403."
      },
      "stream-token": {
        "type": "apiKey",
        "in": "query",
        "name": "token",
        "description": "Short-lived, enrolment-scoped stream token minted by the matching authenticated `stream-token` operation. Used because a cross-origin video element cannot send an Authorization header."
      },
      "livekit-signature": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "JWT signed by the LiveKit server, sent without a `Bearer ` prefix and verified by the service. Only the LiveKit server calls this operation."
      }
    }
  },
  "info": {
    "title": "StartupOS onboarding service",
    "version": "a54687de",
    "description": "Generated at build time from the service's JAX-RS resources (SmallRye OpenAPI) and annotated by the overlay in docs-site/openapi/overlays. Every operation requires a Keycloak access token unless the operation says otherwise. Health and metrics endpoints are internal and are not documented."
  },
  "openapi": "3.0.3",
  "paths": {
    "/api/v1/founders/me": {
      "get": {
        "operationId": "FounderResource_getMyProfile",
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Founders"
        ],
        "summary": "Get my profile"
      },
      "put": {
        "operationId": "FounderResource_updateMyProfile",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FounderProfileRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Founders"
        ],
        "summary": "Update my profile"
      }
    },
    "/api/v1/founders/summary": {
      "get": {
        "operationId": "FounderResource_getSummary",
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Founders"
        ],
        "summary": "Get summary"
      }
    },
    "/api/v1/onboarding/enroll": {
      "post": {
        "operationId": "OnboardingResource_enroll",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnrollRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Onboarding"
        ],
        "summary": "Enroll",
        "security": [],
        "description": "Public by design: called by the wizard before the founder has a token. Limited to a venture that has not finished the wizard."
      }
    },
    "/api/v1/onboarding/instant-value/{founderId}": {
      "get": {
        "operationId": "OnboardingResource_getInstantValue",
        "parameters": [
          {
            "in": "path",
            "name": "founderId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UUID"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Onboarding"
        ],
        "summary": "Get instant value"
      }
    },
    "/api/v1/onboarding/programs": {
      "get": {
        "operationId": "OnboardingResource_getPrograms",
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Onboarding"
        ],
        "summary": "Get programs",
        "security": [],
        "description": "Public by design: lists programmes for the onboarding wizard."
      }
    },
    "/api/v1/onboarding/register": {
      "post": {
        "operationId": "OnboardingResource_register",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterFounderRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Onboarding"
        ],
        "summary": "Register",
        "security": [],
        "description": "Public by design: the onboarding wizard calls it before the founder has a token."
      }
    },
    "/api/v1/onboarding/trl-assessment": {
      "post": {
        "operationId": "OnboardingResource_submitTrlAssessment",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TrlAssessmentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Onboarding"
        ],
        "summary": "Submit trl assessment",
        "security": [],
        "description": "Public by design: called by the wizard before the founder has a token. Limited to a venture that has not finished the wizard."
      }
    },
    "/api/v1/ventures": {
      "get": {
        "operationId": "VentureResource_listAll",
        "parameters": [
          {
            "in": "query",
            "name": "approvalStatus",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "tenantId",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Ventures"
        ],
        "summary": "List all"
      },
      "post": {
        "operationId": "VentureResource_create",
        "parameters": [
          {
            "in": "header",
            "name": "X-Tenant-Id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VentureRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Ventures"
        ],
        "summary": "Create"
      }
    },
    "/api/v1/ventures/founder/{founderId}": {
      "get": {
        "operationId": "VentureResource_getByFounder",
        "parameters": [
          {
            "in": "path",
            "name": "founderId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Ventures"
        ],
        "summary": "Get by founder"
      }
    },
    "/api/v1/ventures/{id}": {
      "delete": {
        "operationId": "VentureResource_delete",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UUID"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Ventures"
        ],
        "summary": "Delete"
      },
      "get": {
        "operationId": "VentureResource_getById",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UUID"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Ventures"
        ],
        "summary": "Get by id"
      },
      "put": {
        "operationId": "VentureResource_update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UUID"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VentureRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Ventures"
        ],
        "summary": "Update"
      }
    },
    "/api/v1/ventures/{id}/approve": {
      "post": {
        "operationId": "VentureResource_approveOrReject",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UUID"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApprovalRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Ventures"
        ],
        "summary": "Approve or reject"
      }
    },
    "/api/v1/ventures/{id}/submit": {
      "post": {
        "operationId": "VentureResource_submitForApproval",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UUID"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Ventures"
        ],
        "summary": "Submit for approval"
      }
    }
  },
  "security": [
    {
      "keycloak-bearer": []
    }
  ],
  "tags": [
    {
      "name": "Founders",
      "description": "Founder profile and summary."
    },
    {
      "name": "Onboarding",
      "description": "Programme enrolment and the first-value onboarding steps."
    },
    {
      "name": "Ventures",
      "description": "Venture records owned by founders."
    }
  ]
}
