{
  "openapi": "3.1.0",
  "info": {
    "title": "Document",
    "description": "API service for App Factory reusable modules",
    "version": "1.0.0",
    "x-source-commit": "f33cc2b935f31b36240d724948dc8b9c765430cc"
  },
  "paths": {
    "/api/v1/document/formats": {
      "get": {
        "tags": [
          "document"
        ],
        "summary": "Document Formats",
        "operationId": "document_formats_api_v1_document_formats_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/v1/document/parse": {
      "post": {
        "tags": [
          "document"
        ],
        "summary": "Document Parse",
        "description": "通过文件 URL 解析文档（Word / Excel / PDF / PPT / TXT 等）。",
        "operationId": "document_parse_api_v1_document_parse_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentParseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/document/parse/upload": {
      "post": {
        "tags": [
          "document"
        ],
        "summary": "Document Parse Upload",
        "description": "上传文档并解析。",
        "operationId": "document_parse_upload_api_v1_document_parse_upload_post",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_document_parse_upload_api_v1_document_parse_upload_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Body_document_parse_upload_api_v1_document_parse_upload_post": {
        "properties": {
          "file": {
            "type": "string",
            "format": "binary",
            "title": "File"
          },
          "output": {
            "type": "string",
            "title": "Output",
            "default": "text"
          }
        },
        "type": "object",
        "required": [
          "file"
        ],
        "title": "Body_document_parse_upload_api_v1_document_parse_upload_post"
      },
      "DocumentParseRequest": {
        "properties": {
          "file_url": {
            "type": "string",
            "minLength": 1,
            "title": "File Url"
          },
          "output": {
            "type": "string",
            "enum": [
              "text",
              "markdown"
            ],
            "title": "Output",
            "default": "text"
          }
        },
        "type": "object",
        "required": [
          "file_url"
        ],
        "title": "DocumentParseRequest"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "servers": [
    {
      "url": "https://api.sniphunter.com"
    }
  ]
}