Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow additional content after the sortable fields in the sorters description. #15

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion functions/parameter-filter-description-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = (targetVal, _opts) => {
}

let i = 2
while (i < parts.length && parts[i].includes(':')) {
while (i < parts.length && parts[i].includes('**: *')) {
const filters = parts[i].split(':')
const property = filters[0]
const operations = filters[1].trim()
Expand Down
2 changes: 1 addition & 1 deletion functions/parameter-sorter-description-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module.exports = (targetVal, _opts) => {
}

// Check if the properties are comma separated
regex = new RegExp('^\\*\\*[a-z]+(,\\s[a-z]+)*\\*\\*$')
regex = new RegExp('^\\*\\*[a-zA-Z.]+(,\\s[a-zA-Z.]+)*\\*\\*$')
if (!regex.test(properties)) {
return [
{
Expand Down
2 changes: 1 addition & 1 deletion functions/tests/parameter-sorter-description-check-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ let ruleNumber = 325;

let validSorterDescription = `Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results)

Sorting is supported for the following fields: **name, identity.manager, modified**`;
Sorting is supported for the following fields: **owner.name, name, identity.manager, modified, identityId**`;

let badKeyForFields = `Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results)

Expand Down
Loading