mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-07-31 14:33:51 -04:00
Updated /translate definition
This commit is contained in:
parent
a0bb9a069c
commit
8b55f92b11
@ -598,7 +598,7 @@ def create_app(args):
|
|||||||
description: API key
|
description: API key
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: Translated text
|
description: Translation
|
||||||
schema:
|
schema:
|
||||||
id: translate
|
id: translate
|
||||||
type: object
|
type: object
|
||||||
@ -608,6 +608,41 @@ def create_app(args):
|
|||||||
- type: string
|
- type: string
|
||||||
- type: array
|
- type: array
|
||||||
description: Translated text(s)
|
description: Translated text(s)
|
||||||
|
detectedLanguage:
|
||||||
|
oneOf:
|
||||||
|
- type: object
|
||||||
|
properties:
|
||||||
|
confidence:
|
||||||
|
type: number
|
||||||
|
format: float
|
||||||
|
description: Confidence score (0-100) of the detected language
|
||||||
|
language:
|
||||||
|
type: string
|
||||||
|
description: Detected language code
|
||||||
|
- type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
confidence:
|
||||||
|
type: number
|
||||||
|
format: float
|
||||||
|
description: Confidence score (0-100) of the detected language
|
||||||
|
language:
|
||||||
|
type: string
|
||||||
|
description: Detected language code
|
||||||
|
alternatives:
|
||||||
|
oneOf:
|
||||||
|
- type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
- type: array
|
||||||
|
items:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
description: Alternative translations
|
||||||
|
required:
|
||||||
|
- translatedText
|
||||||
400:
|
400:
|
||||||
description: Invalid request
|
description: Invalid request
|
||||||
schema:
|
schema:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user