107 lines
2.5 KiB
JSON
107 lines
2.5 KiB
JSON
{
|
|
"openapi": "3.0.3",
|
|
"info": {
|
|
"title": "Сервис формы обратной связи шаблонизатора",
|
|
"description": "Сервис для получения обратной связи. Отправляет все запросы в телеграм канал.",
|
|
"version": "1.0.0"
|
|
},
|
|
"servers": [
|
|
{
|
|
"url": "https://hub.pena.digital"
|
|
}
|
|
],
|
|
"paths": {
|
|
"/callme": {
|
|
"get": {
|
|
"description": "Метод для отправки фидбэка",
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Feedback"
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ErrorValidate"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Too many requests"
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"503": {
|
|
"description": "Service unavailable"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"components": {
|
|
"schemas": {
|
|
"Feedback": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contact": {
|
|
"type": "string",
|
|
"example": "some contact"
|
|
},
|
|
"whoami": {
|
|
"type": "string",
|
|
"example": "test"
|
|
}
|
|
}
|
|
},
|
|
"Error": {
|
|
"type": "string",
|
|
"example": "some error"
|
|
},
|
|
"ErrorValidate": {
|
|
"type": "object",
|
|
"properties": {
|
|
"field": {
|
|
"type": "string",
|
|
"example": "contact"
|
|
},
|
|
"tag": {
|
|
"type": "string",
|
|
"example": "required"
|
|
},
|
|
"value": {
|
|
"type": "string",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"requestBodies": {
|
|
"Feedback": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Feedback"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|