Skip to content
Open
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
40 changes: 40 additions & 0 deletions public/rulesets/default/Sorting_Parameter_Specification.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
rules:
- id: "2.10.3.1"
title: "Sorting Parameter Specification"
message: "Sorting Keywords should be specified as sort_key and sort_dir."
option: Mandatory
location: query
element: url
call: {
function: CheckURLSortingParameter,
functionParams: {
"allowedKeywords": ["sort_key", "sort_dir"]
}
}
severity: "critical"
- id: "2.10.3.2"
title: "Sorting Parameter Default Direction"
message: "Sorting direction must be ascending by default if not specified."
option: Mandatory
location: query
element: url
call: {
function: CheckURLSortingDefaultDirection,
functionParams: {"asc"}
}
severity: "critical"
- id: "2.10.3.3"
title: "Multiple Sorting Parameter Order"
message: "Sorting multiple values must be done in the order of sort_key and sort_dir."
option: Mandatory
location: query
element: url
call: {
function: CheckURLSortingDefaultDirection,
functionParams: {
"KeywordOrder": ["sort_key", "sort_dir"],
"checkSequence": True,
"disallowOtherParams": True,
"defaultValueNotAllowed": True
}
severity: "critical"