-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
Summary
Set up comprehensive documentation generation for the openapi-python-generator project itself using mkdocs or Sphinx to improve developer experience and project maintenance.
Current State
- Project documentation exists in
docs/folder with mkdocs.yml already configured - Documentation includes basic usage guides and tutorials
- Missing comprehensive API documentation for the Python codebase itself
- No automated API reference generation from Python docstrings
- Limited contributor documentation for codebase internals
Motivation
- Improve developer onboarding and contribution experience
- Document internal APIs for easier maintenance and extension
- Provide comprehensive reference for template authors and contributors
- Establish better documentation practices for the project
Proposed Implementation
Enhance the existing mkdocs setup to include comprehensive API documentation and improve overall documentation structure.
Goals
-
API Documentation:
- Generate comprehensive API reference from Python docstrings using mkdocs-gen-files or sphinx-autoapi
- Document all public classes, functions, and modules
- Include type hints and parameter descriptions
- Cover language converters, model generators, and service generators
-
Enhanced Structure:
- Reorganize existing documentation for better navigation
- Add comprehensive developer guide section
- Include architecture documentation and design decisions
- Document template system and customization options
-
Automation:
- Set up automated documentation builds in CI/CD
- Generate API docs automatically from source code
- Ensure documentation stays in sync with code changes
- Add documentation coverage reporting
Proposed Structure
docs/
├── index.md # Enhanced landing page
├── quick_start.md # Existing user guide
├── tutorial/ # Existing tutorials
├── user-guide/ # User-focused documentation
│ ├── authentication.md
│ ├── advanced.md
│ └── template-customization.md
├── api-reference/ # Generated API docs
│ ├── index.md
│ ├── model-generator.md
│ ├── service-generator.md
│ ├── language-converters.md
│ └── common-utilities.md
├── development/ # Developer documentation
│ ├── contributing.md
│ ├── architecture.md
│ ├── testing.md
│ └── release-process.md
└── references/ # Existing reference material
Technical Approach
-
mkdocs Enhancement (preferred since mkdocs.yml exists):
- Add mkdocs-gen-files plugin for API generation
- Use mkdocs-literate-nav for better navigation
- Add mkdocs-section-index for landing pages
- Include mkdocs-material for better theming
-
Alternative Sphinx Setup:
- Set up sphinx with autodoc extension
- Use sphinx-autoapi for comprehensive API docs
- Configure napoleon for Google/NumPy docstring styles
-
CI Integration:
- Add documentation build to GitHub Actions
- Deploy to GitHub Pages automatically
- Add documentation linting and link checking
Implementation Steps
-
Phase 1: Enhance existing mkdocs setup
- Add API generation plugins
- Improve existing content organization
- Set up automated builds
-
Phase 2: Comprehensive API documentation
- Add comprehensive docstrings to existing code
- Generate full API reference
- Add architectural documentation
-
Phase 3: Advanced features
- Add interactive examples
- Include performance benchmarks
- Set up documentation metrics
Dependencies
- mkdocs with plugins (or Sphinx as alternative)
- CI/CD pipeline updates for automated builds
- Python docstring improvements across the codebase
Benefits
- Improved developer experience for contributors
- Better project maintainability
- Professional documentation presentation
- Easier onboarding for new contributors
- Better discoverability of project features
Open Questions
- Should we enhance the existing mkdocs setup or migrate to Sphinx?
- What level of API documentation detail is appropriate?
- Should we include generated examples in the repository documentation?
- How to balance user documentation vs developer documentation?
Related Issues
- Documentation & error message unclear when trying to generate for urllib #74 (documentation clarity improvements)
- README: comparison with openapi-python-client #48 (comparison documentation)
- Enhancement: Comprehensive Documentation Generation for Generated Code #111 (generated code documentation - separate concern)
This would establish openapi-python-generator as a well-documented, professional project and make it easier for contributors to understand and extend the codebase.
Metadata
Metadata
Assignees
Labels
No labels