Add event badge for event triggers, add experimental icon

This commit is contained in:
Tyler Mairose
2025-03-06 13:28:15 -06:00
parent 614552b642
commit c0a964937c
2 changed files with 43 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
const {createApiPageMD} = require('./createApiPageMD');
import clsx from "clsx";
const pluginConfig = [
[
@@ -1623,7 +1624,43 @@ const pluginConfig = [
sidebarOptions: {
groupPathsBy: 'tag',
categoryLinkSource: 'tag',
},
sidebarGenerators: {
createDocItem(
item,
{ sidebarOptions: { customProps }, basePath }
) {
const sidebar_label = item.frontMatter.sidebar_label;
const title = item.title;
const id =
item.type === "schema" ? `schemas/${item.id}` : item.id;
const className =
item.type === "api"
? clsx(
{
"menu__list-item--deprecated": item.api.deprecated,
"menu__list-item--experimental": !!item.api.parameters?.find(header => header.name === 'X-SailPoint-Experimental'), // checks for existence of extension and adds "experimental" class
"api-method": !!item.api.method,
},
item.api.method
)
: clsx(
{
"menu__list-item--deprecated": item.schema.deprecated,
},
"schema"
);
return {
type: "doc" as const,
id:
basePath === "" || undefined
? `${id}`
: `${basePath}/${id}`,
label: (sidebar_label as string) ?? title ?? id,
customProps: customProps,
className: className ? className : undefined,
};
},
}},
version: 'v2024',
label: 'v2024',
downloadUrl: 'https://raw.githubusercontent.com/sailpoint-oss/api-specs/refs/heads/main/dereferenced/deref-sailpoint-api.v2024.yaml',