#233 OpenAPI: SDK Generation and Documentation Portal
Description
Edit## Overview
Generate client SDKs and create documentation portal from OpenAPI spec.
## Requirements
### 1. SDK Generation Setup
Use openapi-generator-cli to generate client SDKs:
```bash
# Python SDK
openapi-generator-cli generate -i openapi.json -g python -o sdk/python
# TypeScript SDK
openapi-generator-cli generate -i openapi.json -g typescript-fetch -o sdk/typescript
# Go SDK
openapi-generator-cli generate -i openapi.json -g go -o sdk/go
```
### 2. SDK Packaging
- Python: Publish to PyPI as `highway-sdk`
- TypeScript: Publish to npm as `@highway/sdk`
- Go: GitHub release
### 3. Documentation Portal Options
- **Redocly** - Professional API docs
- **Stoplight** - Interactive docs
- **GitBook** - Developer docs
- **Self-hosted** - ReDoc static site
### 4. CI/CD Integration
```yaml
# .github/workflows/openapi.yml
on:
push:
paths:
- 'api/**'
jobs:
generate-sdk:
runs-on: ubuntu-latest
steps:
- name: Generate OpenAPI spec
run: python -m api.openapi.generate
- name: Validate spec
run: openapi-generator-cli validate -i openapi.json
- name: Generate SDKs
run: make generate-sdks
- name: Upload artifacts
uses: actions/upload-artifact@v3
```
### 5. Interactive API Explorer
- Swagger UI with try-it-out
- Request/response examples
- Authentication helper
## Files to Create
- sdk/python/setup.py
- sdk/typescript/package.json
- sdk/go/go.mod
- docs/api/index.html (ReDoc static)
- .github/workflows/openapi.yml
## Depends On
- #224 (Infrastructure Setup)
- #225-#232 (All endpoint documentation)
## Acceptance Criteria
- [ ] Python SDK generated and tested
- [ ] TypeScript SDK generated and tested
- [ ] Documentation portal deployed
- [ ] CI/CD pipeline for spec updates
- [ ] Interactive API explorer working
Comments
Loading comments...
Context
Loading context...
Audit History
View AllLoading audit history...