openapi: 3.0.1 info: title: Rosetta Translate Widget Back-end API description: This defines the format and usage that the translate widget is expecting. version: 1.0.0 externalDocs: description: GitHub repo url: https://github.com/au5ton/rosetta servers: - url: https://YOUR_SERVER_HERE.com/ - url: https://rosetta-demo-server.vercel.app/api/legacy description: Data is sourced from [@vitalets/google-translate-api](https://github.com/vitalets/google-translate-api) - url: https://rosetta-demo-server.vercel.app/api/v2 description: Data is sourced from [Google Cloud Translation API (Basic)](https://cloud.google.com/translate/docs/reference/libraries/v2/overview-v2) - url: https://rosetta-demo-server.vercel.app/api/v3 description: Data is sourced from [Google Cloud Translation API (Advanced)](https://cloud.google.com/translate/docs/reference/libraries/v3/overview-v3) - url: https://rosetta-demo-server.vercel.app/api/msft description: Data is sourced from [Microsoft Translator API](https://docs.microsoft.com/en-us/azure/cognitive-services/translator/) paths: /translate: post: summary: Translate some text operationId: translate parameters: - name: to in: query description: The target language to translate to required: true schema: type: string - name: from in: query description: The source language to translate from required: true schema: type: string - name: format in: query description: The format that the provided text is in, either `text` or `html`. required: false schema: type: string default: 'text' - name: siteName in: query description: An optional identifier for the site being translated required: false schema: type: string requestBody: description: The text that is intended to be translated content: application/json: schema: type: array items: type: string required: true responses: 405: description: Invalid input content: {} x-codegen-request-body-name: body /supportedLanguages: get: summary: Gets the list of supported languages for translation description: '' operationId: supportedLanguages parameters: - name: target in: query description: The native language in which to present the supported languages required: false schema: type: string default: 'en' - name: siteName in: query description: An optional identifier for the site being translated required: false schema: type: string responses: 200: description: successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/SupportedLanguage' 400: description: Invalid status value content: {} components: schemas: SupportedLanguage: type: object properties: languageCode: type: string displayName: type: string