add some docs
This commit is contained in:
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: Поле из активированного промокода
|
Loading…
Reference in New Issue
Block a user