DAS_2024_1/zhimolostnova_anna_lab_3/streamService/docs/swagger.yaml
2024-10-05 21:14:57 +03:00

128 lines
3.1 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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