add some docs

This commit is contained in:
Pavel 2024-01-12 16:57:51 +03:00
parent 483eb27723
commit 45e833a74b

@ -193,6 +193,29 @@ paths:
'500':
description: Внутренняя ошибка сервера
/promocode/activate:
post:
summary: Активировать промокод
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ActivateReq'
responses:
'200':
description: Промокод успешно активирован
content:
application/json:
schema:
$ref: '#/components/schemas/ActivateResp'
'400':
description: Невалидный запрос или отсутствует обязательное поле codeword
'404':
description: Промокод не найден
'500':
description: Внутренняя ошибка сервера
components:
schemas:
@ -368,4 +391,20 @@ components:
items:
type: array
items:
$ref: '#/components/schemas/PromoCodeResponse'
$ref: '#/components/schemas/PromoCodeResponse'
ActivateReq:
type: object
required:
- codeword
properties:
codeword:
type: string
description: Кодовое слово промокода, которое требуется активировать
ActivateResp:
type: object
properties:
greetings:
type: string
description: Поле из активированного промокода