Skip to content

Commit ee4d3b1

Browse files
committed
Enhance Proxmox OpenAPI specifications by adding comprehensive API documentation for both Proxmox VE and Backup Server. Introduce standardized security schemes, detailed user flows, and improved error handling. Update configuration files and scripts to support new features and ensure consistency across the API specifications.
1 parent 6165f18 commit ee4d3b1

11 files changed

Lines changed: 284240 additions & 1203 deletions

File tree

.cursor/rules/search-tools.mdc

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
description: pattern searches in codebase files
3+
globs:
4+
alwaysApply: false
5+
---
6+
# Search Tool Preferences
7+
8+
When users request to 'search', 'look for', 'find', or 'grep' a pattern in files or logs, **prefer using `rg` (ripgrep)** over other search tools.
9+
10+
## **Ripgrep Usage Guidelines**
11+
12+
- **Primary Tool**: Use `rg` for pattern searches in codebase files
13+
- **Common Flags**:
14+
- `-i` for case-insensitive searches
15+
- `-C <number>` for context lines around matches
16+
- `--glob <pattern>` for file type filtering
17+
- `-n` for line numbers
18+
- `-A <number>` for lines after match
19+
- `-B <number>` for lines before match
20+
21+
## **When to Use Ripgrep**
22+
23+
**✅ DO use `rg` for:**
24+
- Searching for function names, variables, or code patterns
25+
- Finding configuration values in files
26+
- Locating log entries or error patterns
27+
- Searching within specific file types
28+
- Case-insensitive pattern matching
29+
- Getting context around matches
30+
31+
**❌ DON'T use `rg` for:**
32+
- Semantic code searches (use `codebase_search` tool instead)
33+
- Very large binary files
34+
- When exact tool specification is required by user
35+
36+
## **Example Usage Patterns**
37+
38+
```bash
39+
# Basic pattern search
40+
rg "pattern"
41+
42+
# Case-insensitive with context
43+
rg -i -C 3 "error"
44+
45+
# Search specific file types
46+
rg --glob "*.js" "function"
47+
48+
# Search with line numbers
49+
rg -n "import.*react"
50+
51+
# Exclude directories
52+
rg "pattern" --glob "!node_modules/*"
53+
```
54+
55+
## **Ripgrep vs Other Tools**
56+
57+
| **Use Case** | **Preferred Tool** | **Reason** |
58+
|--------------|-------------------|------------|
59+
| Text pattern search | `rg` | Faster, better output formatting |
60+
| Semantic code search | `codebase_search` | AI-powered understanding |
61+
| File finding | `find` or `file_search` | Purpose-built for file discovery |
62+
| Complex regex | `rg` | Excellent regex support |
63+
64+
## **Integration with Other Tools**
65+
66+
- **Combine with `read_file`**: Use `rg` to locate, then `read_file` to examine
67+
- **Follow up searches**: Use `rg` results to guide `codebase_search` queries
68+
- **File discovery**: Use `rg -l` to list files, then examine with other tools

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,3 +228,4 @@ dev-debug.log
228228
# Task files
229229
tasks.json
230230
tasks/
231+
.cursor/mcp.json

.taskmaster/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"projectName": "Taskmaster",
2828
"ollamaBaseURL": "http://localhost:11434/api",
2929
"bedrockBaseURL": "https://bedrock.us-east-1.amazonaws.com",
30-
"azureOpenaiBaseURL": "https://your-endpoint.openai.azure.com/"
30+
"azureOpenaiBaseURL": "https://your-endpoint.openai.azure.com/",
31+
"userId": "1234567890"
3132
}
3233
}

.taskmaster/docs/prd.txt

Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
# Product Requirements Document: Proxmox OpenAPI Specifications
2+
3+
## Product Overview
4+
5+
**Product Vision:** Enable seamless Proxmox integration by providing reliable, comprehensive OpenAPI 3.0.3 specifications that eliminate developer friction and accelerate infrastructure automation adoption.
6+
7+
**Target Users:** Individual developers building Proxmox integrations for infrastructure automation, monitoring, and virtualization management workflows.
8+
9+
**Business Objectives:**
10+
11+
- Establish the project as the definitive OpenAPI specification source for Proxmox APIs
12+
- Reduce developer integration time by 50% through reliable specifications
13+
- Build a sustainable open source community around Proxmox developer tooling
14+
- Enable the $9.4B infrastructure-as-code market growth for Proxmox users
15+
16+
**Success Metrics:**
17+
18+
- Integration reliability: 99.9% API specification accuracy
19+
- Developer adoption: 1,000+ monthly downloads within 6 months
20+
- Community health: 100+ GitHub stars, 10+ contributors
21+
- Specification consistency: Zero authentication/format discrepancies between PVE/PBS
22+
23+
## User Personas
24+
25+
### Persona 1: Infrastructure Developer
26+
27+
- **Demographics:** 25-40 years old, DevOps Engineer/SRE, 3-8 years experience
28+
- **Goals:** Automate Proxmox VM/container provisioning, integrate with CI/CD pipelines, maintain infrastructure as code
29+
- **Pain Points:** Authentication complexity, inconsistent API documentation, manual specification maintenance, environment setup friction
30+
- **User Journey:** Discovers project → Downloads specifications → Generates client SDKs → Integrates with Terraform/Ansible → Deploys to production
31+
32+
### Persona 2: Integration Specialist
33+
34+
- **Demographics:** 30-45 years old, Senior Developer/Solutions Architect, 5-15 years experience
35+
- **Goals:** Build monitoring dashboards, create backup automation, develop custom Proxmox management tools
36+
- **Pain Points:** API performance issues, missing OpenAPI specifications, CORS/authentication troubles, lack of type safety
37+
- **User Journey:** Needs reliable API specs → Finds project → Validates against live APIs → Builds production integrations → Contributes improvements
38+
39+
## Feature Requirements
40+
41+
| Feature | Description | User Stories | Priority | Acceptance Criteria | Dependencies |
42+
| -------------------------- | ------------------------------------------------------------------ | --------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------ | ----------------------- |
43+
| **PVE OpenAPI Generation** | Automated OpenAPI 3.0.3 spec generation from PVE API documentation | As a developer, I want accurate PVE API specifications to generate reliable client code | Must | 385 endpoints, 687 operations, JSON/YAML formats, <2MB file size | Python parser, API docs |
44+
| **PBS OpenAPI Generation** | Automated OpenAPI 3.0.3 spec generation from PBS API documentation | As a developer, I want PBS API specifications for backup automation | Must | 233 endpoints, 348 operations, consistent authentication patterns | Python parser, API docs |
45+
| **Unified Authentication** | Standardized authentication patterns across PVE/PBS specifications | As a developer, I want consistent auth to avoid integration complexity | Must | Single auth pattern, clear token format, documented permissions | API analysis |
46+
| **Dagger Pipeline** | Containerized generation pipeline with intelligent caching | As a contributor, I want reliable spec generation without environment setup | Should | Single command execution, 50%+ faster builds, consistent outputs | Dagger module |
47+
| **Multi-format Output** | JSON and YAML specification formats with proper naming | As a developer, I want both machine-readable JSON and human-readable YAML | Must | pve-api.json/yaml, pbs-api.json/yaml, identical content | Format converters |
48+
| **Validation Suite** | Comprehensive OpenAPI specification validation | As a maintainer, I want to ensure specification accuracy and completeness | Should | OpenAPI 3.0.3 compliance, API endpoint coverage, schema validation | Validation tools |
49+
| **Client Generation** | Pre-built client libraries for popular languages | As a developer, I want ready-to-use SDKs to accelerate development | Could | Python, Go, JavaScript clients, package registry publishing | OpenAPI Generator |
50+
| **CI/CD Integration** | Automated specification updates and validation | As a maintainer, I want specifications to stay current with API changes | Should | GitHub Actions, automatic PR creation, change detection | CI/CD pipeline |
51+
52+
## User Flows
53+
54+
### Flow 1: Developer Integration
55+
56+
1. Developer discovers project via GitHub/documentation
57+
2. Downloads latest PVE/PBS specifications (JSON/YAML)
58+
3. Generates client SDK using OpenAPI Generator
59+
- Alternative: Uses pre-built client libraries
60+
- Error state: Specification validation fails
61+
4. Integrates SDK into infrastructure automation code
62+
5. Deploys to production with reliable API access
63+
64+
### Flow 2: Contributor Workflow
65+
66+
1. Contributor identifies API documentation update
67+
2. Clones repository and runs Dagger pipeline locally
68+
3. Pipeline generates updated specifications automatically
69+
- Alternative: Manual specification fixes required
70+
- Error state: Generation fails, debug output provided
71+
4. Creates pull request with updated specifications
72+
5. Automated validation and maintainer review
73+
6. Merge triggers specification publishing
74+
75+
### Flow 3: Specification Consumption
76+
77+
1. User needs current Proxmox API specifications
78+
2. Accesses GitHub releases or direct file downloads
79+
3. Validates specifications against OpenAPI tools
80+
- Alternative: Uses web-based API documentation
81+
- Error state: Specification format errors
82+
4. Integrates into development workflow (IDE, tools)
83+
5. Provides feedback via GitHub issues/discussions
84+
85+
## Non-Functional Requirements
86+
87+
### Performance
88+
89+
- **Generation Time:** Complete PVE+PBS specification generation in <2 minutes
90+
- **File Size:** PVE JSON <2MB, PBS JSON <1.5MB, YAML 30% smaller
91+
- **Validation Speed:** OpenAPI specification validation in <10 seconds
92+
93+
### Security
94+
95+
- **Authentication:** Document all supported auth methods (API tokens, session cookies, CSRF)
96+
- **Permissions:** Clear documentation of required API permissions
97+
- **Data Protection:** No sensitive data in specifications or examples
98+
99+
### Compatibility
100+
101+
- **OpenAPI Version:** Strict OpenAPI 3.0.3 compliance
102+
- **Proxmox Versions:** Support PVE 8.0+ and PBS 3.0+
103+
- **Tools:** Compatible with OpenAPI Generator, Swagger UI, Postman
104+
105+
### Accessibility
106+
107+
- **Documentation:** Clear README files with setup instructions
108+
- **Examples:** Working code samples for common integration patterns
109+
- **Error Messages:** Actionable error descriptions with resolution steps
110+
111+
## Technical Specifications
112+
113+
### Frontend
114+
115+
- **Technology Stack:** GitHub Pages for documentation hosting
116+
- **Design System:** GitHub Flavored Markdown, consistent formatting
117+
- **Interactive Docs:** Swagger UI integration for API exploration
118+
119+
### Backend
120+
121+
- **Technology Stack:** Python 3.9+, UV package manager, Node.js for JS parsing
122+
- **Generation Pipeline:** Dagger modules for containerized builds
123+
- **Parsing Logic:** JavaScript AST parsing for API documentation extraction
124+
125+
### Infrastructure
126+
127+
- **Hosting:** GitHub repository with releases and GitHub Pages
128+
- **CI/CD:** GitHub Actions for automated generation and validation
129+
- **Containerization:** Dagger for reproducible build environments
130+
131+
## Analytics & Monitoring
132+
133+
- **Key Metrics:** GitHub stars, download counts, issue resolution time, community contributions
134+
- **Usage Tracking:** GitHub release download analytics, documentation page views
135+
- **Quality Metrics:** Specification validation success rate, API coverage percentage
136+
- **Community Health:** Issue response time, PR merge rate, contributor growth
137+
138+
## Release Planning
139+
140+
### MVP (v1.0) - Reliable Specifications
141+
142+
- **Features:** Complete PVE/PBS OpenAPI generation, JSON/YAML formats, GitHub releases
143+
- **Timeline:** 4 weeks from development start
144+
- **Success Criteria:** 99%+ API coverage, OpenAPI 3.0.3 compliance, documentation completeness
145+
146+
### v1.1 - Developer Experience Enhancement
147+
148+
- **Features:** Dagger pipeline, improved validation, CLI tool, better documentation
149+
- **Timeline:** 2 weeks after v1.0
150+
- **Success Criteria:** <2 minute generation time, single-command usage, contributor adoption
151+
152+
### v1.2 - Ecosystem Integration
153+
154+
- **Features:** Pre-built client libraries, CI/CD templates, Terraform/Ansible examples
155+
- **Timeline:** 4 weeks after v1.1
156+
- **Success Criteria:** 3+ language clients, integration examples, community contributions
157+
158+
### v2.0 - Advanced Features
159+
160+
- **Features:** Live API specification generation, interactive documentation, performance optimization
161+
- **Timeline:** 8 weeks after v1.2
162+
- **Success Criteria:** Real-time API sync, 50%+ performance improvement, enterprise adoption
163+
164+
## Open Questions & Assumptions
165+
166+
- **Question 1:** Should we prioritize live API fetching vs. maintaining current file-based approach?
167+
- **Question 2:** What's the optimal balance between specification completeness and generation speed?
168+
- **Question 3:** How can we ensure community sustainability without official Proxmox endorsement?
169+
170+
- **Assumption 1:** Proxmox API structure will remain stable enough for automated parsing
171+
- **Assumption 2:** Developer demand exists for standardized Proxmox OpenAPI specifications
172+
- **Assumption 3:** Dagger adoption will provide sufficient developer experience improvements
173+
174+
## Appendix
175+
176+
### Competitive Analysis
177+
178+
- **OpenAPI Generator:** 600K+ weekly downloads, 50+ language support, community-driven
179+
- Strengths: Mature ecosystem, broad language support, active community
180+
- Weaknesses: Generic approach, no Proxmox-specific features
181+
- **VMware OpenAPI:** Enterprise-grade specifications, programmatic generation
182+
- Strengths: Official support, comprehensive coverage, enterprise features
183+
- Weaknesses: Commercial focus, complex setup, vendor lock-in
184+
185+
### User Research Findings
186+
187+
- **Finding 1:** Authentication complexity is the primary developer pain point (40+ forum discussions)
188+
- **Finding 2:** 85% developer preference for YAML specifications due to readability
189+
- **Finding 3:** Performance issues affect 30% of users at 500+ VM scale
190+
191+
### AI Conversation Insights
192+
193+
- **Market Analysis:** $9.4B IaC market opportunity, 24% CAGR growth, strong developer demand
194+
- **Technical Patterns:** Design-first approaches, containerized tooling, community-driven development
195+
- **Success Factors:** Technical excellence, authentic community building, pain point resolution
196+
197+
### Glossary
198+
199+
- **PVE:** Proxmox Virtual Environment - VM and container management platform
200+
- **PBS:** Proxmox Backup Server - Backup and data protection solution
201+
- **OpenAPI:** API specification standard for REST APIs, formerly Swagger
202+
- **Dagger:** CI/CD engine for containerized pipelines
203+
- **IaC:** Infrastructure as Code - managing infrastructure through code

0 commit comments

Comments
 (0)