{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://raw.githubusercontent.com/api-evangelist/languagetools/main/json-schema/check-response.json", "title": "CheckResponse", "description": "Response from POST /check - the result of checking the text", "type": "object", "properties": { "software": { "type": "object", "description": "Information about the LanguageTool software version used.", "required": ["name", "version", "buildDate", "apiVersion"], "properties": { "name": { "type": "string", "description": "Usually 'LanguageTool'." }, "version": { "type": "string", "description": "A version string like '3.3' or '3.4-SNAPSHOT'." }, "buildDate": { "type": "string", "description": "Date when the software was built, e.g. '2016-05-25'." }, "apiVersion": { "type": "integer", "description": "Version of this API response format." }, "premium": { "type": "boolean", "description": "true if you're using a Premium account with all premium text checks." }, "status": { "type": "string", "description": "An optional warning, e.g. when the API format is not stable." } } }, "language": { "type": "object", "description": "The language used for checking the text.", "required": ["name", "code", "detectedLanguage"], "properties": { "name": { "type": "string", "description": "Language name like 'French' or 'English (US)'." }, "code": { "type": "string", "description": "ISO 639-1 code like 'en', 'en-US', or 'ca-ES-valencia'." }, "detectedLanguage": { "type": "object", "description": "The automatically detected text language.", "required": ["name", "code"], "properties": { "name": { "type": "string", "description": "Language name like 'French' or 'English (US)'." }, "code": { "type": "string", "description": "ISO 639-1 code like 'en', 'en-US', or 'ca-ES-valencia'." } } } } }, "matches": { "type": "array", "description": "Array of grammar and style issues found in the text.", "items": { "type": "object", "required": ["message", "offset", "length", "replacements", "context", "sentence"], "properties": { "message": { "type": "string", "description": "Message about the error displayed to the user." }, "shortMessage": { "type": "string", "description": "An optional shorter version of 'message'." }, "offset": { "type": "integer", "description": "The 0-based character offset of the error in the text." }, "length": { "type": "integer", "description": "The length of the error in characters." }, "replacements": { "type": "array", "description": "Replacements that might correct the error. Can be empty.", "items": { "type": "object", "properties": { "value": { "type": "string", "description": "The replacement string." } } } }, "context": { "type": "object", "description": "Context of the error in the surrounding text.", "required": ["text", "offset", "length"], "properties": { "text": { "type": "string", "description": "Context of the error, including some text to the left and right." }, "offset": { "type": "integer", "description": "The 0-based character offset of the error in the context text." }, "length": { "type": "integer", "description": "The length of the error in characters in the context." } } }, "sentence": { "type": "string", "description": "The sentence the error occurred in." }, "rule": { "type": "object", "description": "The rule that triggered the match.", "required": ["id", "description", "category"], "properties": { "id": { "type": "string", "description": "A rule identifier that's unique for this language." }, "subId": { "type": "string", "description": "An optional sub identifier of the rule." }, "description": { "type": "string", "description": "Description of the rule." }, "urls": { "type": "array", "description": "An optional array of URLs with more detailed description of the error.", "items": { "type": "object", "properties": { "value": { "type": "string", "description": "The URL." } } } }, "issueType": { "type": "string", "description": "The Localization Quality Issue Type." }, "category": { "type": "object", "description": "The category this rule belongs to.", "properties": { "id": { "type": "string", "description": "A category identifier that's unique for this language." }, "name": { "type": "string", "description": "A short description of the category." } } } } } } } } } }