File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { getProperty } from "dot-prop";
44import { getSchema } from " ~/util/api.ts" ;
55import type { OpenAPIV3 } from " openapi-types" ;
66import CURL from " ./CURL.astro" ;
7+ import Details from " ./Details.astro" ;
78
89type Props = z .input <typeof props >;
910
@@ -91,6 +92,25 @@ if (jsonSchema.required) {
9192 json [property ] = defaultValue ;
9293 }
9394}
95+
96+ const tokenGroups = operation [" x-api-token-group" ];
9497---
9598
99+ {
100+ tokenGroups && (
101+ <Details header = " Required API token permissions" >
102+ <span >
103+ At least one of the following{ " " }
104+ <a href = " /fundamentals/api/reference/permissions/" >token permissions</a >{ " " }
105+ is required:
106+ </span >
107+ <ul >
108+ { tokenGroups .map ((group ) => (
109+ <li >{ group } </li >
110+ ))}
111+ </ul >
112+ </Details >
113+ )
114+ }
115+
96116<CURL url ={ url .toString ()} method ={ method } headers ={ headers } json ={ json } />
You can’t perform that action at this time.
0 commit comments