From 6985bd875466da40839ab3d641936b9d4fcbaf4d Mon Sep 17 00:00:00 2001 From: philip-ellis-sp Date: Mon, 29 Jun 2026 15:09:54 -0400 Subject: [PATCH] fixed link generation --- sdk-resources/postscript.js | 12 ++++++++++++ sdk-resources/resources/api_doc.mustache | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/sdk-resources/postscript.js b/sdk-resources/postscript.js index 79de916e3..6913d5b1d 100644 --- a/sdk-resources/postscript.js +++ b/sdk-resources/postscript.js @@ -126,6 +126,18 @@ const fixFiles = async function (myArray) { } rawDataArra = fileOut.slice(); fileOut = []; + + // Fix API Spec links: add hyphen between version letter and number + // e.g., /docs/api/create-access-profile-v1 → /docs/api/create-access-profile-v-1 + const content = rawDataArra.join("\n"); + const fixedContent = content.replace( + /\[API Spec\]\(https:\/\/developer\.sailpoint\.com\/docs\/api\/([^)]+)\)/g, + (_, slug) => `[API Spec](https://developer.sailpoint.com/docs/api/${slug.replace(/-v(\d+)$/, '-v-$1')})` + ); + if (fixedContent !== content) { + rawDataArra = fixedContent.split("\n"); + madeChange = true; + } } if (file.includes("export_payload.py")) { diff --git a/sdk-resources/resources/api_doc.mustache b/sdk-resources/resources/api_doc.mustache index 2f613a62a..65787ba46 100644 --- a/sdk-resources/resources/api_doc.mustache +++ b/sdk-resources/resources/api_doc.mustache @@ -40,7 +40,7 @@ This API is currently in an experimental state. The API is subject to change bas {{{summary}}} {{#notes}}{{{unescapedNotes}}}{{/notes}} {{{description}}} -[API Spec](https://developer.sailpoint.com/docs/api/{{apiVersion}}/{{#lambda.kebabcase}}{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}{{/lambda.kebabcase}}) +[API Spec](https://developer.sailpoint.com/docs/api/{{#lambda.kebabcase}}{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}{{/lambda.kebabcase}}) ### Parameters {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}