mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-11-26 09:51:01 +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:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: List of languages
|
description: List of languages
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
schema:
|
||||||
|
id: languages
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: object
|
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)
|
description: Character input limit for this language (-1 indicates no limit)
|
||||||
429:
|
429:
|
||||||
description: Slow down
|
description: Slow down
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
schema:
|
||||||
|
id: error-slow-down
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
error:
|
error:
|
||||||
|
@ -136,9 +134,8 @@ def create_app(char_limit=-1, req_limit=-1, ga_id=None, debug=False, frontend_la
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: Translated text
|
description: Translated text
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
schema:
|
||||||
|
id: translate
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
translatedText:
|
translatedText:
|
||||||
|
@ -146,9 +143,8 @@ def create_app(char_limit=-1, req_limit=-1, ga_id=None, debug=False, frontend_la
|
||||||
description: Translated text
|
description: Translated text
|
||||||
400:
|
400:
|
||||||
description: Invalid request
|
description: Invalid request
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
schema:
|
||||||
|
id: error-response
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
error:
|
error:
|
||||||
|
@ -156,9 +152,8 @@ def create_app(char_limit=-1, req_limit=-1, ga_id=None, debug=False, frontend_la
|
||||||
description: Error message
|
description: Error message
|
||||||
500:
|
500:
|
||||||
description: Translation error
|
description: Translation error
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
schema:
|
||||||
|
id: error-response
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
error:
|
error:
|
||||||
|
@ -166,9 +161,8 @@ def create_app(char_limit=-1, req_limit=-1, ga_id=None, debug=False, frontend_la
|
||||||
description: Error message
|
description: Error message
|
||||||
429:
|
429:
|
||||||
description: Slow down
|
description: Slow down
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
schema:
|
||||||
|
id: error-slow-down
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
error:
|
error:
|
||||||
|
|
Loading…
Reference in a new issue