how did i forget to comment my testing stuff

This commit is contained in:
Arya Kiran 2024-07-20 15:38:23 +05:30
parent c233475390
commit aad4b83079
No known key found for this signature in database
GPG key ID: 842D12BDA50DF120
4 changed files with 151 additions and 19 deletions

View file

@ -41,28 +41,28 @@ const docTemplate = `{
"type": "string",
"description": "Engine name",
"name": "engine",
"in": "query",
"in": "formData",
"required": true
},
{
"type": "string",
"description": "Source language",
"name": "from",
"in": "query",
"in": "formData",
"required": true
},
{
"type": "string",
"description": "Target language",
"name": "to",
"in": "query",
"in": "formData",
"required": true
},
{
"type": "string",
"description": "PNG image in base64 format",
"type": "file",
"description": "PNG image",
"name": "image",
"in": "query",
"in": "formData",
"required": true
}
],
@ -227,15 +227,57 @@ const docTemplate = `{
"engine": {
"type": "string"
},
"source_antonyms": {
"type": "array",
"items": {
"type": "string"
}
},
"source_equivalent_target_lang": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
},
"source_language": {
"type": "string"
},
"source_synonyms": {
"type": "array",
"items": {
"type": "string"
}
},
"source_transliteration": {
"type": "string"
},
"target_antonyms": {
"type": "array",
"items": {
"type": "string"
}
},
"target_equivalent_source_lang": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
},
"target_language": {
"type": "string"
},
"target_synonyms": {
"type": "array",
"items": {
"type": "string"
}
},
"target_transliteration": {
"type": "string"
},
@ -264,6 +306,13 @@ const docTemplate = `{
"libmozhi.WordChoices": {
"type": "object",
"properties": {
"definition": {
"type": "string"
},
"example": {
"description": "Example is for google alone; since it does not have a linked example for source \u0026 target",
"type": "string"
},
"examples_source": {
"type": "array",
"items": {

View file

@ -30,28 +30,28 @@
"type": "string",
"description": "Engine name",
"name": "engine",
"in": "query",
"in": "formData",
"required": true
},
{
"type": "string",
"description": "Source language",
"name": "from",
"in": "query",
"in": "formData",
"required": true
},
{
"type": "string",
"description": "Target language",
"name": "to",
"in": "query",
"in": "formData",
"required": true
},
{
"type": "string",
"description": "PNG image in base64 format",
"type": "file",
"description": "PNG image",
"name": "image",
"in": "query",
"in": "formData",
"required": true
}
],
@ -216,15 +216,57 @@
"engine": {
"type": "string"
},
"source_antonyms": {
"type": "array",
"items": {
"type": "string"
}
},
"source_equivalent_target_lang": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
},
"source_language": {
"type": "string"
},
"source_synonyms": {
"type": "array",
"items": {
"type": "string"
}
},
"source_transliteration": {
"type": "string"
},
"target_antonyms": {
"type": "array",
"items": {
"type": "string"
}
},
"target_equivalent_source_lang": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
},
"target_language": {
"type": "string"
},
"target_synonyms": {
"type": "array",
"items": {
"type": "string"
}
},
"target_transliteration": {
"type": "string"
},
@ -253,6 +295,13 @@
"libmozhi.WordChoices": {
"type": "object",
"properties": {
"definition": {
"type": "string"
},
"example": {
"description": "Example is for google alone; since it does not have a linked example for source \u0026 target",
"type": "string"
},
"examples_source": {
"type": "array",
"items": {

View file

@ -20,12 +20,40 @@ definitions:
type: string
engine:
type: string
source_antonyms:
items:
type: string
type: array
source_equivalent_target_lang:
additionalProperties:
items:
type: string
type: array
type: object
source_language:
type: string
source_synonyms:
items:
type: string
type: array
source_transliteration:
type: string
target_antonyms:
items:
type: string
type: array
target_equivalent_source_lang:
additionalProperties:
items:
type: string
type: array
type: object
target_language:
type: string
target_synonyms:
items:
type: string
type: array
target_transliteration:
type: string
translated-text:
@ -44,6 +72,12 @@ definitions:
type: object
libmozhi.WordChoices:
properties:
definition:
type: string
example:
description: Example is for google alone; since it does not have a linked
example for source & target
type: string
examples_source:
items:
type: string
@ -74,25 +108,25 @@ paths:
description: When engine is set to all, it will return an array of libmozhi.LangOut.
parameters:
- description: Engine name
in: query
in: formData
name: engine
required: true
type: string
- description: Source language
in: query
in: formData
name: from
required: true
type: string
- description: Target language
in: query
in: formData
name: to
required: true
type: string
- description: PNG image in base64 format
in: query
- description: PNG image
in: formData
name: image
required: true
type: string
type: file
responses:
"200":
description: OK

2
go.mod
View file

@ -4,7 +4,7 @@ go 1.21.0
replace github.com/OwO-Network/gdeeplx => github.com/gi-yt/gdeeplx v0.0.0-20230817133036-0eb71706cd51
replace codeberg.org/aryak/libmozhi => /home/arya/projects/mozhi/libmozhi
//replace codeberg.org/aryak/libmozhi => /home/arya/projects/mozhi/libmozhi
require (
codeberg.org/aryak/libmozhi v0.0.0-20240717101951-60801036fad6