You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
2.9 KiB
1 lines
2.9 KiB
{"openapi": "3.0.3", "info": {"title": "Language detection service", "description": "Detect language of given text", "version": "0.0.1", "contact": {"name": "Harish", "url": "https://github.com/harish2704", "email": "harish2704@gmail.com"}}, "tags": [], "paths": {"/api/language/predict": {"get": {"summary": "Get a list of supported languages", "operationId": "get__api_language_predict", "description": "", "tags": [], "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AvailableLanguagesResponse.3de4f90"}}}}, "422": {"description": "Unprocessable Entity", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationError.6a07bef"}}}}}}, "post": {"summary": "Detect language of given text", "operationId": "post__api_language_predict", "description": "", "tags": [], "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LanguageDetectionResponse.3de4f90"}}}}, "422": {"description": "Unprocessable Entity", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationError.6a07bef"}}}}}, "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LanguageDetectionRequest.3de4f90"}}}}}}}, "components": {"schemas": {"LanguageDetectionRequest.3de4f90": {"title": "LanguageDetectionRequest", "type": "object", "properties": {"text": {"title": "Text", "type": "string"}}, "required": ["text"], "example": {"text": "How are you?"}}, "LanguageDetectionResponse.3de4f90": {"title": "LanguageDetectionResponse", "type": "object", "properties": {"lang": {"title": "Lang", "type": "string"}, "score": {"title": "Score", "description": "Probability score of the detection", "exclusiveMinimum": 0, "maximum": 1, "type": "number"}}, "required": ["lang", "score"], "example": {"lang": "English", "score": 0.993}}, "ValidationError.6a07bef": {"title": "ValidationError", "description": "Model of a validation error response.", "type": "array", "items": {"$ref": "#/components/schemas/ValidationError.6a07bef.ValidationErrorElement"}}, "AvailableLanguagesResponse.3de4f90": {"title": "AvailableLanguagesResponse", "type": "object", "properties": {"supported_languages": {"title": "Supported Languages", "type": "array", "items": {"type": "string"}}}, "required": ["supported_languages"], "example": {"supported_languages": ["English", "Hindi"]}}, "ValidationError.6a07bef.ValidationErrorElement": {"title": "ValidationErrorElement", "description": "Model of a validation error response element.", "type": "object", "properties": {"loc": {"title": "Missing field name", "type": "array", "items": {"type": "string"}}, "msg": {"title": "Error message", "type": "string"}, "type": {"title": "Error type", "type": "string"}, "ctx": {"title": "Error context", "type": "object"}}, "required": ["loc", "msg", "type"]}}}, "security": []}
|