Skip to content

feat: split API reference into per-product pages for AgentKit and SaaSKit#706

Open
saif-at-scalekit wants to merge 8 commits into
mainfrom
saifshaik/sk-399-separate-api-reference-into-agentkit-and-saaskit-using
Open

feat: split API reference into per-product pages for AgentKit and SaaSKit#706
saif-at-scalekit wants to merge 8 commits into
mainfrom
saifshaik/sk-399-separate-api-reference-into-agentkit-and-saaskit-using

Conversation

@saif-at-scalekit
Copy link
Copy Markdown
Collaborator

@saif-at-scalekit saif-at-scalekit commented May 19, 2026

Summary

Splits the monolithic API reference into dedicated per-product pages while preserving the combined view.

Closes SK-399

What changed

Redocly multi-file split

  • Used redocly split to decompose scalekit.scalar.yaml into a multi-file structure (openapi/paths/, openapi/webhooks/, openapi/components/)
  • Created selective root files openapi/agentkit.yaml and openapi/saaskit.yaml that $ref only the relevant paths, webhooks, and tags
  • redocly bundle --remove-unused-components produces clean per-product specs
  • New pnpm run split-api command chains the full workflow

Per-product Astro pages

  • /agentkit/apis/ — AgentKit API reference (Connected Accounts, tool execution)
  • /saaskit/apis/ — SaaSKit API reference (SSO, SCIM, directories, sessions, roles, users, etc.)
  • /apis/ — Combined reference (unchanged)

AgentKit quickstart

  • Added quickstart content to agentkit.yaml info.description with auth steps, tool execution example, and SDK install for Node.js, Python, Java

Navigation updates

  • AgentKit secondary nav links to /agentkit/apis/
  • SaaSKit secondary nav links to /saaskit/apis/
  • Path-based sidebar detection for the new routes

Cross-links

  • Each product spec includes contextual cross-links to the other product's API reference
  • AgentKit → "Looking for SSO, SCIM, directory sync, or user management APIs?"
  • SaaSKit → "Building AI agents that need OAuth tokens, tool execution, or connected accounts?"

Per-product LLM markdown

  • public/apis.md — combined (777KB)
  • public/agentkit/apis.md — AgentKit only (74.5KB)
  • public/saaskit/apis.md — SaaSKit only (705KB)
  • Updated llms.config.ts and generate-llms-index.js with per-product references

Bug fixes

  • Fixed Algolia search URL generation: tag slugification (spaces → hyphens) and HTTP method casing (GET not get)
  • Fixed 4 broken #tag/ anchor links across docs
  • Fixed apis.md intermittent 404 by writing to public/ (static asset) instead of only dist/

Routes

Route Spec Content
/apis/ scalekit.scalar.yaml All endpoints
/agentkit/apis/ agentkit.scalar.yaml Connected Accounts + tool execution
/saaskit/apis/ saaskit.scalar.yaml SSO, SCIM, directories, sessions, roles, users, domains, API auth, passwordless, passkeys

Summary by CodeRabbit

  • New Features

    • Expanded API documentation with comprehensive code samples for Go, Java, JavaScript, and Python across organizations, users, roles, permissions, domains, directories, connections, and authentication endpoints.
    • Added support for M2M client management, WebAuthn credentials, and passwordless email authentication flows.
  • Documentation

    • Added OpenAPI specifications and schema components for enhanced API reference materials.
  • Chores

    • Updated build configuration and caching rules for documentation files.

Review Change Stack

- Add Redocly CLI workflow: split monolithic spec into multi-file structure,
  then selectively bundle per-product specs with --remove-unused-components
- Create openapi/agentkit.yaml and openapi/saaskit.yaml as custom root files
  that  into the shared split structure
- Add pnpm split-api script chaining split + bundle for both products
- Add Scalar API reference pages at /agentkit/apis/ and /saaskit/apis/
- AgentKit page includes quickstart with auth, connected accounts, and tool execution
- Update secondary nav: AgentKit links to /agentkit/apis/, SaaSKit to /saaskit/apis/
- Update path fallbacks in secondary-nav-utils for new routes
- Existing /apis/ route with full combined spec remains unchanged
… methods

Tag names like 'Connected Accounts' were lowercased but not slugified,
producing 'connected%20accounts' instead of 'connected-accounts'. HTTP
methods were lowercased ('get') but Scalar uses uppercase ('GET').
- java-spring-boot-jwt-timeout: #tag/authentication does not exist, changed to #tag/sessions
- check-sso-domain: lowercase get -> GET to match Scalar anchors
- create-roles-permissions: lowercase get -> GET
- custom-user-attributes: lowercase get -> GET
- Extend openapi-to-markdown integration to generate markdown for all three
  specs: combined (apis.md), agentkit (agentkit/apis.md), saaskit (saaskit/apis.md)
- Write to both dist/ and public/ so files are always served as static assets,
  fixing intermittent 404s caused by SSR shadowing dist/ files
- Add Netlify cache headers for per-product markdown files
- Update llms.config.ts with per-product API markdown and OpenAPI spec links
- Update generate-llms-index.js with per-product entries in Optional section
- Add generated markdown files to .gitignore (build artifacts)
Each product API reference now shows links to switch to the other
product's API reference or the combined reference.
Remove .gitignore entries — these must be committed so Netlify's CDN
serves them as static assets without hitting SSR.
Instead of generic 'Other API references', each link now describes
what the user would be looking for when switching.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 19, 2026

Caution

Review failed

Failed to post review comments

Walkthrough

Adds AgentKit OpenAPI spec, many component schemas, and extensive SDK code samples (Go/JavaScript/Java/Python). Updates Netlify headers for API reference pages and .gitignore to ignore dist/.

Changes

AgentKit spec, shared schemas, and SDK samples

Layer / File(s) Summary
AgentKit OpenAPI specification
openapi/agentkit.yaml
Defines metadata, servers, OAuth2 client-credentials, tags, paths via refs, and webhook refs.
Shared OpenAPI component schemas
openapi/components/schemas/*
Introduces schemas for events, identities, roles/permissions, org policies/settings, WebAuthn, clients/secrets, and enums.
Go SDK usage samples
openapi/code_samples/go/...
Adds examples for connections, organizations, directories, domains, users, roles, permissions, sessions, passwordless, WebAuthn.
JavaScript SDK usage samples
openapi/code_samples/javascript/...
Adds async examples covering the same surface (CRUD/list and flows).
Java SDK usage samples
openapi/code_samples/java/...
Adds builder-based examples across identical API areas and flows.
Python SDK usage samples
openapi/code_samples/python/...
Adds protobuf-based examples and M2M client/secret management, plus other API areas.

Site config and ignore updates

Layer / File(s) Summary
Netlify headers and .gitignore
netlify.toml, .gitignore
Adds cache headers for /apis.md, /agentkit/apis.md, /saaskit/apis.md; ignores dist/.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Suggested reviewers

  • amitash1912
  • ravibits
  • Avinash-Kamath
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch saifshaik/sk-399-separate-api-reference-into-agentkit-and-saaskit-using
  • 🛠️ fix frontmatter
  • 🛠️ fix internal links

@netlify
Copy link
Copy Markdown

netlify Bot commented May 19, 2026

Deploy Preview for scalekit-starlight ready!

Name Link
🔨 Latest commit 3cfbe4d
🔍 Latest deploy log https://app.netlify.com/projects/scalekit-starlight/deploys/6a0c5d1a717bcb0008c9bb24
😎 Deploy Preview https://deploy-preview-706--scalekit-starlight.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant