Markdown Converter
Agent skill for markdown-converter
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This repository generates OpenAPI 3.0.3 specifications for Proxmox APIs by parsing their JavaScript documentation files. It supports both Proxmox Virtual Environment (PVE) and Proxmox Backup Server (PBS).
# Install all dependencies (ALWAYS use UV, never pip) uv sync --extra all # Run any Python script uv run python script_name.py
# Generate PVE API specifications cd scripts/pve && uv run python generate_openapi.py && uv run python convert_to_yaml.py # Generate PBS API specifications cd scripts/pbs && uv run python generate_openapi.py && uv run python convert_to_yaml.py
# Format code uv run ruff format scripts/ # Check linting uv run ruff check scripts/ # Type checking uv run mypy scripts/ # Validate OpenAPI specs uv run python scripts/validate_openapi.py # Run ALL validation (recommended) ./scripts/validate-commit.sh
# Validate commit readiness ./scripts/validate-commit.sh # Commit with automatic validation ./scripts/validate-commit.sh --commit
apidoc.js → Parser → generate_openapi.py → {pve,pbs}-api.json → convert_to_yaml.py → {pve,pbs}-api.yaml
Unified Parser (
scripts/unified_parser.py):
API Generators (
scripts/{pve,pbs}/generate_openapi.py):
Format Converters (
scripts/{pve,pbs}/convert_to_yaml.py):
{pve,pbs}-api.{json,yaml}File Caching: The unified parser caches
apidoc.js content with mtime checking to avoid repeated file reads during development.
Configuration-Driven: Each API (PVE/PBS) has an
APIConfig dataclass defining:
Path Discovery: Scripts automatically search multiple locations for
apidoc.js files, supporting flexible directory structures.
Atomic Commits: The project enforces strict commit conventions with separate commits for different change types (features, fixes, dependencies).
proxmox-virtual-environment/pve-api.{json,yaml}proxmox-backup-server/pbs-api.{json,yaml}{proxmox-virtual-environment,proxmox-backup-server}/apidoc.jsscripts/unified_parser.py, scripts/{pve,pbs}/generate_openapi.pyValidate generation success by checking:
CI/CD Failures:
scripts/{pve,pbs}/ but CI expects them in output directoriesValidation Errors:
uv run python scripts/validate_openapi.py to check specificationsImport Errors:
uv run to execute scripts, not direct PythonBefore Making Changes:
docs/GIT_COMMIT_WORKFLOW.mdMaking Changes:
Before Committing:
./scripts/validate-commit.sh for all quality checkstype(scope): descriptionuv add, uv sync), never pip.python-version)pyproject.toml)