This commit is contained in:
42
src/docgen/models/config.py
Normal file
42
src/docgen/models/config.py
Normal file
@@ -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,
|
||||
}
|
||||
Reference in New Issue
Block a user