{ "openapi": "3.1.0", "info": { "title": "Mentora API", "description": "Mentora API", "version": "0.1.0" }, "paths": { "/api/v1/example/": { "get": { "tags": [ "example" ], "summary": "Get Examples", "description": "Retrieve examples.", "operationId": "get_examples_api_v1_example__get", "parameters": [ { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "Skip" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 100, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ExampleResponse" }, "title": "Response Get Examples Api V1 Example Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "example" ], "summary": "Create Example", "description": "Create new example.", "operationId": "create_example_api_v1_example__post", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExampleCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExampleResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/example/{example_id}": { "get": { "tags": [ "example" ], "summary": "Get Example", "description": "Get example by ID.", "operationId": "get_example_api_v1_example__example_id__get", "parameters": [ { "name": "example_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Example Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExampleResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "example" ], "summary": "Update Example", "description": "Update example.", "operationId": "update_example_api_v1_example__example_id__put", "parameters": [ { "name": "example_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Example Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExampleCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExampleResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "example" ], "summary": "Delete Example", "description": "Delete example.", "operationId": "delete_example_api_v1_example__example_id__delete", "parameters": [ { "name": "example_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Example Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/auth/register": { "post": { "tags": [ "auth" ], "summary": "Register", "description": "Register a new user with email confirmation required.\nIf Supabase is configured to require confirmation, tokens will not be returned.\nAlso captures full_name into user metadata.", "operationId": "register_api_v1_auth_register_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterRequest" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/auth/login": { "post": { "tags": [ "auth" ], "summary": "Login", "description": "Login using email/password via Supabase Auth.\nReturns tokens and user info on success.", "operationId": "login_api_v1_auth_login_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/auth/check-email": { "get": { "tags": [ "auth" ], "summary": "Check Email", "description": "Check if an email exists in Supabase Auth. Returns {\"exists\": bool}.\nRequires SUPABASE_SERVICE_ROLE_KEY configured on the server. If not configured, returns 501.", "operationId": "check_email_api_v1_auth_check_email_get", "parameters": [ { "name": "email", "in": "query", "required": true, "schema": { "type": "string", "format": "email", "title": "Email" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/auth/logout": { "post": { "tags": [ "auth" ], "summary": "Logout", "description": "Logout current session by revoking the provided access token in Supabase.\nThe client must provide the current access_token in the request body.", "operationId": "logout_api_v1_auth_logout_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LogoutRequest" } } }, "required": true }, "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/admin/teacher-code": { "post": { "tags": [ "admin" ], "summary": "Create Teacher Code", "description": "Create a teacher signup code (6 chars alphanumeric), only for admin users.\nAdmin identification is performed by verifying the provided Supabase user access token.", "operationId": "create_teacher_code_api_v1_admin_teacher_code_post", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeacherCodeCreateRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeacherCodeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "bearerAuth": [] } ] }, "get": { "tags": [ "admin" ], "summary": "List Teacher Codes", "operationId": "list_teacher_codes_api_v1_admin_teacher_code_get", "parameters": [ { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "default": 50, "title": "Page Size" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/admin/teacher-code/validate": { "post": { "tags": [ "admin" ], "summary": "Validate Consume Teacher Code", "description": "Validate and consume a teacher code atomically. Any authenticated user can call this during signup.\nIf Authorization is provided, it's used to verify session but not required for code use.", "operationId": "validate_consume_teacher_code_api_v1_admin_teacher_code_validate_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeacherCodeValidateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeacherCodeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/admin/teacher-code/{code}": { "patch": { "tags": [ "admin" ], "summary": "Update Teacher Code", "operationId": "update_teacher_code_api_v1_admin_teacher_code__code__patch", "parameters": [ { "name": "code", "in": "path", "required": true, "schema": { "type": "string", "title": "Code" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeacherCodeUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeacherCodeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "bearerAuth": [] } ] }, "delete": { "tags": [ "admin" ], "summary": "Delete Teacher Code", "description": "Delete a teacher code. Requires admin privileges.", "operationId": "delete_teacher_code_api_v1_admin_teacher_code__code__delete", "parameters": [ { "name": "code", "in": "path", "required": true, "schema": { "type": "string", "title": "Code" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/admin/users/admin": { "post": { "tags": [ "admin" ], "summary": "Create Admin User", "description": "Create an admin user. Allowed if caller is an existing admin OR presents the setup token.\nThe setup token allows bootstrapping the first admin in a new environment.", "operationId": "create_admin_user_api_v1_admin_users_admin_post", "parameters": [ { "name": "authorization", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorization" } }, { "name": "X-Admin-Setup-Token", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Admin-Setup-Token" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminCreateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "bearerAuth": [] }, { "adminSetupToken": [] } ] } }, "/api/v1/admin/users/{user_id}/role": { "post": { "tags": [ "admin" ], "summary": "Upsert User Role", "description": "Update a user's role. Supports POST and PATCH for compatibility.", "operationId": "upsert_user_role_api_v1_admin_users__user_id__role_post", "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RoleUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "bearerAuth": [] } ] }, "patch": { "tags": [ "admin" ], "summary": "Upsert User Role", "description": "Update a user's role. Supports POST and PATCH for compatibility.", "operationId": "upsert_user_role_api_v1_admin_users__user_id__role_post", "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RoleUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/admin/users/role": { "get": { "tags": [ "admin" ], "summary": "View User Role", "description": "View a user's role by email (admin-only).", "operationId": "view_user_role_api_v1_admin_users_role_get", "parameters": [ { "name": "email", "in": "query", "required": true, "schema": { "type": "string", "format": "email", "title": "Email" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RoleViewResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/admin/users": { "get": { "tags": [ "admin" ], "summary": "List Users", "description": "List all users (admin-only).", "operationId": "list_users_api_v1_admin_users_get", "parameters": [ { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "default": 1, "title": "Page" } }, { "name": "per_page", "in": "query", "required": false, "schema": { "type": "integer", "default": 50, "title": "Per Page" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/admin/users/{user_id}": { "delete": { "tags": [ "admin" ], "summary": "Delete User", "description": "Delete a user by ID (admin-only).", "operationId": "delete_user_api_v1_admin_users__user_id__delete", "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/admin/activity": { "get": { "tags": [ "admin-extended" ], "summary": "Get Activity", "description": "Get recent platform activity (admin only).", "operationId": "get_activity_api_v1_admin_activity_get", "parameters": [ { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 50, "title": "Page Size" } }, { "name": "limit", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActivityResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/admin/analytics": { "get": { "tags": [ "admin-extended" ], "summary": "Get Analytics", "description": "Get platform analytics (admin only).", "operationId": "get_analytics_api_v1_admin_analytics_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnalyticsResponse" } } } } } } }, "/api/v1/admin/audit-logs": { "get": { "tags": [ "admin-extended" ], "summary": "Get Audit Logs", "description": "Get audit logs with filtering (admin only).", "operationId": "get_audit_logs_api_v1_admin_audit_logs_get", "parameters": [ { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 50, "title": "Page Size" } }, { "name": "action_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Action Type" } }, { "name": "actor_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Actor Id" } }, { "name": "target_user_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Target User Id" } }, { "name": "resource_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resource Type" } }, { "name": "date_from", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Date From" } }, { "name": "date_to", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Date To" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuditLogResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "admin-extended" ], "summary": "Create Audit Log", "description": "Create an audit log entry (admin only).", "operationId": "create_audit_log_api_v1_admin_audit_logs_post", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAuditLogRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/admin/stats": { "get": { "tags": [ "admin-stats" ], "summary": "Get Admin Stats", "description": "Get admin dashboard statistics.", "operationId": "get_admin_stats_api_v1_admin_stats_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v1/admin/classes": { "get": { "tags": [ "classes" ], "summary": "List Classes", "description": "List all classes with pagination and filtering (admin only).", "operationId": "list_classes_api_v1_admin_classes_get", "parameters": [ { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size" } }, { "name": "search", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Search" } }, { "name": "teacher_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Teacher Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/app__api__endpoints__classes__ClassListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "classes" ], "summary": "Create Class", "description": "Create a new class (admin only).", "operationId": "create_class_api_v1_admin_classes_post", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/app__api__endpoints__classes__CreateClassRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "classes" ], "summary": "Update Class", "description": "Update a class (admin only).", "operationId": "update_class_api_v1_admin_classes_patch", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateClassRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "classes" ], "summary": "Delete Class", "description": "Delete a class (admin only).", "operationId": "delete_class_api_v1_admin_classes_delete", "parameters": [ { "name": "class_id", "in": "query", "required": true, "schema": { "type": "string", "title": "Class Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/admin/classes/{class_id}/teachers": { "get": { "tags": [ "classes" ], "summary": "Get Class Teachers", "description": "Get teachers assigned to a class (admin only).", "operationId": "get_class_teachers_api_v1_admin_classes__class_id__teachers_get", "parameters": [ { "name": "class_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Class Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/classes/{class_id}/assignments": { "get": { "tags": [ "classes-public" ], "summary": "List Class Assignments", "description": "List assignments for a class.", "operationId": "list_class_assignments", "parameters": [ { "name": "class_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Class Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssignmentListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "classes-public" ], "summary": "Create Class Assignment", "description": "Create an assignment (teacher only).", "operationId": "create_class_assignment", "parameters": [ { "name": "class_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Class Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssignmentCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssignmentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/classes/{class_id}/posts": { "get": { "tags": [ "classes-public" ], "summary": "List Class Posts", "description": "List posts for a class.", "operationId": "list_class_posts", "parameters": [ { "name": "class_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Class Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PostListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "classes-public" ], "summary": "Create Class Post", "description": "Create a post (teacher only).", "operationId": "create_class_post", "parameters": [ { "name": "class_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Class Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PostCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PostResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/student/classes": { "get": { "tags": [ "student" ], "summary": "Get Student Classes", "description": "Get all classes the student is enrolled in.", "operationId": "get_student_classes_api_v1_student_classes_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v1/student/enroll": { "post": { "tags": [ "student" ], "summary": "Enroll In Class", "description": "Enroll a student in a class using class code. (Deprecated: use POST /classes/{class_code}/enrollments)", "operationId": "enroll_in_class_api_v1_student_enroll_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EnrollRequest" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/student/submissions": { "post": { "tags": [ "student" ], "summary": "Create Submission", "description": "Submit an assignment. (Deprecated: use POST /assignments/{assignment_id}/submissions)", "operationId": "create_submission_api_v1_student_submissions_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubmissionRequest" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/student/stats": { "get": { "tags": [ "student" ], "summary": "Get Student Stats", "description": "Get student dashboard statistics.", "operationId": "get_student_stats_api_v1_student_stats_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v1/student/assignments": { "get": { "tags": [ "student" ], "summary": "Get Student Assignments", "description": "Get all assignments for the student.", "operationId": "get_student_assignments_api_v1_student_assignments_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v1/student/activity": { "get": { "tags": [ "student" ], "summary": "Get Student Activity", "description": "Get recent activity for the student (new assignments, submissions).", "operationId": "get_student_activity_api_v1_student_activity_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v1/student/classes/{class_code}/enrollments": { "post": { "tags": [ "student" ], "summary": "Create Enrollment", "description": "Create an enrollment for the current student into the class specified by class_code.", "operationId": "create_enrollment_api_v1_student_classes__class_code__enrollments_post", "parameters": [ { "name": "class_code", "in": "path", "required": true, "schema": { "type": "string", "title": "Class Code" } } ], "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/student/assignments/{assignment_id}/submissions": { "post": { "tags": [ "student" ], "summary": "Create Assignment Submission", "description": "Create a submission for the given assignment.", "operationId": "create_assignment_submission_api_v1_student_assignments__assignment_id__submissions_post", "parameters": [ { "name": "assignment_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Assignment Id" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/SubmissionRequest" }, { "type": "null" } ], "title": "Body" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/teacher/classes": { "get": { "tags": [ "content" ], "summary": "Get Teacher Classes", "description": "Get all classes for a teacher.", "operationId": "get_teacher_classes_api_v1_teacher_classes_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } }, "post": { "tags": [ "teacher" ], "summary": "Create Teacher Class", "description": "Create a new class (teacher only).", "operationId": "create_teacher_class", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/app__api__endpoints__teacher__CreateClassRequest" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/teacher/classes/{class_id}/students": { "get": { "tags": [ "content" ], "summary": "Get Class Students", "description": "Get all students in a class.", "operationId": "get_class_students_api_v1_teacher_classes__class_id__students_get", "parameters": [ { "name": "class_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Class Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/teacher/assignments": { "get": { "tags": [ "content" ], "summary": "Get Teacher Assignments", "description": "Get all assignments for a teacher across all their classes.", "operationId": "get_teacher_assignments_api_v1_teacher_assignments_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } }, "post": { "tags": [ "content" ], "summary": "Create Assignment", "description": "Create a new assignment.", "operationId": "create_assignment_api_v1_teacher_assignments_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAssignmentRequest" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/teacher/assignments/{assignment_id}/submissions": { "get": { "tags": [ "teacher" ], "summary": "Get Assignment Submissions", "description": "Get all submissions for an assignment (teacher only).", "operationId": "get_assignment_submissions", "parameters": [ { "name": "assignment_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Assignment Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubmissionListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/teacher/submissions/{submission_id}/grade": { "post": { "tags": [ "teacher" ], "summary": "Grade Submission", "description": "Grade a student submission.", "operationId": "grade_submission", "parameters": [ { "name": "submission_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Submission Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubmissionGradeRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/posts/{post_id}/comments": { "get": { "tags": [ "content" ], "summary": "Get Post Comments", "description": "Get all comments for a post.", "operationId": "get_post_comments_api_v1_posts__post_id__comments_get", "parameters": [ { "name": "post_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Post Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "content" ], "summary": "Create Post Comment", "description": "Create a comment on a post.", "operationId": "create_post_comment_api_v1_posts__post_id__comments_post", "parameters": [ { "name": "post_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Post Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCommentRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/assignments/{assignment_id}/comments": { "get": { "tags": [ "content" ], "summary": "Get Assignment Comments", "description": "Get all comments for an assignment.", "operationId": "get_assignment_comments_api_v1_assignments__assignment_id__comments_get", "parameters": [ { "name": "assignment_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Assignment Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "content" ], "summary": "Create Assignment Comment", "description": "Create a comment on an assignment.", "operationId": "create_assignment_comment_api_v1_assignments__assignment_id__comments_post", "parameters": [ { "name": "assignment_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Assignment Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCommentRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/debug/supabase": { "get": { "tags": [ "debug" ], "summary": "Supabase Debug", "description": "Return non-sensitive Supabase config to verify project wiring.\nShows project ref (derived from URL) and URL host. Never returns keys.", "operationId": "supabase_debug_api_v1_debug_supabase_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v1/ai/transcribe": { "post": { "tags": [ "transcription" ], "summary": "Transcribe Audio Basic", "description": "Basic audio transcription with simple JSON response.", "operationId": "transcribe_audio_basic_api_v1_ai_transcribe_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_transcribe_audio_basic_api_v1_ai_transcribe_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TranscriptionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/ai/transcribe/speakers": { "post": { "tags": [ "transcription" ], "summary": "Transcribe With Speakers", "description": "Audio transcription with speaker diarization.", "operationId": "transcribe_with_speakers_api_v1_ai_transcribe_speakers_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_transcribe_with_speakers_api_v1_ai_transcribe_speakers_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TranscriptionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/ai/transcribe/detailed": { "post": { "tags": [ "transcription" ], "summary": "Transcribe Detailed", "description": "Detailed transcription with word-level timestamps.", "operationId": "transcribe_detailed_api_v1_ai_transcribe_detailed_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_transcribe_detailed_api_v1_ai_transcribe_detailed_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TranscriptionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/ai/transcribe/subtitles": { "post": { "tags": [ "transcription" ], "summary": "Transcribe To Subtitles", "description": "Generate subtitle files (SRT or VTT format).", "operationId": "transcribe_to_subtitles_api_v1_ai_transcribe_subtitles_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_transcribe_to_subtitles_api_v1_ai_transcribe_subtitles_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/ai/transcribe/health": { "get": { "tags": [ "transcription" ], "summary": "Check Transcription Health", "description": "Check if the LemonFox AI transcription service is available.", "operationId": "check_transcription_health_api_v1_ai_transcribe_health_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v1/ai/transcribe/info": { "get": { "tags": [ "transcription" ], "summary": "Get Transcription Info", "description": "Get information about the transcription service capabilities.", "operationId": "get_transcription_info_api_v1_ai_transcribe_info_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v1/gemini/generate": { "post": { "tags": [ "gemini-ai" ], "summary": "Generate Content", "description": "Generate content using Google Gemini AI.\n\n**Based on official Gemini API documentation.**\n\n**Use this endpoint for:**\n- Text generation\n- Question answering\n- Content creation\n- AI assistance\n\n**Parameters:**\n- **prompt**: Your prompt or question for the AI (required)\n- **model**: Gemini model to use (optional, defaults to gemini-2.0-flash-exp)\n- **max_tokens**: Maximum length of response (optional, 1-8192)\n- **temperature**: Creativity level 0.0-2.0 (optional, higher = more creative)\n- **top_p**: Top-p sampling for nucleus sampling (optional, 0.0-1.0)\n- **top_k**: Top-k sampling parameter (optional)\n- **system_instruction**: System instruction to guide model behavior (optional)\n- **thinking_budget**: For Gemini 2.5 models, set to 0 to disable thinking (optional)\n- **stream**: Enable streaming response (optional, default: false)\n\n**Returns:**\n- Generated text response from Gemini AI (or streaming chunks if stream=true)\n\n**Example:**\n```json\n{\n \"prompt\": \"Explain how AI works\",\n \"model\": \"gemini-2.0-flash-exp\",\n \"temperature\": 0.7,\n \"max_tokens\": 1024,\n \"system_instruction\": \"You are a helpful AI assistant.\"\n}\n```", "operationId": "generate_content_api_v1_gemini_generate_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeminiRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/gemini/health": { "get": { "tags": [ "gemini-ai" ], "summary": "Check Gemini Health", "description": "Check if the Gemini AI service is available.\n\nReturns service status and configuration.", "operationId": "check_gemini_health_api_v1_gemini_health_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v1/gemini/models": { "get": { "tags": [ "gemini-ai" ], "summary": "List Available Models", "description": "List available Gemini models.\n\nReturns a list of Gemini models that can be used for text generation.\nModels include Gemini 2.0 Flash (experimental), Gemini 1.5 Pro, and Gemini 1.5 Flash.", "operationId": "list_available_models_api_v1_gemini_models_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v1/speaking-tests/templates": { "post": { "tags": [ "speaking-tests", "Speaking Tests" ], "summary": "Create Template", "description": "Create a new speaking test template (teachers only)", "operationId": "create_template_api_v1_speaking_tests_templates_post", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpeakingTestTemplateCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpeakingTestTemplateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "speaking-tests", "Speaking Tests" ], "summary": "List Templates", "description": "List all speaking test templates (teachers only)", "operationId": "list_templates_api_v1_speaking_tests_templates_get", "parameters": [ { "name": "active_only", "in": "query", "required": false, "schema": { "type": "boolean", "default": true, "title": "Active Only" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SpeakingTestTemplateResponse" }, "title": "Response List Templates Api V1 Speaking Tests Templates Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/speaking-tests/templates/{template_id}": { "get": { "tags": [ "speaking-tests", "Speaking Tests" ], "summary": "Get Template", "description": "Get a specific template", "operationId": "get_template_api_v1_speaking_tests_templates__template_id__get", "parameters": [ { "name": "template_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Template Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpeakingTestTemplateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "speaking-tests", "Speaking Tests" ], "summary": "Update Template", "description": "Update a speaking test template", "operationId": "update_template_api_v1_speaking_tests_templates__template_id__patch", "parameters": [ { "name": "template_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Template Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpeakingTestTemplateUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpeakingTestTemplateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "speaking-tests", "Speaking Tests" ], "summary": "Delete Template", "description": "Delete a speaking test template", "operationId": "delete_template_api_v1_speaking_tests_templates__template_id__delete", "parameters": [ { "name": "template_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Template Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/speaking-tests/assignments": { "post": { "tags": [ "speaking-tests", "Speaking Tests" ], "summary": "Create Assignment", "description": "Create a new speaking test assignment (teachers only).\n\nFor now we default new assignments to published so that students can immediately\nsee and start the test once it is created from the teacher UI.", "operationId": "create_assignment_api_v1_speaking_tests_assignments_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpeakingTestAssignmentCreate" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpeakingTestAssignmentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/speaking-tests/assignments/class/{class_id}": { "get": { "tags": [ "speaking-tests", "Speaking Tests" ], "summary": "List Class Assignments", "description": "List all speaking test assignments for a class", "operationId": "list_class_assignments_api_v1_speaking_tests_assignments_class__class_id__get", "parameters": [ { "name": "class_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Class Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SpeakingTestAssignmentResponse" }, "title": "Response List Class Assignments Api V1 Speaking Tests Assignments Class Class Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/speaking-tests/assignments/{assignment_id}": { "get": { "tags": [ "speaking-tests", "Speaking Tests" ], "summary": "Get Assignment", "description": "Get a specific assignment", "operationId": "get_assignment_api_v1_speaking_tests_assignments__assignment_id__get", "parameters": [ { "name": "assignment_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Assignment Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpeakingTestAssignmentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "speaking-tests", "Speaking Tests" ], "summary": "Update Assignment", "description": "Update an assignment", "operationId": "update_assignment_api_v1_speaking_tests_assignments__assignment_id__patch", "parameters": [ { "name": "assignment_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Assignment Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpeakingTestAssignmentUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpeakingTestAssignmentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/speaking-tests/sessions": { "post": { "tags": [ "speaking-tests", "Speaking Tests" ], "summary": "Create Session", "description": "Start a new speaking test session (students only)", "operationId": "create_session_api_v1_speaking_tests_sessions_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpeakingTestSessionCreate" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpeakingTestSessionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/speaking-tests/sessions/{session_id}": { "get": { "tags": [ "speaking-tests", "Speaking Tests" ], "summary": "Get Session", "description": "Get a specific session", "operationId": "get_session_api_v1_speaking_tests_sessions__session_id__get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpeakingTestSessionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "speaking-tests", "Speaking Tests" ], "summary": "Update Session", "description": "Update session status", "operationId": "update_session_api_v1_speaking_tests_sessions__session_id__patch", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpeakingTestSessionUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpeakingTestSessionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/speaking-tests/sessions/student/me": { "get": { "tags": [ "speaking-tests", "Speaking Tests" ], "summary": "List My Sessions", "description": "List current student's sessions", "operationId": "list_my_sessions_api_v1_speaking_tests_sessions_student_me_get", "parameters": [ { "name": "assignment_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Assignment Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SpeakingTestSessionResponse" }, "title": "Response List My Sessions Api V1 Speaking Tests Sessions Student Me Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/speaking-tests/turns": { "post": { "tags": [ "speaking-tests", "Speaking Tests" ], "summary": "Create Turn", "description": "Add a conversation turn (audio + transcription)", "operationId": "create_turn_api_v1_speaking_tests_turns_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpeakingTestTurnCreate" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpeakingTestTurnResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/speaking-tests/turns/session/{session_id}": { "get": { "tags": [ "speaking-tests", "Speaking Tests" ], "summary": "List Session Turns", "description": "List all turns in a session", "operationId": "list_session_turns_api_v1_speaking_tests_turns_session__session_id__get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } }, { "name": "part_number", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Part Number" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SpeakingTestTurnResponse" }, "title": "Response List Session Turns Api V1 Speaking Tests Turns Session Session Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/speaking-tests/grades/ai/{session_id}": { "post": { "tags": [ "speaking-tests", "Speaking Tests" ], "summary": "Trigger Ai Grading", "description": "Trigger AI grading for a completed session", "operationId": "trigger_ai_grading_api_v1_speaking_tests_grades_ai__session_id__post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } } ], "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIGradeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/speaking-tests/grades/session/{session_id}": { "get": { "tags": [ "speaking-tests", "Speaking Tests" ], "summary": "Get Session Grades", "description": "Get combined AI + teacher grades for a session", "operationId": "get_session_grades_api_v1_speaking_tests_grades_session__session_id__get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FinalGradeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/speaking-tests/grades/teacher": { "post": { "tags": [ "speaking-tests", "Speaking Tests" ], "summary": "Create Teacher Grade", "description": "Teacher submits manual grade", "operationId": "create_teacher_grade_api_v1_speaking_tests_grades_teacher_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeacherGradeCreate" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeacherGradeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/speaking-tests/grades/teacher/{grade_id}": { "patch": { "tags": [ "speaking-tests", "Speaking Tests" ], "summary": "Update Teacher Grade", "description": "Update teacher grade", "operationId": "update_teacher_grade_api_v1_speaking_tests_grades_teacher__grade_id__patch", "parameters": [ { "name": "grade_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Grade Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeacherGradeUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeacherGradeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/speaking-tests/grading-queue": { "get": { "tags": [ "speaking-tests", "Speaking Tests" ], "summary": "Get Grading Queue", "description": "Get teacher's grading queue", "operationId": "get_grading_queue_api_v1_speaking_tests_grading_queue_get", "parameters": [ { "name": "status_filter", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "pending", "title": "Status Filter" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GradingQueueItem" }, "title": "Response Get Grading Queue Api V1 Speaking Tests Grading Queue Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/speaking-tests/grading-queue/{queue_id}": { "patch": { "tags": [ "speaking-tests", "Speaking Tests" ], "summary": "Update Queue Item", "description": "Update grading queue item status", "operationId": "update_queue_item_api_v1_speaking_tests_grading_queue__queue_id__patch", "parameters": [ { "name": "queue_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Queue Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GradingQueueUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GradingQueueItem" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/": { "get": { "summary": "Root", "description": "Root endpoint.", "operationId": "root__get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/health": { "get": { "summary": "Health Check", "description": "Health check endpoint.", "operationId": "health_check_health_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } } }, "components": { "schemas": { "AIGradeResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "pronunciation_fluency": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Pronunciation Fluency" }, "grammar_vocabulary": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Grammar Vocabulary" }, "interactive_communication": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Interactive Communication" }, "task_achievement": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Task Achievement" }, "part1_score": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Part1 Score" }, "part2_score": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Part2 Score" }, "part3_score": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Part3 Score" }, "total_score": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Total Score" }, "percentage": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Percentage" }, "band": { "type": "string", "title": "Band" }, "strengths": { "items": { "type": "string" }, "type": "array", "title": "Strengths" }, "improvements": { "items": { "type": "string" }, "type": "array", "title": "Improvements" }, "detailed_feedback": { "type": "string", "title": "Detailed Feedback" }, "good_examples": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Good Examples" }, "improvement_examples": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Improvement Examples" }, "ai_model": { "type": "string", "title": "Ai Model" }, "ai_prompt_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Ai Prompt Version" }, "grading_duration_seconds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Grading Duration Seconds" }, "graded_at": { "type": "string", "format": "date-time", "title": "Graded At" }, "confidence_score": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Confidence Score" }, "flagged_for_review": { "type": "boolean", "title": "Flagged For Review" }, "review_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Review Reason" } }, "type": "object", "required": [ "id", "session_id", "pronunciation_fluency", "grammar_vocabulary", "interactive_communication", "task_achievement", "part1_score", "part2_score", "part3_score", "total_score", "percentage", "band", "strengths", "improvements", "detailed_feedback", "good_examples", "improvement_examples", "ai_model", "ai_prompt_version", "grading_duration_seconds", "graded_at", "confidence_score", "flagged_for_review", "review_reason" ], "title": "AIGradeResponse", "description": "Response model for AI grade" }, "ActivityItem": { "properties": { "type": { "type": "string", "title": "Type" }, "description": { "type": "string", "title": "Description" }, "user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Id" }, "user_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Name" }, "resource_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resource Id" }, "resource_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resource Name" }, "timestamp": { "type": "string", "title": "Timestamp" } }, "type": "object", "required": [ "type", "description", "timestamp" ], "title": "ActivityItem" }, "ActivityResponse": { "properties": { "activities": { "items": { "$ref": "#/components/schemas/ActivityItem" }, "type": "array", "title": "Activities" }, "items": { "items": { "$ref": "#/components/schemas/ActivityItem" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" }, "size": { "type": "integer", "title": "Size" }, "total_pages": { "type": "integer", "title": "Total Pages" } }, "type": "object", "required": [ "activities", "items", "total", "page", "page_size", "size", "total_pages" ], "title": "ActivityResponse" }, "AdminCreateRequest": { "properties": { "email": { "type": "string", "title": "Email" }, "password": { "type": "string", "title": "Password" }, "full_name": { "type": "string", "title": "Full Name" } }, "type": "object", "required": [ "email", "password", "full_name" ], "title": "AdminCreateRequest" }, "AnalyticsResponse": { "properties": { "totals": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "Totals" }, "role_distribution": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "Role Distribution" }, "user_growth": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "User Growth" }, "active_classes": { "type": "integer", "title": "Active Classes" }, "top_teachers": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Top Teachers" }, "assignment_completion_rate": { "type": "number", "title": "Assignment Completion Rate" } }, "type": "object", "required": [ "totals", "role_distribution", "user_growth", "active_classes", "top_teachers", "assignment_completion_rate" ], "title": "AnalyticsResponse" }, "AssignmentCreate": { "properties": { "title": { "type": "string", "minLength": 1, "title": "Title" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "due_date": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Due Date" }, "rubric": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Rubric" } }, "type": "object", "required": [ "title" ], "title": "AssignmentCreate" }, "AssignmentListResponse": { "properties": { "assignments": { "items": { "$ref": "#/components/schemas/AssignmentResponse" }, "type": "array", "title": "Assignments" } }, "type": "object", "required": [ "assignments" ], "title": "AssignmentListResponse" }, "AssignmentResponse": { "properties": { "assignment_id": { "type": "string", "title": "Assignment Id" }, "title": { "type": "string", "title": "Title" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "due_date": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Due Date" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "class_id": { "type": "string", "title": "Class Id" } }, "type": "object", "required": [ "assignment_id", "title", "created_at", "class_id" ], "title": "AssignmentResponse" }, "AuditLogResponse": { "properties": { "logs": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Logs" }, "items": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" }, "size": { "type": "integer", "title": "Size" }, "total_pages": { "type": "integer", "title": "Total Pages" } }, "type": "object", "required": [ "logs", "items", "total", "page", "page_size", "size", "total_pages" ], "title": "AuditLogResponse" }, "Body_transcribe_audio_basic_api_v1_ai_transcribe_post": { "properties": { "audio": { "type": "string", "format": "binary", "title": "Audio", "description": "Audio file to transcribe" }, "language": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Language", "description": "Language of input audio (auto-detect if not provided)" }, "prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Prompt", "description": "Text to guide transcript style or fix specific words" }, "translate": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Translate", "description": "Translate audio to English" }, "callback_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Callback Url", "description": "URL for async callback" } }, "type": "object", "required": [ "audio" ], "title": "Body_transcribe_audio_basic_api_v1_ai_transcribe_post" }, "Body_transcribe_detailed_api_v1_ai_transcribe_detailed_post": { "properties": { "audio": { "type": "string", "format": "binary", "title": "Audio", "description": "Audio file to transcribe" }, "language": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Language", "description": "Language of input audio" }, "timestamp_granularities": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Timestamp Granularities", "description": "Comma-separated: segment,word" }, "prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Prompt", "description": "Text to guide transcript style" }, "translate": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Translate", "description": "Translate audio to English" }, "callback_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Callback Url", "description": "URL for async callback" } }, "type": "object", "required": [ "audio" ], "title": "Body_transcribe_detailed_api_v1_ai_transcribe_detailed_post" }, "Body_transcribe_to_subtitles_api_v1_ai_transcribe_subtitles_post": { "properties": { "audio": { "type": "string", "format": "binary", "title": "Audio", "description": "Audio file to transcribe" }, "format": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Format", "description": "Subtitle format: srt or vtt (default: srt)" }, "language": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Language", "description": "Language of input audio" }, "prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Prompt", "description": "Text to guide transcript style" }, "translate": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Translate", "description": "Translate audio to English" }, "callback_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Callback Url", "description": "URL for async callback" } }, "type": "object", "required": [ "audio" ], "title": "Body_transcribe_to_subtitles_api_v1_ai_transcribe_subtitles_post" }, "Body_transcribe_with_speakers_api_v1_ai_transcribe_speakers_post": { "properties": { "audio": { "type": "string", "format": "binary", "title": "Audio", "description": "Audio file to transcribe" }, "language": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Language", "description": "Language of input audio" }, "min_speakers": { "anyOf": [ { "type": "integer", "maximum": 10.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Min Speakers", "description": "Minimum number of speakers" }, "max_speakers": { "anyOf": [ { "type": "integer", "maximum": 10.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Max Speakers", "description": "Maximum number of speakers" }, "prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Prompt", "description": "Text to guide transcript style" }, "callback_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Callback Url", "description": "URL for async callback" } }, "type": "object", "required": [ "audio" ], "title": "Body_transcribe_with_speakers_api_v1_ai_transcribe_speakers_post" }, "CreateAssignmentRequest": { "properties": { "class_id": { "type": "string", "title": "Class Id" }, "title": { "type": "string", "title": "Title" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "due_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Due Date" }, "max_grade": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Grade", "default": 100 } }, "type": "object", "required": [ "class_id", "title" ], "title": "CreateAssignmentRequest" }, "CreateAuditLogRequest": { "properties": { "action_type": { "type": "string", "title": "Action Type" }, "target_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Target User Id" }, "target_resource_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Target Resource Type" }, "target_resource_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Target Resource Id" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" } }, "type": "object", "required": [ "action_type" ], "title": "CreateAuditLogRequest" }, "CreateCommentRequest": { "properties": { "content": { "type": "string", "title": "Content" } }, "type": "object", "required": [ "content" ], "title": "CreateCommentRequest" }, "EnrollRequest": { "properties": { "class_code": { "type": "string", "title": "Class Code" } }, "type": "object", "required": [ "class_code" ], "title": "EnrollRequest" }, "ExampleCreate": { "properties": { "name": { "type": "string", "maxLength": 100, "minLength": 1, "title": "Name", "description": "Name of the example" }, "description": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Description", "description": "Description of the example" } }, "type": "object", "required": [ "name" ], "title": "ExampleCreate", "description": "Schema for creating an example." }, "ExampleResponse": { "properties": { "name": { "type": "string", "maxLength": 100, "minLength": 1, "title": "Name", "description": "Name of the example" }, "description": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Description", "description": "Description of the example" }, "id": { "type": "integer", "title": "Id" }, "created_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Created At" }, "updated_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Updated At" } }, "type": "object", "required": [ "name", "id" ], "title": "ExampleResponse", "description": "Schema for example response." }, "FinalGradeResponse": { "properties": { "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "assignment_id": { "type": "string", "format": "uuid", "title": "Assignment Id" }, "student_id": { "type": "string", "format": "uuid", "title": "Student Id" }, "attempt_number": { "type": "integer", "title": "Attempt Number" }, "status": { "type": "string", "title": "Status" }, "submitted_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Submitted At" }, "ai_total_score": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Ai Total Score" }, "ai_percentage": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Ai Percentage" }, "ai_band": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Ai Band" }, "ai_graded_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Ai Graded At" }, "ai_feedback": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Ai Feedback" }, "ai_strengths": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Ai Strengths" }, "ai_improvements": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Ai Improvements" }, "teacher_total_score": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Teacher Total Score" }, "teacher_percentage": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Teacher Percentage" }, "teacher_band": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Teacher Band" }, "teacher_graded_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Teacher Graded At" }, "teacher_feedback": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Teacher Feedback" }, "teacher_strengths": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Teacher Strengths" }, "teacher_improvements": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Teacher Improvements" }, "teacher_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Teacher Id" }, "final_total_score": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Final Total Score" }, "final_percentage": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Final Percentage" }, "final_band": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Final Band" }, "grading_status": { "type": "string", "enum": [ "not_graded", "ai_graded", "teacher_graded" ], "title": "Grading Status" }, "has_both_grades": { "type": "boolean", "title": "Has Both Grades" } }, "type": "object", "required": [ "session_id", "assignment_id", "student_id", "attempt_number", "status", "submitted_at", "ai_total_score", "ai_percentage", "ai_band", "ai_graded_at", "ai_feedback", "ai_strengths", "ai_improvements", "teacher_total_score", "teacher_percentage", "teacher_band", "teacher_graded_at", "teacher_feedback", "teacher_strengths", "teacher_improvements", "teacher_id", "final_total_score", "final_percentage", "final_band", "grading_status", "has_both_grades" ], "title": "FinalGradeResponse", "description": "Combined AI + Teacher grades" }, "GeminiRequest": { "properties": { "prompt": { "type": "string", "minLength": 1, "title": "Prompt", "description": "The prompt/content to send to Gemini AI" }, "model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Model", "description": "Gemini model to use (defaults to gemini-2.0-flash-exp)" }, "max_tokens": { "anyOf": [ { "type": "integer", "maximum": 8192.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Max Tokens", "description": "Maximum tokens to generate (max_output_tokens)" }, "temperature": { "anyOf": [ { "type": "number", "maximum": 2.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Temperature", "description": "Temperature for generation (0.0 to 2.0)" }, "top_p": { "anyOf": [ { "type": "number", "maximum": 1.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Top P", "description": "Top-p sampling parameter" }, "top_k": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Top K", "description": "Top-k sampling parameter" }, "system_instruction": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "System Instruction", "description": "System instruction to guide model behavior" }, "thinking_budget": { "anyOf": [ { "type": "integer", "minimum": 0.0 }, { "type": "null" } ], "title": "Thinking Budget", "description": "Thinking budget for Gemini 2.5 models (0 to disable)" }, "stream": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Stream", "description": "Enable streaming response", "default": false } }, "type": "object", "required": [ "prompt" ], "title": "GeminiRequest", "description": "Request model for Gemini AI generation." }, "GradingQueueItem": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "teacher_id": { "type": "string", "format": "uuid", "title": "Teacher Id" }, "priority": { "type": "integer", "title": "Priority" }, "status": { "type": "string", "enum": [ "pending", "in_progress", "completed", "skipped" ], "title": "Status" }, "assigned_at": { "type": "string", "format": "date-time", "title": "Assigned At" }, "started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Started At" }, "completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Completed At" }, "teacher_notes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Teacher Notes" } }, "type": "object", "required": [ "id", "session_id", "teacher_id", "priority", "status", "assigned_at", "started_at", "completed_at", "teacher_notes" ], "title": "GradingQueueItem", "description": "Grading queue item" }, "GradingQueueUpdate": { "properties": { "status": { "anyOf": [ { "type": "string", "enum": [ "pending", "in_progress", "completed", "skipped" ] }, { "type": "null" } ], "title": "Status" }, "started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Started At" }, "completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Completed At" }, "teacher_notes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Teacher Notes" } }, "type": "object", "title": "GradingQueueUpdate", "description": "Update queue item status" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "LoginRequest": { "properties": { "email": { "type": "string", "format": "email", "title": "Email" }, "password": { "type": "string", "minLength": 8, "title": "Password" } }, "type": "object", "required": [ "email", "password" ], "title": "LoginRequest" }, "LoginResponse": { "properties": { "access_token": { "type": "string", "title": "Access Token" }, "token_type": { "type": "string", "title": "Token Type", "default": "bearer" }, "refresh_token": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Refresh Token" }, "expires_in": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Expires In" }, "user": { "additionalProperties": true, "type": "object", "title": "User" } }, "type": "object", "required": [ "access_token", "user" ], "title": "LoginResponse" }, "LogoutRequest": { "properties": { "access_token": { "type": "string", "title": "Access Token" } }, "type": "object", "required": [ "access_token" ], "title": "LogoutRequest" }, "Part1Question": { "properties": { "phase": { "type": "integer", "enum": [ 1, 2 ], "title": "Phase" }, "question": { "type": "string", "title": "Question" } }, "type": "object", "required": [ "phase", "question" ], "title": "Part1Question", "description": "Individual Part 1 question" }, "Part2Topic": { "properties": { "topic": { "type": "string", "title": "Topic" }, "talking_points": { "items": { "type": "string" }, "type": "array", "title": "Talking Points" } }, "type": "object", "required": [ "topic", "talking_points" ], "title": "Part2Topic", "description": "Part 2 topic with talking points" }, "Part3Discussion": { "properties": { "topic": { "type": "string", "title": "Topic" }, "mindmap": { "items": { "type": "string" }, "type": "array", "title": "Mindmap" }, "follow_up": { "type": "string", "title": "Follow Up" }, "final_question": { "type": "string", "title": "Final Question" } }, "type": "object", "required": [ "topic", "mindmap", "follow_up", "final_question" ], "title": "Part3Discussion", "description": "Part 3 discussion structure" }, "PostCreate": { "properties": { "content": { "type": "string", "minLength": 1, "title": "Content" } }, "type": "object", "required": [ "content" ], "title": "PostCreate" }, "PostListResponse": { "properties": { "posts": { "items": { "$ref": "#/components/schemas/PostResponse" }, "type": "array", "title": "Posts" } }, "type": "object", "required": [ "posts" ], "title": "PostListResponse" }, "PostResponse": { "properties": { "post_id": { "type": "string", "title": "Post Id" }, "content": { "type": "string", "title": "Content" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "author_name": { "type": "string", "title": "Author Name" }, "comment_count": { "type": "integer", "title": "Comment Count" } }, "type": "object", "required": [ "post_id", "content", "created_at", "author_name", "comment_count" ], "title": "PostResponse" }, "RegisterRequest": { "properties": { "full_name": { "type": "string", "maxLength": 100, "minLength": 2, "title": "Full Name", "description": "Full name" }, "email": { "type": "string", "format": "email", "title": "Email" }, "password": { "type": "string", "minLength": 8, "title": "Password", "description": "Password (min 8 chars, with uppercase and number)" }, "confirm_password": { "type": "string", "minLength": 8, "title": "Confirm Password", "description": "Re-enter password" } }, "type": "object", "required": [ "full_name", "email", "password", "confirm_password" ], "title": "RegisterRequest" }, "RegisterResponse": { "properties": { "message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Message" }, "user": { "additionalProperties": true, "type": "object", "title": "User" } }, "type": "object", "required": [ "user" ], "title": "RegisterResponse" }, "RoleUpdateRequest": { "properties": { "role": { "type": "string", "pattern": "^(student|teacher|admin)$", "title": "Role" }, "adminSecret": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Adminsecret" } }, "type": "object", "required": [ "role" ], "title": "RoleUpdateRequest" }, "RoleViewResponse": { "properties": { "user_id": { "type": "string", "title": "User Id" }, "email": { "type": "string", "title": "Email" }, "role": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Role" }, "source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source" } }, "type": "object", "required": [ "user_id", "email" ], "title": "RoleViewResponse" }, "SpeakingTestAssignmentCreate": { "properties": { "template_id": { "type": "string", "format": "uuid", "title": "Template Id" }, "title": { "type": "string", "title": "Title" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "instructions": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Instructions" }, "class_id": { "type": "string", "format": "uuid", "title": "Class Id" }, "due_date": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Due Date" }, "available_from": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Available From" }, "available_until": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Available Until" }, "max_attempts": { "type": "integer", "title": "Max Attempts", "default": 1 }, "require_teacher_review": { "type": "boolean", "title": "Require Teacher Review", "default": false } }, "type": "object", "required": [ "template_id", "title", "class_id" ], "title": "SpeakingTestAssignmentCreate", "description": "Create a new speaking test assignment" }, "SpeakingTestAssignmentResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "template_id": { "type": "string", "format": "uuid", "title": "Template Id" }, "title": { "type": "string", "title": "Title" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "instructions": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Instructions" }, "class_id": { "type": "string", "format": "uuid", "title": "Class Id" }, "teacher_id": { "type": "string", "format": "uuid", "title": "Teacher Id" }, "assigned_at": { "type": "string", "format": "date-time", "title": "Assigned At" }, "due_date": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Due Date" }, "available_from": { "type": "string", "format": "date-time", "title": "Available From" }, "available_until": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Available Until" }, "max_attempts": { "type": "integer", "title": "Max Attempts" }, "require_teacher_review": { "type": "boolean", "title": "Require Teacher Review" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "is_published": { "type": "boolean", "title": "Is Published" } }, "type": "object", "required": [ "id", "template_id", "title", "description", "instructions", "class_id", "teacher_id", "assigned_at", "due_date", "available_from", "available_until", "max_attempts", "require_teacher_review", "created_at", "updated_at", "is_published" ], "title": "SpeakingTestAssignmentResponse", "description": "Response model for assignment" }, "SpeakingTestAssignmentUpdate": { "properties": { "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "instructions": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Instructions" }, "due_date": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Due Date" }, "available_from": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Available From" }, "available_until": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Available Until" }, "max_attempts": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Attempts" }, "require_teacher_review": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Require Teacher Review" }, "is_published": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Published" } }, "type": "object", "title": "SpeakingTestAssignmentUpdate", "description": "Update an existing assignment" }, "SpeakingTestSessionCreate": { "properties": { "assignment_id": { "type": "string", "format": "uuid", "title": "Assignment Id" } }, "type": "object", "required": [ "assignment_id" ], "title": "SpeakingTestSessionCreate", "description": "Start a new speaking test session" }, "SpeakingTestSessionResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "assignment_id": { "type": "string", "format": "uuid", "title": "Assignment Id" }, "student_id": { "type": "string", "format": "uuid", "title": "Student Id" }, "attempt_number": { "type": "integer", "title": "Attempt Number" }, "status": { "type": "string", "title": "Status" }, "part1_status": { "type": "string", "title": "Part1 Status" }, "part1_started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Part1 Started At" }, "part1_completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Part1 Completed At" }, "part1_duration_seconds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Part1 Duration Seconds" }, "part2_status": { "type": "string", "title": "Part2 Status" }, "part2_started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Part2 Started At" }, "part2_completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Part2 Completed At" }, "part2_duration_seconds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Part2 Duration Seconds" }, "part3_status": { "type": "string", "title": "Part3 Status" }, "part3_started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Part3 Started At" }, "part3_completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Part3 Completed At" }, "part3_duration_seconds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Part3 Duration Seconds" }, "started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Started At" }, "completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Completed At" }, "submitted_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Submitted At" }, "total_duration_seconds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Total Duration Seconds" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "assignment_id", "student_id", "attempt_number", "status", "part1_status", "part1_started_at", "part1_completed_at", "part1_duration_seconds", "part2_status", "part2_started_at", "part2_completed_at", "part2_duration_seconds", "part3_status", "part3_started_at", "part3_completed_at", "part3_duration_seconds", "started_at", "completed_at", "submitted_at", "total_duration_seconds", "created_at", "updated_at" ], "title": "SpeakingTestSessionResponse", "description": "Response model for session" }, "SpeakingTestSessionUpdate": { "properties": { "status": { "anyOf": [ { "type": "string", "enum": [ "not_started", "in_progress", "completed", "graded" ] }, { "type": "null" } ], "title": "Status" }, "part1_status": { "anyOf": [ { "type": "string", "enum": [ "not_started", "in_progress", "completed" ] }, { "type": "null" } ], "title": "Part1 Status" }, "part1_started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Part1 Started At" }, "part1_completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Part1 Completed At" }, "part1_duration_seconds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Part1 Duration Seconds" }, "part2_status": { "anyOf": [ { "type": "string", "enum": [ "not_started", "in_progress", "completed" ] }, { "type": "null" } ], "title": "Part2 Status" }, "part2_started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Part2 Started At" }, "part2_completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Part2 Completed At" }, "part2_duration_seconds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Part2 Duration Seconds" }, "part3_status": { "anyOf": [ { "type": "string", "enum": [ "not_started", "in_progress", "completed" ] }, { "type": "null" } ], "title": "Part3 Status" }, "part3_started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Part3 Started At" }, "part3_completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Part3 Completed At" }, "part3_duration_seconds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Part3 Duration Seconds" }, "completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Completed At" }, "submitted_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Submitted At" } }, "type": "object", "title": "SpeakingTestSessionUpdate", "description": "Update session status" }, "SpeakingTestTemplateCreate": { "properties": { "title": { "type": "string", "title": "Title" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "test_type": { "type": "string", "title": "Test Type", "default": "spm_english_speaking" }, "part1_enabled": { "type": "boolean", "title": "Part1 Enabled", "default": true }, "part1_duration_minutes": { "type": "integer", "title": "Part1 Duration Minutes", "default": 3 }, "part1_questions": { "anyOf": [ { "items": { "$ref": "#/components/schemas/Part1Question" }, "type": "array" }, { "type": "null" } ], "title": "Part1 Questions" }, "part2_enabled": { "type": "boolean", "title": "Part2 Enabled", "default": true }, "part2_duration_minutes": { "type": "integer", "title": "Part2 Duration Minutes", "default": 2 }, "part2_topics": { "anyOf": [ { "items": { "$ref": "#/components/schemas/Part2Topic" }, "type": "array" }, { "type": "null" } ], "title": "Part2 Topics" }, "part3_enabled": { "type": "boolean", "title": "Part3 Enabled", "default": true }, "part3_duration_minutes": { "type": "integer", "title": "Part3 Duration Minutes", "default": 5 }, "part3_discussions": { "anyOf": [ { "items": { "$ref": "#/components/schemas/Part3Discussion" }, "type": "array" }, { "type": "null" } ], "title": "Part3 Discussions" }, "ai_grading_enabled": { "type": "boolean", "title": "Ai Grading Enabled", "default": true }, "teacher_grading_required": { "type": "boolean", "title": "Teacher Grading Required", "default": false } }, "type": "object", "required": [ "title" ], "title": "SpeakingTestTemplateCreate", "description": "Create a new speaking test template" }, "SpeakingTestTemplateResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "title": { "type": "string", "title": "Title" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "test_type": { "type": "string", "title": "Test Type" }, "part1_enabled": { "type": "boolean", "title": "Part1 Enabled" }, "part1_duration_minutes": { "type": "integer", "title": "Part1 Duration Minutes" }, "part1_questions": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Part1 Questions" }, "part2_enabled": { "type": "boolean", "title": "Part2 Enabled" }, "part2_duration_minutes": { "type": "integer", "title": "Part2 Duration Minutes" }, "part2_topics": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Part2 Topics" }, "part3_enabled": { "type": "boolean", "title": "Part3 Enabled" }, "part3_duration_minutes": { "type": "integer", "title": "Part3 Duration Minutes" }, "part3_discussions": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Part3 Discussions" }, "ai_grading_enabled": { "type": "boolean", "title": "Ai Grading Enabled" }, "teacher_grading_required": { "type": "boolean", "title": "Teacher Grading Required" }, "created_by": { "type": "string", "format": "uuid", "title": "Created By" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "is_active": { "type": "boolean", "title": "Is Active" } }, "type": "object", "required": [ "id", "title", "description", "test_type", "part1_enabled", "part1_duration_minutes", "part1_questions", "part2_enabled", "part2_duration_minutes", "part2_topics", "part3_enabled", "part3_duration_minutes", "part3_discussions", "ai_grading_enabled", "teacher_grading_required", "created_by", "created_at", "updated_at", "is_active" ], "title": "SpeakingTestTemplateResponse", "description": "Response model for speaking test template" }, "SpeakingTestTemplateUpdate": { "properties": { "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "part1_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Part1 Enabled" }, "part1_duration_minutes": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Part1 Duration Minutes" }, "part1_questions": { "anyOf": [ { "items": { "$ref": "#/components/schemas/Part1Question" }, "type": "array" }, { "type": "null" } ], "title": "Part1 Questions" }, "part2_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Part2 Enabled" }, "part2_duration_minutes": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Part2 Duration Minutes" }, "part2_topics": { "anyOf": [ { "items": { "$ref": "#/components/schemas/Part2Topic" }, "type": "array" }, { "type": "null" } ], "title": "Part2 Topics" }, "part3_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Part3 Enabled" }, "part3_duration_minutes": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Part3 Duration Minutes" }, "part3_discussions": { "anyOf": [ { "items": { "$ref": "#/components/schemas/Part3Discussion" }, "type": "array" }, { "type": "null" } ], "title": "Part3 Discussions" }, "ai_grading_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Ai Grading Enabled" }, "teacher_grading_required": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Teacher Grading Required" }, "is_active": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Active" } }, "type": "object", "title": "SpeakingTestTemplateUpdate", "description": "Update an existing template" }, "SpeakingTestTurnCreate": { "properties": { "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "part_number": { "type": "integer", "enum": [ 1, 2, 3 ], "title": "Part Number" }, "turn_order": { "type": "integer", "title": "Turn Order" }, "speaker": { "type": "string", "enum": [ "student", "ai_examiner", "ai_peer" ], "title": "Speaker" }, "audio_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Audio Url" }, "audio_duration_seconds": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Audio Duration Seconds" }, "transcription": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Transcription" }, "transcription_confidence": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Transcription Confidence" }, "ai_prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Ai Prompt" }, "ai_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Ai Model" }, "timestamp_seconds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Timestamp Seconds" } }, "type": "object", "required": [ "session_id", "part_number", "turn_order", "speaker" ], "title": "SpeakingTestTurnCreate", "description": "Create a new conversation turn" }, "SpeakingTestTurnResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "part_number": { "type": "integer", "title": "Part Number" }, "turn_order": { "type": "integer", "title": "Turn Order" }, "speaker": { "type": "string", "title": "Speaker" }, "audio_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Audio Url" }, "audio_duration_seconds": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Audio Duration Seconds" }, "transcription": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Transcription" }, "transcription_confidence": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Transcription Confidence" }, "ai_prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Ai Prompt" }, "ai_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Ai Model" }, "timestamp_seconds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Timestamp Seconds" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "session_id", "part_number", "turn_order", "speaker", "audio_url", "audio_duration_seconds", "transcription", "transcription_confidence", "ai_prompt", "ai_model", "timestamp_seconds", "created_at" ], "title": "SpeakingTestTurnResponse", "description": "Response model for turn" }, "StatsResponse": { "properties": { "totalTeachers": { "type": "integer", "title": "Totalteachers" }, "totalStudents": { "type": "integer", "title": "Totalstudents" }, "activeCodes": { "type": "integer", "title": "Activecodes" } }, "type": "object", "required": [ "totalTeachers", "totalStudents", "activeCodes" ], "title": "StatsResponse" }, "StudentListResponse": { "properties": { "students": { "items": { "$ref": "#/components/schemas/StudentResponse" }, "type": "array", "title": "Students" } }, "type": "object", "required": [ "students" ], "title": "StudentListResponse" }, "StudentResponse": { "properties": { "student_id": { "type": "string", "title": "Student Id" }, "full_name": { "type": "string", "title": "Full Name" }, "email": { "type": "string", "title": "Email" }, "enrolled_at": { "type": "string", "title": "Enrolled At" } }, "type": "object", "required": [ "student_id", "full_name", "email", "enrolled_at" ], "title": "StudentResponse" }, "SubmissionGradeRequest": { "properties": { "grade": { "type": "integer", "title": "Grade" }, "feedback": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Feedback" } }, "type": "object", "required": [ "grade" ], "title": "SubmissionGradeRequest" }, "SubmissionListResponse": { "properties": { "submissions": { "items": { "$ref": "#/components/schemas/SubmissionResponse" }, "type": "array", "title": "Submissions" } }, "type": "object", "required": [ "submissions" ], "title": "SubmissionListResponse" }, "SubmissionRequest": { "properties": { "assignment_id": { "type": "string", "title": "Assignment Id" }, "submission_content": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Submission Content" }, "file_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "File Url" } }, "type": "object", "required": [ "assignment_id" ], "title": "SubmissionRequest" }, "SubmissionResponse": { "properties": { "submission_id": { "type": "string", "title": "Submission Id" }, "assignment_id": { "type": "string", "title": "Assignment Id" }, "student_id": { "type": "string", "title": "Student Id" }, "student_name": { "type": "string", "title": "Student Name" }, "submission_content": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Submission Content" }, "file_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "File Url" }, "grade": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Grade" }, "feedback": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Feedback" }, "submitted_at": { "type": "string", "title": "Submitted At" }, "status": { "type": "string", "title": "Status" } }, "type": "object", "required": [ "submission_id", "assignment_id", "student_id", "student_name", "submitted_at", "status" ], "title": "SubmissionResponse" }, "TeacherAssignmentListResponse": { "properties": { "assignments": { "items": { "$ref": "#/components/schemas/TeacherAssignmentResponse" }, "type": "array", "title": "Assignments" } }, "type": "object", "required": [ "assignments" ], "title": "TeacherAssignmentListResponse" }, "TeacherAssignmentResponse": { "properties": { "assignment_id": { "type": "string", "title": "Assignment Id" }, "title": { "type": "string", "title": "Title" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "due_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Due Date" }, "max_grade": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Grade" }, "class_id": { "type": "string", "title": "Class Id" }, "class_name": { "type": "string", "title": "Class Name" }, "submission_count": { "type": "integer", "title": "Submission Count" }, "created_at": { "type": "string", "title": "Created At" } }, "type": "object", "required": [ "assignment_id", "title", "class_id", "class_name", "submission_count", "created_at" ], "title": "TeacherAssignmentResponse" }, "TeacherCodeCreateRequest": { "properties": { "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Display Name" }, "expires_in_days": { "anyOf": [ { "type": "integer", "maximum": 365.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Expires In Days" }, "max_uses": { "anyOf": [ { "type": "integer", "maximum": 1000.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Max Uses", "default": 1 } }, "type": "object", "title": "TeacherCodeCreateRequest" }, "TeacherCodeResponse": { "properties": { "code": { "type": "string", "title": "Code" }, "created_by": { "type": "string", "title": "Created By" }, "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Display Name" }, "created_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created At" }, "expires_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Expires At" }, "max_uses": { "type": "integer", "title": "Max Uses" }, "uses": { "type": "integer", "title": "Uses" }, "active": { "type": "boolean", "title": "Active" } }, "type": "object", "required": [ "code", "created_by", "max_uses", "uses", "active" ], "title": "TeacherCodeResponse" }, "TeacherCodeUpdateRequest": { "properties": { "active": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Active" }, "max_uses": { "anyOf": [ { "type": "integer", "maximum": 1000.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Max Uses" } }, "type": "object", "title": "TeacherCodeUpdateRequest" }, "TeacherCodeValidateRequest": { "properties": { "code": { "type": "string", "title": "Code" } }, "type": "object", "required": [ "code" ], "title": "TeacherCodeValidateRequest" }, "TeacherGradeCreate": { "properties": { "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "pronunciation_fluency": { "anyOf": [ { "type": "number", "maximum": 10.0, "minimum": 0.0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Pronunciation Fluency" }, "grammar_vocabulary": { "anyOf": [ { "type": "number", "maximum": 10.0, "minimum": 0.0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Grammar Vocabulary" }, "interactive_communication": { "anyOf": [ { "type": "number", "maximum": 10.0, "minimum": 0.0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Interactive Communication" }, "task_achievement": { "anyOf": [ { "type": "number", "maximum": 10.0, "minimum": 0.0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Task Achievement" }, "part1_score": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Part1 Score" }, "part2_score": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Part2 Score" }, "part3_score": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Part3 Score" }, "strengths": { "items": { "type": "string" }, "type": "array", "title": "Strengths" }, "improvements": { "items": { "type": "string" }, "type": "array", "title": "Improvements" }, "detailed_feedback": { "type": "string", "title": "Detailed Feedback" }, "private_notes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Private Notes" }, "grading_duration_minutes": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Grading Duration Minutes" }, "overrides_ai_grade": { "type": "boolean", "title": "Overrides Ai Grade", "default": true }, "ai_grade_reviewed": { "type": "boolean", "title": "Ai Grade Reviewed", "default": true } }, "type": "object", "required": [ "session_id", "pronunciation_fluency", "grammar_vocabulary", "interactive_communication", "task_achievement", "strengths", "improvements", "detailed_feedback" ], "title": "TeacherGradeCreate", "description": "Teacher manual grading" }, "TeacherGradeResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "teacher_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Teacher Id" }, "pronunciation_fluency": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Pronunciation Fluency" }, "grammar_vocabulary": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Grammar Vocabulary" }, "interactive_communication": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Interactive Communication" }, "task_achievement": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Task Achievement" }, "part1_score": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Part1 Score" }, "part2_score": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Part2 Score" }, "part3_score": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Part3 Score" }, "total_score": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Total Score" }, "percentage": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Percentage" }, "band": { "type": "string", "title": "Band" }, "strengths": { "items": { "type": "string" }, "type": "array", "title": "Strengths" }, "improvements": { "items": { "type": "string" }, "type": "array", "title": "Improvements" }, "detailed_feedback": { "type": "string", "title": "Detailed Feedback" }, "private_notes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Private Notes" }, "graded_at": { "type": "string", "format": "date-time", "title": "Graded At" }, "updated_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Updated At" }, "grading_duration_minutes": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Grading Duration Minutes" }, "overrides_ai_grade": { "type": "boolean", "title": "Overrides Ai Grade" }, "ai_grade_reviewed": { "type": "boolean", "title": "Ai Grade Reviewed" } }, "type": "object", "required": [ "id", "session_id", "teacher_id", "pronunciation_fluency", "grammar_vocabulary", "interactive_communication", "task_achievement", "part1_score", "part2_score", "part3_score", "total_score", "percentage", "band", "strengths", "improvements", "detailed_feedback", "private_notes", "graded_at", "updated_at", "grading_duration_minutes", "overrides_ai_grade", "ai_grade_reviewed" ], "title": "TeacherGradeResponse", "description": "Response model for teacher grade" }, "TeacherGradeUpdate": { "properties": { "pronunciation_fluency": { "anyOf": [ { "type": "number", "maximum": 10.0, "minimum": 0.0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Pronunciation Fluency" }, "grammar_vocabulary": { "anyOf": [ { "type": "number", "maximum": 10.0, "minimum": 0.0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Grammar Vocabulary" }, "interactive_communication": { "anyOf": [ { "type": "number", "maximum": 10.0, "minimum": 0.0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Interactive Communication" }, "task_achievement": { "anyOf": [ { "type": "number", "maximum": 10.0, "minimum": 0.0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Task Achievement" }, "part1_score": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Part1 Score" }, "part2_score": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Part2 Score" }, "part3_score": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Part3 Score" }, "strengths": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Strengths" }, "improvements": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Improvements" }, "detailed_feedback": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Detailed Feedback" }, "private_notes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Private Notes" }, "grading_duration_minutes": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Grading Duration Minutes" } }, "type": "object", "title": "TeacherGradeUpdate", "description": "Update teacher grade" }, "TeacherInfo": { "properties": { "id": { "type": "string", "title": "Id" }, "email": { "type": "string", "title": "Email" }, "name": { "type": "string", "title": "Name" } }, "type": "object", "required": [ "id", "email", "name" ], "title": "TeacherInfo" }, "TranscriptionResponse": { "properties": { "transcription": { "type": "string", "title": "Transcription", "description": "The transcribed or translated text" }, "language": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Language", "description": "Detected or specified language" }, "duration_seconds": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Duration Seconds", "description": "Audio duration in seconds if available" }, "response_format": { "type": "string", "title": "Response Format", "description": "Format of the response" }, "segments": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Segments", "description": "Transcript segments with timestamps (verbose_json only)" }, "words": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Words", "description": "Word-level timestamps (verbose_json with word granularity)" }, "speaker_labels": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Speaker Labels", "description": "Speaker diarization data (if enabled)" } }, "type": "object", "required": [ "transcription", "response_format" ], "title": "TranscriptionResponse", "description": "Schema for transcription response.", "example": { "duration_seconds": 5.2, "language": "english", "response_format": "verbose_json", "segments": [ { "end": 5.2, "start": 0.0, "text": "Hello, this is a sample transcription." } ], "transcription": "Hello, this is a sample transcription." } }, "UpdateClassRequest": { "properties": { "class_id": { "type": "string", "title": "Class Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "teacher_ids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Teacher Ids" } }, "type": "object", "required": [ "class_id", "name" ], "title": "UpdateClassRequest" }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "app__api__endpoints__classes__ClassListResponse": { "properties": { "classes": { "items": { "$ref": "#/components/schemas/app__api__endpoints__classes__ClassResponse" }, "type": "array", "title": "Classes" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" }, "total_pages": { "type": "integer", "title": "Total Pages" } }, "type": "object", "required": [ "classes", "total", "page", "page_size", "total_pages" ], "title": "ClassListResponse" }, "app__api__endpoints__classes__ClassResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "code": { "type": "string", "title": "Code" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "teacher": { "$ref": "#/components/schemas/TeacherInfo" }, "student_count": { "type": "integer", "title": "Student Count" }, "assignment_count": { "type": "integer", "title": "Assignment Count" }, "created_at": { "type": "string", "title": "Created At" } }, "type": "object", "required": [ "id", "name", "code", "teacher", "student_count", "assignment_count", "created_at" ], "title": "ClassResponse" }, "app__api__endpoints__classes__CreateClassRequest": { "properties": { "class_name": { "type": "string", "title": "Class Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "teacher_ids": { "items": { "type": "string" }, "type": "array", "title": "Teacher Ids" } }, "type": "object", "required": [ "class_name", "teacher_ids" ], "title": "CreateClassRequest" }, "app__api__endpoints__teacher__ClassListResponse": { "properties": { "classes": { "items": { "$ref": "#/components/schemas/app__api__endpoints__teacher__ClassResponse" }, "type": "array", "title": "Classes" } }, "type": "object", "required": [ "classes" ], "title": "ClassListResponse" }, "app__api__endpoints__teacher__ClassResponse": { "properties": { "class_id": { "type": "string", "title": "Class Id" }, "class_name": { "type": "string", "title": "Class Name" }, "class_code": { "type": "string", "title": "Class Code" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "created_at": { "type": "string", "title": "Created At" }, "student_count": { "type": "integer", "title": "Student Count" } }, "type": "object", "required": [ "class_id", "class_name", "class_code", "created_at", "student_count" ], "title": "ClassResponse" }, "app__api__endpoints__teacher__CreateClassRequest": { "properties": { "class_name": { "type": "string", "title": "Class Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" } }, "type": "object", "required": [ "class_name" ], "title": "CreateClassRequest" } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" }, "adminSetupToken": { "type": "apiKey", "in": "header", "name": "X-Admin-Setup-Token" } } } }