From 70f80c0f47c97ed829b4b835692126e17181a6fd Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Sat, 31 Jan 2026 17:10:18 +0000 Subject: [PATCH] Add models module --- src/docgen/models/config.py | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/docgen/models/config.py diff --git a/src/docgen/models/config.py b/src/docgen/models/config.py new file mode 100644 index 0000000..bb38d39 --- /dev/null +++ b/src/docgen/models/config.py @@ -0,0 +1,42 @@ +"""Configuration models for DocGen.""" + +from enum import Enum +from pathlib import Path +from typing import Optional +from pydantic import BaseModel + + +class OutputFormat(str, Enum): + """Supported output formats.""" + + HTML = "html" + MARKDOWN = "markdown" + OPENAPI = "openapi" + + +class Theme(str, Enum): + """Available themes for HTML output.""" + + DEFAULT = "default" + DARK = "dark" + MINIMAL = "minimal" + + +class DocConfig(BaseModel): + """Configuration for documentation generation.""" + + input_dir: Path = Path(".") + output_dir: Path = Path("docs") + format: OutputFormat = OutputFormat.HTML + theme: Theme = Theme.DEFAULT + framework: Optional[str] = None + title: str = "API Documentation" + description: str = "" + version: str = "1.0.0" + verbose: bool = False + include_private: bool = False + exclude_patterns: list[str] = [] + + model_config = { + "use_enum_values": True, + }