Skip to content

docs(developer-docs): add API v2 reference and split api-reference into v1/v2 - #497

Draft
sriramveeraghanta wants to merge 3 commits into
masterfrom
docs/v2-api-reference
Draft

docs(developer-docs): add API v2 reference and split api-reference into v1/v2#497
sriramveeraghanta wants to merge 3 commits into
masterfrom
docs/v2-api-reference

Conversation

@sriramveeraghanta

Copy link
Copy Markdown
Member

Ports makeplane/developer-docs#303 into this monorepo. 745 files, ~96k insertions.

Structure

  • The 270 existing v1 pages move to apps/developer-docs/docs/api-reference/v1/ — git-tracked as renames, so history is preserved.
  • New apps/developer-docs/docs/api-reference/v2/ with 463 pages: an endpoint page per v2 operation, resource overviews, and nine concept guides.
  • Header API Reference goes straight to v2. Version switching lives at the top of the API reference sidebar (ApiVersionSwitcher.vue), and picking a version swaps the whole sidebar tree via the path-prefix keys in config.mts.
  • The switcher is two links rather than a <select> — Vue's SSR drops selected on options inside a bound select, so a dropdown would render the wrong version before hydration and wouldn't work at all without JS.

Routing

The unversioned entry point lands on v2, and no previously indexed URL 404s:

Request Goes to
/api-reference /api-reference/v2/introduction
/api-reference/introduction /api-reference/v2/introduction
/api-reference/issue/overview (legacy deep link) /api-reference/v1/issue/overview

The legacy catch-all is /api-reference/:path((?!v1/|v2/).*), ordered after the specific cycle-issue/module-issue redirects so those still win, and after /api-reference/byoa/build-plane-app. docs/api-reference/index.md covers pnpm dev and pnpm preview, where vercel.json redirects don't run.

Monorepo adaptations

Upstream is a standalone repo, so three things could not be copied as-is:

  1. The version switcher mounts through the shared theme, not a forked layout. Upstream adds a sidebar-nav-before slot directly in the app's own Layout. Here that layout lives in packages/theme, so this adds a layoutSlots option to createPlaneTheme() and the app passes the switcher through it. packages/theme stays the single owner of layout composition, per the monorepo rules.
  2. The packageManager bump is dropped — this workspace pins pnpm 11.8.0 at the root. The NODE_OPTIONS=--max-old-space-size=8192 bump on the build script is kept; the page count needs it.
  3. v1 link rewrites were re-derived rather than replayed. The monorepo's api-reference content has diverged from upstream's PR base (215 files differ), so applying the upstream patch would have reverted those. Instead the v1 tree was moved as-is and the unversioned /api-reference/… links rewritten in place. Verified: the monorepo sidebar and upstream's PR base are semantically identical (301 texts / 260 links), and both spliced sidebar trees match upstream's exactly.

One fix on top of upstream

sparse-fields was missing from the prose-page list that decides which /api-reference/ pages keep the normal doc layout. That concept guide was added by a later commit in the same PR and the list was never updated, so the page would render with the wide two-column endpoint layout. Added here — the list now covers all nine concept pages exactly.

Verification

  • pnpm check:format — clean
  • pnpm check:types (theme + both apps) — clean
  • pnpm --filter developer-docs build — succeeds, 821 pages, no dead links
  • Sidebar ↔ disk parity: v2 463 ↔ 463, zero sidebar links without a file
  • v1 has 10 files not in the sidebar (inbox-issue, work-item-relations) — confirmed identical on master, pre-existing, not introduced here

Worth a look

  • /api-reference/introduction (the versionless front door) resolves to v2, but in-page links on the home page and the build-plane-app guides were pointed at v1 by upstream. Ported faithfully; easy to flip if they should follow the front door to v2.
  • Upstream documents ?expand= even though it is absent from the OpenAPI schema, because the code supports it. Carried over as-is.
  • Upstream lists four schema gaps for the API team (undeclared ?expand= and ?cursor=, missing 400 on list operations, nullable AuditLog.project_id). Those are source-side, not doc-side, and are unaffected by this port.

Draft while makeplane/developer-docs#303 is still under review.

https://claude.ai/code/session_019kCVtLs1Yho8dzcuzV4Hrn

…to v1/v2

Port makeplane/developer-docs#303 into the monorepo.

Structure
- The 270 existing v1 pages move to docs/api-reference/v1/ (git-tracked
  renames, history preserved).
- New docs/api-reference/v2/ with 463 pages: endpoint pages for every v2
  operation, resource overviews, and nine concept guides.
- Header "API Reference" goes to v2; version switching lives at the top of
  the API reference sidebar and swaps the whole sidebar tree.
- Internal links rewritten to versioned paths.

Routing — the unversioned entry point lands on v2 and no previously
indexed URL 404s: /api-reference and /api-reference/introduction go to
v2, and the catch-all /api-reference/:path((?!v1/|v2/).*) sends legacy
deep links to v1, ordered after the specific cycle-issue/module-issue
redirects so those still win. docs/api-reference/index.md covers
`pnpm dev`, where vercel.json redirects don't run.

Monorepo adaptations (upstream is a standalone repo)
- The version switcher mounts through a new `layoutSlots` option on
  createPlaneTheme instead of the app forking the shared Layout, so
  packages/theme stays the single owner of layout composition.
- Upstream's `packageManager` bump is dropped; the NODE_OPTIONS heap
  bump on the build script is kept, since the page count needs it.

Also adds "sparse-fields" to the prose-page list, which upstream missed
when a later commit added that concept guide — without it the page gets
the wide two-column endpoint layout.

Claude-Session: https://claude.ai/code/session_019kCVtLs1Yho8dzcuzV4Hrn
@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
developer-docs Ready Ready Preview Aug 19, 2026 12:23pm
docs Ready Ready Preview Aug 19, 2026 12:23pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 02746441-b6cb-4629-8fa6-a66b70497dc4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…EB-8669)

Brings the v2 reference up to the api_v2 surface on preview (80741805f7).
Coverage verified against the committed OpenAPI document: 406/406 operations
documented, no orphan pages, no duplicate coverage.

The committed spec on preview is already current — `check_v2_schema_drift
--check` reports "No schema drift", so no regen was needed this round.

## What changed upstream

WEB-8669 (#8946) **replaced the single `bulk/` route with three** and reshaped
the contract. Four api_v2 commits landed since the last sync; only this one
altered the public surface.

Removed (10 pages) — `POST …/<resource>/bulk/` no longer exists:
cycles, estimate points, estimates, labels, milestones, modules, projects,
states, work items, work item comments.

Added (29 pages) — `bulk-create/` and `bulk-update/` on all ten, plus
`bulk-delete/` on nine (projects has no bulk-delete).

## Contract changes documented

- **`all_or_none`** (default `false`) is the new atomic mode. Off, each row runs
  in its own savepoint and successful rows commit. On, every row is still
  evaluated — so you see everything that would fail, not just the first — and
  then the whole batch is discarded with a `409`, `transaction.on_commit` side
  effects included.
- **Cap is now 50 rows, was 100.** Exceeding it fails the envelope, not a row.
- **`bulk-update` items require `id`**; `bulk-delete` takes `{ids: [...]}`
  rather than `items`.
- **The `upsert` flag is gone from bulk.** Reconciling on
  `(external_source, external_id)` stays the single-row `upsert/` route's job.
- **Row shape**: success is `{index, result, id}` with `result` one of
  `created`/`updated`/`deleted`; failure keeps the top-level problem members
  (`type`, `code`, `detail`, `errors[]`) plus `index` and `result: "failed"`, so
  the same error handling works per row as at the top level.
- **`200` does not mean every row succeeded** — each page says so up front, since
  an empty-looking success is the easy mistake here.
- **JSON only**: the parsers are restricted, so a form or multipart body is a
  clean `415` instead of `items` being silently misread.
- Bulk operations declare no `402`.

## Fixed: bulk-invitations documented the wrong contract

`POST …/invitations/bulk/` survived the rename because it is not the generic
mixin at all — `members_bulk` takes `{emails, role, message}`, caps at 100, is
atomic in one transaction, and answers `201` with the invitations it created.
The previous page described it as `{items}` with per-row results and an `upsert`
flag, none of which was ever true for this route. Rewritten from the view, and
it now documents the behavior that actually bites: **addresses with a pending
invite are skipped silently**, so the response array can be shorter than the
`emails` sent, or empty.

## Also

- 59 resource overviews: endpoint tables rebuilt from the page badges
- sparse-fields: the bulk exclusion now names the three routes
- sidebar regenerated from the page tree — 482 links, one per page

`check:format` (oxfmt), `check:types`, and `turbo run build` all pass. VitePress
fails on dead links, so the clean build is the link check; 844 pages render.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`AuditLogSourceEnum` gained `admin` in 17b1e49ab3 (#9071), which landed on
preview after the last docs sync. The overview listed the five older values in
two places; both now include `admin` and say what it means.

Found by running the drift gate against the current preview tip rather than
trusting the unchanged spec file: the committed openapi/ document is byte-
identical between 80741805f7 and cb7ca630d6, but
`check_v2_schema_drift --check` at cb7ca630d6 reports additive drift, and the
one changed component is this enum. The spec regen for it belongs in a plane-ee
PR and is not included here.

Coverage re-verified against the regenerated spec at cb7ca630d6: 406/406
operations, no orphans. No operations were added or removed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

2 participants