Skip to content

Commit

Permalink
Merge pull request #15 from sailpoint-oss/fix/filter-sorter-rules
Browse files Browse the repository at this point in the history
Allow additional content after the sortable fields in the sorters description.
  • Loading branch information
colin-mckibben-sp authored Oct 30, 2023
2 parents 6d88abc + ae7fca3 commit a44d7bd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
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

0 comments on commit a44d7bd

Please sign in to comment.