mirror of
https://github.com/LukeHagar/developer.sailpoint.com.git
synced 2025-12-09 20:37:47 +00:00
Add event badge for event triggers, add experimental icon
This commit is contained in:
39
plugins.ts
39
plugins.ts
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user