{
  "openapi": "3.0.2",
  "info": {
    "title": "Preprocess Text - Opyrator",
    "description": "Clean up text data based on selected preprocessing steps.",
    "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/TextPreprocessingInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TextProcessingOutput"
                }
              }
            }
          },
          "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": {
      "HTTPValidationError": {
        "title": "HTTPValidationError",
        "type": "object",
        "properties": {
          "detail": {
            "title": "Detail",
            "type": "array",
            "items": { "$ref": "#/components/schemas/ValidationError" }
          }
        }
      },
      "PreprocessingStep": {
        "title": "PreprocessingStep",
        "enum": [
          "remove-special-characters",
          "remove-single-characters",
          "clean-multiple-spaces",
          "lowercase",
          "remove-stop-words"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "TextPreprocessingInput": {
        "title": "TextPreprocessingInput",
        "required": ["text", "preprocessing_steps"],
        "type": "object",
        "properties": {
          "text": { "title": "Text", "type": "string" },
          "preprocessing_steps": {
            "uniqueItems": true,
            "type": "array",
            "items": { "$ref": "#/components/schemas/PreprocessingStep" },
            "description": "Preprocessing steps to apply on the text."
          }
        }
      },
      "TextProcessingOutput": {
        "title": "TextProcessingOutput",
        "required": ["preprocessed_text"],
        "type": "object",
        "properties": {
          "preprocessed_text": {
            "title": "Preprocessed Text",
            "type": "string"
          }
        }
      },
      "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" }
        }
      }
    }
  }
}
