mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-11-22 07:51:00 +00:00
fix swagger doc response model
This commit is contained in:
parent
5c82f9e11e
commit
eb832cc538
1 changed files with 50 additions and 56 deletions
18
app/app.py
18
app/app.py
|
@ -63,9 +63,8 @@ def create_app(char_limit=-1, req_limit=-1, ga_id=None, debug=False, frontend_la
|
|||
responses:
|
||||
200:
|
||||
description: List of languages
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
id: languages
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
|
@ -81,9 +80,8 @@ def create_app(char_limit=-1, req_limit=-1, ga_id=None, debug=False, frontend_la
|
|||
description: Character input limit for this language (-1 indicates no limit)
|
||||
429:
|
||||
description: Slow down
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
id: error-slow-down
|
||||
type: object
|
||||
properties:
|
||||
error:
|
||||
|
@ -136,9 +134,8 @@ def create_app(char_limit=-1, req_limit=-1, ga_id=None, debug=False, frontend_la
|
|||
responses:
|
||||
200:
|
||||
description: Translated text
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
id: translate
|
||||
type: object
|
||||
properties:
|
||||
translatedText:
|
||||
|
@ -146,9 +143,8 @@ def create_app(char_limit=-1, req_limit=-1, ga_id=None, debug=False, frontend_la
|
|||
description: Translated text
|
||||
400:
|
||||
description: Invalid request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
id: error-response
|
||||
type: object
|
||||
properties:
|
||||
error:
|
||||
|
@ -156,9 +152,8 @@ def create_app(char_limit=-1, req_limit=-1, ga_id=None, debug=False, frontend_la
|
|||
description: Error message
|
||||
500:
|
||||
description: Translation error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
id: error-response
|
||||
type: object
|
||||
properties:
|
||||
error:
|
||||
|
@ -166,9 +161,8 @@ def create_app(char_limit=-1, req_limit=-1, ga_id=None, debug=False, frontend_la
|
|||
description: Error message
|
||||
429:
|
||||
description: Slow down
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
id: error-slow-down
|
||||
type: object
|
||||
properties:
|
||||
error:
|
||||
|
|
Loading…
Reference in a new issue