Commit Graph
10 Commits
Author SHA1 Message Date
Alexis Aguilar 6ac0f3f231 fix(docs): include request bodies in the Management API markdown reference (#54343)
## Problem

Agents can't find request body fields for Management API endpoints. In
an eval for the access control guide
([DOCS-1489](https://linear.app/supabase/issue/DOCS-1489)), an agent
read the [Create organization
invitations](https://supabase.com/docs/reference/api/v2-create-organization-invitations)
page and concluded the body accepts only an email. It refused to invite
someone scoped to one project, even though the API accepts `role` and
`projects`.

Reference pages have no `.md` version. Their markdown 404 points agents
to the markdown reference (`llms/api.txt`), which lists path and query
parameters but no request body for any endpoint.

Resolves part of
[DOCS-1823](https://linear.app/supabase/issue/DOCS-1823).

## Solution

Each endpoint with a request body gets a **Request body** section in the
markdown reference. It lists every field as a nested list with its type,
whether it's required, its description, accepted values, defaults, and
constraints. Unions list each option by name, and map-like objects show
the shape of their values.

This changes only the generated markdown. Reference pages render the
same as before.

Reference pages don't have their own `.md` versions yet. That's tracked
in [DOCS-1332](https://linear.app/supabase/issue/DOCS-1332). The new
renderer takes one endpoint's request body and returns markdown, so a
per-page generator can reuse it.

## Follow-ups

- **Reference page HTML (rest of DOCS-1823):** nested schema fields
still reach the HTML only after someone opens their control. Moving
these controls to native `<details>` also needs three fixes found in
review:
- A union option puts an `<li>` inside another `<li>`, which breaks the
list once the content is in the HTML.
- The **Items** control for an array of union items, such as the
notebook `cells` array, opens an empty panel.
- The new summary styles repeat the current trigger's styles. They
should share one base.
- **Parameters:** path and query parameters still use the older one-line
format, so their accepted values don't appear in the markdown reference.
For example, `continent` on the available regions endpoint lists no
values.
- **Shared schema helpers:** the renderer copies `asSchemaArray` from
`Reference.ui.tsx` and adds its own schema type. Sharing both through
`Reference.api.utils.ts` keeps the HTML and the markdown in step.

## Review category (docs PRs only)

- [ ] Critical: needs a review as soon as possible
- [ ] Urgent: the feature ships soon, or it's blocking something else
- [x] Moderate: good to have soon, not urgent
- [ ] Low: get to it when you can

## Review instructions

1. Open the [Management API markdown reference on the
preview](https://docs-git-alexisa-docs-1823-supabase.vercel.app/docs/markdown/reference/api.md).
On production, the same file is served at `/llms/api.txt`.
2. Under **Creates organization invitations**, see the **Request body**
section with `data`, `type`, `attributes`, `email`, `role`, `projects`,
and `require_sso`.
3. Under **Assign or change an organization member role**, see
`data.attributes.role` and `projects`.

## Checklist

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-12-01 11:15:33 -07:00
b27694b1d4 docs: add TanStack DB reference page (#51086)
## Problem

`supabase/tanstack-db` (a frontend data layer syncing TanStack DB
collections with Postgres via Supabase) has no reference documentation
on supabase.com/docs.

## Solution

Adds a new `/reference/tanstack-db` SDK reference page documenting
`supabaseCollectionOptions()`, `queryOnce()`, and live-query/mutation
usage. Since the package has no TypeDoc pipeline (unlike
`middleware`/`server`), it uses the legacy hand-written YAML spec
pattern already used for Python, Swift, C#, and Dart v1
(`apps/docs/spec/supabase_tanstack_db_v1.yml`), wired into
`navigation.references.ts` and the sidebar/breadcrumb constants the same
way as the existing `middleware` entry. Content is sourced from the
public `supabase/tanstack-db` README and source, since there's no
internal ticket for this.

## Review instructions

1. Run `pnpm run codegen:references:legacy` in `apps/docs` and confirm
`features/docs/generated/tanstack_db.v1.*.json` are generated.
2. Start local Supabase (`pnpm supabase start`) and `pnpm dev:docs`,
then visit `/docs/reference/tanstack_db` and confirm the sidebar entry
and content render.

## Checklist

- [ ] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: Tiago Antunes <tiagoantunespt@gmail.com>
2026-10-28 22:10:43 +01:00
Johan Bergström a58bb832c6 feat(docs): show guides sidebar on Management API introduction
The sidebar for the management api introduction is eating into the main
content unfairly given its amount of importance (three links). Also, most
of our content has a richer sidebar with more ways to interact.

What started as an attempt to give more space for the main content in
the management api introduction turned into an attempt to standardize
the sidebar similar to how its being used on other pages.

The "Additional links" now live in the sidebar and fall back to a list
under the article below the md breakpoint.

PR: https://github.com/supabase/supabase/pull/52107
2026-10-23 11:17:39 +01:00
Katerina Skroumpelou 6e83f71a56 docs: wire middleware sdk docs (#49854)
Wire middleware sdk docs (`@supabase/middleware`)
https://github.com/supabase/middleware

Preview ref here:
https://docs-git-docs-supabase-middleware-sdk-supabase.vercel.app/docs/reference/middleware/introduction

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
  * Added a Middleware SDK reference section to the documentation.
  * Added installation guidance for npm, Yarn, pnpm, Deno, and Bun.
* Documented framework-agnostic middleware composition, typed shared
context, ordering, trust, and environment access across supported
runtimes.
  * Added Middleware documentation to navigation and search.
  * Identified the Middleware SDK as an alpha release.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-02 14:06:23 +03:00
Katerina Skroumpelou 373e917a99 feat(docs): generate server.txt reference and wire into www llms (#47782)
Add a `server` entry to the reference-markdown pipeline so it emits
`public/markdown/reference/server.md`, and register the Supabase Server
Library Reference as a source in the www `llms.txt` and `llms-full.txt`
routes.




<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Documentation**
* Added a new Supabase Server Library Reference covering server-side SDK
usage.
* Included the server reference in generated documentation and plaintext
documentation indexes.
* Made server SDK reference content available through the full
documentation feed.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-10 11:56:20 +01:00
Lukas KlingsboandJeremias Menichelli 833d3cb1d7 docs: migrate Dart/Flutter reference to the new reference pipeline (#47224)
## What

Routes the **Dart/Flutter v2** reference through the new
reference-content pipeline (`scripts/build-reference-content.ts` +
`spec/reference/dart/v2/`), the same one JavaScript v2 already uses.
Dart v1 stays on the legacy YAML pipeline.

## How

Dart has no upstream TypeDoc dump, so this follows the reference
README's "adapt other formats as a pre-step" approach:

- **`scripts/generate-dart-reference.ts`** converts the committed legacy
spec (`spec/supabase_dart_v2.yml`) plus the shared section tree into a
TypeDoc-shaped dump at `spec/reference/dart/v2/supabase_flutter.json`
(gitignored, like every other dump). Each Dart method becomes a
`variant: 'declaration'` node tagged with `@category`/`@subcategory` and
carries the legacy function shape (description, notes, params, examples)
on a non-TypeDoc `content` field.
- **`build-reference-content.ts`** gains a small, backward-compatible
addition: it spreads a declaration's `content` straight onto the
`functions.json` entry. The renderer then shows params/examples/notes
exactly as the legacy YAML did, with no typeSpec round-trip. The field
is absent for real TypeDoc dumps, so **JavaScript output is unchanged**
(existing JS snapshot still passes).
- `dart-v2` added to `SUPPORTS_NEW_REFERENCE_PROCESS`; the v2 `specFile`
is dropped from the nav entry so the legacy generator skips it.
- Dart search ingest switched to the new-pipeline loader.
- `config.json` + hand-authored partials (intro markdown,
`initializing`, and subcategory overviews like `using-filters`,
`auth-mfa`) added under `spec/reference/dart/v2/partials/`, mirroring
the JS lib.
- The dart dump is regenerated in `codegen:references:new` and in CI; a
self-contained `dart/v2` snapshot test covers the full YAML → dump →
content path.

## Verification

- `vitest run scripts/build-reference-content.test.ts` — both JS and
Dart snapshots pass.
- 112 function sections all resolve to renderable `functions.json`
entries (104 methods + 7 subcategory overviews + `initializing`).
- `tsc --noEmit` clean for all changed files.
- Legacy generator confirmed to skip dart v2 (only `dart.v1.*`
regenerated).

> Note: the live dev server (which needs the Supabase backend) was not
run; verification was done at the data-pipeline level plus parity with
the production JS pipeline behavior.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added Dart v2 reference documentation sections, including Installing,
Initializing, Filters, Modifiers, Auth Admin, MFA, Passkeys, File
Buckets, Introduction, and Upgrade guidance.
* Expanded the Dart v2 reference pipeline so Dart API pages are
generated from the newer reference content flow.
* **Bug Fixes**
* Improved Dart reference rendering by preserving legacy descriptions,
notes, params, and examples in generated function entries.
* Updated Dart v2 reference search to use the new pipeline’s generated
content so results and navigation stay in sync.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Jeremias Menichelli <jmenichelli@gmail.com>
2026-07-03 15:09:56 +02:00
Chris Chinchilla bce47daeea docs: Only build reference docs if feature is enabled (#47273)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Reference documentation generation now only includes feature-enabled
SDK pages, so published docs better match what’s available.
* Legacy SDK reference pages are now shown selectively based on enabled
feature flags.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-25 13:16:38 +02:00
Jeremias Menichelli fdd5b11dff refactor: Move URL prefixing to AST (#47074) 2026-06-22 12:11:55 +02:00
Jeremias Menichelli 19ae3501e6 fix: Make markdown links absolute (#46773)
In this PR:
- For preview and production builds, Vercel deployment URL gets prepend
in markdown links.
2026-06-09 14:33:22 +02:00
Jeremias Menichelli 575ac8c645 [DOCS-979] feat(Docs): Generate new markdown files for reference pages (#46727)
In this PR:
- The `llms.ts` script is removed from the pipeline. It was just
iterating over the sections of the SDK JSON files to generate _dummy_
text files for LLMS to consume. But with a lot of inconsistencies and
mistakes.
- There's a new script that builds markdown files from the SDK
definition files.
- The Management API now has a definition file too, it was missing
before.
- On the www project now there are redirects for the reference text
files to the new markdown files in the docs project.
- NPM scripts have received better names so that prebuild ones are
smaller and all are easier to differentiate.
2026-06-09 10:39:55 +02:00