-
Notifications
You must be signed in to change notification settings - Fork 1
docs: OpenAPI 3.0 spec with Mintlify documentation site #154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 12 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
112e2a1
docs: add OpenAPI 3.1 spec with Swagger UI at /api/docs
8a27f25
docs: replace Swagger UI with Mintlify documentation site
c6bc36d
docs(api): fix OpenAPI version, auth scheme, analytics params, enum v…
6a849e7
fix: address PR review feedback
03e6b05
docs: regenerate openapi.json from updated annotations
54caa73
docs(api): round 2 — regenerate spec, fix docs, add 404 responses, sc…
0ee8f20
docs(api): round 2b — fix stats schema, logout description, mint.json…
1b0a4fd
test(web): use safe unknown cast for createdAnchor typecheck
f7588d2
docs(api): finalize openapi review fixes
1702066
docs(api): sync guild endpoint response contracts
21b3379
docs(mintlify): add placeholder branding assets and deployment note
1f463c0
docs(mintlify): use relative API base URL
c6e3502
docs(api): include limit in moderation pagination responses
ca2f095
Merge branch 'main' into docs/openapi-swagger
BillChirico 166123c
Merge branch 'main' into docs/openapi-swagger
BillChirico 6037683
fix: emit X-RateLimit-* headers on all responses per OpenAPI spec
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| --- | ||
| title: Authentication | ||
| description: 'How to authenticate with the Volvox Bot API' | ||
| --- | ||
|
|
||
| # Authentication | ||
|
|
||
| The API supports two authentication methods: | ||
|
|
||
| ## API Key | ||
|
|
||
| Pass your API secret in the `x-api-secret` header: | ||
|
|
||
| ```bash | ||
| curl -H "x-api-secret: YOUR_SECRET" https://your-domain.com/api/v1/health | ||
| ``` | ||
|
|
||
| Set via the `BOT_API_SECRET` environment variable. | ||
|
|
||
| ## OAuth2 Session (Bearer JWT) | ||
|
|
||
| The web dashboard uses Discord OAuth2: | ||
|
|
||
| 1. User clicks "Login with Discord" | ||
| 2. Discord redirects to `/api/v1/auth/discord/callback` with an authorization code | ||
| 3. Server exchanges code for tokens and returns a signed JWT | ||
| 4. Subsequent requests must include the `Authorization: Bearer <jwt>` header | ||
|
|
||
| ## Public Endpoints | ||
|
|
||
| These endpoints require no authentication: | ||
|
|
||
| - `GET /health` — Basic health check | ||
| - `GET /community/{guildId}/leaderboard` — Public leaderboard | ||
| - `GET /community/{guildId}/showcases` — Public showcases | ||
| - `GET /community/{guildId}/stats` — Public server stats | ||
| - `GET /community/{guildId}/profile/{userId}` — Public user profile |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| --- | ||
| title: Introduction | ||
| description: 'Volvox Bot API documentation' | ||
| --- | ||
|
|
||
| # Volvox Bot API | ||
|
|
||
| The Volvox Bot REST API powers the web dashboard and provides programmatic access to guild management, moderation, analytics, AI conversations, and community features. | ||
|
|
||
| ## Base URL | ||
|
|
||
| ``` | ||
| https://your-domain.com/api/v1 | ||
| ``` | ||
|
|
||
| > **Deployment note:** `your-domain.com` is a placeholder. Replace it with your production API domain before publishing these docs. | ||
|
|
||
| ## Features | ||
|
|
||
| - **Guild Management** — Server settings, analytics, member management | ||
| - **Moderation** — Cases, warnings, bans, timeouts | ||
| - **AI Conversations** — Chat history, flagging, search | ||
| - **Community** — Leaderboards, showcases, public profiles | ||
| - **Tickets** — Support ticket system | ||
| - **Config** — Bot configuration CRUD | ||
|
|
||
| ## Rate Limiting | ||
|
|
||
| All endpoints return rate limit headers: | ||
|
|
||
| | Header | Description | | ||
| |--------|-------------| | ||
| | `X-RateLimit-Limit` | Max requests per window | | ||
| | `X-RateLimit-Remaining` | Requests remaining | | ||
| | `X-RateLimit-Reset` | Unix timestamp when window resets | | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,137 @@ | ||
| { | ||
| "$schema": "https://mintlify.com/schema.json", | ||
| "name": "Volvox Bot", | ||
| "colors": { | ||
BillChirico marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "primary": "#22c55e", | ||
| "light": "#4ade80", | ||
| "dark": "#16a34a", | ||
| "anchors": { | ||
| "from": "#22c55e", | ||
| "to": "#16a34a" | ||
| } | ||
| }, | ||
| "navigation": [ | ||
| { | ||
| "group": "Getting Started", | ||
| "pages": [ | ||
| "introduction", | ||
| "authentication" | ||
| ] | ||
| }, | ||
| { | ||
| "group": "API Reference", | ||
| "pages": [ | ||
| { | ||
| "group": "Health", | ||
| "icon": "heart-pulse", | ||
| "pages": [ | ||
| "api-reference/health/get-health" | ||
| ] | ||
| }, | ||
| { | ||
| "group": "Auth", | ||
| "icon": "key", | ||
| "pages": [ | ||
| "api-reference/auth/callback", | ||
| "api-reference/auth/session", | ||
| "api-reference/auth/logout" | ||
| ] | ||
| }, | ||
| { | ||
| "group": "Config", | ||
| "icon": "gear", | ||
| "pages": [ | ||
| "api-reference/config/get-config", | ||
| "api-reference/config/update-config" | ||
| ] | ||
| }, | ||
| { | ||
| "group": "Guilds", | ||
| "icon": "server", | ||
| "pages": [ | ||
| "api-reference/guilds/list-guilds", | ||
| "api-reference/guilds/get-guild", | ||
| "api-reference/guilds/list-channels", | ||
| "api-reference/guilds/list-roles", | ||
| "api-reference/guilds/get-config", | ||
| "api-reference/guilds/update-config", | ||
| "api-reference/guilds/stats", | ||
| "api-reference/guilds/analytics", | ||
| "api-reference/guilds/moderation-cases", | ||
| "api-reference/guilds/actions" | ||
| ] | ||
| }, | ||
| { | ||
| "group": "Members", | ||
| "icon": "users", | ||
| "pages": [ | ||
| "api-reference/members/list-members", | ||
| "api-reference/members/export-members", | ||
| "api-reference/members/get-member", | ||
| "api-reference/members/member-cases", | ||
| "api-reference/members/adjust-member-xp" | ||
| ] | ||
| }, | ||
BillChirico marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| { | ||
| "group": "Moderation", | ||
| "icon": "shield", | ||
| "pages": [ | ||
| "api-reference/moderation/list-cases", | ||
| "api-reference/moderation/get-case", | ||
| "api-reference/moderation/stats", | ||
| "api-reference/moderation/user-history" | ||
| ] | ||
| }, | ||
| { | ||
| "group": "Conversations", | ||
| "icon": "message", | ||
| "pages": [ | ||
| "api-reference/conversations/list", | ||
| "api-reference/conversations/analytics", | ||
| "api-reference/conversations/flagged", | ||
| "api-reference/conversations/get-detail", | ||
| "api-reference/conversations/flag-message" | ||
| ] | ||
| }, | ||
| { | ||
| "group": "Tickets", | ||
| "icon": "ticket", | ||
| "pages": [ | ||
| "api-reference/tickets/stats", | ||
| "api-reference/tickets/get-ticket", | ||
| "api-reference/tickets/list-tickets" | ||
| ] | ||
| }, | ||
BillChirico marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| { | ||
| "group": "Community", | ||
| "icon": "people-group", | ||
| "pages": [ | ||
| "api-reference/community/leaderboard", | ||
| "api-reference/community/showcases", | ||
| "api-reference/community/stats" | ||
| ] | ||
| }, | ||
| { | ||
| "group": "Webhooks", | ||
| "icon": "webhook", | ||
| "pages": [ | ||
| "api-reference/webhooks/config-update" | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| ], | ||
| "openapi": "openapi.json", | ||
BillChirico marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "api": { | ||
| "baseUrl": "/api/v1" | ||
| }, | ||
BillChirico marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "footerSocials": { | ||
| "github": "https://github.com/VolvoxLLC/volvox-bot", | ||
| "discord": "https://discord.gg/volvox" | ||
| }, | ||
| "logo": { | ||
| "dark": "/logo/dark.svg", | ||
| "light": "/logo/light.svg" | ||
| }, | ||
| "favicon": "/favicon.svg" | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.