mirror of
https://github.com/LukeHagar/developer.sailpoint.com.git
synced 2025-12-08 12:27:47 +00:00
adding versioning for nerm apis
This commit is contained in:
6
.gitignore
vendored
6
.gitignore
vendored
@@ -50,6 +50,12 @@ yarn.lock
|
|||||||
!/docs/api/nerm/authentication.md
|
!/docs/api/nerm/authentication.md
|
||||||
!/docs/api/nerm/pagination-metadata-filtering.md
|
!/docs/api/nerm/pagination-metadata-filtering.md
|
||||||
!/docs/api/nerm/getting-started.md
|
!/docs/api/nerm/getting-started.md
|
||||||
|
!/docs/api/nerm/v1/authentication.md
|
||||||
|
!/docs/api/nerm/v1/pagination-metadata-filtering.md
|
||||||
|
!/docs/api/nerm/v1/getting-started.md
|
||||||
|
!/docs/api/nerm/v2025/authentication.md
|
||||||
|
!/docs/api/nerm/v2025/pagination-metadata-filtering.md
|
||||||
|
!/docs/api/nerm/v2025/getting-started.md
|
||||||
|
|
||||||
|
|
||||||
!/docs/api/beta/getting-started.md
|
!/docs/api/beta/getting-started.md
|
||||||
|
|||||||
@@ -18,8 +18,8 @@
|
|||||||
"clean-api-docs": "docusaurus clean-api-docs",
|
"clean-api-docs": "docusaurus clean-api-docs",
|
||||||
"gen-api-docs:version": "docusaurus gen-api-docs:version",
|
"gen-api-docs:version": "docusaurus gen-api-docs:version",
|
||||||
"clean-api-docs:version": "docusaurus clean-api-docs:version",
|
"clean-api-docs:version": "docusaurus clean-api-docs:version",
|
||||||
"gen-api-docs-all": "npm run merge-all-code-examples && npm run gen-all-api-specs-code-examples && docusaurus gen-api-docs:version isc_versioned:all --plugin-id isc-api && docusaurus gen-api-docs isc_versioned --plugin-id isc-api && docusaurus gen-api-docs iiq --plugin-id iiq-api && docusaurus gen-api-docs nerm --plugin-id nerm-api",
|
"gen-api-docs-all": "npm run merge-all-code-examples && npm run gen-all-api-specs-code-examples && docusaurus gen-api-docs:version isc_versioned:all --plugin-id isc-api && docusaurus gen-api-docs isc_versioned --plugin-id isc-api && docusaurus gen-api-docs iiq --plugin-id iiq-api && docusaurus gen-api-docs:version nerm_versioned:all --plugin-id nerm-api && docusaurus gen-api-docs nerm_versioned --plugin-id nerm-api",
|
||||||
"clean-api-docs-all": "docusaurus clean-api-docs isc_versioned --plugin-id isc-api && docusaurus clean-api-docs:version isc_versioned:all --plugin-id isc-api && docusaurus clean-api-docs iiq --plugin-id iiq-api && docusaurus clean-api-docs nerm --plugin-id nerm-api",
|
"clean-api-docs-all": "docusaurus clean-api-docs isc_versioned --plugin-id isc-api && docusaurus clean-api-docs:version isc_versioned:all --plugin-id isc-api && docusaurus clean-api-docs iiq --plugin-id iiq-api docusaurus clean-api-docs nerm_versioned --plugin-id nerm-api && docusaurus clean-api-docs:version nerm_versioned:all --plugin-id nerm-api && ",
|
||||||
"rebuild-docs": "npm run clean-api-docs-all && npm run gen-api-docs-all",
|
"rebuild-docs": "npm run clean-api-docs-all && npm run gen-api-docs-all",
|
||||||
"beta-merge-code-examples": "node src/components/mergeoverlayfiles.js static/code-examples/beta/python_code_examples_overlay.yaml static/code-examples/beta/powershell_code_examples_overlay.yaml static/code-examples/beta/go_code_examples_overlay.yaml",
|
"beta-merge-code-examples": "node src/components/mergeoverlayfiles.js static/code-examples/beta/python_code_examples_overlay.yaml static/code-examples/beta/powershell_code_examples_overlay.yaml static/code-examples/beta/go_code_examples_overlay.yaml",
|
||||||
"speecy-beta-spec": "speccy resolve --quiet static/api-specs/idn/sailpoint-api.beta.yaml -o static/code-examples/beta/beta.yaml",
|
"speecy-beta-spec": "speccy resolve --quiet static/api-specs/idn/sailpoint-api.beta.yaml -o static/code-examples/beta/beta.yaml",
|
||||||
@@ -39,7 +39,8 @@
|
|||||||
"sentence-case-v3": "node src/components/updateSpecsSentenceCase.js static/code-examples/v3/v3.yaml",
|
"sentence-case-v3": "node src/components/updateSpecsSentenceCase.js static/code-examples/v3/v3.yaml",
|
||||||
"sentence-case-v2024": "node src/components/updateSpecsSentenceCase.js static/code-examples/v2024/v2024.yaml",
|
"sentence-case-v2024": "node src/components/updateSpecsSentenceCase.js static/code-examples/v2024/v2024.yaml",
|
||||||
"sentence-case-v2025": "node src/components/updateSpecsSentenceCase.js static/code-examples/v2025/v2025.yaml",
|
"sentence-case-v2025": "node src/components/updateSpecsSentenceCase.js static/code-examples/v2025/v2025.yaml",
|
||||||
"sentence-case-all": "npm run sentence-case-beta && npm run sentence-case-v3 && npm run sentence-case-v2024 && npm run sentence-case-v2025"
|
"sentence-case-all": "npm run sentence-case-beta && npm run sentence-case-v3 && npm run sentence-case-v2024 && npm run sentence-case-v2025",
|
||||||
|
"version-nerm": "docusaurus gen-api-docs:version nerm_versioned:all --plugin-id nerm-api && docusaurus gen-api-docs nerm_versioned --plugin-id nerm-api"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@docusaurus/faster": "3.8.1",
|
"@docusaurus/faster": "3.8.1",
|
||||||
|
|||||||
68
plugins.ts
68
plugins.ts
@@ -1,5 +1,5 @@
|
|||||||
const {createApiPageMD} = require('./createApiPageMD');
|
const {createApiPageMD} = require('./createApiPageMD');
|
||||||
import clsx from "clsx";
|
import clsx from 'clsx';
|
||||||
|
|
||||||
const pluginConfig = [
|
const pluginConfig = [
|
||||||
[
|
[
|
||||||
@@ -89,34 +89,35 @@ const pluginConfig = [
|
|||||||
groupPathsBy: 'tag',
|
groupPathsBy: 'tag',
|
||||||
categoryLinkSource: 'tag',
|
categoryLinkSource: 'tag',
|
||||||
sidebarGenerators: {
|
sidebarGenerators: {
|
||||||
createDocItem(
|
createDocItem(item, {sidebarOptions: {customProps}, basePath}) {
|
||||||
item,
|
|
||||||
{ sidebarOptions: { customProps }, basePath }
|
|
||||||
) {
|
|
||||||
const sidebar_label = item.frontMatter.sidebar_label;
|
const sidebar_label = item.frontMatter.sidebar_label;
|
||||||
const title = item.title;
|
const title = item.title;
|
||||||
const id =
|
const id =
|
||||||
item.type === "schema" ? `schemas/${item.id}` : item.id;
|
item.type === 'schema' ? `schemas/${item.id}` : item.id;
|
||||||
const className =
|
const className =
|
||||||
item.type === "api"
|
item.type === 'api'
|
||||||
? clsx(
|
? clsx(
|
||||||
{
|
{
|
||||||
"menu__list-item--deprecated": item.api.deprecated,
|
'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
|
'menu__list-item--experimental':
|
||||||
"api-method": !!item.api.method,
|
!!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
|
item.api.method,
|
||||||
)
|
)
|
||||||
: clsx(
|
: clsx(
|
||||||
{
|
{
|
||||||
"menu__list-item--deprecated": item.schema.deprecated,
|
'menu__list-item--deprecated': item.schema.deprecated,
|
||||||
},
|
},
|
||||||
"schema"
|
'schema',
|
||||||
);
|
);
|
||||||
return {
|
return {
|
||||||
type: "doc" as const,
|
type: 'doc' as const,
|
||||||
id:
|
id:
|
||||||
basePath === "" || undefined
|
basePath === '' || undefined
|
||||||
? `${id}`
|
? `${id}`
|
||||||
: `${basePath}/${id}`,
|
: `${basePath}/${id}`,
|
||||||
label: (sidebar_label as string) ?? title ?? id,
|
label: (sidebar_label as string) ?? title ?? id,
|
||||||
@@ -124,10 +125,12 @@ const pluginConfig = [
|
|||||||
className: className ? className : undefined,
|
className: className ? className : undefined,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
}},
|
},
|
||||||
|
},
|
||||||
version: 'v2025',
|
version: 'v2025',
|
||||||
label: 'v2025',
|
label: 'v2025',
|
||||||
downloadUrl: 'https://raw.githubusercontent.com/sailpoint-oss/api-specs/refs/heads/main/dereferenced/deref-sailpoint-api.v2025.yaml',
|
downloadUrl:
|
||||||
|
'https://raw.githubusercontent.com/sailpoint-oss/api-specs/refs/heads/main/dereferenced/deref-sailpoint-api.v2025.yaml',
|
||||||
baseUrl: '/docs/api/v2025',
|
baseUrl: '/docs/api/v2025',
|
||||||
template: 'api.mustache',
|
template: 'api.mustache',
|
||||||
markdownGenerators: {
|
markdownGenerators: {
|
||||||
@@ -137,21 +140,24 @@ const pluginConfig = [
|
|||||||
v2024: {
|
v2024: {
|
||||||
specPath: 'static/code-examples/v2024/v2024.yaml',
|
specPath: 'static/code-examples/v2024/v2024.yaml',
|
||||||
outputDir: 'docs/api/v2024',
|
outputDir: 'docs/api/v2024',
|
||||||
downloadUrl: 'https://raw.githubusercontent.com/sailpoint-oss/api-specs/main/dereferenced/deref-sailpoint-api.v2024.yaml',
|
downloadUrl:
|
||||||
|
'https://raw.githubusercontent.com/sailpoint-oss/api-specs/main/dereferenced/deref-sailpoint-api.v2024.yaml',
|
||||||
label: 'v2024',
|
label: 'v2024',
|
||||||
baseUrl: '/docs/api/v2024',
|
baseUrl: '/docs/api/v2024',
|
||||||
},
|
},
|
||||||
v3: {
|
v3: {
|
||||||
specPath: 'static/code-examples/v3/v3.yaml',
|
specPath: 'static/code-examples/v3/v3.yaml',
|
||||||
outputDir: 'docs/api/v3',
|
outputDir: 'docs/api/v3',
|
||||||
downloadUrl: 'https://raw.githubusercontent.com/sailpoint-oss/api-specs/main/dereferenced/deref-sailpoint-api.v3.yaml',
|
downloadUrl:
|
||||||
|
'https://raw.githubusercontent.com/sailpoint-oss/api-specs/main/dereferenced/deref-sailpoint-api.v3.yaml',
|
||||||
label: 'v3',
|
label: 'v3',
|
||||||
baseUrl: '/docs/api/v3',
|
baseUrl: '/docs/api/v3',
|
||||||
},
|
},
|
||||||
beta: {
|
beta: {
|
||||||
specPath: 'static/code-examples/beta/beta.yaml',
|
specPath: 'static/code-examples/beta/beta.yaml',
|
||||||
outputDir: 'docs/api/beta',
|
outputDir: 'docs/api/beta',
|
||||||
downloadUrl: 'https://raw.githubusercontent.com/sailpoint-oss/api-specs/main/dereferenced/deref-sailpoint-api.beta.yaml',
|
downloadUrl:
|
||||||
|
'https://raw.githubusercontent.com/sailpoint-oss/api-specs/main/dereferenced/deref-sailpoint-api.beta.yaml',
|
||||||
label: 'Beta',
|
label: 'Beta',
|
||||||
baseUrl: '/docs/api/beta',
|
baseUrl: '/docs/api/beta',
|
||||||
},
|
},
|
||||||
@@ -186,21 +192,33 @@ const pluginConfig = [
|
|||||||
id: 'nerm-api',
|
id: 'nerm-api',
|
||||||
docsPluginId: 'nerm',
|
docsPluginId: 'nerm',
|
||||||
config: {
|
config: {
|
||||||
nerm: {
|
nerm_versioned: {
|
||||||
specPath: 'static/api-specs/nerm/openapi.yaml',
|
version: 'v2025', // The default version shown
|
||||||
outputDir: 'docs/api/nerm/v1',
|
label: 'v2025',
|
||||||
|
specPath: 'static/api-specs/nerm/v2025/v2025.yaml',
|
||||||
|
outputDir: 'docs/api/nerm/v2025',
|
||||||
downloadUrl:
|
downloadUrl:
|
||||||
'https://raw.githubusercontent.com/sailpoint-oss/api-specs/main/dereferenced/deref-sailpoint-api.nerm.yaml',
|
'https://raw.githubusercontent.com/sailpoint-oss/api-specs/main/dereferenced/deref-sailpoint-api.nerm.v2025.yaml',
|
||||||
|
baseUrl: '/docs/api/nerm/v2025',
|
||||||
sidebarOptions: {
|
sidebarOptions: {
|
||||||
groupPathsBy: 'tag',
|
groupPathsBy: 'tag',
|
||||||
categoryLinkSource: 'tag',
|
categoryLinkSource: 'tag',
|
||||||
},
|
},
|
||||||
template: 'api.mustache',
|
template: 'api.mustache',
|
||||||
|
versions: {
|
||||||
|
v1: {
|
||||||
|
label: 'v1',
|
||||||
|
specPath: 'static/api-specs/nerm/openapi.yaml',
|
||||||
|
outputDir: 'docs/api/nerm/v1',
|
||||||
|
baseUrl: '/docs/api/nerm/v1',
|
||||||
|
downloadUrl:
|
||||||
|
'https://raw.githubusercontent.com/sailpoint-oss/api-specs/main/dereferenced/deref-sailpoint-api.nerm.v1.yaml',
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
export default pluginConfig;
|
export default pluginConfig;
|
||||||
|
|||||||
103
sidebars.ts
103
sidebars.ts
@@ -12,46 +12,50 @@ import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
|
|||||||
|
|
||||||
Create as many sidebars as you want.
|
Create as many sidebars as you want.
|
||||||
*/
|
*/
|
||||||
import { versionSelector, versionCrumb } from 'docusaurus-plugin-openapi-docs/lib/sidebars/utils';
|
import {
|
||||||
import versions from './docs/api/v2025/versions.json';
|
versionSelector,
|
||||||
|
versionCrumb,
|
||||||
|
} from 'docusaurus-plugin-openapi-docs/lib/sidebars/utils';
|
||||||
|
import versions from './docs/api/v2025/versions.json';
|
||||||
|
import nermVersions from './docs/api/nerm/v2025/versions.json';
|
||||||
|
|
||||||
const sidebars: SidebarsConfig = {
|
const sidebars: SidebarsConfig = {
|
||||||
openApiSidebar: [
|
openApiSidebar: [
|
||||||
{
|
{
|
||||||
type: 'category',
|
type: 'category',
|
||||||
label: 'Documentation',
|
label: 'Documentation',
|
||||||
collapsible: false,
|
collapsible: false,
|
||||||
link: { type: 'doc', id: 'docs' },
|
link: {type: 'doc', id: 'docs'},
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
type: 'category',
|
type: 'category',
|
||||||
label: 'Extensibility',
|
label: 'Extensibility',
|
||||||
link: { type: 'doc', id: 'extensibility' },
|
link: {type: 'doc', id: 'extensibility'},
|
||||||
items: [{ type: 'autogenerated', dirName: 'extensibility' }],
|
items: [{type: 'autogenerated', dirName: 'extensibility'}],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'category',
|
type: 'category',
|
||||||
label: 'Connectivity',
|
label: 'Connectivity',
|
||||||
link: { type: 'doc', id: 'connectivity' },
|
link: {type: 'doc', id: 'connectivity'},
|
||||||
items: [{ type: 'autogenerated', dirName: 'connectivity' }],
|
items: [{type: 'autogenerated', dirName: 'connectivity'}],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'category',
|
type: 'category',
|
||||||
label: 'Tools',
|
label: 'Tools',
|
||||||
link: { type: 'doc', id: 'tools' },
|
link: {type: 'doc', id: 'tools'},
|
||||||
items: [{ type: 'autogenerated', dirName: 'tools' }],
|
items: [{type: 'autogenerated', dirName: 'tools'}],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'category',
|
type: 'category',
|
||||||
label: 'Reporting',
|
label: 'Reporting',
|
||||||
link: { type: 'doc', id: 'reporting' },
|
link: {type: 'doc', id: 'reporting'},
|
||||||
items: [{ type: 'autogenerated', dirName: 'reporting' }],
|
items: [{type: 'autogenerated', dirName: 'reporting'}],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'category',
|
type: 'category',
|
||||||
label: 'Guides',
|
label: 'Guides',
|
||||||
link: { type: 'doc', id: 'guides' },
|
link: {type: 'doc', id: 'guides'},
|
||||||
items: [{ type: 'autogenerated', dirName: 'guides' }],
|
items: [{type: 'autogenerated', dirName: 'guides'}],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'link',
|
type: 'link',
|
||||||
@@ -66,13 +70,15 @@ import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
|
|||||||
type: 'category',
|
type: 'category',
|
||||||
label: 'Documentation',
|
label: 'Documentation',
|
||||||
collapsible: false,
|
collapsible: false,
|
||||||
link: { type: 'doc', id: 'iiq' },
|
link: {type: 'doc', id: 'iiq'},
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
type: 'category',
|
type: 'category',
|
||||||
label: 'Plugin Developer Guide',
|
label: 'Plugin Developer Guide',
|
||||||
link: { type: 'doc', id: 'plugin-developer-guide' },
|
link: {type: 'doc', id: 'plugin-developer-guide'},
|
||||||
items: [{ type: 'autogenerated', dirName: 'iiq/plugin-developer-guide' }],
|
items: [
|
||||||
|
{type: 'autogenerated', dirName: 'iiq/plugin-developer-guide'},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'link',
|
type: 'link',
|
||||||
@@ -97,17 +103,55 @@ import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
|
|||||||
items: require('./docs/api/iiq/sidebar.ts'),
|
items: require('./docs/api/iiq/sidebar.ts'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
nermSideBar: [
|
nerm_2025_sidebar: [
|
||||||
|
{
|
||||||
|
type: 'html',
|
||||||
|
defaultStyle: true,
|
||||||
|
value: versionSelector(nermVersions),
|
||||||
|
className: 'version-button',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'html',
|
||||||
|
defaultStyle: true,
|
||||||
|
value: versionCrumb(`v2025`),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: 'category',
|
type: 'category',
|
||||||
label: 'NERM',
|
label: 'NERM v2025 APIs',
|
||||||
collapsible: true,
|
link: {
|
||||||
link: { type: 'doc', id: 'api/non-employee' },
|
type: 'generated-index',
|
||||||
customProps: { description: 'NERM API specifications.' },
|
title: 'NERM v2025 APIs',
|
||||||
items: [
|
description:
|
||||||
{ type: 'doc', id: 'api/nerm/getting-started' },
|
'These are the Non-employee Risk Management APIs for SailPoint.',
|
||||||
{ type: 'doc', id: 'api/nerm/authentication' },
|
slug: '/api/nerm/v2025',
|
||||||
{ type: 'doc', id: 'api/nerm/pagination-metadata-filtering' },
|
},
|
||||||
|
items: require('./docs/api/nerm/v2025/sidebar.ts'),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
nermSideBar: [
|
||||||
|
{
|
||||||
|
type: 'html',
|
||||||
|
defaultStyle: true,
|
||||||
|
value: versionSelector(nermVersions),
|
||||||
|
className: 'version-button',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'html',
|
||||||
|
defaultStyle: true,
|
||||||
|
value: versionCrumb(`v1`), // or dynamically detect the current version
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'doc',
|
||||||
|
id: 'api/nerm/getting-started',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'doc',
|
||||||
|
id: 'api/nerm/authentication',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'doc',
|
||||||
|
id: 'api/nerm/pagination-metadata-filtering',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: 'category',
|
type: 'category',
|
||||||
label: 'NERM v1 API',
|
label: 'NERM v1 API',
|
||||||
@@ -121,8 +165,6 @@ import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
|
|||||||
items: require('./docs/api/nerm/v1/sidebar.ts'),
|
items: require('./docs/api/nerm/v1/sidebar.ts'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
|
||||||
],
|
|
||||||
isc_2025_sidebar: [
|
isc_2025_sidebar: [
|
||||||
{
|
{
|
||||||
type: 'html',
|
type: 'html',
|
||||||
@@ -351,7 +393,6 @@ import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
|
|||||||
items: require('./docs/api/v3/sidebar.ts'),
|
items: require('./docs/api/v3/sidebar.ts'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
export default sidebars;
|
|
||||||
|
|
||||||
|
export default sidebars;
|
||||||
|
|||||||
Reference in New Issue
Block a user