From 032c71c5bfa1f4425d2f93072e28fa7d4e9a8321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gulbinowicz?= Date: Wed, 30 Sep 2026 17:25:17 +0200 Subject: [PATCH] fix(docs): use summary instead of slug for webhooks api spec (#51088) ## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Bug fix ## What is the current behavior? Operations names for webhooks in Organizations webhooks and Project webhooks use titles derived from slug, which produces wrong/incoherent titles, for example: `Organizations slug webhooks deliveries id get`. ## What is the new behavior? For Organizations webhooks and Project webhooks use `summary` from the OpenAPI spec as the title instead of deriving it from the operation id. ## Additional context Once this PR is merged, an _Update Mgmt Api Docs_ workflow needs to be run to regenerate the sections and the spec. ## Summary by CodeRabbit * **Documentation** * Management API documentation section titles for organization and project operations now use the OpenAPI summary when one is available. If no summary is provided, the title falls back to the existing name-based format. Titles for other operations continue to use the existing format, so their presentation is unchanged. --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- apps/docs/spec/sections/generateMgmtApiSections.cts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/docs/spec/sections/generateMgmtApiSections.cts b/apps/docs/spec/sections/generateMgmtApiSections.cts index ecb55ed9063..ed2c225fd4f 100644 --- a/apps/docs/spec/sections/generateMgmtApiSections.cts +++ b/apps/docs/spec/sections/generateMgmtApiSections.cts @@ -56,7 +56,9 @@ function extractSectionsFromOpenApi(filePaths: string[], outputPath: string) { const sectionCate = sections.find((i) => i.title === tag) sectionCate?.items.push({ id: operationId, - title: slugToTitle(operationId), + title: operationId.match(/^v\d+-(organizations-slug|projects-ref)-.+$/) + ? (methods[method].summary ?? slugToTitle(operationId)) + : slugToTitle(operationId), slug: operationId, type: 'operation', })