Editing Docs
Creates and modifies documentation in apps/docs-mintlify. Use when adding new service documentation, updating navigation, editing the All Services page, or adding endpoints to the API reference. Covers Mintlify MDX pages, docs.json navigation, services.mdx, and openapi.json.
Documentation Editing
This skill covers creating and modifying documentation for Case.dev services using Mintlify.
Key Files
| File | Purpose |
|---|---|
apps/docs-mintlify/docs.json | Navigation menu structure |
apps/docs-mintlify/services.mdx | All Services page |
apps/docs-mintlify/openapi.json | API Reference endpoints (generated from router metadata) |
apps/docs-mintlify/<service>/ | Service documentation pages |
apps/router/server/routes/ | Source of truth for public endpoint OpenAPI metadata |
Before Making Changes
Study existing documentation to match style and conventions:
- Read 2-3 existing service docs (e.g.,
llms/,vault/,voice/) - Note the frontmatter format, heading structure, component usage
- Match the tone: concise, action-oriented, developer-focused
- For multi-language examples, use
apps/docs-mintlify/llms/index.mdxas the formatting guide
Adding a New Service
1. Create Documentation Pages
Create a folder under apps/docs-mintlify/<service-name>/ with:
<service-name>/
├── index.mdx # Overview (title: "<Service> Overview")
├── <feature>.mdx # Feature pages (no icons in frontmatter)
└── ...
Use kebab-case for folder names (e.g., web-search/, ai-governance/).
2. Add to Navigation Menu
Edit docs.json → find the appropriate tab → add group:
{
"group": "Service Name",
"icon": "icon-name",
"pages": ["service-name/index", "service-name/feature-one", "service-name/feature-two"]
}
- Add icon to the group only, not individual pages
- Overview page title should be
<Service> Overviewto distinguish from group name - Place under "Platform" for services, or appropriate section
3. Add to All Services Page
Edit services.mdx:
- Add a Card in the CardGroup:
<Card title="Service Name" icon="icon-name" href="/service-name/index">
One-sentence description of what this service does.
</Card>
- Add a row to the decision table:
| Use case description | [Service Name](/service-name/index) |
4. Add to API Reference (if endpoints exist)
Do not edit apps/docs-mintlify/openapi.json by hand.
To expose endpoints in the API Reference:
- Add or update
export const openapi = { ... }in the route file underapps/router/server/routes/ - Run
cd apps/router && bun run openapi:compile - Verify the generated spec in
apps/docs-mintlify/openapi.json
bun run openapi:compile also refreshes apps/router/openapi.json, apps/router/generated/services.json, and apps/router/generated/services-catalog.json.
If you change apps/docs-mintlify/services.mdx, rerun cd apps/router && bun run openapi:compile so the services catalog stays in sync.
Mintlify Components
Common components for documentation:
<Card title="Title" icon="icon" href="/path">Description</Card>
<CardGroup cols={2}>...</CardGroup>
<CodeGroup>...</CodeGroup>
<Info>Informational note</Info>
<Warning>Warning message</Warning>
<Tip>Helpful tip</Tip>
Codeblock Conventions
Use apps/docs-mintlify/llms/models.mdx as the canonical reference for SDK code examples.
Rules
- Every code block needs an explicit
title="..."— Mintlify will not render tabs for blocks that omit the title attribute. This applies to all languages, includingtypescript,python, andgo. - Wrap multi-language examples in
<CodeGroup> - Use this exact tab order (matching the rest of the docs): TypeScript → Python → C# → Java → PHP → cURL → Go → CLI
- Include all SDK languages when providing code examples. Omit CLI only if there is no CLI equivalent.
- Prefer the existing SDK method names and import style from current docs over inventing new examples
Example skeleton
<CodeGroup>
```typescript title="TypeScript"
import Casedev from 'casedev'
const client = new Casedev({ apiKey: process.env.CASEDEV_API_KEY })
// ...
```
```python title="Python"
import casedev
client = casedev.Casedev(api_key=os.environ['CASEDEV_API_KEY'])
# ...
```
```csharp title="C#"
using Casedev;
CasedevClient client = new() { ApiKey = Environment.GetEnvironmentVariable("CASEDEV_API_KEY") };
// ...
```
```java title="Java"
import dev.case.api.client.CasedevClient;
import dev.case.api.client.okhttp.CasedevOkHttpClient;
CasedevClient client = CasedevOkHttpClient.fromEnv();
// ...
```
```php title="PHP"
<?php
require 'vendor/autoload.php';
$client = new \CaseDev\Client(apiKey: getenv('CASEDEV_API_KEY') ?: 'sk_case_YOUR_API_KEY');
// ...
```
```bash title="cURL"
curl https://api.case.dev/... \
-H "Authorization: Bearer $CASE_API_KEY"
```
```go title="Go"
import "github.com/casemark/casedev-go"
client := casedev.NewClient()
// ...
```
```bash title="CLI"
casedev ...
```
</CodeGroup>
Verification
After making changes:
cd apps/router && bun run openapi:compile
cd apps/docs-mintlify && mintlify dev
Check for:
- Broken links (Mintlify reports these)
- Navigation renders correctly
- New pages are accessible
- API Reference reflects the generated spec
- Service catalog changes derived from
services.mdxlook correct
Stop and Ask
Stop and ask if:
- Adding a service that doesn't have implemented endpoints yet
- Changing navigation structure significantly
- Removing or renaming existing pages (could break external links)
Just proceed if:
- Adding new documentation for an existing service
- Fixing typos or improving descriptions
- Adding implemented endpoints through router
openapiexports
Common Mistakes
- Adding icons to subpages - Icons go on the group, not individual pages
- Forgetting services.mdx - New services should appear on All Services
- Editing generated OpenAPI files by hand - Update router metadata and recompile instead
- Skipping
bun run openapi:compileafterservices.mdxchanges - This leavesgenerated/services-catalog.jsonstale - Dropping SDK languages inconsistently - Match the existing
CodeGrouppattern when a page needs multi-language examples - Mismatched titles - Overview page should say "Overview" to avoid confusion with nav group
- Missing
title="..."on code blocks - Mintlify silently drops tabs that lack an explicit title. Always addtitle="TypeScript",title="Python",title="Go", etc. — even when the title matches the language tag - Wrong tab order - Tabs must follow: TypeScript → Python → C# → Java → PHP → cURL → Go → CLI. Deviating from this order creates an inconsistent experience across docs pages