adding Experimental back to createApiPageMD and fixing auth section

This commit is contained in:
darrell-thobe-sp
2024-11-18 13:22:19 -05:00
parent 0c9358d084
commit 0a577861f2
2 changed files with 44 additions and 44 deletions

View File

@@ -73,6 +73,7 @@ export function createApiPageMD({
frontMatter.show_extensions
? createVendorExtensions(extensions)
: undefined,
createExperimentalNotice(parameters),
createDeprecationNotice({ deprecated, description: deprecatedDescription }),
createDescription(description),
requestBody || parameters ? createRequestHeader("Request") : undefined,
@@ -86,17 +87,6 @@ export function createApiPageMD({
]);
}
function createDeprecation({ deprecated, description }: { deprecated?: boolean; description?: string }) {
if (deprecated == true) {
if (description !== undefined) {
return `:::caution deprecated\n\n${description}\n\n:::`;
} else {
return `:::caution deprecated\n\nThis endpoint has been deprecated and may be replaced or removed in future versions of the API.\n\n:::`;
}
}
}
function createExperimentalNotice(parameters){
if (parameters && parameters.some(element => element.in === 'header' && element.name === 'X-SailPoint-Experimental')) {
return ":::warning experimental\n\nThis API is currently in an experimental state. The API is subject to change based on feedback and further testing. You must include the X-SailPoint-Experimental header and set it to `true` to use this endpoint.\n\n:::\n\n";