openapi: 3.0.1 info: title: АПИ перевод description: version: v1 paths: #/language/list: # get: # tags: # - Language list codes # summary: # responses: # 200: # description: "Успешно" # content: # application/json: # schema: # type: object # properties: # result: # type: string # description: привет # example: true /translate/translate: get: tags: - Translate text summary: Method for translate parameters: - name: token in: query description: The token required for authorization required: true example: jaLa324556678912erooerJk schema: type: string - name: language_code in: query description: What language should the text be translated into required: true example: ru schema: type: string - name: text in: query description: Text for translate required: true example: hello schema: type: string responses: 200: description: "Успешно" content: application/json: schema: type: object properties: result: type: string description: привет example: true #/translate/text: # post: # tags: # - Translate text # summary: Метод для перевода # requestBody: # content: # application/json: # schema: # properties: # language_code: # type: string # description: Language code # example: uk # text: # type: string # description: Text for translate # example: Hello world # responses: # 200: # description: "Success" # content: # application/json: # schema: # type: object # properties: # translated_text: # type: text # description: Translated text # example: Привіт світ # 400: # content: # application/json: # schema: # allOf: # - $ref: '#/components/schemas/Error' # #/translate/text-translate: # post: # tags: # - Translate text # summary: Метод для перевода текста в rapidApi для Google Translate приложения # requestBody: # content: # application/json: # schema: # properties: # language: # type: string # description: Language code # example: fr # text: # type: string # description: Text for translate # example: Hello # responses: # 200: # description: "Success" # content: # application/json: # schema: # type: object # properties: # translated_text: # type: text # description: Translated text # example: Привіт світ # 400: # content: # application/json: # schema: # allOf: # - $ref: '#/components/schemas/Error' components: schemas: Error: type: object properties: name: type: string example: "Bad request" message: type: string example: "Ошибка выполнения api" code: type: integer type: type: string example: "common\\lib\\web\\HttpException" status: type: integer example: 400 responses: Success: description: OK headers: Is-Logged: schema: type: integer description: Флаг авторизованного пользователя security: - apiKey: []