{
    "swagger": "2.0",
    "info": {
        "contact": {},
        "version": "",
        "title": ""
    },
    "paths": {
        "/stream-service/streams": {
            "get": {
                "description": "Возвращает список всех стримов",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "streams"
                ],
                "summary": "Получить все стримы",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.Stream"
                            }
                        }
                    }
                }
            },
            "post": {
                "description": "Создает новый стрим",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "streams"
                ],
                "summary": "Создать стрим",
                "parameters": [
                    {
                        "description": "Данные стримы",
                        "name": "stream",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.Stream"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/models.Stream"
                        }
                    }
                }
            }
        },
        "/stream-service/streams/{id}": {
            "get": {
                "description": "Возвращает стрим с указанным ID",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "streams"
                ],
                "summary": "Получить стрим по ID",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "ID стрима",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/models.Stream"
                        }
                    }
                }
            },
            "put": {
                "description": "Обновляет данные стрима по ID",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "streams"
                ],
                "summary": "Обновить данные стрима",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "ID стрима",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Обновленные данные стрима",
                        "name": "stream",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.Stream"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/models.Stream"
                        }
                    }
                }
            },
            "delete": {
                "description": "Удаляет стрим по ID",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "streams"
                ],
                "summary": "Удалить стрим",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "ID стрима",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    }
                }
            }
        }
    },
    "definitions": {
        "models.Stream": {
            "description": "Стрим",
            "type": "object",
            "properties": {
                "ended_at": {
                    "description": "Время окончания стрима",
                    "type": "string"
                },
                "id": {
                    "description": "Идентификатор стрима",
                    "type": "integer"
                },
                "started_at": {
                    "description": "Время запуска стрима",
                    "type": "string",
                    "example": "2024-10-04T14:48:00Z"
                },
                "title": {
                    "description": "Название стрима",
                    "type": "string"
                }
            }
        }
    }
}