Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Adds complete Slate documentation infrastructure to generated projects:
- docs/ directory with Gemfile, config.rb, and source templates
- Dockerfile for building docs site
- Dockerfile.nginx for serving static docs
- generate-docs.sh script for CI integration
- Claude command for AI-assisted docs generation
- OpenAPI → Slate markdown conversion via widdershins
Also includes:
- --export-openapi flag for service binaries
- DNS provisioning for docs.{domain} subdomain
- Updated project_infra for docs DNS records
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
85 lines
1.6 KiB
Cheetah
85 lines
1.6 KiB
Cheetah
---
|
|
title: {{PROJECT_NAME}} API Documentation
|
|
|
|
language_tabs:
|
|
- shell: curl
|
|
- go: Go
|
|
|
|
toc_footers:
|
|
- <a href='https://{{DOMAIN}}'>{{PROJECT_NAME}}</a>
|
|
- <a href='https://github.com/slatedocs/slate'>Documentation Powered by Slate</a>
|
|
|
|
includes:
|
|
- errors
|
|
|
|
search: true
|
|
|
|
code_clipboard: true
|
|
|
|
meta:
|
|
- name: description
|
|
content: API documentation for {{PROJECT_NAME}}
|
|
---
|
|
|
|
# Introduction
|
|
|
|
Welcome to the **{{PROJECT_NAME}}** API documentation.
|
|
|
|
This documentation covers all services in the {{PROJECT_NAME}} monorepo. Each service provides a REST API with JSON responses.
|
|
|
|
## Authentication
|
|
|
|
Most endpoints require authentication via Bearer token:
|
|
|
|
```shell
|
|
curl -X GET "https://{{DOMAIN}}/api/service-name/endpoint" \
|
|
-H "Authorization: Bearer YOUR_TOKEN"
|
|
```
|
|
|
|
```go
|
|
req, _ := http.NewRequest("GET", "https://{{DOMAIN}}/api/service-name/endpoint", nil)
|
|
req.Header.Set("Authorization", "Bearer YOUR_TOKEN")
|
|
```
|
|
|
|
## Base URLs
|
|
|
|
| Environment | URL |
|
|
|-------------|-----|
|
|
| Production | `https://{{DOMAIN}}` |
|
|
| Staging | `https://staging.{{DOMAIN}}` |
|
|
|
|
## Response Format
|
|
|
|
All API responses use a consistent envelope:
|
|
|
|
```json
|
|
{
|
|
"data": { ... },
|
|
"meta": {
|
|
"request_id": "abc123"
|
|
}
|
|
}
|
|
```
|
|
|
|
Error responses include an error object:
|
|
|
|
```json
|
|
{
|
|
"error": {
|
|
"code": "NOT_FOUND",
|
|
"message": "Resource not found"
|
|
},
|
|
"meta": {
|
|
"request_id": "abc123"
|
|
}
|
|
}
|
|
```
|
|
|
|
# Services
|
|
|
|
The following services are available in this project. Click on a service name to jump to its API documentation.
|
|
|
|
<!-- SERVICE_INCLUDES_BELOW -->
|
|
<!-- Auto-generated includes will be inserted here by generate-docs.sh -->
|
|
|