diff --git a/docs/openapi.yaml b/docs/openapi.yaml index 4c5383f..48a4d6a 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -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' \ No newline at end of file + $ref: '#/components/schemas/PromoCodeResponse' + + ActivateReq: + type: object + required: + - codeword + properties: + codeword: + type: string + description: Кодовое слово промокода, которое требуется активировать + + ActivateResp: + type: object + properties: + greetings: + type: string + description: Поле из активированного промокода \ No newline at end of file