{
    "openapi": "3.0.0",
    "info": {
        "title": "rust_photoacoustic",
        "description": "Flexible Gas Analyzer using Laser Photoacoustic Spectroscopy",
        "version": "0.1.0"
    },
    "paths": {
        "/api/config": {
            "get": {
                "tags": [
                    "Configuration"
                ],
                "description": "Get the current application configuration\n\n**Endpoint:** `GET /api/config`\n\nReturns the complete application configuration as JSON, including all sections: - Visualization server settings - Data acquisition configuration - Modbus TCP server settings - Photoacoustic measurement parameters - User access and permissions - Processing pipeline configuration - OAuth2/OIDC provider settings\n\nThis endpoint is useful for: - Administrative configuration review - Configuration validation and debugging - Dynamic configuration discovery by client applications - Configuration backup and documentation\n\n### Authentication\n\nThis endpoint requires a valid JWT bearer token in the Authorization header with administrative privileges. The token must have the `admin:api` scope.\n\n### Security Considerations\n\n**âš ï¸ WARNING:** This endpoint exposes sensitive configuration data including: - HMAC secrets and cryptographic keys - Database connection strings - Internal service URLs and credentials - User password hashes\n\nAccess should be restricted to trusted administrators only.\n\n### Returns\n\nReturns a JSON response containing the complete `Config` structure with all configuration sections populated according to the current application state.\n\n### Response Structure\n\n```json { \"visualization\": { \"enabled\": true, \"port\": 8080, \"address\": \"127.0.0.1\", \"hmac_secret\": \"...\", \"rs256_public_key_path\": null }, \"acquisition\": { \"enabled\": true, \"interval_ms\": 1000 }, \"modbus\": { \"enabled\": false, \"port\": 502, \"address\": \"127.0.0.1\" }, \"photoacoustic\": { \"input_device\": null, \"input_file\": null, \"frequency\": 1000.0, \"bandwidth\": 100.0, \"frame_size\": 1024, \"averages\": 10 }, \"access\": { \"users\": [...], \"clients\": [...], \"duration\": 86400, \"iss\": \"LaserSmartServer\" }, \"processing\": { \"enabled\": true, \"result_buffer_size\": 1000, \"default_graph\": {...}, \"performance\": {...} }, \"generix\": { \"provider\": \"generix\", \"api_base_url\": \"https://localhost:8080\", \"client_id\": \"LaserSmartClient\", \"scope\": \"openid email profile read:api write:api\", ... } } ```\n\n### Error Responses\n\n- `401 Unauthorized`: Missing or invalid JWT token - `403 Forbidden`: Token lacks required `admin:api` scope - `500 Internal Server Error`: Server error accessing configuration",
                "operationId": "get_config",
                "responses": {
                    "403": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Config"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or missing Bearer token",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Invalid or missing Bearer token"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Authentication service unavailable",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Authentication service unavailable"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/api/config.schema.json": {
            "get": {
                "tags": [
                    "Configuration"
                ],
                "description": "Get the configuration schema\n\n**Endpoint:** `GET /api/config.schema.json`\n\nReturns the JSON schema for the application configuration, which defines the structure and validation rules for the configuration data.\n\nThis endpoint is useful for: - Client applications to validate configuration data - Documentation of configuration structure",
                "operationId": "get_config_schema",
                "responses": {
                    "403": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {}
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or missing Bearer token",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Invalid or missing Bearer token"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Authentication service unavailable",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Authentication service unavailable"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/api/config/visualization/output": {
            "get": {
                "tags": [
                    "Configuration"
                ],
                "description": "Get the visualization.output configuration\n\n**Endpoint:** `GET /api/config/visualization/output`\n\nReturns the current visualization output configuration",
                "operationId": "get_visualization_output",
                "responses": {
                    "403": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/VisualizationOutputItem"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or missing Bearer token",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Invalid or missing Bearer token"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Authentication service unavailable",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Authentication service unavailable"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/api/graph-statistics": {
            "get": {
                "tags": [
                    "Processing"
                ],
                "description": "Get processing graph statistics\n\n**Endpoint:** `GET /api/graph-statistics`\n\nReturns comprehensive statistics about the processing graph including: - Overall graph performance metrics - Individual node statistics - Execution timing information - Graph structure details\n\n### Authentication\n\nThis endpoint requires a valid JWT bearer token in the Authorization header. The token must have the appropriate scope for API access.\n\n### Returns\n\nReturns a JSON response containing `ProcessingGraphStatistics` with: - `node_statistics`: HashMap of node ID to performance statistics - `total_executions`: Total number of graph executions - `total_graph_processing_time`: Cumulative processing time - `average_graph_processing_time`: Average time per execution - `fastest_graph_execution`: Fastest recorded execution - `worst_graph_execution`: Slowest recorded execution - `active_nodes`: Number of active nodes in the graph - `connections_count`: Number of connections between nodes\n\n### Example Response\n\n```json { \"node_statistics\": { \"input\": { \"node_id\": \"input\", \"node_type\": \"input\", \"frames_processed\": 1000, \"total_processing_time\": \"PT1.234S\", \"average_processing_time\": \"PT0.001234S\", \"fastest_processing_time\": \"PT0.0008S\", \"worst_processing_time\": \"PT0.002S\" } }, \"total_executions\": 1000, \"total_graph_processing_time\": \"PT5.678S\", \"average_graph_processing_time\": \"PT0.005678S\", \"fastest_graph_execution\": \"PT0.003S\", \"worst_graph_execution\": \"PT0.012S\", \"active_nodes\": 4, \"connections_count\": 3 } ```\n\n### Error Responses\n\n- `401 Unauthorized`: Missing or invalid JWT token - `403 Forbidden`: Token lacks required scope - `404 Not Found`: No processing is currently active - `500 Internal Server Error`: Server error accessing statistics",
                "operationId": "get_graph_statistics",
                "responses": {
                    "403": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ProcessingGraphStatistics"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or missing Bearer token",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Invalid or missing Bearer token"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Authentication service unavailable",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Authentication service unavailable"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/api/graph": {
            "get": {
                "tags": [
                    "Processing"
                ],
                "description": "Get processing graph information\n\n**Endpoint:** `GET /api/graph`\n\nReturns a JSON object representing the current processing graph structure including nodes, connections, execution order, and topology information.\n\n### Authentication\n\nThis endpoint requires a valid JWT bearer token in the Authorization header. The token must have the appropriate scope for API access.\n\n### Returns\n\nReturns a JSON response containing `SerializableProcessingGraph` with: - `nodes`: Array of all processing nodes with their configurations - `connections`: Array of connections between nodes - `execution_order`: Topological order of node execution - `input_node`: ID of the designated input node - `output_node`: ID of the designated output node - `statistics`: Current performance statistics for the graph\n\n### Error Responses\n\n- `401 Unauthorized`: Missing or invalid JWT token - `403 Forbidden`: Token lacks required scope - `404 Not Found`: No processing graph is currently available - `500 Internal Server Error`: Server error accessing graph data",
                "operationId": "get_graph",
                "responses": {
                    "403": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SerializableProcessingGraph"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or missing Bearer token",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Invalid or missing Bearer token"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Authentication service unavailable",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Authentication service unavailable"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/api/graph/config": {
            "post": {
                "tags": [
                    "Processing"
                ],
                "description": "Post new node configuration\n\n**Endpoint:** `POST /api/graph/config`\n\nThis endpoint allows updating the configuration of processing nodes that support hot-reloading. The configuration changes are applied to the shared configuration state and will be automatically detected by the background monitoring thread for hot-reload without requiring a restart.\n\n### Request Body\n\nThe request body must be a valid JSON object conforming to the `NodeConfig` schema:\n\n```json { \"id\": \"node_id\", \"node_type\": \"filter\", \"parameters\": { \"cutoff_frequency\": 1000.0, \"filter_type\": \"lowpass\" } } ```\n\n### Validation Process\n\nThe endpoint performs the following validation steps in order:\n\n1. **Processing graph availability**: Verifies that a processing graph is currently loaded 2. **Node existence**: Confirms the specified `node_id` exists in the active processing graph 3. **Hot-reload support**: Validates that the target node supports hot-reloading via `supports_hot_reload` flag 4. **Configuration presence**: Ensures the node exists in the shared configuration state 5. **Parameter merging**: Intelligently merges new parameters with existing configuration: - If both existing and new parameters are JSON objects: performs key-by-key merging - If existing parameters are not an object: replaces entirely with new parameters - If new parameters are not an object: replaces existing parameters entirely\n\n### Configuration Update Behavior\n\n- **Merge strategy**: New parameter values overwrite existing ones with the same key - **Preservation**: Existing parameters not specified in the request are preserved - **Atomic update**: Configuration changes are applied atomically within a write lock - **Hot-reload trigger**: Changes are automatically detected by the monitoring thread\n\n### Authentication\n\nThis endpoint requires a valid JWT bearer token in the Authorization header. The token must have the `admin:api` scope for API access.\n\n### Returns\n\nReturns a JSON response containing the complete updated node parameters after merging:\n\n```json { \"cutoff_frequency\": 1000.0, \"filter_type\": \"lowpass\", \"existing_param\": \"preserved_value\" } ```\n\n### Error Responses\n\n- `400 Bad Request`: - No processing graph is currently available - Node with the specified ID does not exist in the processing graph - Node does not support hot reloading - Node not found in configuration state - Invalid JSON structure in request body - `401 Unauthorized`: Missing or invalid JWT token - `403 Forbidden`: Token lacks required `admin:api` scope - `500 Internal Server Error`: Server error processing the request or configuration lock failure",
                "operationId": "post_node_config",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/NodeConfig"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "403": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {}
                            }
                        }
                    },
                    "400": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or missing Bearer token",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Invalid or missing Bearer token"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Authentication service unavailable",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Authentication service unavailable"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/api/system/stats": {
            "get": {
                "tags": [
                    "System"
                ],
                "description": "Get current system statistics\n\n**Endpoint:** `GET /api/system/stats`\n\nReturns current system resource usage including: - CPU usage percentage - Memory consumption (physical and virtual) - Thread count - System uptime information\n\n### Authentication\n\nThis endpoint requires a valid JWT bearer token in the Authorization header.\n\n### Returns\n\nReturns JSON response containing `SystemStats` with current system metrics.\n\n### Example Response\n\n```json { \"cpu_usage_percent\": 25.4, \"memory_usage_mb\": 512, \"virtual_memory_mb\": 1024, \"thread_count\": 8, \"total_cpu_cores\": 4, \"available_memory_mb\": 3584, \"uptime_seconds\": 86400, \"process_uptime_seconds\": 3600, \"timestamp\": 1640995200 } ```",
                "operationId": "get_system_stats",
                "responses": {
                    "403": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SystemStats"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": ""
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or missing Bearer token",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Invalid or missing Bearer token"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Authentication service unavailable",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Authentication service unavailable"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/api/system/health": {
            "get": {
                "tags": [
                    "System"
                ],
                "description": "Get comprehensive system health report\n\n**Endpoint:** `GET /api/system/health`\n\nReturns a comprehensive health assessment combining: - System resource statistics - Processing pipeline performance - Health status evaluation - Optimization recommendations\n\n### Authentication\n\nThis endpoint requires a valid JWT bearer token in the Authorization header.\n\n### Returns\n\nReturns JSON response containing `SystemHealthReport` with complete system assessment.\n\n### Health Status Levels\n\n- **Healthy**: All systems operating within normal parameters - **Warning**: Minor performance issues detected but system functional - **Critical**: Significant performance degradation requiring attention\n\n### Example Response\n\n```json { \"system_stats\": { /* SystemStats object */ }, \"processing_summary\": { \"avg_execution_time_ms\": 5.2, \"efficiency_percentage\": 98.5, \"active_nodes\": 4, \"total_executions\": 15420, \"slowest_node\": \"bandpass_filter\" }, \"health_status\": { \"Healthy\": null }, \"recommendations\": [ \"System operating optimally\" ] } ```",
                "operationId": "get_system_health",
                "responses": {
                    "403": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SystemHealthReport"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": ""
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or missing Bearer token",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Invalid or missing Bearer token"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Authentication service unavailable",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Authentication service unavailable"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/api/action/{node_id}/history": {
            "get": {
                "tags": [
                    "Action History"
                ],
                "description": "Get historical measurement data from a specific action node\n\nReturns measurement data stored in the action node's history buffer. The data is returned in chronological order (newest first).\n\n### Path Parameters - `node_id`: The ID of the action node to query\n\n### Query Parameters - `limit`: Maximum number of entries to return (optional)\n\n### Returns - `200 OK`: Array of measurement data - `404 Not Found`: Action node with the specified ID not found - `500 Internal Server Error`: Failed to access processing graph\n\n### Example Response ```json [ { \"concentration_ppm\": 456.78, \"source_node_id\": \"concentration_calculator\", \"peak_amplitude\": 0.85, \"peak_frequency\": 2000.5, \"timestamp\": 1640995200, \"metadata\": { \"trigger_type\": \"concentration_threshold\", \"alert_message\": \"High concentration detected\" } } ] ```",
                "operationId": "get_action_history",
                "parameters": [
                    {
                        "name": "node_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "format": "uint",
                            "minimum": 0.0,
                            "nullable": true
                        }
                    }
                ],
                "responses": {
                    "403": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/MeasurementData"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": ""
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or missing Bearer token",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Invalid or missing Bearer token"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Authentication service unavailable",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Authentication service unavailable"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/api/action/{node_id}/history/stats": {
            "get": {
                "tags": [
                    "Action History"
                ],
                "description": "Get statistics about an action node's history buffer\n\nReturns metadata about the action node including buffer statistics, configuration, and performance metrics.\n\n### Path Parameters - `node_id`: The ID of the action node to query\n\n### Returns - `200 OK`: Statistics object - `404 Not Found`: Action node with the specified ID not found - `500 Internal Server Error`: Failed to access processing graph\n\n### Example Response ```json { \"node_id\": \"redis_stream_action\", \"node_type\": \"action_universal\", \"history_buffer\": { \"capacity\": 100, \"current_size\": 85, \"is_full\": false, \"oldest_entry_timestamp\": 1640995000, \"newest_entry_timestamp\": 1640995200 }, \"configuration\": { \"monitored_nodes\": [\"concentration_calculator\"], \"concentration_threshold\": 100.0, \"amplitude_threshold\": 0.65, \"update_interval_ms\": 5000 }, \"driver_info\": { \"has_driver\": true, \"driver_type\": \"configured\" }, \"performance\": { \"processing_count\": 1250, \"actions_triggered\": 15, \"last_update_time\": 1640995200, \"last_action_update\": 1640995195 } } ```",
                "operationId": "get_action_history_stats",
                "parameters": [
                    {
                        "name": "node_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "403": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {}
                            }
                        }
                    },
                    "default": {
                        "description": ""
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or missing Bearer token",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Invalid or missing Bearer token"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Authentication service unavailable",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Authentication service unavailable"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/api/action": {
            "get": {
                "tags": [
                    "Action History"
                ],
                "description": "List all available action nodes\n\nReturns a summary of all UniversalActionNode instances in the processing graph, including their basic configuration and status information.\n\n### Returns - `200 OK`: Array of action node information - `500 Internal Server Error`: Failed to access processing graph\n\n### Example Response ```json [ { \"id\": \"redis_stream_action\", \"node_type\": \"action_universal\", \"has_driver\": true, \"monitored_nodes_count\": 1, \"buffer_size\": 85, \"buffer_capacity\": 100 }, { \"id\": \"web_dashboard_action\", \"node_type\": \"action_universal\", \"has_driver\": true, \"monitored_nodes_count\": 1, \"buffer_size\": 200, \"buffer_capacity\": 300 } ] ```",
                "operationId": "list_action_nodes",
                "responses": {
                    "403": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ActionNodeInfo"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": ""
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or missing Bearer token",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Invalid or missing Bearer token"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Authentication service unavailable",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Authentication service unavailable"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/api/test/{path}": {
            "get": {
                "tags": [
                    "Test"
                ],
                "operationId": "test_api",
                "parameters": [
                    {
                        "name": "path",
                        "in": "path",
                        "required": true,
                        "allow_reserved": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "403": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TestResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or missing Bearer token",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Invalid or missing Bearer token"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Authentication service unavailable",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Authentication service unavailable"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Test"
                ],
                "operationId": "test_post_api",
                "parameters": [
                    {
                        "name": "path",
                        "in": "path",
                        "required": true,
                        "allow_reserved": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/TestData"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "403": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TestResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or missing Bearer token",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Invalid or missing Bearer token"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Authentication service unavailable",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Authentication service unavailable"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/api/test/web_dashboard_action": {
            "post": {
                "tags": [
                    "Test"
                ],
                "description": "Test API endpoint for web dashboard display\n\nThis endpoint is used to test the API functionality for the web dashboard display. It returns a JSON response containing the request path, user information, and an optional message. It logs the concentration, amplitude, frequency, and timestamp from the display update data.",
                "operationId": "test_api_post_web_dashboard_display",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/DisplayUpdateData"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "403": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TestResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or missing Bearer token",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Invalid or missing Bearer token"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Authentication service unavailable",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Authentication service unavailable"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/": {
            "get": {
                "tags": [
                    "webclient"
                ],
                "description": "Redirect the root path to the web client\n\nThis route handler redirects requests for the root path (`/`) to the web client's index.html file. This allows users to access the web interface by navigating to the server's root URL.\n\n### Returns\n\nA redirect response pointing to `/client/index.html`",
                "operationId": "webclient_index",
                "responses": {
                    "500": {
                        "description": ""
                    }
                }
            }
        },
        "/index.html": {
            "get": {
                "tags": [
                    "webclient"
                ],
                "description": "Redirect `/index.html` to the web client\n\nThis route handler redirects requests for `/index.html` to the web client's index.html file at `/client/index.html`. This provides a convenient shorthand URL for accessing the web interface.\n\n### Returns\n\nA redirect response pointing to `/client/index.html`",
                "operationId": "webclient_index_html",
                "responses": {
                    "500": {
                        "description": ""
                    }
                }
            }
        },
        "/{_path}": {
            "options": {
                "tags": [
                    "Cors"
                ],
                "description": "Handler for HTTP OPTIONS requests required for CORS preflight\n\nThis handler responds to OPTIONS requests with a 200 OK response, which is necessary for CORS preflight requests. The CORS fairing will add the appropriate headers to the response.\n\n### Parameters\n\n* `_path` - The path requested (ignored in this implementation)\n\n### Returns\n\nAn empty success result to indicate that the preflight request is accepted",
                "operationId": "options",
                "parameters": [
                    {
                        "name": "_path",
                        "in": "path",
                        "required": true,
                        "allow_reserved": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": ""
                    },
                    "500": {
                        "description": ""
                    }
                }
            }
        },
        "/api/computing": {
            "get": {
                "tags": [
                    "Computing"
                ],
                "description": "Computing API endpoint that returns live data from SharedComputingState",
                "operationId": "computing_api",
                "responses": {
                    "403": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ComputingResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or missing Bearer token",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Invalid or missing Bearer token"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Authentication service unavailable",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Authentication service unavailable"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/api/thermal/regulators": {
            "get": {
                "tags": [
                    "Thermal Regulation"
                ],
                "description": "Get the list of available thermal regulators\n\n**Endpoint:** `GET /api/thermal/regulators`\n\nReturns a list of all thermal regulator identifiers that are currently configured in the system. This list can be used to filter thermal data requests to specific regulators.\n\n### Authentication\n\nThis endpoint requires a valid JWT bearer token in the Authorization header with read access privileges. The token must have the `read:api` scope.\n\n### Returns\n\nReturns a JSON array containing the string identifiers of all available thermal regulators in the system.\n\n### Response Structure\n\n```json [ \"regulator_1\", \"regulator_2\", \"main_chamber_heater\", \"coolant_system\" ] ```\n\n### Error Responses\n\n- `401 Unauthorized`: Missing or invalid JWT token - `403 Forbidden`: Token lacks required `read:api` scope - `500 Internal Server Error`: Server error accessing thermal regulation state",
                "operationId": "get_thermal_regulators",
                "responses": {
                    "403": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or missing Bearer token",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Invalid or missing Bearer token"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Authentication service unavailable",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Authentication service unavailable"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/api/thermal": {
            "get": {
                "tags": [
                    "Thermal Regulation"
                ],
                "description": "Get thermal regulation data with filtering and pagination\n\n**Endpoint:** `GET /api/thermal`\n\nReturns historical thermal regulation data with optional filtering by time range, regulators, and data sampling. The response includes pagination support for efficient handling of large datasets.\n\nThis endpoint provides access to: - Historical temperature measurements from all thermal regulators - PID controller output values and setpoints - Individual PID component values (P, I, D terms) for control analysis - Configurable data sampling intervals to reduce response size - Time-range filtering for specific analysis periods - Regulator-specific data filtering\n\n### Query Parameters\n\nAll query parameters are optional and can be combined to customize the response:\n\n- `steps` - Time interval in seconds between returned data points - Default: 60 seconds (1 minute intervals) - Set to 0 to return all available data points - Higher values reduce response size by sampling data\n\n- `regulators` - Array of regulator IDs to include in response - Default: All regulators included - Use `/api/thermal/regulators` to get available regulator IDs - Example: `?regulators=main_heater&regulators=coolant_pump`\n\n- `from` - Start timestamp for data range (Unix seconds or ISO 8601) - Default: Beginning of available data - Example: `?from=1672531200` or `?from=2023-01-01T00:00:00Z`\n\n- `to` - End timestamp for data range (Unix seconds or ISO 8601) - Default: Most recent data - Example: `?to=1672617600` or `?to=2023-01-02T00:00:00Z`\n\n- `page` - Page number for pagination (1-indexed) - Default: 1 - Used with `limit` parameter for result pagination\n\n- `limit` - Maximum number of data points per regulator per page - Default: 1000 - Maximum: 10000 to prevent excessive response sizes\n\n### Authentication\n\nThis endpoint requires a valid JWT bearer token in the Authorization header with read access privileges. The token must have the `read:api` scope.\n\n### Response Structure\n\nReturns a JSON response with the following structure:\n\n```json { \"data\": { \"regulator_1\": [ { \"timestamp\": 1672531260, \"temperature_celsius\": 23.5, \"control_output_percent\": 15.2, \"setpoint_celsius\": 25.0, \"pid_components\": { \"proportional\": 1.5, \"integral\": 0.3, \"derivative\": -0.1, \"error\": 1.5 } } ] }, \"pagination\": { \"page\": 1, \"limit\": 1000, \"total_items\": 2500, \"total_pages\": 3, \"has_next\": true, \"has_previous\": false }, \"filters\": { \"step_seconds\": 60, \"included_regulators\": [\"regulator_1\", \"regulator_2\"], \"from_timestamp\": 1672531200, \"to_timestamp\": 1672617600 } } ```\n\n### Data Sampling and Performance\n\nFor optimal performance with large datasets: - Use the `steps` parameter to reduce data density - Apply time range filtering with `from` and `to` parameters - Use pagination for datasets exceeding 1000 points per regulator - Consider filtering to specific regulators when only subset analysis is needed\n\n### Error Responses\n\n- `400 Bad Request`: Invalid query parameters (e.g., invalid timestamp format) - `401 Unauthorized`: Missing or invalid JWT token - `403 Forbidden`: Token lacks required `read:api` scope - `422 Unprocessable Entity`: Invalid parameter values (e.g., page < 1, limit > 10000) - `500 Internal Server Error`: Server error accessing thermal regulation data\n\n### Examples\n\nGet last hour of data with 5-minute intervals: ```text GET /api/thermal?steps=300&from=1672531200&to=1672534800 ```\n\nGet specific regulator data with pagination: ```text GET /api/thermal?regulators=main_heater&page=2&limit=500 ```\n\nGet all available data for analysis: ```text GET /api/thermal?steps=0 ```",
                "operationId": "get_thermal_data",
                "parameters": [
                    {
                        "name": "steps",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "format": "uint32",
                            "minimum": 0.0,
                            "nullable": true
                        }
                    },
                    {
                        "name": "regulators",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            },
                            "nullable": true
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "nullable": true
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "nullable": true
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "format": "uint32",
                            "minimum": 0.0,
                            "nullable": true
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "format": "uint32",
                            "minimum": 0.0,
                            "nullable": true
                        }
                    }
                ],
                "responses": {
                    "403": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaginatedThermalResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or missing Bearer token",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Invalid or missing Bearer token"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Authentication service unavailable",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Authentication service unavailable"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/api/thermal/temperatures": {
            "get": {
                "tags": [
                    "Thermal Regulation"
                ],
                "description": "Get the last recorded temperatures for all thermal regulators\n\n**Endpoint:** `GET /api/thermal/temperatures`\n\nReturns the most recent temperature reading for each thermal regulator in the system. This provides a quick snapshot of the current thermal state without historical data.\n\n### Authentication\n\nThis endpoint requires a valid JWT bearer token in the Authorization header with read access privileges. The token must have the `read:api` scope.\n\n### Returns\n\nReturns a JSON object containing the regulator ID as the key and current temperature information as the value. Each regulator entry includes: - Current temperature in degrees Celsius - Timestamp of the last reading (Unix seconds) - Current setpoint temperature - Regulator status\n\n### Response Structure\n\n```json { \"regulator_1\": { \"temperature_celsius\": 23.5, \"timestamp\": 1672531260, \"setpoint_celsius\": 25.0, \"status\": \"Running\" }, \"main_chamber_heater\": { \"temperature_celsius\": 45.2, \"timestamp\": 1672531265, \"setpoint_celsius\": 50.0, \"status\": \"Running\" } } ```\n\n### Error Responses\n\n- `401 Unauthorized`: Missing or invalid JWT token - `403 Forbidden`: Token lacks required `read:api` scope - `500 Internal Server Error`: Server error accessing thermal regulation state\n\n### Notes\n\n- If a regulator has no temperature readings, it will not appear in the response - The timestamp indicates when the temperature reading was taken - Status values include: \"Uninitialized\", \"Initializing\", \"Running\", \"Error\", \"Stopped\"",
                "operationId": "get_last_temperatures",
                "responses": {
                    "403": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": {
                                        "$ref": "#/components/schemas/CurrentTemperatureInfo"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or missing Bearer token",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Invalid or missing Bearer token"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Authentication service unavailable",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Authentication service unavailable"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/api/stream/stats": {
            "get": {
                "tags": [
                    "Audio Streaming"
                ],
                "description": "Get realtime source stream statistics\n\nReturns information about the audio stream including frame rates, subscriber count, and other metrics.",
                "operationId": "get_stream_stats",
                "responses": {
                    "403": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/StreamStats"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or missing Bearer token",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Invalid or missing Bearer token"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Authentication service unavailable",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Authentication service unavailable"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/api/stream/audio/fast/stats": {
            "get": {
                "tags": [
                    "Audio Streaming"
                ],
                "description": "Get realtime source stream statistics\n\nReturns information about the audio stream including frame rates, subscriber count, and other metrics.",
                "operationId": "get_stream_fast_stats",
                "responses": {
                    "403": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/StreamStats"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or missing Bearer token",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Invalid or missing Bearer token"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Authentication service unavailable",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Authentication service unavailable"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/api/stream/latest": {
            "get": {
                "tags": [
                    "Audio Streaming"
                ],
                "description": "Get the latest audio frame from realtime source\n\nReturns the most recent audio frame without subscribing to the stream. Useful for getting current state or testing connectivity.",
                "operationId": "get_latest_frame",
                "responses": {
                    "403": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AudioFrameResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": ""
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or missing Bearer token",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Invalid or missing Bearer token"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Authentication service unavailable",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Authentication service unavailable"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/api/stream/audio": {
            "get": {
                "tags": [
                    "Audio Streaming"
                ],
                "description": "Stream audio frames via Server-Sent Events\n\nProvides a continuous stream of audio frames to web clients using Server-Sent Events. Each event contains a complete audio frame with both channels of data. Source is the realtime source\n\n### Authentication Requires a valid JWT token with appropriate read permissions. The token is transmitted via \"Authorization: Bearer <token>\" .\n\n### Response Format The stream sends JSON-encoded audio frames as SSE events: ```json data: {\"channel_a\": [...], \"channel_b\": [...], ...}\n\n```",
                "operationId": "stream_audio",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "text/event-stream": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "integer",
                                        "format": "uint8",
                                        "minimum": 0.0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/stream/audio/fast": {
            "get": {
                "tags": [
                    "Audio Streaming"
                ],
                "description": "Stream realtime source frames via Server-Sent Events using fast binary format\n\nSimilar to stream_audio but uses base64-encoded binary data for reduced bandwidth. This can reduce data size by approximately 1.9x compared to JSON arrays.",
                "operationId": "stream_audio_fast",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "text/event-stream": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "integer",
                                        "format": "uint8",
                                        "minimum": 0.0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/stream/audio/{node_id}": {
            "get": {
                "tags": [
                    "Audio Streaming"
                ],
                "description": "Stream audio frames via Server-Sent Events for a specific streaming node (JSON format)\n\n**DEPRECATED:** Use [`/api/stream/audio/fast/<node_id>`] for more efficient binary streaming with node routing.\n\nThis endpoint streams real-time audio frames from a specific `StreamingNode` identified by its UUID or string ID. Each event contains a JSON-encoded audio frame with both channels of data. The endpoint is primarily intended for backward compatibility and debugging, as the fast binary endpoint is recommended for production use.\n\n### Route Pattern `/api/stream/audio/<node_id>` where `node_id` can be: - A UUID string: `123e4567-e89b-12d3-a456-426614174000` - A string ID from node configuration: `my_streaming_node`\n\n### Parameters - `node_id`: The UUID or string ID of the streaming node to subscribe to (as a path parameter) - `stream_state`: Rocket-managed state containing the streaming registry\n\n### Authentication Requires a valid JWT token with `read:api` permission.\n\n### Response Format Streams Server-Sent Events (SSE) with JSON-encoded audio frames:\n\n```json data:{\"channel_a\": [...], \"channel_b\": [...], \"sample_rate\": 44100, ...} ```\n\nIf the node ID is invalid or not found, an error event is sent:\n\n```json data:{\"type\": \"error\", \"message\": \"No streaming node found\"} ```\n\nHeartbeat events are sent every 5 seconds if no frame is available:\n\n```json data:{\"type\": \"heartbeat\"} ```\n\n### Deprecation This endpoint is deprecated in favor of [`/stream/audio/fast/<node_id>`], which uses a more efficient binary format for audio data. New clients should use the fast endpoint for lower bandwidth and better performance.\n\n### Examples\n\n```text GET /api/stream/audio/123e4567-e89b-12d3-a456-426614174000 GET /api/stream/audio/my_streaming_node ```\n\n### See Also - [`/stream/audio/fast/<node_id>`]: Fast binary streaming for a specific node - [`/stream/nodes`]: List all available streaming nodes and their UUIDs",
                "operationId": "stream_audio_with_node_id",
                "parameters": [
                    {
                        "name": "node_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "text/event-stream": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "integer",
                                        "format": "uint8",
                                        "minimum": 0.0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/stream/audio/fast/{node_id}": {
            "get": {
                "tags": [
                    "Audio Streaming"
                ],
                "description": "Stream audio frames via Server-Sent Events using fast binary format with dynamic node ID routing\n\nThis endpoint supports routing to specific streaming nodes using their UUID. When a node_id is provided, it queries the StreamingNodeRegistry for the appropriate stream. If no matching node is found, returns a 404 error.\n\n### Route Pattern `/api/stream/audio/fast/<node_id>` where `node_id` is a UUID string\n\n### Examples - `/stream/audio/fast/123e4567-e89b-12d3-a456-426614174000` - Stream from specific node\n\n### Authentication Requires a valid JWT token with `read:api` permission.",
                "operationId": "stream_audio_fast_with_node_id",
                "parameters": [
                    {
                        "name": "node_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "text/event-stream": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "integer",
                                        "format": "uint8",
                                        "minimum": 0.0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/stream/spectral": {
            "get": {
                "tags": [
                    "Audio Streaming"
                ],
                "description": "Stream spectral analysis data via Server-Sent Events\n\nProvides real-time spectral analysis data computed from the audio frames. The analysis includes FFT magnitude and optionally phase information for both audio channels.\n\n### Authentication Requires a valid JWT token with appropriate read permissions.\n\n### Response Format The stream sends JSON-encoded spectral data as SSE events: ```json data: {\"frequencies\": [...], \"magnitude_a\": [...], \"magnitude_b\": [...], ...}\n\n```",
                "operationId": "stream_spectral_analysis",
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "text/event-stream": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "integer",
                                        "format": "uint8",
                                        "minimum": 0.0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/stream/nodes": {
            "get": {
                "tags": [
                    "Audio Streaming"
                ],
                "description": "List all available streaming nodes\n\nReturns information about all registered streaming nodes in the system. This endpoint is useful for discovering available streams and their status.\n\n### Authentication Requires a valid JWT token with `read:api` permission.\n\n### Response Format Returns a JSON array of streaming node information: ```json [ { \"id\": \"my_streaming_node\", \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\", \"name\": \"Recording Node 1\", \"is_active\": true, \"subscriber_count\": 2 } ] ```",
                "operationId": "list_streaming_nodes",
                "responses": {
                    "403": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/StreamingNodeInfo"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or missing Bearer token",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Invalid or missing Bearer token"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Authentication service unavailable",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Authentication service unavailable"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/api/stream/nodes/{node_id}/stats": {
            "get": {
                "tags": [
                    "Audio Streaming"
                ],
                "description": "Get statistics for a specific streaming node\n\nReturns detailed statistics for a specific streaming node identified by its UUID or string ID. The endpoint supports both formats: - UUID format: `123e4567-e89b-12d3-a456-426614174000` - String ID format: `my_streaming_node`\n\n### Authentication Requires a valid JWT token with `read:api` permission.",
                "operationId": "get_node_stats",
                "parameters": [
                    {
                        "name": "node_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "403": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/StreamStats"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or missing Bearer token",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Invalid or missing Bearer token"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Authentication service unavailable",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Authentication service unavailable"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/api/stream/audio/fast/{node_id}/stats": {
            "get": {
                "tags": [
                    "Audio Streaming"
                ],
                "description": "Get statistics for a specific fast streaming node\n\nReturns detailed statistics for a specific streaming node identified by its UUID or string ID. The endpoint supports both formats: - UUID format: `123e4567-e89b-12d3-a456-426614174000` - String ID format: `my_streaming_node`\n\n### Authentication Requires a valid JWT token with `read:api` permission.",
                "operationId": "get_node_fast_stats",
                "parameters": [
                    {
                        "name": "node_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "403": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/StreamStats"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or missing Bearer token",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Invalid or missing Bearer token"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Authentication service unavailable",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Authentication service unavailable"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/api/stream/audio/get-all-streams": {
            "get": {
                "tags": [
                    "Audio Streaming"
                ],
                "description": "Retrieve all available audio streams\n\nThis endpoint lists all currently active audio streams in the system. Includes streams from nodes (by id) as well as the realtime source stream.\n\n### Authentication Requires a valid JWT token with `read:api` permission.\n\n### Response Format Returns a JSON array of audio stream information objects: ```json [ { \"id\": \"realtime_source\", \"stream_url\": \"/api/stream/audio/fast\", \"stats_url\": \"/api/stream/audio/fast/stats\" }, { \"id\": \"streaming_output\", \"stream_url\": \"/api/stream/audio/fast/streaming_output\", \"stats_url\": \"/api/stream/audio/fast/streaming_output/stats\" } ] ```",
                "operationId": "get_all_available_fast_audio_streams",
                "responses": {
                    "403": {
                        "description": "",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/AudioStreamInfo"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - Invalid or missing Bearer token",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Invalid or missing Bearer token"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error - Authentication service unavailable",
                        "content": {
                            "application/json": {
                                "example": {
                                    "error": "Authentication service unavailable"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        }
    },
    "components": {
        "schemas": {
            "Config": {
                "description": "Root configuration structure for the photoacoustic application.\n\nThis structure serves as the main container for all configuration sections of the application. Currently, it only contains visualization settings, but it can be expanded to include other sections as the application grows.\n\n### Structure\n\nThe configuration is designed to be deserialized from and serialized to YAML using the serde framework. The structure is validated against a JSON schema to ensure all required fields are present and have valid values.\n\n### Default Values\n\nEach section uses default values when not explicitly specified in the configuration file, allowing for minimal configuration when custom settings are not required.",
                "type": "object",
                "properties": {
                    "visualization": {
                        "description": "Settings for the visualization web server component.\n\nThese settings control how the visualization server behaves, including network binding, security, and authentication mechanisms. If not specified in the configuration file, default values are used.",
                        "default": {
                            "address": "127.0.0.1",
                            "cert": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJvekNDQVVtZ0F3SUJBZ0lVVmsvWDVLNVpaZVlxQkhhSXBIc1BqNzZWRjFJd0NnWUlLb1pJemowRUF3SXcKSXpFaE1COEdBMVVFQXd3WWNuVnpkQzF3YUc5MGIyRmpiM1Z6ZEdsakxteHZZMkZzTUI0WERUSTFNRFV5T0RBMQpNalF3T0ZvWERUSTJNRFV5T0RBMU1qUXdPRm93SXpFaE1COEdBMVVFQXd3WWNuVnpkQzF3YUc5MGIyRmpiM1Z6CmRHbGpMbXh2WTJGc01Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRXZuTUpBSzN5OUtodlBQR20KRmN6U1NsTHJxZFJxWURERW1OUllITFNXVnpFU2VkVC9wRWtIN2hHanpHcHBuNGhaRERsOWd4VmtEYzRYeWlKYQpGcHBCYktOYk1Ga3dSZ1lEVlIwUkJEOHdQWUlZY25WemRDMXdhRzkwYjJGamIzVnpkR2xqTG14dlkyRnNnZ2xzCmIyTmhiR2h2YzNTSEJIOEFBQUdIRUFBQUFBQUFBQUFBQUFBQUFBQUFBQUV3RHdZRFZSMFBBUUgvQkFVREF3ZWcKQURBS0JnZ3Foa2pPUFFRREFnTklBREJGQWlCK1NmdmlNNk1Vc0s3SWkxdWZuZmUwTldQelo4OExvc2Y4bHlBVQpHbTNHVXdJaEFNQWFNQmszdWpJSU8yWjNLejlSNmlrenNnT1Q4aGxSRzgxOERPV09KSUMvCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K",
                            "enable_compression": true,
                            "enabled": true,
                            "hmac_secret": "my-super-secret-jwt-key-for-photoacoustic-app",
                            "key": "LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JR0hBZ0VBTUJNR0J5cUdTTTQ5QWdFR0NDcUdTTTQ5QXdFSEJHMHdhd0lCQVFRZ2c0cUNhWFowVTJWeWpjL0gKek1TSE94dnJpbU1TcEpjYlYzdnpPWWszTUQ2aFJBTkNBQVMrY3drQXJmTDBxRzg4OGFZVnpOSktVdXVwMUdwZwpNTVNZMUZnY3RKWlhNUko1MVAra1NRZnVFYVBNYW1tZmlGa01PWDJERldRTnpoZktJbG9XbWtGcwotLS0tLUVORCBQUklWQVRFIEtFWS0tLS0tCg==",
                            "name": "LaserSmartApiServer/0.1.0",
                            "output": [],
                            "port": 8080,
                            "rs256_private_key": "LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlKS0FJQkFBS0NBZ0VBdjBxWi9WOFhJNVlaald6MUZzTkpHS0E5Q095TXl4RzkxSVFzT2FycmVBNTZTTGQrCmYwNUZyN3hhQkJyaThDa1JNN0NpNDY1b0dmM3VScXVLYmhMRjg1d1ovV2RWYjBpMFg4RzJvRnpnMTFsZkpKcjIKN0lWSkIxTlZIRjJKYmp1SGFHQmlGenNUTG1QMTNWRno2ZW44K2lqREpYTXd2d3hsZnhPRWdzTmtGSHBkTHo4UgpDM3FGaGFEV2M1aDAyQXlzRTFKc0p1Y3ZxMDYxMmV1cjcrb3RkUVR1eE9uMXVJa3Z5N2FxRmJpWlJnNHZMdzVHClFFVDJuT3I5LzJTdEJxSDI4UUk4emNVS3VwZi9Kd3hmbDFrMTNnZWNwOWkvRWZZR3JYdHJxYm9xYmluRkRVYUcKQzVaZWFsQU4zTTBCeXpmU09adjdJUWx6ZXllUW1CNTNwN25jSEFNV01Ic1JMT2tvUUtLM3gxekpCSUUyU3FzTQovdUdudkg3YkZqR21GN3JCWnpUWHd6NGNmaVVxbjdlNzU2eXJDeFNnZlhDdy9OTVlNcnBXSk9wZ3JtV0xndi9ICkZjV0JOWU1KeEhoOWFGOHovQm1LVTlrNFZSaC8yNWRkOEF0MHgxNnExTU4xbX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lp6VFh3ejRjZmlVcW43ZTc1NnlyQ3hTZ2ZYQ3cvTk1ZTXJwV0pPcGdybVdMZ3YvSEZjV0IKTllNSnhIaDlhRjh6L0JtS1U5azRWUmgvMjVkZDhBdDB4MTZxMU1OMW15aERiTWFibVVYcDEzQ080K1Z1b1c5SApJSlgxSWRwSFJERnlZR1RxWWMvTzFCTXNTSjliWDZvYWl5eFBNMmlRRmRJT0ZCK3BqRFJzQ1FHTk9WMUpmREx6CnRCOHprTmlqKzF4T0RmUSs5MWwrYnJwNG9BeHJFRERQWXBQa3dTdzgyNjJkTW5YL2VmSFZQblFwNGhLTnRKa3gKNlhwcitvNW1BSXRtY0RtWXFpZ3U0RlRnOE9ucndRT3MrUDBoODkrMzV5SUZNZlRJejlCVlpRa0NBd0VBQVE9PQotLS0tLUVORCBSU0EgUFVCTElDIEtFWS0tLS0tCg==",
                            "session_secret": "MhJo2WfuMZObt5g8fFNAe3CJG1FdsUn1WV9gYCf54Sg="
                        },
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/VisualizationConfig"
                            }
                        ]
                    },
                    "acquisition": {
                        "description": "Acquisition settings for the photoacoustic application.\n\nThis section controls parameters related to the data acquisition process, such as enabling/disabling acquisition, and the interval between acquisitions. If not specified, default values will be used.",
                        "default": {
                            "enabled": true,
                            "interval_ms": 1000
                        },
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/AcquisitionConfig"
                            }
                        ]
                    },
                    "modbus": {
                        "description": "Modbus settings for the photoacoustic application.\n\nThis section controls parameters related to the Modbus communication, such as enabling/disabling Modbus, the port to use, and the address. If not specified, default values will be used.",
                        "default": {
                            "address": "127.0.0.1",
                            "enabled": false,
                            "port": 502
                        },
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/ModbusConfig"
                            }
                        ]
                    },
                    "photoacoustic": {
                        "description": "Photoacoustic settings for the photoacoustic application.\n\nThis section controls parameters related to the photoacoustic acquisition, such as the input device, input file, frequency, bandwidth, window size, and number of spectra to average. If not specified, default values will be used.",
                        "default": {
                            "averages": 10,
                            "bandwidth": 50.0,
                            "frame_size": 4096,
                            "frequency": 1000.0,
                            "input_device": "first",
                            "precision": 16,
                            "record_consumer": false,
                            "record_file": "recorded_audio.wav",
                            "sample_rate": 44100
                        },
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/PhotoacousticConfig"
                            }
                        ]
                    },
                    "access": {
                        "description": "User access and permissions settings for the photoacoustic application.\n\nThis section controls parameters related to user authentication and authorization, such as the list of users, their credentials, and associated permissions. If not specified, default values will be used.",
                        "default": {
                            "clients": [
                                {
                                    "allowed_callbacks": [
                                        "http://localhost:8080/client/",
                                        "https://localhost:8080/client/"
                                    ],
                                    "client_id": "LaserSmartClient",
                                    "default_scope": "openid profile email read:api write:api"
                                }
                            ],
                            "duration": 86400,
                            "iss": "LaserSmartServer",
                            "users": [
                                {
                                    "email": "email@example.org",
                                    "name": "Admin User",
                                    "pass": "JDUkM2E2OUZwQW0xejZBbWV2QSRvMlhhN0lxcVdVU1VPTUh6UVJiM3JjRlRhZy9WYjdpSWJtZUJFaXA3Y1ZECg==",
                                    "permissions": [
                                        "read:api",
                                        "write:api",
                                        "admin:api",
                                        "openid",
                                        "profile",
                                        "email"
                                    ],
                                    "user": "admin"
                                }
                            ]
                        },
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/AccessConfig"
                            }
                        ]
                    },
                    "processing": {
                        "description": "Processing settings for the photoacoustic application.\n\nThis section controls parameters related to the audio processing pipeline, such as processing graphs, nodes configuration, and performance settings. If not specified, default values will be used.",
                        "default": {
                            "default_graph": {
                                "connections": [
                                    {
                                        "from": "input",
                                        "to": "channel_selector"
                                    }
                                ],
                                "id": "default",
                                "nodes": [
                                    {
                                        "id": "input",
                                        "node_type": "input",
                                        "parameters": null
                                    },
                                    {
                                        "id": "channel_selector",
                                        "node_type": "channel_selector",
                                        "parameters": {
                                            "target_channel": "ChannelA"
                                        }
                                    }
                                ],
                                "output_node": "channel_selector"
                            },
                            "enabled": true,
                            "performance": {
                                "enable_stats": true,
                                "max_processing_time_us": 10000,
                                "stats_interval_ms": 1000
                            },
                            "result_buffer_size": 1000
                        },
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/ProcessingConfig"
                            }
                        ]
                    },
                    "thermal_regulation": {
                        "description": "Thermal regulation settings for the photoacoustic application.\n\nThis section controls parameters related to thermal regulation system, including I2C controllers, PID regulators, and thermal actuators. If not specified, default values will be used.",
                        "default": {
                            "enabled": false,
                            "global_settings": {
                                "global_sampling_rate_hz": 10.0,
                                "max_concurrent_regulators": 32,
                                "monitoring": {
                                    "enable_performance_monitoring": true,
                                    "enable_thermal_history": false,
                                    "history_buffer_size": 1000,
                                    "metrics_interval_s": 1.0
                                },
                                "resource_sharing": {
                                    "i2c_arbitration_timeout_ms": 100,
                                    "max_operation_queue_size": 100,
                                    "priority_scheduling": false
                                }
                            },
                            "i2c_buses": {},
                            "regulators": []
                        },
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/ThermalRegulationConfig"
                            }
                        ]
                    },
                    "generix": {
                        "default": {
                            "api_base_url": "https://localhost:8080",
                            "audience": "LaserSmartClient",
                            "authority": "https://localhost:8080",
                            "client_id": "LaserSmartClient",
                            "domain": "localhost",
                            "issuer": "LaserSmartServer",
                            "jwks_endpoint": "https://localhost:8080/.well-known/jwks.json",
                            "provider": "generix",
                            "redirect_uri": "https://localhost:8080/client/",
                            "scope": "openid email profile read:api write:api",
                            "token_issuer": "https://localhost:8080"
                        },
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/GenerixConfig"
                            }
                        ]
                    }
                }
            },
            "VisualizationConfig": {
                "description": "Configuration for the visualization web server.\n\nThis structure contains all settings required for the visualization server component, including network binding parameters, TLS certificate settings, and authentication configuration with both HMAC and RSA key-based JWT options.\n\n### Security Options\n\nThe structure supports two JWT authentication mechanisms:\n\n1. **HMAC-based JWT**: A simple secret key used for both signing and verification 2. **RS256-based JWT**: More secure public/private key pair where: - Private key is used for signing tokens - Public key is used for verifying tokens\n\nThe RS256 keys can be generated using the included `rs256keygen` binary.\n\n### TLS Configuration\n\nFor secure HTTPS connections, both `cert` and `key` fields must be provided as Base64-encoded PEM files. If either is missing, the server will operate in non-TLS mode.",
                "type": "object",
                "properties": {
                    "port": {
                        "description": "The TCP port the visualization server will listen on.\n\nValid range is 1-65534. Default value is 8080.",
                        "default": 8080,
                        "type": "integer",
                        "format": "uint16",
                        "minimum": 0.0
                    },
                    "address": {
                        "description": "The network address the server will bind to.\n\nCan be an IPv4/IPv6 address or a hostname. Default is \"127.0.0.1\". Use \"0.0.0.0\" to bind to all IPv4 interfaces.",
                        "default": "127.0.0.1",
                        "type": "string"
                    },
                    "name": {
                        "description": "The server name reported in HTTP headers and logs.\n\nDefault is \"LaserSmartApiServer/\" followed by the package version.",
                        "default": "LaserSmartApiServer/0.1.0",
                        "type": "string"
                    },
                    "cert": {
                        "description": "SSL/TLS certificate in PEM format, Base64 encoded.\n\nIf provided, `key` must also be supplied. For development, defaults to the certificate in the resources directory.",
                        "default": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJvekNDQVVtZ0F3SUJBZ0lVVmsvWDVLNVpaZVlxQkhhSXBIc1BqNzZWRjFJd0NnWUlLb1pJemowRUF3SXcKSXpFaE1COEdBMVVFQXd3WWNuVnpkQzF3YUc5MGIyRmpiM1Z6ZEdsakxteHZZMkZzTUI0WERUSTFNRFV5T0RBMQpNalF3T0ZvWERUSTJNRFV5T0RBMU1qUXdPRm93SXpFaE1COEdBMVVFQXd3WWNuVnpkQzF3YUc5MGIyRmpiM1Z6CmRHbGpMbXh2WTJGc01Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRXZuTUpBSzN5OUtodlBQR20KRmN6U1NsTHJxZFJxWURERW1OUllITFNXVnpFU2VkVC9wRWtIN2hHanpHcHBuNGhaRERsOWd4VmtEYzRYeWlKYQpGcHBCYktOYk1Ga3dSZ1lEVlIwUkJEOHdQWUlZY25WemRDMXdhRzkwYjJGamIzVnpkR2xqTG14dlkyRnNnZ2xzCmIyTmhiR2h2YzNTSEJIOEFBQUdIRUFBQUFBQUFBQUFBQUFBQUFBQUFBQUV3RHdZRFZSMFBBUUgvQkFVREF3ZWcKQURBS0JnZ3Foa2pPUFFRREFnTklBREJGQWlCK1NmdmlNNk1Vc0s3SWkxdWZuZmUwTldQelo4OExvc2Y4bHlBVQpHbTNHVXdJaEFNQWFNQmszdWpJSU8yWjNLejlSNmlrenNnT1Q4aGxSRzgxOERPV09KSUMvCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K",
                        "type": "string",
                        "nullable": true
                    },
                    "key": {
                        "description": "SSL/TLS private key in PEM format, Base64 encoded.\n\nIf provided, `cert` must also be supplied. For development, defaults to the key in the resources directory.",
                        "default": "LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JR0hBZ0VBTUJNR0J5cUdTTTQ5QWdFR0NDcUdTTTQ5QXdFSEJHMHdhd0lCQVFRZ2c0cUNhWFowVTJWeWpjL0gKek1TSE94dnJpbU1TcEpjYlYzdnpPWWszTUQ2aFJBTkNBQVMrY3drQXJmTDBxRzg4OGFZVnpOSktVdXVwMUdwZwpNTVNZMUZnY3RKWlhNUko1MVAra1NRZnVFYVBNYW1tZmlGa01PWDJERldRTnpoZktJbG9XbWtGcwotLS0tLUVORCBQUklWQVRFIEtFWS0tLS0tCg==",
                        "type": "string",
                        "nullable": true
                    },
                    "hmac_secret": {
                        "description": "Secret key for HMAC-based JWT token signing and verification.\n\nUsed when RS256 keys are not available or for simpler deployments. Not recommended for production environments.",
                        "default": "my-super-secret-jwt-key-for-photoacoustic-app",
                        "type": "string"
                    },
                    "rs256_private_key": {
                        "description": "RS256 private key in PEM format, Base64 encoded.\n\nUsed for signing JWT tokens with the RS256 algorithm. Can be generated with the `rs256keygen` binary.",
                        "default": "LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlKS0FJQkFBS0NBZ0VBdjBxWi9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bz0KLS0tLS1FTkQgUlNBIFBSSVZBVEUgS0VZLS0tLS0K",
                        "type": "string"
                    },
                    "rs256_public_key": {
                        "description": "RS256 public key in PEM format, Base64 encoded.\n\nUsed for verifying JWT tokens signed with the RS256 algorithm. Can be generated with the `rs256keygen` binary.",
                        "default": "LS0tLS1CRUdJTiBSU0EgUFVCTElDIEtFWS0tLS0tCk1JSUNDZ0tDQWdFQXYwcVovVjhYSTVZWmpXejFGc05KR0tBOUNPeU15eEc5MUlRc09hcnJlQTU2U0xkK2YwNUYKcjd4YUJCcmk4Q2tSTTdDaTQ2NW9HZjN1UnF1S2JoTEY4NXdaL1dkVmIwaTBYOEcyb0Z6ZzExbGZKSnIyN0lWSgpCMU5WSEYySmJqdUhhR0JpRnpzVExtUDEzVkZ6NmVuOCtpakRKWE13dnd4bGZ4T0Vnc05rRkhwZEx6OFJDM3FGCmhhRFdjNWgwMkF5c0UxSnNKdWN2cTA2MTJldXI3K290ZFFUdXhPbjF1SWt2eTdhcUZiaVpSZzR2THc1R1FFVDIKbk9yOS8yU3RCcUgyOFFJOHpjVUt1cGYvSnd4ZmwxazEzZ2VjcDlpL0VmWUdyWHRycWJvcWJpbkZEVWFHQzVaZQphbEFOM00wQnl6ZlNPWnY3SVFsemV5ZVFtQjUzcDduY0hBTVdNSHNSTE9rb1FLSzN4MXpKQklFMlNxc00vdUduCnZIN2JGakdtRjdyQlp6VFh3ejRjZmlVcW43ZTc1NnlyQ3hTZ2ZYQ3cvTk1ZTXJwV0pPcGdybVdMZ3YvSEZjV0IKTllNSnhIaDlhRjh6L0JtS1U5azRWUmgvMjVkZDhBdDB4MTZxMU1OMW15aERiTWFibVVYcDEzQ080K1Z1b1c5SApJSlgxSWRwSFJERnlZR1RxWWMvTzFCTXNTSjliWDZvYWl5eFBNMmlRRmRJT0ZCK3BqRFJzQ1FHTk9WMUpmREx6CnRCOHprTmlqKzF4T0RmUSs5MWwrYnJwNG9BeHJFRERQWXBQa3dTdzgyNjJkTW5YL2VmSFZQblFwNGhLTnRKa3gKNlhwcitvNW1BSXRtY0RtWXFpZ3U0RlRnOE9ucndRT3MrUDBoODkrMzV5SUZNZlRJejlCVlpRa0NBd0VBQVE9PQotLS0tLUVORCBSU0EgUFVCTElDIEtFWS0tLS0tCg==",
                        "type": "string"
                    },
                    "enabled": {
                        "description": "Enable or disable the visualization server.\n\nThis flag can be used to easily enable or disable the server without removing the configuration. Default is `true`.",
                        "default": true,
                        "type": "boolean"
                    },
                    "session_secret": {
                        "description": "Session secret key for cookie-based authentication.",
                        "default": "6eIt4+v48DbG9qgctMvLVcFbDhqCUeCSrnlBmVY9nUM=",
                        "type": "string"
                    },
                    "enable_compression": {
                        "description": "Optional enable compression for the server responses. This can help reduce the size of the data sent over the network, improving performance for large responses. Default is `true`, meaning compression is enabled.",
                        "default": true,
                        "type": "boolean"
                    },
                    "output": {
                        "description": "List of output items to be displayed in the visualization interface.\n\nEach item represents a specific measurement with customizable display properties. The order of items in this list determines their display order in the interface. Items with negative display order values will be hidden.",
                        "default": [],
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/VisualizationOutputItem"
                        }
                    }
                }
            },
            "VisualizationOutputItem": {
                "description": "Configuration item for visualization output display\n\nEach item represents a specific measurement that will be displayed in the visualization interface, with customizable properties.",
                "type": "object",
                "required": [
                    "action_node_id",
                    "concentration_max",
                    "concentration_min",
                    "description",
                    "display_order",
                    "id",
                    "molecule",
                    "unit"
                ],
                "properties": {
                    "id": {
                        "description": "Unique identifier for this output configuration",
                        "type": "string"
                    },
                    "action_node_id": {
                        "description": "ID of the action node providing the measurement data",
                        "type": "string"
                    },
                    "molecule": {
                        "description": "Name of the molecule being measured (e.g., \"Hâ‚‚S\", \"COâ‚‚\", \"CHâ‚„\")",
                        "type": "string"
                    },
                    "unit": {
                        "description": "Unit of measurement (e.g., \"ppm\", \"mg/mÂ³\", \"%\")",
                        "type": "string"
                    },
                    "display_order": {
                        "description": "Display order in the interface (negative values hide the item)",
                        "type": "integer",
                        "format": "int32"
                    },
                    "description": {
                        "description": "Description of the measurement (e.g., \"Spectral ray 3963nm\")",
                        "type": "string"
                    },
                    "concentration_min": {
                        "description": "Minimal concentration value to display (below this value, the item is hidden)",
                        "type": "number",
                        "format": "double"
                    },
                    "concentration_max": {
                        "description": "Maximum concentration value to display (above this value, the item is hidden)",
                        "type": "number",
                        "format": "double"
                    }
                }
            },
            "AcquisitionConfig": {
                "description": "Configuration for the data acquisition process.\n\nThis structure contains settings that control how data is acquired from the photoacoustic sensor, including timing parameters and whether the acquisition system is enabled.",
                "type": "object",
                "required": [
                    "enabled",
                    "interval_ms"
                ],
                "properties": {
                    "enabled": {
                        "description": "Flag to enable or disable data acquisition.\n\nWhen enabled, the system will acquire data from the configured source at the specified interval. When disabled, no data is acquired.",
                        "type": "boolean"
                    },
                    "interval_ms": {
                        "description": "Time interval in milliseconds between acquisitions.\n\nThis parameter controls how frequently the system will acquire new data. Lower values provide more frequent updates but may increase system load. Must be greater than zero.",
                        "type": "integer",
                        "format": "uint64",
                        "minimum": 0.0
                    }
                }
            },
            "ModbusConfig": {
                "description": "Configuration for the Modbus TCP server component.\n\nThis structure contains settings that control the Modbus TCP server functionality, including network binding parameters and whether the server is enabled.\n\n### Fields\n\n* `enabled` - Flag to enable or disable the Modbus server * `port` - TCP port number for the Modbus server (default: 502) * `address` - Network address for the Modbus server to bind to (default: 127.0.0.1)\n\n### Example\n\n``` use rust_photoacoustic::config::ModbusConfig;\n\nlet modbus_config = ModbusConfig { enabled: true, port: 503, address: \"0.0.0.0\".to_string(), }; ```",
                "type": "object",
                "required": [
                    "address",
                    "enabled",
                    "port"
                ],
                "properties": {
                    "enabled": {
                        "description": "Flag to enable or disable the Modbus server.\n\nWhen enabled, the server will start and respond to Modbus TCP requests. When disabled, no server will be started and no resources will be used.",
                        "type": "boolean"
                    },
                    "port": {
                        "description": "The TCP port the Modbus server will listen on.\n\nValid range is 1-65534. Default value is 502, which is the standard Modbus TCP port.",
                        "type": "integer",
                        "format": "uint16",
                        "minimum": 0.0
                    },
                    "address": {
                        "description": "The network address the Modbus server will bind to.\n\nCan be an IPv4/IPv6 address or a hostname. Default is \"127.0.0.1\". Use \"0.0.0.0\" to bind to all IPv4 interfaces.",
                        "type": "string"
                    }
                }
            },
            "PhotoacousticConfig": {
                "description": "Configuration for the photoacoustic measurement system.\n\nThis structure contains settings that control the photoacoustic measurement process, including input sources, signal processing parameters, and analysis settings.\n\n### Input Sources\n\nThe configuration supports two mutually exclusive input sources: * `input_device` - A hardware audio device (e.g., \"hw:0,0\" for ALSA) \"first\" for the first available device * `input_file` - A path to a WAV file for offline analysis\n\nOne of these must be specified, but not both simultaneously.\n\n### Signal Processing Parameters\n\n* `frequency` - The primary excitation frequency in Hz * `bandwidth` - Filter bandwidth in Hz around the excitation frequency * `frame_size` - FFT window size (power of 2 recommended) * `averages` - Number of spectra to average for noise reduction\n\n### Example\n\n```no_run use rust_photoacoustic::config::{PhotoacousticConfig, SimulatedSourceConfig};\n\nlet pa_config = PhotoacousticConfig { input_device: Some(\"first\".to_string()), input_file: None, frequency: 1000.0, sample_rate: 48000, bandwidth: 50.0, frame_size: 4096, averages: 10, precision: 16, simulated_source: Some(SimulatedSourceConfig::default()), record_consumer: false, record_file: \"recorded_audio.wav\".to_string(), }; ```",
                "type": "object",
                "required": [
                    "averages",
                    "bandwidth",
                    "frame_size",
                    "frequency"
                ],
                "properties": {
                    "input_device": {
                        "description": "The input device to use for data acquisition",
                        "type": "string",
                        "nullable": true
                    },
                    "input_file": {
                        "description": "The input file to use for data acquisition mutually exclusive with input_device",
                        "type": "string",
                        "nullable": true
                    },
                    "simulated_source": {
                        "description": "Configuration for simulated photoacoustic sources\n\nWhen present, enables simulation mode using either the simple mock source or the comprehensive universal photoacoustic generator. This replaces the deprecated `mock_source` and `mock_correlation` parameters.\n\n**For Physics PhD Specialists:** The simulated source can model realistic photoacoustic phenomena including Helmholtz resonance, gas flow noise, thermal effects, and dual-microphone differential configurations.\n\n**For Developers:** When `simulated_source` is `Some(config)`, the acquisition system will use synthetic data instead of hardware input. When `None`, real hardware sources are used.",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/SimulatedSourceConfig"
                            }
                        ],
                        "nullable": true
                    },
                    "frequency": {
                        "description": "The excitation frequency in Hz",
                        "type": "number",
                        "format": "float"
                    },
                    "bandwidth": {
                        "description": "Filter bandwidth in Hz",
                        "type": "number",
                        "format": "float"
                    },
                    "frame_size": {
                        "description": "Window size for FFT analysis and frame sharing",
                        "type": "integer",
                        "format": "uint16",
                        "minimum": 0.0
                    },
                    "averages": {
                        "description": "Number of spectra to average",
                        "type": "integer",
                        "format": "uint16",
                        "minimum": 0.0
                    },
                    "sample_rate": {
                        "description": "Sample rate of the input data (default is 48000 Hz)",
                        "default": 44100,
                        "type": "integer",
                        "format": "uint16",
                        "minimum": 0.0
                    },
                    "precision": {
                        "description": "Sampling precision in bits (16 bits for standard PCM)",
                        "default": 16,
                        "type": "integer",
                        "format": "uint8",
                        "minimum": 0.0
                    },
                    "record_consumer": {
                        "description": "Flag to enable or disable the record consumer daemon.\n\nWhen enabled, a record consumer will be started to validate the producer/consumer system by consuming audio frames and saving them to a WAV file.",
                        "default": false,
                        "type": "boolean"
                    },
                    "record_file": {
                        "description": "Optional output file for recording audio frames",
                        "default": "",
                        "type": "string"
                    }
                }
            },
            "SimulatedSourceConfig": {
                "description": "Configuration for simulated photoacoustic sources\n\nThis structure configures all parameters for generating synthetic photoacoustic signals using either the simple mock approach or the comprehensive universal photoacoustic simulation. It supports both the existing `MockSource` and the new `SimulatedPhotoacousticRealtimeAudioSource`.\n\n### Physics Parameters\n\n**For Physics PhD Specialists:** The configuration models a Helmholtz resonance cell photoacoustic analyzer with: - Resonance frequency typically around 2 kHz for optimal acoustic coupling - Dual microphone differential configuration for noise rejection - Laser modulation creating photoacoustic waves through molecular absorption - Gas flow introducing 1/f noise characteristics - Temperature effects causing frequency and phase drift - SNR control for signal quality assessment\n\n**For Rust Developers:** This structure provides all parameters needed to configure the `generate_universal_photoacoustic_stereo` function, with sensible defaults for typical photoacoustic measurement scenarios.\n\n### Examples\n\n```no_run use rust_photoacoustic::config::SimulatedSourceConfig;\n\n// Configuration for simple mock source let mock_config = SimulatedSourceConfig { source_type: \"mock\".to_string(), correlation: 0.8, ..Default::default() };\n\n// Configuration for comprehensive physics simulation let universal_config = SimulatedSourceConfig { source_type: \"universal\".to_string(), background_noise_amplitude: 0.1, resonance_frequency: 2100.0, laser_modulation_depth: 0.9, signal_amplitude: 0.7, phase_opposition_degrees: 175.0, temperature_drift_factor: 0.02, gas_flow_noise_factor: 0.3, snr_factor: 25.0, modulation_mode: \"amplitude\".to_string(), pulse_width_seconds: 0.005, pulse_frequency_hz: 100.0, ..Default::default() }; ```",
                "type": "object",
                "properties": {
                    "source_type": {
                        "description": "Source type: \"mock\" for simple MockSource or \"universal\" for full physics simulation\n\n**Source Options:** - \"mock\": Uses the existing `MockSource` with simple correlation-based signal generation - \"universal\": Uses the new `SimulatedPhotoacousticRealtimeAudioSource` with comprehensive physics simulation including Helmholtz resonance, gas flow noise, and thermal drift\n\n**For Physics PhD Specialists:** Use \"mock\" for quick testing and \"universal\" for realistic photoacoustic physics modeling.\n\n**For Rust Developers:** \"mock\" provides lightweight simulation, \"universal\" provides full feature simulation.",
                        "default": "mock",
                        "type": "string"
                    },
                    "correlation": {
                        "description": "Correlation coefficient between channels for simple mock mode (0.0 to 1.0)\n\nThis parameter is used by the existing `MockSource` for backward compatibility. It controls the statistical correlation between left and right channels: - 1.0: Perfectly correlated (identical channels) - 0.0: Uncorrelated (independent channels) Only used when source_type is \"mock\".",
                        "default": 0.699999988079071,
                        "type": "number",
                        "format": "float"
                    },
                    "background_noise_amplitude": {
                        "description": "Background noise amplitude for gas flow and environmental noise (0.0 to 1.0)\n\nControls the amplitude of background noise including: - Gas flow turbulence (1/f characteristics) - Environmental acoustic interference - Electronic noise in the measurement system",
                        "default": 0.15000000596046448,
                        "type": "number",
                        "format": "float"
                    },
                    "resonance_frequency": {
                        "description": "Resonance frequency of the Helmholtz cell in Hz\n\n**Physics Background:** The Helmholtz resonance frequency is determined by the cell geometry and gas properties. Typical values range from 1.5 to 3 kHz for optimal photoacoustic coupling. The resonance enhances the photoacoustic signal at this frequency.",
                        "default": 2100.0,
                        "type": "number",
                        "format": "float"
                    },
                    "laser_modulation_depth": {
                        "description": "Laser modulation depth (0.0 to 1.0)\n\nControls the depth of laser intensity modulation creating the photoacoustic effect. Higher values produce stronger photoacoustic signals but may introduce nonlinearities.",
                        "default": 0.800000011920929,
                        "type": "number",
                        "format": "float"
                    },
                    "signal_amplitude": {
                        "description": "Photoacoustic signal amplitude (0.0 to 1.0)\n\nSets the overall amplitude of the photoacoustic signal relative to background noise. This represents the signal strength that would be observed with a given analyte concentration.",
                        "default": 0.6000000238418579,
                        "type": "number",
                        "format": "float"
                    },
                    "phase_opposition_degrees": {
                        "description": "Phase opposition between microphones in degrees\n\n**Physics Background:** In a differential photoacoustic cell, microphones are positioned to be in approximate phase opposition (180Â°). Small deviations (170-185Â°) are realistic due to: - Manufacturing tolerances in microphone positioning - Temperature-induced changes in gas properties - Cell geometry variations",
                        "default": 175.0,
                        "type": "number",
                        "format": "float"
                    },
                    "temperature_drift_factor": {
                        "description": "Temperature drift factor affecting phase and frequency stability (0.0 to 0.1)\n\n**Physics Background:** Temperature variations affect: - Gas density and sound velocity (frequency drift) - Thermal expansion of cell components (phase drift) - Molecular absorption characteristics Typical values: 0.01-0.05 for laboratory conditions",
                        "default": 0.019999999552965164,
                        "type": "number",
                        "format": "float"
                    },
                    "gas_flow_noise_factor": {
                        "description": "Gas flow noise factor for 1/f characteristics (0.0 to 1.0)\n\n**Physics Background:** Gas circulation in photoacoustic cells introduces characteristic 1/f noise due to: - Turbulent flow patterns - Pressure fluctuations - Flow-induced vibrations Higher values simulate more turbulent conditions.",
                        "default": 0.30000001192092896,
                        "type": "number",
                        "format": "float"
                    },
                    "snr_factor": {
                        "description": "Signal-to-noise ratio factor in dB\n\nControls the overall signal quality by setting the ratio between the photoacoustic signal and background noise. Typical values: - 10-20 dB: Poor conditions (high noise environment) - 20-30 dB: Normal operation - 30+ dB: Excellent conditions (low noise, high concentration)",
                        "default": 25.0,
                        "type": "number",
                        "format": "float"
                    },
                    "modulation_mode": {
                        "description": "Laser modulation mode: \"amplitude\" or \"pulsed\"\n\n**Physics Background:** - \"amplitude\": Continuous amplitude modulation at resonance frequency - \"pulsed\": Periodic pulsed operation with configurable pulse width and frequency\n\nPulsed mode allows for different measurement techniques and can provide better temporal resolution for concentration measurements.",
                        "default": "amplitude",
                        "type": "string"
                    },
                    "pulse_width_seconds": {
                        "description": "Pulse width in seconds (for pulsed mode)\n\nDuration of each laser pulse when using pulsed modulation mode. Typical values: 0.001-0.01 seconds (1-10 ms)",
                        "default": 0.004999999888241291,
                        "type": "number",
                        "format": "float"
                    },
                    "pulse_frequency_hz": {
                        "description": "Pulse frequency in Hz (for pulsed mode)\n\nRepetition rate of laser pulses when using pulsed modulation mode. Should be much lower than the resonance frequency. Typical values: 10-1000 Hz",
                        "default": 100.0,
                        "type": "number",
                        "format": "float"
                    }
                }
            },
            "AccessConfig": {
                "description": "Configuration for user access and permissions\n\nThis structure defines both users who can access the application directly and OAuth2 clients that can use the authorization flow. Users have usernames, password hashes, and permissions, while clients have identifiers and allowed callback URLs.\n\n### Example\n\n```rust use rust_photoacoustic::config::access::{AccessConfig, User, Client};\n\nlet access_config = AccessConfig { duration: Some(86400), // Token duration in seconds iss: Some(\"LaserSmartServer\".to_string()), users: vec![ User { user: \"admin\".to_string(), pass: \"JDEkYTRuMy5jZmUkRU93djlOYXBKYjFNTXRTMHA1UzN1MQo=\".to_string(), permissions: vec![\"read:api\".to_string(), \"write:api\".to_string(), \"admin:api\".to_string()], email: None, name: None, }, User { user: \"reader\".to_string(), pass: \"JDEkUTJoSGZWU3ckT3NIVTUzamhCY3pYVmRHTGlTazg4Lwo=\".to_string(), permissions: vec![\"read:api\".to_string()], email: None, name: None, }], clients: vec![ Client { client_id: \"LaserSmartClient\".to_string(), default_scope: \"openid profile email read:api write:api\".to_string(), allowed_callbacks: vec![ \"http://localhost:8080/client/\".to_string(), \"https://localhost:8080/client/\".to_string(), ], }], }; ```",
                "type": "object",
                "required": [
                    "clients",
                    "users"
                ],
                "properties": {
                    "users": {
                        "description": "List of users with their credentials and permissions",
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/User"
                        }
                    },
                    "clients": {
                        "description": "List of OAuth2 clients with their identifiers and allowed callback URLs",
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Client"
                        }
                    },
                    "duration": {
                        "description": "Duration of the issued token",
                        "default": 86400,
                        "type": "integer",
                        "format": "int64",
                        "nullable": true
                    },
                    "iss": {
                        "description": "Issuer for the access tokens",
                        "default": "LaserSmartServer",
                        "type": "string",
                        "nullable": true
                    }
                }
            },
            "User": {
                "description": "User definition for authentication and authorization\n\nThis structure represents a user with authentication credentials and associated permissions for controlling access to API endpoints.\n\n### Fields\n\n* `user` - The username used for authentication * `pass` - Base64-encoded password hash (created with openssl passwd -5 | base64 -w0) * `permissions` - List of permission strings that define what actions the user can perform\n\n### Example\n\n``` use rust_photoacoustic::config::User;\n\nlet user = User { user: \"admin\".to_string(), pass: \"JDEkYTRuMy5jZmUkRU93djlOYXBKYjFNTXRTMHA1UzN1MQo=\".to_string(), email: None, name: None, permissions: vec![\"read:api\".to_string(), \"write:api\".to_string(), \"admin:api\".to_string()], }; ```",
                "type": "object",
                "required": [
                    "pass",
                    "permissions",
                    "user"
                ],
                "properties": {
                    "user": {
                        "description": "The username used for authentication",
                        "type": "string"
                    },
                    "pass": {
                        "description": "Base64-encoded password hash\n\nThis should be created using: `openssl passwd -5 <password> | base64 -w0`",
                        "type": "string"
                    },
                    "permissions": {
                        "description": "List of permission strings that define what actions the user can perform\n\nCommon permissions include: * \"read:api\" - Allows read-only access to API endpoints * \"write:api\" - Allows modification operations on API endpoints * \"admin:api\" - Allows administrative operations",
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "email": {
                        "type": "string",
                        "nullable": true
                    },
                    "name": {
                        "type": "string",
                        "nullable": true
                    }
                }
            },
            "Client": {
                "description": "OAuth2 client configuration for authorization code flow\n\nThis structure represents an OAuth2 client that is allowed to use the authorization code flow with this server.\n\n### Fields\n\n* `client_id` - The unique identifier for the OAuth2 client * `allowed_callbacks` - List of URLs that this client is allowed to redirect to\n\n### Example\n\n``` use rust_photoacoustic::config::access::Client;\n\nlet client = Client { client_id: \"LaserSmartClient\".to_string(), default_scope: \"openid profile email read:api write:api\".to_string(), allowed_callbacks: vec![ \"http://localhost:8080/client/\".to_string(), \"https://localhost:8080/client/\".to_string(), ], }; ```",
                "type": "object",
                "required": [
                    "allowed_callbacks",
                    "client_id",
                    "default_scope"
                ],
                "properties": {
                    "client_id": {
                        "description": "The unique identifier for the OAuth2 client",
                        "type": "string"
                    },
                    "allowed_callbacks": {
                        "description": "List of URLs that this client is allowed to redirect to after authorization\n\nThese URLs must match exactly during the OAuth2 flow for security. Both HTTP and HTTPS URLs are supported, but HTTPS is recommended for production.",
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "default_scope": {
                        "description": "Default scope for the client\n\nThis is a space-separated list of scopes that the client can request. The default scope is used if the client does not specify a scope during the authorization request.",
                        "type": "string"
                    }
                }
            },
            "ProcessingConfig": {
                "description": "Configuration for the processing system",
                "type": "object",
                "properties": {
                    "enabled": {
                        "description": "Enable or disable the processing consumer",
                        "default": true,
                        "type": "boolean"
                    },
                    "result_buffer_size": {
                        "description": "Buffer size for processing results broadcasting",
                        "default": 1000,
                        "type": "integer",
                        "format": "uint",
                        "minimum": 0.0
                    },
                    "default_graph": {
                        "description": "Default processing graph configuration",
                        "default": {
                            "connections": [
                                {
                                    "from": "input",
                                    "to": "channel_selector"
                                }
                            ],
                            "id": "default",
                            "nodes": [
                                {
                                    "id": "input",
                                    "node_type": "input",
                                    "parameters": null
                                },
                                {
                                    "id": "channel_selector",
                                    "node_type": "channel_selector",
                                    "parameters": {
                                        "target_channel": "ChannelA"
                                    }
                                }
                            ],
                            "output_node": "channel_selector"
                        },
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/ProcessingGraphConfig"
                            }
                        ]
                    },
                    "performance": {
                        "description": "Processing performance settings",
                        "default": {
                            "enable_stats": true,
                            "max_processing_time_us": 10000,
                            "stats_interval_ms": 1000
                        },
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/ProcessingPerformanceConfig"
                            }
                        ]
                    }
                }
            },
            "ProcessingGraphConfig": {
                "description": "Configuration for a processing graph",
                "type": "object",
                "properties": {
                    "id": {
                        "description": "Graph identifier",
                        "default": "default",
                        "type": "string"
                    },
                    "nodes": {
                        "description": "List of nodes in the graph",
                        "default": [],
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/NodeConfig"
                        }
                    },
                    "connections": {
                        "description": "List of connections between nodes",
                        "default": [],
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ConnectionConfig"
                        }
                    },
                    "output_node": {
                        "description": "Output node identifier",
                        "default": null,
                        "type": "string",
                        "nullable": true
                    }
                }
            },
            "NodeConfig": {
                "description": "Configuration for a processing node",
                "type": "object",
                "required": [
                    "id",
                    "node_type"
                ],
                "properties": {
                    "id": {
                        "description": "Node identifier",
                        "type": "string"
                    },
                    "node_type": {
                        "description": "Node type (filter, differential, channel_selector, etc.)",
                        "type": "string"
                    },
                    "parameters": {
                        "description": "Node-specific parameters",
                        "default": null
                    }
                }
            },
            "ConnectionConfig": {
                "description": "Configuration for a connection between nodes",
                "type": "object",
                "required": [
                    "from",
                    "to"
                ],
                "properties": {
                    "from": {
                        "description": "Source node identifier",
                        "type": "string"
                    },
                    "to": {
                        "description": "Target node identifier",
                        "type": "string"
                    }
                }
            },
            "ProcessingPerformanceConfig": {
                "description": "Performance configuration for processing",
                "type": "object",
                "properties": {
                    "max_processing_time_us": {
                        "description": "Maximum processing time per frame (microseconds)",
                        "default": 10000,
                        "type": "integer",
                        "format": "uint64",
                        "minimum": 0.0
                    },
                    "enable_stats": {
                        "description": "Enable detailed processing statistics",
                        "default": true,
                        "type": "boolean"
                    },
                    "stats_interval_ms": {
                        "description": "Statistics update interval (milliseconds)",
                        "default": 1000,
                        "type": "integer",
                        "format": "uint64",
                        "minimum": 0.0
                    }
                }
            },
            "ThermalRegulationConfig": {
                "description": "Main thermal regulation configuration",
                "type": "object",
                "required": [
                    "i2c_buses"
                ],
                "properties": {
                    "enabled": {
                        "description": "Enable or disable thermal regulation system",
                        "default": false,
                        "type": "boolean"
                    },
                    "i2c_buses": {
                        "description": "I2C bus configurations (primary and optional secondary buses)",
                        "type": "object",
                        "additionalProperties": {
                            "$ref": "#/components/schemas/I2CBusConfig"
                        }
                    },
                    "regulators": {
                        "description": "Individual thermal regulators configuration",
                        "default": [],
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ThermalRegulatorConfig"
                        }
                    },
                    "global_settings": {
                        "description": "Global thermal regulation parameters",
                        "default": {
                            "global_sampling_rate_hz": 10.0,
                            "max_concurrent_regulators": 32,
                            "monitoring": {
                                "enable_performance_monitoring": true,
                                "enable_thermal_history": false,
                                "history_buffer_size": 1000,
                                "metrics_interval_s": 1.0
                            },
                            "resource_sharing": {
                                "i2c_arbitration_timeout_ms": 100,
                                "max_operation_queue_size": 100,
                                "priority_scheduling": false
                            }
                        },
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/GlobalThermalSettings"
                            }
                        ]
                    }
                }
            },
            "I2CBusConfig": {
                "description": "I2C bus configuration for hardware controllers",
                "type": "object",
                "required": [
                    "device",
                    "type"
                ],
                "properties": {
                    "type": {
                        "description": "Bus type: \"native\" for Raspberry Pi I2C or \"cp2112\" for USB-HID bridge",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/I2CBusType"
                            }
                        ]
                    },
                    "device": {
                        "description": "Device path for native I2C (e.g., \"/dev/i2c-1\") or USB identifier for CP2112",
                        "type": "string"
                    },
                    "usb_vendor_id": {
                        "description": "USB vendor ID for CP2112 (only used when bus_type is \"cp2112\")",
                        "type": "integer",
                        "format": "uint16",
                        "minimum": 0.0,
                        "nullable": true
                    },
                    "usb_product_id": {
                        "description": "USB product ID for CP2112 (only used when bus_type is \"cp2112\")",
                        "type": "integer",
                        "format": "uint16",
                        "minimum": 0.0,
                        "nullable": true
                    },
                    "pwm_controllers": {
                        "description": "PWM controllers on this bus (up to 32 PCA9685)",
                        "default": [],
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/PwmControllerConfig"
                        }
                    },
                    "adc_controllers": {
                        "description": "ADC controllers on this bus (up to 4 ADS1115)",
                        "default": [],
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/AdcControllerConfig"
                        }
                    },
                    "gpio_controllers": {
                        "description": "GPIO controllers on this bus (up to 8 CAT9555)",
                        "default": [],
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/GpioControllerConfig"
                        }
                    },
                    "bus_settings": {
                        "description": "Bus-specific settings",
                        "default": {
                            "frequency_hz": 100000,
                            "max_retries": 3,
                            "timeout_ms": 1000
                        },
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/I2CBusSettings"
                            }
                        ]
                    }
                }
            },
            "I2CBusType": {
                "description": "I2C bus type enumeration",
                "oneOf": [
                    {
                        "description": "Native Raspberry Pi I2C bus",
                        "type": "string",
                        "enum": [
                            "native"
                        ]
                    },
                    {
                        "description": "Silicon Labs CP2112 USB-to-I2C bridge",
                        "type": "string",
                        "enum": [
                            "cp2112"
                        ]
                    },
                    {
                        "description": "Mock driver for thermal simulation testing",
                        "type": "string",
                        "enum": [
                            "mock"
                        ]
                    }
                ]
            },
            "PwmControllerConfig": {
                "description": "PWM controller configuration (PCA9685)",
                "type": "object",
                "required": [
                    "address"
                ],
                "properties": {
                    "address": {
                        "description": "I2C address of the PCA9685 controller (0x40-0x7F)",
                        "type": "integer",
                        "format": "uint8",
                        "minimum": 0.0
                    },
                    "channels": {
                        "description": "Number of PWM channels (always 16 for PCA9685)",
                        "default": 16,
                        "type": "integer",
                        "format": "uint8",
                        "minimum": 0.0
                    },
                    "frequency_hz": {
                        "description": "PWM frequency in Hz (24-1526 Hz for PCA9685)",
                        "default": 1000,
                        "type": "integer",
                        "format": "uint16",
                        "minimum": 0.0
                    },
                    "settings": {
                        "description": "Controller-specific settings",
                        "default": {
                            "auto_increment": false,
                            "restart_mode": false,
                            "sleep_mode": false
                        },
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/PwmControllerSettings"
                            }
                        ]
                    }
                }
            },
            "PwmControllerSettings": {
                "description": "PWM controller settings",
                "type": "object",
                "properties": {
                    "auto_increment": {
                        "description": "Enable auto-increment mode",
                        "default": false,
                        "type": "boolean"
                    },
                    "sleep_mode": {
                        "description": "Sleep mode configuration",
                        "default": false,
                        "type": "boolean"
                    },
                    "restart_mode": {
                        "description": "Restart mode configuration",
                        "default": false,
                        "type": "boolean"
                    }
                }
            },
            "AdcControllerConfig": {
                "description": "ADC controller configuration (ADS1115)",
                "type": "object",
                "required": [
                    "address"
                ],
                "properties": {
                    "address": {
                        "description": "I2C address of the ADS1115 controller (0x48-0x4B)",
                        "type": "integer",
                        "format": "uint8",
                        "minimum": 0.0
                    },
                    "channels": {
                        "description": "Number of ADC channels (always 4 for ADS1115)",
                        "default": 4,
                        "type": "integer",
                        "format": "uint8",
                        "minimum": 0.0
                    },
                    "resolution": {
                        "description": "ADC resolution in bits (always 16 for ADS1115)",
                        "default": 16,
                        "type": "integer",
                        "format": "uint8",
                        "minimum": 0.0
                    },
                    "voltage_ref": {
                        "description": "Voltage reference in volts",
                        "default": 3.299999952316284,
                        "type": "number",
                        "format": "float"
                    },
                    "gain": {
                        "description": "ADC gain setting",
                        "default": "GAIN_TWO",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/AdcGain"
                            }
                        ]
                    },
                    "data_rate": {
                        "description": "Data rate in samples per second",
                        "default": "Sps128",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/AdcDataRate"
                            }
                        ]
                    }
                }
            },
            "AdcGain": {
                "description": "ADC gain settings for ADS1115",
                "oneOf": [
                    {
                        "description": "Â±6.144V range",
                        "type": "string",
                        "enum": [
                            "GAIN_TWOTHIRDS"
                        ]
                    },
                    {
                        "description": "Â±4.096V range",
                        "type": "string",
                        "enum": [
                            "GAIN_ONE"
                        ]
                    },
                    {
                        "description": "Â±2.048V range (default)",
                        "type": "string",
                        "enum": [
                            "GAIN_TWO"
                        ]
                    },
                    {
                        "description": "Â±1.024V range",
                        "type": "string",
                        "enum": [
                            "GAIN_FOUR"
                        ]
                    },
                    {
                        "description": "Â±0.512V range",
                        "type": "string",
                        "enum": [
                            "GAIN_EIGHT"
                        ]
                    },
                    {
                        "description": "Â±0.256V range",
                        "type": "string",
                        "enum": [
                            "GAIN_SIXTEEN"
                        ]
                    }
                ]
            },
            "AdcDataRate": {
                "description": "ADC data rate settings for ADS1115",
                "oneOf": [
                    {
                        "description": "8 samples per second",
                        "type": "string",
                        "enum": [
                            "Sps8"
                        ]
                    },
                    {
                        "description": "16 samples per second",
                        "type": "string",
                        "enum": [
                            "Sps16"
                        ]
                    },
                    {
                        "description": "32 samples per second",
                        "type": "string",
                        "enum": [
                            "Sps32"
                        ]
                    },
                    {
                        "description": "64 samples per second",
                        "type": "string",
                        "enum": [
                            "Sps64"
                        ]
                    },
                    {
                        "description": "128 samples per second (default)",
                        "type": "string",
                        "enum": [
                            "Sps128"
                        ]
                    },
                    {
                        "description": "250 samples per second",
                        "type": "string",
                        "enum": [
                            "Sps250"
                        ]
                    },
                    {
                        "description": "475 samples per second",
                        "type": "string",
                        "enum": [
                            "Sps475"
                        ]
                    },
                    {
                        "description": "860 samples per second",
                        "type": "string",
                        "enum": [
                            "Sps860"
                        ]
                    }
                ]
            },
            "GpioControllerConfig": {
                "description": "GPIO controller configuration (CAT9555)",
                "type": "object",
                "required": [
                    "address"
                ],
                "properties": {
                    "address": {
                        "description": "I2C address of the CAT9555 controller (0x20-0x27)",
                        "type": "integer",
                        "format": "uint8",
                        "minimum": 0.0
                    },
                    "channels": {
                        "description": "Number of GPIO channels (always 16 for CAT9555)",
                        "default": 16,
                        "type": "integer",
                        "format": "uint8",
                        "minimum": 0.0
                    },
                    "type": {
                        "description": "Controller type identifier",
                        "default": "CAT9555",
                        "type": "string"
                    },
                    "function": {
                        "description": "Primary function of this GPIO controller",
                        "default": "h_bridge_control",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/GpioFunction"
                            }
                        ]
                    },
                    "settings": {
                        "description": "GPIO controller settings",
                        "default": {
                            "interrupt_config": {
                                "enabled": false,
                                "pin_config": 0
                            },
                            "polarity_inversion": 0
                        },
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/GpioControllerSettings"
                            }
                        ]
                    }
                }
            },
            "GpioFunction": {
                "description": "GPIO controller function",
                "oneOf": [
                    {
                        "description": "H-Bridge control for thermal regulation",
                        "type": "string",
                        "enum": [
                            "h_bridge_control"
                        ]
                    },
                    {
                        "description": "General purpose I/O",
                        "type": "string",
                        "enum": [
                            "general_purpose"
                        ]
                    },
                    {
                        "description": "Status indication (LEDs, etc.)",
                        "type": "string",
                        "enum": [
                            "status_indication"
                        ]
                    }
                ]
            },
            "GpioControllerSettings": {
                "description": "GPIO controller settings",
                "type": "object",
                "properties": {
                    "polarity_inversion": {
                        "description": "Input polarity inversion",
                        "default": 0,
                        "type": "integer",
                        "format": "uint16",
                        "minimum": 0.0
                    },
                    "interrupt_config": {
                        "description": "Interrupt configuration",
                        "default": {
                            "enabled": false,
                            "pin_config": 0
                        },
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/InterruptConfig"
                            }
                        ]
                    }
                }
            },
            "InterruptConfig": {
                "description": "Interrupt configuration for GPIO controllers",
                "type": "object",
                "properties": {
                    "enabled": {
                        "description": "Enable interrupts",
                        "default": false,
                        "type": "boolean"
                    },
                    "pin_config": {
                        "description": "Interrupt pin configuration",
                        "default": 0,
                        "type": "integer",
                        "format": "uint16",
                        "minimum": 0.0
                    }
                }
            },
            "I2CBusSettings": {
                "description": "I2C bus settings",
                "type": "object",
                "properties": {
                    "frequency_hz": {
                        "description": "I2C clock frequency in Hz",
                        "default": 100000,
                        "type": "integer",
                        "format": "uint32",
                        "minimum": 0.0
                    },
                    "timeout_ms": {
                        "description": "Bus timeout in milliseconds",
                        "default": 1000,
                        "type": "integer",
                        "format": "uint32",
                        "minimum": 0.0
                    },
                    "max_retries": {
                        "description": "Maximum retry attempts for failed operations",
                        "default": 3,
                        "type": "integer",
                        "format": "uint8",
                        "minimum": 0.0
                    }
                }
            },
            "ThermalRegulatorConfig": {
                "description": "Individual thermal regulator configuration",
                "type": "object",
                "required": [
                    "actuators",
                    "control_parameters",
                    "i2c_bus",
                    "id",
                    "name",
                    "pid_parameters",
                    "safety_limits",
                    "temperature_conversion",
                    "temperature_sensor"
                ],
                "properties": {
                    "id": {
                        "description": "Unique identifier for this regulator",
                        "type": "string"
                    },
                    "name": {
                        "description": "Human-readable name for this regulator",
                        "type": "string"
                    },
                    "enabled": {
                        "description": "Enable or disable this specific regulator",
                        "default": true,
                        "type": "boolean"
                    },
                    "i2c_bus": {
                        "description": "I2C bus identifier (reference to i2c_buses key)",
                        "type": "string"
                    },
                    "temperature_sensor": {
                        "description": "Temperature sensor configuration",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/TemperatureSensorConfig"
                            }
                        ]
                    },
                    "actuators": {
                        "description": "Thermal actuators configuration",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/ThermalActuatorsConfig"
                            }
                        ]
                    },
                    "temperature_conversion": {
                        "description": "Temperature conversion parameters",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/TemperatureConversionConfig"
                            }
                        ]
                    },
                    "pid_parameters": {
                        "description": "PID controller parameters",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/PidParameters"
                            }
                        ]
                    },
                    "control_parameters": {
                        "description": "Control system parameters",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/ControlParameters"
                            }
                        ]
                    },
                    "safety_limits": {
                        "description": "Safety limits and protections",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/SafetyLimits"
                            }
                        ]
                    }
                }
            },
            "TemperatureSensorConfig": {
                "description": "Temperature sensor configuration",
                "type": "object",
                "required": [
                    "adc_address",
                    "adc_channel"
                ],
                "properties": {
                    "adc_address": {
                        "description": "ADC controller I2C address",
                        "type": "integer",
                        "format": "uint8",
                        "minimum": 0.0
                    },
                    "adc_channel": {
                        "description": "ADC channel number (0-3)",
                        "type": "integer",
                        "format": "uint8",
                        "minimum": 0.0
                    },
                    "sensor_type": {
                        "description": "Sensor type for calibration",
                        "default": "generic",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/TemperatureSensorType"
                            }
                        ]
                    }
                }
            },
            "TemperatureSensorType": {
                "description": "Temperature sensor types",
                "oneOf": [
                    {
                        "description": "Thermocouple (Type K)",
                        "type": "string",
                        "enum": [
                            "thermocouple_k"
                        ]
                    },
                    {
                        "description": "Thermocouple (Type J)",
                        "type": "string",
                        "enum": [
                            "thermocouple_j"
                        ]
                    },
                    {
                        "description": "RTD (PT100)",
                        "type": "string",
                        "enum": [
                            "rtd_pt100"
                        ]
                    },
                    {
                        "description": "RTD (PT1000)",
                        "type": "string",
                        "enum": [
                            "rtd_pt1000"
                        ]
                    },
                    {
                        "description": "Thermistor (NTC)",
                        "type": "string",
                        "enum": [
                            "thermistor_ntc"
                        ]
                    },
                    {
                        "description": "Generic voltage sensor",
                        "type": "string",
                        "enum": [
                            "generic"
                        ]
                    }
                ]
            },
            "ThermalActuatorsConfig": {
                "description": "Thermal actuators configuration with H-Bridge control",
                "type": "object",
                "required": [
                    "thermal_control"
                ],
                "properties": {
                    "thermal_control": {
                        "description": "Main thermal control configuration",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/ThermalControlConfig"
                            }
                        ]
                    }
                }
            },
            "ThermalControlConfig": {
                "description": "Thermal control configuration for bidirectional control",
                "type": "object",
                "required": [
                    "direction_controller",
                    "pwm_controller",
                    "thermal_modes"
                ],
                "properties": {
                    "pwm_controller": {
                        "description": "PWM controller configuration",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/PwmChannelConfig"
                            }
                        ]
                    },
                    "direction_controller": {
                        "description": "Direction controller (GPIO) configuration",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/DirectionControllerConfig"
                            }
                        ]
                    },
                    "thermal_modes": {
                        "description": "Available thermal modes",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/ThermalModesConfig"
                            }
                        ]
                    }
                }
            },
            "PwmChannelConfig": {
                "description": "PWM channel configuration",
                "type": "object",
                "required": [
                    "address",
                    "channel"
                ],
                "properties": {
                    "address": {
                        "description": "PCA9685 I2C address",
                        "type": "integer",
                        "format": "uint8",
                        "minimum": 0.0
                    },
                    "channel": {
                        "description": "PWM channel number (0-15)",
                        "type": "integer",
                        "format": "uint8",
                        "minimum": 0.0
                    }
                }
            },
            "DirectionControllerConfig": {
                "description": "Direction controller configuration for H-Bridge control",
                "type": "object",
                "required": [
                    "address",
                    "gpio_pins"
                ],
                "properties": {
                    "address": {
                        "description": "CAT9555 I2C address",
                        "type": "integer",
                        "format": "uint8",
                        "minimum": 0.0
                    },
                    "gpio_pins": {
                        "description": "GPIO pins mapping for H-Bridge control",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/HBridgeGpioPins"
                            }
                        ]
                    }
                }
            },
            "HBridgeGpioPins": {
                "description": "H-Bridge GPIO pins configuration",
                "type": "object",
                "required": [
                    "h_bridge_enable",
                    "h_bridge_in1",
                    "h_bridge_in2"
                ],
                "properties": {
                    "h_bridge_in1": {
                        "description": "GPIO pin for H-Bridge IN1 (direction bit 1)",
                        "type": "integer",
                        "format": "uint8",
                        "minimum": 0.0
                    },
                    "h_bridge_in2": {
                        "description": "GPIO pin for H-Bridge IN2 (direction bit 2)",
                        "type": "integer",
                        "format": "uint8",
                        "minimum": 0.0
                    },
                    "h_bridge_enable": {
                        "description": "GPIO pin for H-Bridge enable",
                        "type": "integer",
                        "format": "uint8",
                        "minimum": 0.0
                    }
                }
            },
            "ThermalModesConfig": {
                "description": "Thermal modes configuration",
                "type": "object",
                "required": [
                    "cooling_tec",
                    "heating_resistive",
                    "heating_tec"
                ],
                "properties": {
                    "heating_tec": {
                        "description": "Heating via TEC (Peltier) mode",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/ThermalModeConfig"
                            }
                        ]
                    },
                    "cooling_tec": {
                        "description": "Cooling via TEC (Peltier) mode",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/ThermalModeConfig"
                            }
                        ]
                    },
                    "heating_resistive": {
                        "description": "Heating via resistive element mode",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/ThermalModeConfig"
                            }
                        ]
                    }
                }
            },
            "ThermalModeConfig": {
                "description": "Individual thermal mode configuration",
                "type": "object",
                "required": [
                    "description",
                    "h_bridge_direction",
                    "power_range"
                ],
                "properties": {
                    "description": {
                        "description": "Human-readable description",
                        "type": "string"
                    },
                    "h_bridge_direction": {
                        "description": "H-Bridge direction (\"forward\" or \"reverse\")",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/HBridgeDirection"
                            }
                        ]
                    },
                    "power_range": {
                        "description": "Power range as string (e.g., \"0-80%\")",
                        "type": "string"
                    },
                    "max_power_percent": {
                        "description": "Maximum power percentage for this mode",
                        "default": 100.0,
                        "type": "number",
                        "format": "float"
                    }
                }
            },
            "HBridgeDirection": {
                "description": "H-Bridge direction",
                "oneOf": [
                    {
                        "description": "Forward direction (IN1=HIGH, IN2=LOW)",
                        "type": "string",
                        "enum": [
                            "forward"
                        ]
                    },
                    {
                        "description": "Reverse direction (IN1=LOW, IN2=HIGH)",
                        "type": "string",
                        "enum": [
                            "reverse"
                        ]
                    }
                ]
            },
            "TemperatureConversionConfig": {
                "description": "Temperature conversion configuration",
                "type": "object",
                "required": [
                    "adc_resolution",
                    "formula",
                    "voltage_reference"
                ],
                "properties": {
                    "formula": {
                        "description": "Conversion formula (polynomial or lookup table)",
                        "type": "string"
                    },
                    "adc_resolution": {
                        "description": "ADC resolution in bits",
                        "type": "integer",
                        "format": "uint8",
                        "minimum": 0.0
                    },
                    "voltage_reference": {
                        "description": "Voltage reference in volts",
                        "type": "number",
                        "format": "float"
                    },
                    "conversion_type": {
                        "description": "Conversion type",
                        "default": "polynomial",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/ConversionType"
                            }
                        ]
                    }
                }
            },
            "ConversionType": {
                "description": "Temperature conversion type",
                "oneOf": [
                    {
                        "description": "Polynomial conversion",
                        "type": "string",
                        "enum": [
                            "polynomial"
                        ]
                    },
                    {
                        "description": "Linear conversion",
                        "type": "string",
                        "enum": [
                            "linear"
                        ]
                    },
                    {
                        "description": "Lookup table",
                        "type": "string",
                        "enum": [
                            "lookup_table"
                        ]
                    },
                    {
                        "description": "NTC thermistor conversion using mathematical formula",
                        "type": "string",
                        "enum": [
                            "ntc_thermistor"
                        ]
                    }
                ]
            },
            "PidParameters": {
                "description": "PID controller parameters",
                "type": "object",
                "required": [
                    "integral_max",
                    "kd",
                    "ki",
                    "kp",
                    "output_max",
                    "output_min",
                    "setpoint"
                ],
                "properties": {
                    "kp": {
                        "description": "Proportional gain",
                        "type": "number",
                        "format": "float"
                    },
                    "ki": {
                        "description": "Integral gain",
                        "type": "number",
                        "format": "float"
                    },
                    "kd": {
                        "description": "Derivative gain",
                        "type": "number",
                        "format": "float"
                    },
                    "setpoint": {
                        "description": "Target temperature setpoint in Kelvin",
                        "type": "number",
                        "format": "float"
                    },
                    "output_min": {
                        "description": "Minimum output value",
                        "type": "number",
                        "format": "float"
                    },
                    "output_max": {
                        "description": "Maximum output value",
                        "type": "number",
                        "format": "float"
                    },
                    "integral_max": {
                        "description": "Maximum integral value (anti-windup)",
                        "type": "number",
                        "format": "float"
                    },
                    "settings": {
                        "description": "PID controller settings",
                        "default": {
                            "derivative_on_measurement": false,
                            "integral_clamping": true,
                            "output_rate_limit": null
                        },
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/PidSettings"
                            }
                        ]
                    }
                }
            },
            "PidSettings": {
                "description": "PID controller settings",
                "type": "object",
                "properties": {
                    "derivative_on_measurement": {
                        "description": "Derivative on measurement (instead of error)",
                        "default": false,
                        "type": "boolean"
                    },
                    "integral_clamping": {
                        "description": "Integral clamping enabled",
                        "default": true,
                        "type": "boolean"
                    },
                    "output_rate_limit": {
                        "description": "Output rate limiting",
                        "default": null,
                        "type": "number",
                        "format": "float",
                        "nullable": true
                    }
                }
            },
            "ControlParameters": {
                "description": "Control system parameters",
                "type": "object",
                "required": [
                    "pwm_frequency_hz",
                    "sampling_frequency_hz"
                ],
                "properties": {
                    "sampling_frequency_hz": {
                        "description": "Sampling frequency in Hz",
                        "type": "number",
                        "format": "float"
                    },
                    "pwm_frequency_hz": {
                        "description": "PWM frequency in Hz",
                        "type": "number",
                        "format": "float"
                    },
                    "settings": {
                        "description": "Control loop settings",
                        "default": {
                            "adaptive_control": false,
                            "deadband_k": 0.10000000149011612,
                            "min_control_action": 0.10000000149011612
                        },
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/ControlSettings"
                            }
                        ]
                    }
                }
            },
            "ControlSettings": {
                "description": "Control loop settings",
                "type": "object",
                "properties": {
                    "adaptive_control": {
                        "description": "Enable adaptive control",
                        "default": false,
                        "type": "boolean"
                    },
                    "deadband_k": {
                        "description": "Deadband around setpoint",
                        "default": 0.0,
                        "type": "number",
                        "format": "float"
                    },
                    "min_control_action": {
                        "description": "Minimum control action",
                        "default": 0.0,
                        "type": "number",
                        "format": "float"
                    }
                }
            },
            "SafetyLimits": {
                "description": "Safety limits and protections",
                "type": "object",
                "required": [
                    "max_cooling_duty",
                    "max_heating_duty",
                    "max_temperature_k",
                    "min_temperature_k"
                ],
                "properties": {
                    "min_temperature_k": {
                        "description": "Minimum allowed temperature in Kelvin",
                        "type": "number",
                        "format": "float"
                    },
                    "max_temperature_k": {
                        "description": "Maximum allowed temperature in Kelvin",
                        "type": "number",
                        "format": "float"
                    },
                    "max_heating_duty": {
                        "description": "Maximum heating duty cycle percentage",
                        "type": "number",
                        "format": "float"
                    },
                    "max_cooling_duty": {
                        "description": "Maximum cooling duty cycle percentage",
                        "type": "number",
                        "format": "float"
                    },
                    "emergency_settings": {
                        "description": "Emergency shutdown settings",
                        "default": {
                            "emergency_temp_k": 373.1499938964844,
                            "enabled": true,
                            "response_timeout_s": 5.0
                        },
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/EmergencySettings"
                            }
                        ]
                    }
                }
            },
            "EmergencySettings": {
                "description": "Emergency settings",
                "type": "object",
                "properties": {
                    "enabled": {
                        "description": "Enable emergency shutdown",
                        "default": true,
                        "type": "boolean"
                    },
                    "emergency_temp_k": {
                        "description": "Temperature threshold for emergency shutdown",
                        "default": 373.1499938964844,
                        "type": "number",
                        "format": "float"
                    },
                    "response_timeout_s": {
                        "description": "Timeout for emergency response in seconds",
                        "default": 5.0,
                        "type": "number",
                        "format": "float"
                    }
                }
            },
            "GlobalThermalSettings": {
                "description": "Global thermal regulation settings",
                "type": "object",
                "properties": {
                    "global_sampling_rate_hz": {
                        "description": "Global sampling rate for all regulators",
                        "default": 10.0,
                        "type": "number",
                        "format": "float"
                    },
                    "max_concurrent_regulators": {
                        "description": "Maximum number of concurrent regulators",
                        "default": 32,
                        "type": "integer",
                        "format": "uint8",
                        "minimum": 0.0
                    },
                    "resource_sharing": {
                        "description": "Resource sharing settings",
                        "default": {
                            "i2c_arbitration_timeout_ms": 100,
                            "max_operation_queue_size": 100,
                            "priority_scheduling": false
                        },
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/ResourceSharingSettings"
                            }
                        ]
                    },
                    "monitoring": {
                        "description": "Logging and monitoring settings",
                        "default": {
                            "enable_performance_monitoring": true,
                            "enable_thermal_history": false,
                            "history_buffer_size": 1000,
                            "metrics_interval_s": 1.0
                        },
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/MonitoringSettings"
                            }
                        ]
                    }
                }
            },
            "ResourceSharingSettings": {
                "description": "Resource sharing settings",
                "type": "object",
                "properties": {
                    "i2c_arbitration_timeout_ms": {
                        "description": "I2C bus arbitration timeout in milliseconds",
                        "default": 100,
                        "type": "integer",
                        "format": "uint32",
                        "minimum": 0.0
                    },
                    "max_operation_queue_size": {
                        "description": "Maximum queue size for pending operations",
                        "default": 100,
                        "type": "integer",
                        "format": "uint",
                        "minimum": 0.0
                    },
                    "priority_scheduling": {
                        "description": "Enable priority-based scheduling",
                        "default": false,
                        "type": "boolean"
                    }
                }
            },
            "MonitoringSettings": {
                "description": "Monitoring settings",
                "type": "object",
                "properties": {
                    "enable_performance_monitoring": {
                        "description": "Enable performance monitoring",
                        "default": true,
                        "type": "boolean"
                    },
                    "metrics_interval_s": {
                        "description": "Metrics collection interval in seconds",
                        "default": 1.0,
                        "type": "number",
                        "format": "float"
                    },
                    "enable_thermal_history": {
                        "description": "Enable thermal history logging",
                        "default": false,
                        "type": "boolean"
                    },
                    "history_buffer_size": {
                        "description": "History buffer size",
                        "default": 1000,
                        "type": "integer",
                        "format": "uint",
                        "minimum": 0.0
                    }
                }
            },
            "GenerixConfig": {
                "description": "Configuration for a Generix-compatible OAuth2/OIDC provider.\n\nThis struct contains all parameters required to interact with the provider for authentication and token validation. It is typically loaded from a YAML file and injected into Rocket state for use throughout the application.",
                "type": "object",
                "required": [
                    "api_base_url",
                    "audience",
                    "authority",
                    "client_id",
                    "domain",
                    "issuer",
                    "jwks_endpoint",
                    "provider",
                    "redirect_uri",
                    "scope",
                    "token_issuer"
                ],
                "properties": {
                    "provider": {
                        "description": "Name of the OAuth2 provider (e.g., \"generix\").",
                        "type": "string"
                    },
                    "api_base_url": {
                        "description": "Base URL for the provider's API.",
                        "type": "string"
                    },
                    "authority": {
                        "description": "Authority URL for the OAuth2 provider, used for token validation.",
                        "type": "string"
                    },
                    "client_id": {
                        "description": "OAuth2 client ID registered with the provider.",
                        "type": "string"
                    },
                    "scope": {
                        "description": "Space-separated list of OAuth2 scopes to request.",
                        "type": "string"
                    },
                    "redirect_uri": {
                        "description": "Redirect URI registered for OAuth2 callbacks.",
                        "type": "string"
                    },
                    "audience": {
                        "description": "Expected audience claim in JWTs.",
                        "type": "string"
                    },
                    "token_issuer": {
                        "description": "Expected issuer claim in JWTs.",
                        "type": "string"
                    },
                    "jwks_endpoint": {
                        "description": "URL to the provider's JWKS (JSON Web Key Set) endpoint.",
                        "type": "string"
                    },
                    "domain": {
                        "description": "Domain name for the provider or application.",
                        "type": "string"
                    },
                    "issuer": {
                        "description": "Issuer for the OpenID Connect discovery document.",
                        "type": "string"
                    }
                }
            },
            "ProcessingGraphStatistics": {
                "title": "Processing Graph Statistics",
                "description": "Overall performance statistics for the entire processing graph",
                "type": "object",
                "required": [
                    "active_nodes",
                    "average_graph_processing_time",
                    "connections_count",
                    "fastest_graph_execution",
                    "node_statistics",
                    "total_executions",
                    "total_graph_processing_time",
                    "worst_graph_execution"
                ],
                "properties": {
                    "node_statistics": {
                        "title": "Node Statistics Map",
                        "description": "Map of node ID to statistics",
                        "type": "object",
                        "additionalProperties": {
                            "$ref": "#/components/schemas/NodeStatistics"
                        }
                    },
                    "total_executions": {
                        "type": "integer",
                        "format": "uint64",
                        "minimum": 0.0
                    },
                    "total_graph_processing_time": {
                        "title": "Duration in nanoseconds",
                        "type": "integer",
                        "format": "int64"
                    },
                    "average_graph_processing_time": {
                        "title": "Duration in nanoseconds",
                        "type": "integer",
                        "format": "int64"
                    },
                    "fastest_graph_execution": {
                        "title": "Duration in nanoseconds",
                        "type": "integer",
                        "format": "int64"
                    },
                    "worst_graph_execution": {
                        "title": "Duration in nanoseconds",
                        "type": "integer",
                        "format": "int64"
                    },
                    "active_nodes": {
                        "type": "integer",
                        "format": "uint",
                        "minimum": 0.0
                    },
                    "connections_count": {
                        "type": "integer",
                        "format": "uint",
                        "minimum": 0.0
                    }
                }
            },
            "NodeStatistics": {
                "type": "object",
                "required": [
                    "average_processing_time",
                    "fastest_processing_time",
                    "frames_processed",
                    "node_id",
                    "node_type",
                    "total_processing_time",
                    "worst_processing_time"
                ],
                "properties": {
                    "node_id": {
                        "type": "string"
                    },
                    "node_type": {
                        "type": "string"
                    },
                    "frames_processed": {
                        "type": "integer",
                        "format": "uint64",
                        "minimum": 0.0
                    },
                    "total_processing_time": {
                        "title": "Duration in nanoseconds",
                        "type": "integer",
                        "format": "int64"
                    },
                    "average_processing_time": {
                        "title": "Duration in nanoseconds",
                        "type": "integer",
                        "format": "int64"
                    },
                    "fastest_processing_time": {
                        "title": "Duration in nanoseconds",
                        "type": "integer",
                        "format": "int64"
                    },
                    "worst_processing_time": {
                        "title": "Duration in nanoseconds",
                        "type": "integer",
                        "format": "int64"
                    }
                }
            },
            "SerializableProcessingGraph": {
                "title": "Serializable Processing Graph",
                "description": "Complete serializable representation of a processing graph with nodes, connections and statistics",
                "type": "object",
                "required": [
                    "connections",
                    "execution_order",
                    "nodes"
                ],
                "properties": {
                    "nodes": {
                        "description": "List of processing nodes in the graph",
                        "type": "array"
                    },
                    "connections": {
                        "description": "List of connections between nodes",
                        "type": "array"
                    },
                    "execution_order": {
                        "description": "Topological execution order of nodes",
                        "type": "array"
                    },
                    "input_node": {
                        "description": "ID of the input node",
                        "type": "string"
                    },
                    "output_nodes": {
                        "description": "List of output node IDs",
                        "type": "array"
                    },
                    "is_valid": {
                        "description": "Whether the graph is valid",
                        "type": "boolean"
                    },
                    "validation_errors": {
                        "description": "List of validation errors if any",
                        "type": "array"
                    }
                }
            },
            "SystemStats": {
                "description": "Comprehensive system statistics for the current process",
                "type": "object",
                "required": [
                    "available_memory_mb",
                    "cpu_usage_percent",
                    "memory_usage_mb",
                    "process_uptime_seconds",
                    "thread_count",
                    "timestamp",
                    "total_cpu_cores",
                    "uptime_seconds",
                    "virtual_memory_mb"
                ],
                "properties": {
                    "cpu_usage_percent": {
                        "description": "CPU usage percentage (0.0 to 100.0)",
                        "type": "number",
                        "format": "float"
                    },
                    "memory_usage_mb": {
                        "description": "Physical memory usage in megabytes",
                        "type": "integer",
                        "format": "uint64",
                        "minimum": 0.0
                    },
                    "virtual_memory_mb": {
                        "description": "Virtual memory usage in megabytes",
                        "type": "integer",
                        "format": "uint64",
                        "minimum": 0.0
                    },
                    "thread_count": {
                        "description": "Number of threads in the current process",
                        "type": "integer",
                        "format": "uint",
                        "minimum": 0.0
                    },
                    "total_cpu_cores": {
                        "description": "Total number of CPU cores in the system",
                        "type": "integer",
                        "format": "uint",
                        "minimum": 0.0
                    },
                    "available_memory_mb": {
                        "description": "Available system memory in megabytes",
                        "type": "integer",
                        "format": "uint64",
                        "minimum": 0.0
                    },
                    "uptime_seconds": {
                        "description": "System uptime in seconds",
                        "type": "integer",
                        "format": "uint64",
                        "minimum": 0.0
                    },
                    "process_uptime_seconds": {
                        "description": "Process uptime in seconds",
                        "type": "integer",
                        "format": "uint64",
                        "minimum": 0.0
                    },
                    "timestamp": {
                        "description": "Timestamp when these statistics were collected",
                        "type": "integer",
                        "format": "uint64",
                        "minimum": 0.0
                    }
                }
            },
            "SystemHealthReport": {
                "description": "Combined system and processing health report",
                "type": "object",
                "required": [
                    "health_status",
                    "recommendations",
                    "system_stats"
                ],
                "properties": {
                    "system_stats": {
                        "description": "Current system resource statistics",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/SystemStats"
                            }
                        ]
                    },
                    "processing_summary": {
                        "description": "Processing pipeline performance summary",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/ProcessingPerformanceSummary"
                            }
                        ],
                        "nullable": true
                    },
                    "health_status": {
                        "description": "Overall system health assessment",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/HealthStatus"
                            }
                        ]
                    },
                    "recommendations": {
                        "description": "Recommendations for system optimization",
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "ProcessingPerformanceSummary": {
                "description": "Processing performance summary for health monitoring",
                "type": "object",
                "required": [
                    "active_nodes",
                    "avg_execution_time_ms",
                    "efficiency_percentage",
                    "total_executions"
                ],
                "properties": {
                    "avg_execution_time_ms": {
                        "description": "Average processing time per frame in milliseconds",
                        "type": "number",
                        "format": "double"
                    },
                    "efficiency_percentage": {
                        "description": "Processing efficiency percentage (0-100)",
                        "type": "number",
                        "format": "double"
                    },
                    "active_nodes": {
                        "description": "Number of active processing nodes",
                        "type": "integer",
                        "format": "uint",
                        "minimum": 0.0
                    },
                    "total_executions": {
                        "description": "Total number of completed executions",
                        "type": "integer",
                        "format": "uint64",
                        "minimum": 0.0
                    },
                    "slowest_node": {
                        "description": "ID of the slowest node (bottleneck)",
                        "type": "string",
                        "nullable": true
                    }
                }
            },
            "HealthStatus": {
                "description": "System health status assessment",
                "oneOf": [
                    {
                        "description": "All systems operating normally",
                        "type": "string",
                        "enum": [
                            "Healthy"
                        ]
                    },
                    {
                        "description": "Minor performance issues detected",
                        "type": "object",
                        "required": [
                            "Warning"
                        ],
                        "properties": {
                            "Warning": {
                                "type": "object",
                                "required": [
                                    "issues"
                                ],
                                "properties": {
                                    "issues": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        },
                        "additionalProperties": false
                    },
                    {
                        "description": "Significant performance degradation",
                        "type": "object",
                        "required": [
                            "Critical"
                        ],
                        "properties": {
                            "Critical": {
                                "type": "object",
                                "required": [
                                    "issues"
                                ],
                                "properties": {
                                    "issues": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        },
                        "additionalProperties": false
                    }
                ]
            },
            "MeasurementData": {
                "description": "Core action data passed to drivers",
                "type": "object",
                "required": [
                    "concentration_ppm",
                    "metadata",
                    "peak_amplitude",
                    "peak_frequency",
                    "source_node_id",
                    "timestamp"
                ],
                "properties": {
                    "concentration_ppm": {
                        "description": "Current concentration value in ppm",
                        "type": "number",
                        "format": "double"
                    },
                    "source_node_id": {
                        "description": "Source node ID that generated this data",
                        "type": "string"
                    },
                    "peak_amplitude": {
                        "description": "Peak amplitude value (0.0-1.0)",
                        "type": "number",
                        "format": "float"
                    },
                    "peak_frequency": {
                        "description": "Peak frequency in Hz",
                        "type": "number",
                        "format": "float"
                    },
                    "timestamp": {
                        "description": "Timestamp of the measurement",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/SystemTime"
                            }
                        ]
                    },
                    "metadata": {
                        "description": "Additional metadata for the action",
                        "type": "object",
                        "additionalProperties": true
                    }
                }
            },
            "SystemTime": {
                "type": "object",
                "required": [
                    "nanos_since_epoch",
                    "secs_since_epoch"
                ],
                "properties": {
                    "secs_since_epoch": {
                        "type": "integer",
                        "format": "uint64",
                        "minimum": 0.0
                    },
                    "nanos_since_epoch": {
                        "type": "integer",
                        "format": "uint32",
                        "minimum": 0.0
                    }
                }
            },
            "ActionNodeInfo": {
                "description": "Response structure for action node list",
                "type": "object",
                "required": [
                    "buffer_capacity",
                    "buffer_size",
                    "has_driver",
                    "id",
                    "monitored_nodes_count",
                    "node_type"
                ],
                "properties": {
                    "id": {
                        "description": "Node ID",
                        "type": "string"
                    },
                    "node_type": {
                        "description": "Node type",
                        "type": "string"
                    },
                    "has_driver": {
                        "description": "Whether the node has a configured driver",
                        "type": "boolean"
                    },
                    "monitored_nodes_count": {
                        "description": "Number of monitored computing nodes",
                        "type": "integer",
                        "format": "uint",
                        "minimum": 0.0
                    },
                    "buffer_size": {
                        "description": "Current buffer size",
                        "type": "integer",
                        "format": "uint",
                        "minimum": 0.0
                    },
                    "buffer_capacity": {
                        "description": "Buffer capacity",
                        "type": "integer",
                        "format": "uint",
                        "minimum": 0.0
                    }
                }
            },
            "TestResponse": {
                "type": "object",
                "required": [
                    "description",
                    "token",
                    "user"
                ],
                "properties": {
                    "description": {
                        "type": "string"
                    },
                    "token": {
                        "type": "string"
                    },
                    "user": {
                        "type": "string"
                    },
                    "message": {
                        "type": "string",
                        "nullable": true
                    }
                }
            },
            "TestData": {
                "type": "object",
                "required": [
                    "message"
                ],
                "properties": {
                    "message": {
                        "type": "string"
                    }
                }
            },
            "DisplayUpdateData": {
                "type": "object",
                "required": [
                    "timestamp",
                    "type"
                ],
                "properties": {
                    "type": {
                        "type": "string"
                    },
                    "concentration_ppm": {
                        "default": null,
                        "type": "number",
                        "format": "double",
                        "nullable": true
                    },
                    "source_node_id": {
                        "default": null,
                        "type": "string",
                        "nullable": true
                    },
                    "peak_amplitude": {
                        "default": null,
                        "type": "number",
                        "format": "float",
                        "nullable": true
                    },
                    "peak_frequency": {
                        "default": null,
                        "type": "number",
                        "format": "float",
                        "nullable": true
                    },
                    "timestamp": {
                        "type": "integer",
                        "format": "uint64",
                        "minimum": 0.0
                    },
                    "metadata": {
                        "default": null,
                        "type": "object",
                        "additionalProperties": true,
                        "nullable": true
                    },
                    "retry_attempt": {
                        "default": null,
                        "type": "integer",
                        "format": "uint32",
                        "minimum": 0.0,
                        "nullable": true
                    },
                    "alert_type": {
                        "default": null,
                        "type": "string",
                        "nullable": true
                    },
                    "severity": {
                        "default": null,
                        "type": "string",
                        "nullable": true
                    },
                    "message": {
                        "default": null,
                        "type": "string",
                        "nullable": true
                    },
                    "data": {
                        "default": null,
                        "type": "object",
                        "additionalProperties": true,
                        "nullable": true
                    }
                }
            },
            "ComputingResponse": {
                "type": "object",
                "required": [
                    "active_node_ids",
                    "peak_results",
                    "polynomial_coefficients"
                ],
                "properties": {
                    "peak_results": {
                        "description": "Peak results from multiple nodes, keyed by node ID",
                        "type": "object",
                        "additionalProperties": {
                            "$ref": "#/components/schemas/PeakResultResponse"
                        }
                    },
                    "peak_frequency": {
                        "description": "Legacy fields for backward compatibility",
                        "type": "number",
                        "format": "float",
                        "nullable": true
                    },
                    "peak_amplitude": {
                        "type": "number",
                        "format": "float",
                        "nullable": true
                    },
                    "concentration_ppm": {
                        "type": "number",
                        "format": "float",
                        "nullable": true
                    },
                    "polynomial_coefficients": {
                        "type": "array",
                        "items": {
                            "type": "number",
                            "format": "double"
                        },
                        "maxItems": 5,
                        "minItems": 5
                    },
                    "active_node_ids": {
                        "description": "Node IDs that have recent data (within last 30 seconds)",
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "latest_result": {
                        "description": "Most recent result across all nodes",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/PeakResultResponse"
                            }
                        ],
                        "nullable": true
                    }
                }
            },
            "PeakResultResponse": {
                "type": "object",
                "required": [
                    "amplitude",
                    "frequency",
                    "timestamp"
                ],
                "properties": {
                    "frequency": {
                        "type": "number",
                        "format": "float"
                    },
                    "amplitude": {
                        "type": "number",
                        "format": "float"
                    },
                    "concentration_ppm": {
                        "type": "number",
                        "format": "float",
                        "nullable": true
                    },
                    "timestamp": {
                        "$ref": "#/components/schemas/SystemTime"
                    }
                }
            },
            "PaginatedThermalResponse": {
                "description": "Paginated thermal data response",
                "type": "object",
                "required": [
                    "data",
                    "filters",
                    "pagination"
                ],
                "properties": {
                    "data": {
                        "description": "Filtered thermal regulation data",
                        "type": "object",
                        "additionalProperties": {
                            "type": "array",
                            "items": {
                                "$ref": "#/components/schemas/ThermalDataPoint"
                            }
                        }
                    },
                    "pagination": {
                        "description": "Pagination metadata",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/PaginationInfo"
                            }
                        ]
                    },
                    "filters": {
                        "description": "Applied filters summary",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/FilterSummary"
                            }
                        ]
                    }
                }
            },
            "ThermalDataPoint": {
                "description": "Single data point in thermal regulation history",
                "type": "object",
                "required": [
                    "control_output_percent",
                    "pid_components",
                    "setpoint_celsius",
                    "temperature_celsius",
                    "timestamp"
                ],
                "properties": {
                    "timestamp": {
                        "description": "Timestamp in Unix seconds",
                        "type": "integer",
                        "format": "uint64",
                        "minimum": 0.0
                    },
                    "temperature_celsius": {
                        "description": "Temperature reading in degrees Celsius",
                        "type": "number",
                        "format": "double"
                    },
                    "control_output_percent": {
                        "description": "Control output percentage (-100.0 to +100.0)",
                        "type": "number",
                        "format": "double"
                    },
                    "setpoint_celsius": {
                        "description": "PID setpoint temperature in degrees Celsius",
                        "type": "number",
                        "format": "double"
                    },
                    "pid_components": {
                        "description": "Individual PID components for debugging",
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/PidComponents"
                            }
                        ]
                    }
                }
            },
            "PidComponents": {
                "description": "PID controller components for analysis",
                "type": "object",
                "required": [
                    "derivative",
                    "error",
                    "integral",
                    "proportional"
                ],
                "properties": {
                    "proportional": {
                        "description": "Proportional term value",
                        "type": "number",
                        "format": "double"
                    },
                    "integral": {
                        "description": "Integral term value",
                        "type": "number",
                        "format": "double"
                    },
                    "derivative": {
                        "description": "Derivative term value",
                        "type": "number",
                        "format": "double"
                    },
                    "error": {
                        "description": "Error value (setpoint - process_variable)",
                        "type": "number",
                        "format": "double"
                    }
                }
            },
            "PaginationInfo": {
                "description": "Pagination information for thermal data responses",
                "type": "object",
                "required": [
                    "has_next",
                    "has_previous",
                    "limit",
                    "page",
                    "total_items",
                    "total_pages"
                ],
                "properties": {
                    "page": {
                        "description": "Current page number (1-indexed)",
                        "type": "integer",
                        "format": "uint32",
                        "minimum": 0.0
                    },
                    "limit": {
                        "description": "Number of items per page",
                        "type": "integer",
                        "format": "uint32",
                        "minimum": 0.0
                    },
                    "total_items": {
                        "description": "Total number of items across all pages",
                        "type": "integer",
                        "format": "uint32",
                        "minimum": 0.0
                    },
                    "total_pages": {
                        "description": "Total number of pages available",
                        "type": "integer",
                        "format": "uint32",
                        "minimum": 0.0
                    },
                    "has_next": {
                        "description": "Whether there is a next page available",
                        "type": "boolean"
                    },
                    "has_previous": {
                        "description": "Whether there is a previous page available",
                        "type": "boolean"
                    }
                }
            },
            "FilterSummary": {
                "description": "Summary of applied filters",
                "type": "object",
                "required": [
                    "included_regulators",
                    "step_seconds"
                ],
                "properties": {
                    "step_seconds": {
                        "description": "Step size in seconds between data points",
                        "type": "integer",
                        "format": "uint32",
                        "minimum": 0.0
                    },
                    "included_regulators": {
                        "description": "List of regulator IDs included in the response",
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "from_timestamp": {
                        "description": "Start timestamp (Unix seconds) for data range",
                        "type": "integer",
                        "format": "uint64",
                        "minimum": 0.0,
                        "nullable": true
                    },
                    "to_timestamp": {
                        "description": "End timestamp (Unix seconds) for data range",
                        "type": "integer",
                        "format": "uint64",
                        "minimum": 0.0,
                        "nullable": true
                    }
                }
            },
            "CurrentTemperatureInfo": {
                "description": "Current temperature information for a thermal regulator",
                "type": "object",
                "required": [
                    "control_output_percent",
                    "setpoint_celsius",
                    "status",
                    "temperature_celsius",
                    "timestamp"
                ],
                "properties": {
                    "temperature_celsius": {
                        "description": "Current temperature reading in degrees Celsius",
                        "type": "number",
                        "format": "double"
                    },
                    "timestamp": {
                        "description": "Timestamp of the temperature reading (Unix seconds)",
                        "type": "integer",
                        "format": "uint64",
                        "minimum": 0.0
                    },
                    "setpoint_celsius": {
                        "description": "Current setpoint temperature in degrees Celsius",
                        "type": "number",
                        "format": "double"
                    },
                    "control_output_percent": {
                        "description": "Current output power of the regulator",
                        "type": "number",
                        "format": "double"
                    },
                    "status": {
                        "description": "Current status of the regulator",
                        "type": "string"
                    }
                }
            },
            "StreamStats": {
                "description": "Statistics about the audio stream",
                "type": "object",
                "required": [
                    "active_subscribers",
                    "dropped_frames",
                    "dual_channel",
                    "fps",
                    "frames_since_last_update",
                    "last_update",
                    "sample_rate",
                    "total_frames"
                ],
                "properties": {
                    "total_frames": {
                        "description": "Total number of frames processed",
                        "type": "integer",
                        "format": "uint64",
                        "minimum": 0.0
                    },
                    "dropped_frames": {
                        "description": "Total number of dropped frames",
                        "type": "integer",
                        "format": "uint64",
                        "minimum": 0.0
                    },
                    "active_subscribers": {
                        "description": "Number of active subscribers",
                        "type": "integer",
                        "format": "uint",
                        "minimum": 0.0
                    },
                    "fps": {
                        "description": "Average frames per second",
                        "type": "number",
                        "format": "double"
                    },
                    "last_update": {
                        "description": "Last update timestamp",
                        "type": "integer",
                        "format": "uint64",
                        "minimum": 0.0
                    },
                    "frames_since_last_update": {
                        "description": "Frames processed since last FPS calculation",
                        "type": "integer",
                        "format": "uint64",
                        "minimum": 0.0
                    },
                    "sample_rate": {
                        "description": "Sample rate of the audio stream in Hz",
                        "type": "integer",
                        "format": "uint32",
                        "minimum": 0.0
                    },
                    "dual_channel": {
                        "description": "Whether the stream has dual channels (true) or is mono (false)",
                        "type": "boolean"
                    }
                }
            },
            "AudioFrameResponse": {
                "description": "Response structure for audio frame data",
                "type": "object",
                "required": [
                    "channel_a",
                    "channel_b",
                    "duration_ms",
                    "frame_number",
                    "sample_rate",
                    "timestamp"
                ],
                "properties": {
                    "channel_a": {
                        "description": "Channel A audio data",
                        "type": "array",
                        "items": {
                            "type": "number",
                            "format": "float"
                        }
                    },
                    "channel_b": {
                        "description": "Channel B audio data",
                        "type": "array",
                        "items": {
                            "type": "number",
                            "format": "float"
                        }
                    },
                    "sample_rate": {
                        "description": "Sample rate of the audio data",
                        "type": "integer",
                        "format": "uint32",
                        "minimum": 0.0
                    },
                    "timestamp": {
                        "description": "Timestamp when the frame was captured",
                        "type": "integer",
                        "format": "uint64",
                        "minimum": 0.0
                    },
                    "frame_number": {
                        "description": "Sequential frame number",
                        "type": "integer",
                        "format": "uint64",
                        "minimum": 0.0
                    },
                    "duration_ms": {
                        "description": "Duration of this frame in milliseconds",
                        "type": "number",
                        "format": "double"
                    }
                }
            },
            "StreamingNodeInfo": {
                "description": "Response structure for listing available streaming nodes",
                "type": "object",
                "required": [
                    "id",
                    "is_active",
                    "subscriber_count",
                    "uuid"
                ],
                "properties": {
                    "id": {
                        "description": "Node string ID from configuration (preferred for permanent links)",
                        "type": "string"
                    },
                    "uuid": {
                        "description": "Node UUID (for backward compatibility and internal operations)",
                        "type": "string"
                    },
                    "name": {
                        "description": "Human-readable node name (if available)",
                        "type": "string",
                        "nullable": true
                    },
                    "is_active": {
                        "description": "Whether the node is currently streaming",
                        "type": "boolean"
                    },
                    "subscriber_count": {
                        "description": "Current subscriber count for this node's stream",
                        "type": "integer",
                        "format": "uint",
                        "minimum": 0.0
                    }
                }
            },
            "AudioStreamInfo": {
                "description": "Response structure for available audio stream information",
                "type": "object",
                "required": [
                    "id",
                    "stats_url",
                    "stream_url"
                ],
                "properties": {
                    "id": {
                        "description": "Stream identifier (e.g., \"realtime_source\", \"streaming_output\")",
                        "type": "string"
                    },
                    "stream_url": {
                        "description": "Stream URL endpoint for consuming audio data",
                        "type": "string"
                    },
                    "stats_url": {
                        "description": "Statistics URL endpoint for stream metrics",
                        "type": "string"
                    }
                }
            }
        },
        "securitySchemes": {
            "BearerAuth": {
                "description": "Requires a valid JWT Bearer token for authentication. The token must be provided in the Authorization header as 'Bearer <token>'. Supports both HMAC (HS256) and RSA (RS256) signed tokens.",
                "type": "http",
                "scheme": "bearer",
                "bearerFormat": "JWT",
                "x-bearer-format": "JWT",
                "x-description": "JWT tokens are issued by the /token endpoint after successful authentication"
            }
        }
    }
}