diff --git a/tools/spectral/ipa/ipa-spectral.yaml b/tools/spectral/ipa/ipa-spectral.yaml index dbbd3aca8f..d6d6d56c59 100644 --- a/tools/spectral/ipa/ipa-spectral.yaml +++ b/tools/spectral/ipa/ipa-spectral.yaml @@ -21,6 +21,15 @@ extends: - ./rulesets/IPA-126.yaml overrides: + - files: + - '**#/paths/~1api~1atlas~1v2~1unauth~1controlPlaneIPAddresses' + rules: + xgen-IPA-110-collections-response-define-links-array: 'off' + xgen-IPA-110-collections-response-define-results-array: 'off' + xgen-IPA-110-collections-use-paginated-prefix: 'off' + xgen-IPA-110-collections-request-has-itemsPerPage-query-param: 'off' + xgen-IPA-110-collections-request-has-pageNum-query-param: 'off' + xgen-IPA-104-resource-has-GET: 'off' - files: - '**#/components/schemas/DataLakeDatabaseDataSourceSettings' - '**#/components/schemas/DataLakeAtlasStoreReadPreference' diff --git a/tools/spectral/ipa/rulesets/functions/utils/resourceEvaluation.js b/tools/spectral/ipa/rulesets/functions/utils/resourceEvaluation.js index 361fe0caff..e872646ee1 100644 --- a/tools/spectral/ipa/rulesets/functions/utils/resourceEvaluation.js +++ b/tools/spectral/ipa/rulesets/functions/utils/resourceEvaluation.js @@ -190,12 +190,12 @@ function resourceBelongsToSingleParent(resourcePath) { } // TODO move prefixes to be rule arguments -function removePrefix(path) { - if (path.startsWith(AUTH_PREFIX)) { - return path.slice(AUTH_PREFIX.length); - } +export function removePrefix(path) { if (path.startsWith(UNAUTH_PREFIX)) { return path.slice(UNAUTH_PREFIX.length); } + if (path.startsWith(AUTH_PREFIX)) { + return path.slice(AUTH_PREFIX.length); + } return path; }