{
  "components": {
    "schemas": {
      "BookRequest": {
        "properties": {
          "createdByRole": {
            "type": "string"
          },
          "durationMinutes": {
            "format": "int32",
            "maximum": 480,
            "minimum": 5,
            "type": "integer"
          },
          "meetingLink": {
            "type": "string"
          },
          "mentorId": {
            "type": "string"
          },
          "scheduledAt": {
            "$ref": "#/components/schemas/LocalDateTime"
          },
          "topic": {
            "type": "string"
          },
          "ventureId": {
            "$ref": "#/components/schemas/UUID"
          },
          "ventureName": {
            "type": "string"
          }
        },
        "required": [
          "mentorId",
          "ventureId",
          "scheduledAt"
        ],
        "type": "object"
      },
      "DecisionRequest": {
        "properties": {
          "decidedBy": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "score": {
            "format": "float",
            "type": "number"
          }
        },
        "type": "object"
      },
      "LocalDate": {
        "example": "2022-03-10",
        "format": "date",
        "type": "string"
      },
      "LocalDateTime": {
        "example": "2022-03-10T12:15:50",
        "format": "date-time",
        "type": "string"
      },
      "LogRequest": {
        "properties": {
          "actionItems": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "adviceGiven": {
            "type": "string"
          },
          "followUpDate": {
            "$ref": "#/components/schemas/LocalDate"
          },
          "founderRating": {
            "format": "int32",
            "maximum": 5,
            "minimum": 1,
            "type": "integer"
          },
          "meetingLink": {
            "type": "string"
          },
          "mentorRating": {
            "format": "int32",
            "maximum": 5,
            "minimum": 1,
            "type": "integer"
          },
          "nextSteps": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "usefulness": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "OverrideRequest": {
        "properties": {
          "decidedBy": {
            "type": "string"
          },
          "mentorId": {
            "$ref": "#/components/schemas/UUID"
          },
          "reason": {
            "type": "string"
          },
          "score": {
            "format": "float",
            "type": "number"
          }
        },
        "required": [
          "mentorId"
        ],
        "type": "object"
      },
      "RecommendRequest": {
        "properties": {
          "district": {
            "type": "string"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "sector": {
            "type": "string"
          },
          "trlLevel": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "RegisterRequest": {
        "properties": {
          "bio": {
            "type": "string"
          },
          "district": {
            "type": "string"
          },
          "domains": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "email": {
            "pattern": "\\S",
            "type": "string"
          },
          "maxConnections": {
            "format": "int32",
            "type": "integer"
          },
          "name": {
            "pattern": "\\S",
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "stagePreference": {
            "items": {
              "format": "int32",
              "type": "integer"
            },
            "type": "array"
          },
          "yearsExperience": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "name",
          "email"
        ],
        "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"
      }
    },
    "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 mentorship 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/matches": {
      "get": {
        "operationId": "MatchResource_list",
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Matches"
        ],
        "summary": "List"
      }
    },
    "/api/v1/matches/recommend": {
      "post": {
        "operationId": "MatchResource_recommend",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecommendRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Matches"
        ],
        "summary": "Recommend"
      }
    },
    "/api/v1/matches/{matchId}/approve": {
      "post": {
        "operationId": "MatchResource_approve",
        "parameters": [
          {
            "in": "path",
            "name": "matchId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UUID"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DecisionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Matches"
        ],
        "summary": "Approve"
      }
    },
    "/api/v1/matches/{matchId}/override": {
      "post": {
        "operationId": "MatchResource_override",
        "parameters": [
          {
            "in": "path",
            "name": "matchId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UUID"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OverrideRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Matches"
        ],
        "summary": "Override"
      }
    },
    "/api/v1/matches/{matchId}/reject": {
      "post": {
        "operationId": "MatchResource_reject",
        "parameters": [
          {
            "in": "path",
            "name": "matchId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UUID"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DecisionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Matches"
        ],
        "summary": "Reject"
      }
    },
    "/api/v1/mentors": {
      "get": {
        "operationId": "MentorResource_listMentors",
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Mentors"
        ],
        "summary": "List mentors"
      }
    },
    "/api/v1/mentors/connect": {
      "post": {
        "operationId": "MentorResource_connect",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Mentors"
        ],
        "summary": "Connect"
      }
    },
    "/api/v1/mentors/register": {
      "post": {
        "operationId": "MentorResource_register",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Mentors"
        ],
        "summary": "Register"
      }
    },
    "/api/v1/mentors/{mentorId}": {
      "get": {
        "operationId": "MentorResource_getMentor",
        "parameters": [
          {
            "in": "path",
            "name": "mentorId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Mentors"
        ],
        "summary": "Get mentor"
      }
    },
    "/api/v1/mentors/{mentorId}/availability": {
      "put": {
        "operationId": "MentorResource_updateAvailability",
        "parameters": [
          {
            "in": "path",
            "name": "mentorId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UUID"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": {
                  "type": "boolean"
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Mentors"
        ],
        "summary": "Update availability"
      }
    },
    "/api/v1/mentors/{mentorId}/impact": {
      "get": {
        "operationId": "MentorResource_getImpact",
        "parameters": [
          {
            "in": "path",
            "name": "mentorId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Mentors"
        ],
        "summary": "Get impact"
      }
    },
    "/api/v1/mentors/{mentorId}/mentees": {
      "get": {
        "operationId": "MentorResource_getMentees",
        "parameters": [
          {
            "in": "path",
            "name": "mentorId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Mentors"
        ],
        "summary": "Get mentees"
      }
    },
    "/api/v1/mentors/{mentorId}/mentees/{menteeId}": {
      "get": {
        "operationId": "MentorResource_getMenteeDetail",
        "parameters": [
          {
            "in": "path",
            "name": "menteeId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "mentorId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Mentors"
        ],
        "summary": "Get mentee detail"
      }
    },
    "/api/v1/sessions": {
      "post": {
        "operationId": "SessionResource_book",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BookRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Sessions"
        ],
        "summary": "Book"
      }
    },
    "/api/v1/sessions/mentor/{mentorId}": {
      "get": {
        "operationId": "SessionResource_listForMentor",
        "parameters": [
          {
            "in": "path",
            "name": "mentorId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Sessions"
        ],
        "summary": "List for mentor"
      }
    },
    "/api/v1/sessions/venture/{ventureId}": {
      "get": {
        "operationId": "SessionResource_listForVenture",
        "parameters": [
          {
            "in": "path",
            "name": "ventureId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UUID"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Sessions"
        ],
        "summary": "List for venture"
      }
    },
    "/api/v1/sessions/{sessionId}": {
      "get": {
        "operationId": "SessionResource_get",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UUID"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Sessions"
        ],
        "summary": "Get"
      }
    },
    "/api/v1/sessions/{sessionId}/cancel": {
      "post": {
        "operationId": "SessionResource_cancel",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UUID"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Sessions"
        ],
        "summary": "Cancel"
      }
    },
    "/api/v1/sessions/{sessionId}/complete": {
      "post": {
        "operationId": "SessionResource_complete",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UUID"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LogRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Sessions"
        ],
        "summary": "Complete"
      }
    },
    "/api/v1/sessions/{sessionId}/join": {
      "get": {
        "operationId": "SessionResource_join",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UUID"
            }
          },
          {
            "in": "query",
            "name": "name",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "role",
            "schema": {
              "default": "founder",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-User-Id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Sessions"
        ],
        "summary": "Join"
      }
    }
  },
  "security": [
    {
      "keycloak-bearer": []
    }
  ],
  "tags": [
    {
      "name": "Matches",
      "description": "Mentor-venture matching: recommendations and approval."
    },
    {
      "name": "Mentors",
      "description": "Mentor registry, registration and connection requests."
    },
    {
      "name": "Sessions",
      "description": "Mentor session booking and listing by mentor or venture."
    }
  ]
}
