diff --git a/generated/Apis/DefaultApi.md b/generated/Apis/DefaultApi.md new file mode 100644 index 0000000..934054e --- /dev/null +++ b/generated/Apis/DefaultApi.md @@ -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 + + + +# **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 + + +# **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 + diff --git a/generated/Models/AvailableLanguagesResponse.3de4f90.md b/generated/Models/AvailableLanguagesResponse.3de4f90.md new file mode 100644 index 0000000..9f97c93 --- /dev/null +++ b/generated/Models/AvailableLanguagesResponse.3de4f90.md @@ -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) + diff --git a/generated/Models/LanguageDetectionRequest.3de4f90.md b/generated/Models/LanguageDetectionRequest.3de4f90.md new file mode 100644 index 0000000..a41a91d --- /dev/null +++ b/generated/Models/LanguageDetectionRequest.3de4f90.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) + diff --git a/generated/Models/LanguageDetectionResponse.3de4f90.md b/generated/Models/LanguageDetectionResponse.3de4f90.md new file mode 100644 index 0000000..b692521 --- /dev/null +++ b/generated/Models/LanguageDetectionResponse.3de4f90.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) + diff --git a/generated/Models/ValidationError.6a07bef.ValidationErrorElement.md b/generated/Models/ValidationError.6a07bef.ValidationErrorElement.md new file mode 100644 index 0000000..338f812 --- /dev/null +++ b/generated/Models/ValidationError.6a07bef.ValidationErrorElement.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) + diff --git a/generated/README.md b/generated/README.md new file mode 100644 index 0000000..3e787a2 --- /dev/null +++ b/generated/README.md @@ -0,0 +1,26 @@ +# Documentation for Language detection service + + +## 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 + + + +## 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) + + + +## Documentation for Authorization + +All endpoints do not require authorization. diff --git a/generated/index.html b/generated/index.html new file mode 100644 index 0000000..de7e938 --- /dev/null +++ b/generated/index.html @@ -0,0 +1,3523 @@ + + + + + Language detection service + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+

Language detection service

+
+
+
+ +
+
+

Default

+
+
+
+

getApiLanguagePredict

+

Get a list of supported languages

+
+
+
+

+

+

+
+
/api/language/predict
+

+

Usage and SDK Samples

+

+ + +
+
+
curl -X GET \
+ -H "Accept: application/json" \
+ "http://localhost/api/language/predict"
+
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+    public static void main(String[] args) {
+
+        // Create an instance of the API class
+        DefaultApi apiInstance = new DefaultApi();
+
+        try {
+            AvailableLanguagesResponse.3de4f90 result = apiInstance.getApiLanguagePredict();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#getApiLanguagePredict");
+            e.printStackTrace();
+        }
+    }
+}
+
+
+ +
+
import org.openapitools.client.api.DefaultApi;
+
+public class DefaultApiExample {
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+
+        try {
+            AvailableLanguagesResponse.3de4f90 result = apiInstance.getApiLanguagePredict();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#getApiLanguagePredict");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+

+
+// Create an instance of the API class
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+
+// Get a list of supported languages
+[apiInstance getApiLanguagePredictWithCompletionHandler: 
+              ^(AvailableLanguagesResponse.3de4f90 output, NSError* error) {
+    if (output) {
+        NSLog(@"%@", output);
+    }
+    if (error) {
+        NSLog(@"Error: %@", error);
+    }
+}];
+
+
+ +
+
var LanguageDetectionService = require('language_detection_service');
+
+// Create an instance of the API class
+var api = new LanguageDetectionService.DefaultApi()
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.getApiLanguagePredict(callback);
+
+
+ + +
+
using System;
+using System.Diagnostics;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+    public class getApiLanguagePredictExample
+    {
+        public void main()
+        {
+
+            // Create an instance of the API class
+            var apiInstance = new DefaultApi();
+
+            try {
+                // Get a list of supported languages
+                AvailableLanguagesResponse.3de4f90 result = apiInstance.getApiLanguagePredict();
+                Debug.WriteLine(result);
+            } catch (Exception e) {
+                Debug.Print("Exception when calling DefaultApi.getApiLanguagePredict: " + e.Message );
+            }
+        }
+    }
+}
+
+
+ +
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Create an instance of the API class
+$api_instance = new OpenAPITools\Client\Api\DefaultApi();
+
+try {
+    $result = $api_instance->getApiLanguagePredict();
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->getApiLanguagePredict: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+ +
+
use Data::Dumper;
+use WWW::OPenAPIClient::Configuration;
+use WWW::OPenAPIClient::DefaultApi;
+
+# Create an instance of the API class
+my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
+
+eval {
+    my $result = $api_instance->getApiLanguagePredict();
+    print Dumper($result);
+};
+if ($@) {
+    warn "Exception when calling DefaultApi->getApiLanguagePredict: $@\n";
+}
+
+ +
+
from __future__ import print_statement
+import time
+import openapi_client
+from openapi_client.rest import ApiException
+from pprint import pprint
+
+# Create an instance of the API class
+api_instance = openapi_client.DefaultApi()
+
+try:
+    # Get a list of supported languages
+    api_response = api_instance.get_api_language_predict()
+    pprint(api_response)
+except ApiException as e:
+    print("Exception when calling DefaultApi->getApiLanguagePredict: %s\n" % e)
+
+ +
+
extern crate DefaultApi;
+
+pub fn main() {
+
+    let mut context = DefaultApi::Context::default();
+    let result = client.getApiLanguagePredict(&context).wait();
+
+    println!("{:?}", result);
+}
+
+
+
+ +

Scopes

+ + +
+ +

Parameters

+ + + + + + +

Responses

+

+

+ + + + + + +
+
+
+ +
+ +
+
+

+

+ + + + + + +
+
+
+ +
+ +
+
+
+
+
+
+
+
+

postApiLanguagePredict

+

Detect language of given text

+
+
+
+

+

+

+
+
/api/language/predict
+

+

Usage and SDK Samples

+

+ + +
+
+
curl -X POST \
+ -H "Accept: application/json" \
+ -H "Content-Type: application/json" \
+ "http://localhost/api/language/predict" \
+ -d ''
+
+
+
+
import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.DefaultApi;
+
+import java.io.File;
+import java.util.*;
+
+public class DefaultApiExample {
+    public static void main(String[] args) {
+
+        // Create an instance of the API class
+        DefaultApi apiInstance = new DefaultApi();
+        LanguageDetectionRequest3de4f90 languageDetectionRequest3de4f90 = ; // LanguageDetectionRequest3de4f90 | 
+
+        try {
+            LanguageDetectionResponse.3de4f90 result = apiInstance.postApiLanguagePredict(languageDetectionRequest3de4f90);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#postApiLanguagePredict");
+            e.printStackTrace();
+        }
+    }
+}
+
+
+ +
+
import org.openapitools.client.api.DefaultApi;
+
+public class DefaultApiExample {
+    public static void main(String[] args) {
+        DefaultApi apiInstance = new DefaultApi();
+        LanguageDetectionRequest3de4f90 languageDetectionRequest3de4f90 = ; // LanguageDetectionRequest3de4f90 | 
+
+        try {
+            LanguageDetectionResponse.3de4f90 result = apiInstance.postApiLanguagePredict(languageDetectionRequest3de4f90);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling DefaultApi#postApiLanguagePredict");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+

+
+// Create an instance of the API class
+DefaultApi *apiInstance = [[DefaultApi alloc] init];
+LanguageDetectionRequest3de4f90 *languageDetectionRequest3de4f90 = ; //  (optional)
+
+// Detect language of given text
+[apiInstance postApiLanguagePredictWith:languageDetectionRequest3de4f90
+              completionHandler: ^(LanguageDetectionResponse.3de4f90 output, NSError* error) {
+    if (output) {
+        NSLog(@"%@", output);
+    }
+    if (error) {
+        NSLog(@"Error: %@", error);
+    }
+}];
+
+
+ +
+
var LanguageDetectionService = require('language_detection_service');
+
+// Create an instance of the API class
+var api = new LanguageDetectionService.DefaultApi()
+var opts = {
+  'languageDetectionRequest3de4f90':  // {LanguageDetectionRequest3de4f90} 
+};
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.postApiLanguagePredict(opts, callback);
+
+
+ + +
+
using System;
+using System.Diagnostics;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+    public class postApiLanguagePredictExample
+    {
+        public void main()
+        {
+
+            // Create an instance of the API class
+            var apiInstance = new DefaultApi();
+            var languageDetectionRequest3de4f90 = new LanguageDetectionRequest3de4f90(); // LanguageDetectionRequest3de4f90 |  (optional) 
+
+            try {
+                // Detect language of given text
+                LanguageDetectionResponse.3de4f90 result = apiInstance.postApiLanguagePredict(languageDetectionRequest3de4f90);
+                Debug.WriteLine(result);
+            } catch (Exception e) {
+                Debug.Print("Exception when calling DefaultApi.postApiLanguagePredict: " + e.Message );
+            }
+        }
+    }
+}
+
+
+ +
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// Create an instance of the API class
+$api_instance = new OpenAPITools\Client\Api\DefaultApi();
+$languageDetectionRequest3de4f90 = ; // LanguageDetectionRequest3de4f90 | 
+
+try {
+    $result = $api_instance->postApiLanguagePredict($languageDetectionRequest3de4f90);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling DefaultApi->postApiLanguagePredict: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+ +
+
use Data::Dumper;
+use WWW::OPenAPIClient::Configuration;
+use WWW::OPenAPIClient::DefaultApi;
+
+# Create an instance of the API class
+my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
+my $languageDetectionRequest3de4f90 = WWW::OPenAPIClient::Object::LanguageDetectionRequest3de4f90->new(); # LanguageDetectionRequest3de4f90 | 
+
+eval {
+    my $result = $api_instance->postApiLanguagePredict(languageDetectionRequest3de4f90 => $languageDetectionRequest3de4f90);
+    print Dumper($result);
+};
+if ($@) {
+    warn "Exception when calling DefaultApi->postApiLanguagePredict: $@\n";
+}
+
+ +
+
from __future__ import print_statement
+import time
+import openapi_client
+from openapi_client.rest import ApiException
+from pprint import pprint
+
+# Create an instance of the API class
+api_instance = openapi_client.DefaultApi()
+languageDetectionRequest3de4f90 =  # LanguageDetectionRequest3de4f90 |  (optional)
+
+try:
+    # Detect language of given text
+    api_response = api_instance.post_api_language_predict(languageDetectionRequest3de4f90=languageDetectionRequest3de4f90)
+    pprint(api_response)
+except ApiException as e:
+    print("Exception when calling DefaultApi->postApiLanguagePredict: %s\n" % e)
+
+ +
+
extern crate DefaultApi;
+
+pub fn main() {
+    let languageDetectionRequest3de4f90 = ; // LanguageDetectionRequest3de4f90
+
+    let mut context = DefaultApi::Context::default();
+    let result = client.postApiLanguagePredict(languageDetectionRequest3de4f90, &context).wait();
+
+    println!("{:?}", result);
+}
+
+
+
+ +

Scopes

+ + +
+ +

Parameters

+ + + +
Body parameters
+ + + + + + + + + +
NameDescription
languageDetectionRequest3de4f90 +

+ +
+
+ + + +

Responses

+

+

+ + + + + + +
+
+
+ +
+ +
+
+

+

+ + + + + + +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+
+
+ + + + + + + + + + + + + + diff --git a/generated/openapi.json b/generated/openapi.json new file mode 100644 index 0000000..3a6464d --- /dev/null +++ b/generated/openapi.json @@ -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": []} \ No newline at end of file