Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

feat(docs): Add required oauth scope to API endpoints (#39723)

Kamil Ogórek564ebfc2748e
diff --git a/apps/docs/features/docs/Reference.api.utils.ts b/apps/docs/features/docs/Reference.api.utils.ts
index 841c433df0d..df0c9f6d1ce 100644
--- a/apps/docs/features/docs/Reference.api.utils.ts
+++ b/apps/docs/features/docs/Reference.api.utils.ts
@@ -24,6 +24,7 @@ export interface IApiEndPoint {
}
tags?: Array<string>
security?: Array<ISecurityOption>
+ 'x-oauth-scope'?: string
}
export type ISchema =
diff --git a/apps/docs/features/docs/Reference.sections.tsx b/apps/docs/features/docs/Reference.sections.tsx
index ca9197dab14..67c07fccd2f 100644
--- a/apps/docs/features/docs/Reference.sections.tsx
+++ b/apps/docs/features/docs/Reference.sections.tsx
@@ -341,6 +341,18 @@ async function ApiEndpointSection({ link, section, servicePath }: ApiEndpointSec
{endpointDetails.description}
</ReactMarkdown>
)}
+ {endpointDetails['x-oauth-scope'] && (
+ <section>
+ <h3 className="mb-3 text-base text-foreground">OAuth scopes</h3>
+ <ul>
+ <li key={endpointDetails['x-oauth-scope']} className="list-['-'] ml-2 pl-2">
+ <span className="font-mono text-sm font-medium text-foreground">
+ {endpointDetails['x-oauth-scope']}
+ </span>
+ </li>
+ </ul>
+ </section>
+ )}
{pathParameters.length > 0 && (
<section>
<h3 className="mb-3 text-base text-foreground">Path parameters</h3>