8 changed files with 3647 additions and 0 deletions
@ -0,0 +1,57 @@ |
|||
# DefaultApi |
|||
|
|||
All URIs are relative to *http://localhost* |
|||
|
|||
Method | HTTP request | Description |
|||
------------- | ------------- | ------------- |
|||
[**getApiLanguagePredict**](DefaultApi.md#getApiLanguagePredict) | **GET** /api/language/predict | Get a list of supported languages |
|||
[**postApiLanguagePredict**](DefaultApi.md#postApiLanguagePredict) | **POST** /api/language/predict | Detect language of given text |
|||
|
|||
|
|||
<a name="getApiLanguagePredict"></a> |
|||
# **getApiLanguagePredict** |
|||
> AvailableLanguagesResponse.3de4f90 getApiLanguagePredict() |
|||
|
|||
Get a list of supported languages |
|||
|
|||
### Parameters |
|||
This endpoint does not need any parameter. |
|||
|
|||
### Return type |
|||
|
|||
[**AvailableLanguagesResponse.3de4f90**](../Models/AvailableLanguagesResponse.3de4f90.md) |
|||
|
|||
### Authorization |
|||
|
|||
No authorization required |
|||
|
|||
### HTTP request headers |
|||
|
|||
- **Content-Type**: Not defined |
|||
- **Accept**: application/json |
|||
|
|||
<a name="postApiLanguagePredict"></a> |
|||
# **postApiLanguagePredict** |
|||
> LanguageDetectionResponse.3de4f90 postApiLanguagePredict(LanguageDetectionRequest.3de4f90) |
|||
|
|||
Detect language of given text |
|||
|
|||
### Parameters |
|||
|
|||
Name | Type | Description | Notes |
|||
------------- | ------------- | ------------- | ------------- |
|||
**LanguageDetectionRequest.3de4f90** | [**LanguageDetectionRequest.3de4f90**](../Models/LanguageDetectionRequest.3de4f90.md)| | [optional] |
|||
|
|||
### Return type |
|||
|
|||
[**LanguageDetectionResponse.3de4f90**](../Models/LanguageDetectionResponse.3de4f90.md) |
|||
|
|||
### Authorization |
|||
|
|||
No authorization required |
|||
|
|||
### HTTP request headers |
|||
|
|||
- **Content-Type**: application/json |
|||
- **Accept**: application/json |
|||
|
@ -0,0 +1,9 @@ |
|||
# AvailableLanguagesResponse.3de4f90 |
|||
## Properties |
|||
|
|||
Name | Type | Description | Notes |
|||
------------ | ------------- | ------------- | ------------- |
|||
**supported\_languages** | **List** | | [default to null] |
|||
|
|||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) |
|||
|
@ -0,0 +1,9 @@ |
|||
# LanguageDetectionRequest.3de4f90 |
|||
## Properties |
|||
|
|||
Name | Type | Description | Notes |
|||
------------ | ------------- | ------------- | ------------- |
|||
**text** | **String** | | [default to null] |
|||
|
|||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) |
|||
|
@ -0,0 +1,10 @@ |
|||
# LanguageDetectionResponse.3de4f90 |
|||
## Properties |
|||
|
|||
Name | Type | Description | Notes |
|||
------------ | ------------- | ------------- | ------------- |
|||
**lang** | **String** | | [default to null] |
|||
**score** | **BigDecimal** | Probability score of the detection | [default to null] |
|||
|
|||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) |
|||
|
@ -0,0 +1,12 @@ |
|||
# ValidationError.6a07bef.ValidationErrorElement |
|||
## Properties |
|||
|
|||
Name | Type | Description | Notes |
|||
------------ | ------------- | ------------- | ------------- |
|||
**loc** | **List** | | [default to null] |
|||
**msg** | **String** | | [default to null] |
|||
**type** | **String** | | [default to null] |
|||
**ctx** | [**Object**](.md) | | [optional] [default to null] |
|||
|
|||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) |
|||
|
@ -0,0 +1,26 @@ |
|||
# Documentation for Language detection service |
|||
|
|||
<a name="documentation-for-api-endpoints"></a> |
|||
## Documentation for API Endpoints |
|||
|
|||
All URIs are relative to *http://localhost* |
|||
|
|||
Class | Method | HTTP request | Description |
|||
------------ | ------------- | ------------- | ------------- |
|||
*DefaultApi* | [**getApiLanguagePredict**](Apis/DefaultApi.md#getapilanguagepredict) | **GET** /api/language/predict | Get a list of supported languages |
|||
*DefaultApi* | [**postApiLanguagePredict**](Apis/DefaultApi.md#postapilanguagepredict) | **POST** /api/language/predict | Detect language of given text |
|||
|
|||
|
|||
<a name="documentation-for-models"></a> |
|||
## Documentation for Models |
|||
|
|||
- [AvailableLanguagesResponse.3de4f90](./Models/AvailableLanguagesResponse.3de4f90.md) |
|||
- [LanguageDetectionRequest.3de4f90](./Models/LanguageDetectionRequest.3de4f90.md) |
|||
- [LanguageDetectionResponse.3de4f90](./Models/LanguageDetectionResponse.3de4f90.md) |
|||
- [ValidationError.6a07bef.ValidationErrorElement](./Models/ValidationError.6a07bef.ValidationErrorElement.md) |
|||
|
|||
|
|||
<a name="documentation-for-authorization"></a> |
|||
## Documentation for Authorization |
|||
|
|||
All endpoints do not require authorization. |
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@ |
|||
{"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": []} |
Loading…
Reference in new issue