{
    "openapi": "3.0.0",
    "info": {
        "title": "History data server",
        "version": "0.1.0"
    },
    "paths": {
        "/api/optimal-prices": {
            "get": {
                "summary": "Get Optimal Prices",
                "operationId": "get_optimal_prices",
                "parameters": [
                    {
                        "name": "day",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "date",
                            "title": "Day"
                        },
                        "example": "2024-09-29"
                    },
                    {
                        "name": "length",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "integer",
                            "title": "length"
                        },
                        "example": "3"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful Response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/OptimalPriceRecord"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Prices were not found",
                        "content": {
                            "application/json": {}
                        }
                    }
                }
            }
        },
        "/api/health": {
            "get": {
                "summary": "Get Health status",
                "operationId": "get_health",
                "responses": {
                    "200": {
                        "description": "Successful Response",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string",
                                    "example": "Success"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "OptimalPriceRecord": {
                "properties": {
                    "start-time": {
                        "type": "integer",
                        "title": "Timestamp"
                    },
                    "end-time": {
                        "type": "integer",
                        "title": "Timestamp"
                    },
                    "total-price": {
                        "type": "number",
                        "title": "Total price"
                    }
                },
                "type": "object",
                "required": [
                    "start-time",
                    "end-time",
                    "total-price"
                ],
                "title": "OptimalPriceRecord",
                "x-body-name": "optimal_price_record"
            }
        }
    }
}