{
  "openapi": "3.0.2",
  "info": {
    "title": "Detect Language - Opyrator",
    "description": "Detect the language of a given text via a Fasttext model.",
    "version": "0.1.0"
  },
  "paths": {
    "/call": {
      "post": {
        "summary": "Execute the opyrator.",
        "description": "Executes this opyrator.",
        "operationId": "call",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TextClassificationInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClassificationOutput"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
              }
            }
          }
        }
      }
    },
    "/info": {
      "get": {
        "summary": "Get info metadata.",
        "description": "Returns informational metadata about this Opyrator.",
        "operationId": "info",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Info Info Get",
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ClassificationOutput": {
        "title": "ClassificationOutput",
        "type": "array",
        "items": { "$ref": "#/components/schemas/ScoredLabel" }
      },
      "HTTPValidationError": {
        "title": "HTTPValidationError",
        "type": "object",
        "properties": {
          "detail": {
            "title": "Detail",
            "type": "array",
            "items": { "$ref": "#/components/schemas/ValidationError" }
          }
        }
      },
      "ScoredLabel": {
        "title": "ScoredLabel",
        "required": ["label", "score"],
        "type": "object",
        "properties": {
          "label": { "title": "Label", "type": "string" },
          "score": { "title": "Score", "type": "number" }
        }
      },
      "TextClassificationInput": {
        "title": "TextClassificationInput",
        "required": ["inputs"],
        "type": "object",
        "properties": {
          "inputs": {
            "title": "Text Input",
            "type": "string",
            "description": "The input text to be classified."
          }
        }
      },
      "ValidationError": {
        "title": "ValidationError",
        "required": ["loc", "msg", "type"],
        "type": "object",
        "properties": {
          "loc": {
            "title": "Location",
            "type": "array",
            "items": { "type": "string" }
          },
          "msg": { "title": "Message", "type": "string" },
          "type": { "title": "Error Type", "type": "string" }
        }
      }
    }
  }
}
