Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
pip install mkdocs-material
pip install mkdocs-git-revision-date-localized-plugin
pip install mkdocs-redoc-tag
pip install mkdocs-swagger-ui-tag
- name: MkDocs build (no deploy)
run: mkdocs build --strict

Expand All @@ -53,6 +54,7 @@ jobs:
pip install mkdocs-material
pip install mkdocs-git-revision-date-localized-plugin
pip install mkdocs-redoc-tag
pip install mkdocs-swagger-ui-tag
pip install mike
- name: Deploy with versioning
run: |
Expand Down
27 changes: 7 additions & 20 deletions docs/api/index.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,11 @@
# RDCP OpenAPI (v1)
# API Documentation

This page renders the RDCP OpenAPI contract for version 1.
RDCP provides two ways to explore the API:

!!! note "Multi-tenancy header and server hostname"
- X-RDCP-Tenant-ID: Optional header used in multi-tenant deployments to scope discovery, control, status and metrics to a specific tenant.
- Format: an opaque string up to 255 chars matching `^[a-zA-Z0-9._-]{1,255}$`.
- Supported endpoints: `/rdcp/v1/discovery`, `/rdcp/v1/control`, `/rdcp/v1/status`, `/rdcp/v1/metrics`.
- Servers: the spec defines a templated server `https://{hostname}` with default `localhost:3000`. Replace `{hostname}` with your deployment's host.
## [API Reference](reference.md)
Clean, readable documentation of all endpoints, schemas, and responses.

```redoc
spec-url: ./v1/openapi.json
hide-download-button: true
```
## [API Playground](playground.md)
Interactive testing environment - try API calls directly from your browser.

Example (curl):

```bash path=null start=null
HOST=rdcp.example.com
TENANT=acme-prod
curl -fsS \
-H "X-RDCP-Tenant-ID: $TENANT" \
"https://$HOST/rdcp/v1/status"
```
Both views use the same OpenAPI specification: [openapi.json](v1/openapi.json)
3 changes: 3 additions & 0 deletions docs/api/playground.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# API Playground

<swagger-ui src="./v1/openapi.json"></swagger-ui>
6 changes: 6 additions & 0 deletions docs/api/reference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# API Reference

```redoc
spec-url: ./v1/openapi.json
hide-download-button: true
```
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ All RDCP-compliant implementations must expose these endpoints:

## Documentation Structure

- **[API Reference](/api/)** - Interactive OpenAPI (v1) with try-it examples
- **[API Reference](api/)** - Interactive OpenAPI (v1) with try-it examples
- **[Protocol Specification](rdcp-protocol-specification.md)** - Complete technical specification
- **[Implementation Guide](rdcp-implementation-guide.md)** - Step-by-step implementation instructions
- **[Protocol Schemas](protocol-schemas.md)** - JSON schema definitions
Expand Down
6 changes: 5 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ plugins:
enable_creation_date: true
type: datetime
- redoc-tag
- swagger-ui-tag

# Extensions
markdown_extensions:
Expand Down Expand Up @@ -87,6 +88,9 @@ nav:
- Health Response: schemas/endpoints/health-response.md
- Response Types:
- Error Response: schemas/responses/error.md
- API Reference: api/index.md
- API:
- Overview: api/index.md
- Reference: api/reference.md
- Playground: api/playground.md
- Error Codes: error-codes.md
- Compliance Report: PROTOCOL-COMPLIANCE-REPORT.md