@@ -221,22 +226,62 @@ function OpenAPISchemaOAuth2Item(props: {
) : null}
- {scopes.length ? (
-
- {t(context.translation, 'available_scopes')}:{' '}
-
- {scopes.map(([key, value]) => (
- -
-
-
{key}
-
- : {value}
-
- ))}
-
-
- ) : null}
+ {scopes.length ?
: null}
);
}
+
+/**
+ * Render a list of available scopes.
+ */
+function OpenAPISchemaScopes(props: {
+ scopes: OpenAPISecurityScope[];
+ context: OpenAPIClientContext;
+}) {
+ const { scopes, context } = props;
+
+ return (
+