Skip to content
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
24 changes: 4 additions & 20 deletions example/response.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,6 @@
"field": "salesfrequency",
"relevanceBased": true,
"direction": "DESC"
},
"selectedFilters": {
"cat": [
{
"value": "Gardening"
}
],
"price": [
{
"min": 0.0,
"max": 15
}
],
"vendor": [
{
"value": "Blubbergurken International Inc."
}
]
}
},
"result": {
Expand Down Expand Up @@ -80,7 +62,7 @@
}
}
],
"availableFilters": {
"filters": {
"main": [
{
"name": "cat",
Expand Down Expand Up @@ -133,7 +115,8 @@
"value": "Blubbergurken International Inc.",
"weight": 0.8,
"frequency": 5,
"selected": true
"selected": true,
"frequencyType" : "additive"
}
]
}
Expand All @@ -143,6 +126,7 @@
"name": "color",
"displayName": "Color",
"type": "color",
"selectMode": "multiple",
"cssClass": "my-colors",
"values": [
{
Expand Down
43 changes: 23 additions & 20 deletions resources/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@
"description": "The number of products matching a filter. Not supported in all configuration constellations.",
"type": ["number", "null"]
},
"frequencyType": {
"type": "string",
"enum": [
"additive",
"absolute"
],
"description": "In case of a selected-filter, this property indicates whether the frequency is the number of additional products you'll get after selecting the filter (additive), or whether it's the total number of results you'll have after selecting the filter (absolute)."
},
"colorCode": {
"description": "For color filters, the hexadecimal code corresponding to the color. The filter's value is the configured color name in such a case.",
"type": "string",
Expand All @@ -52,7 +60,7 @@
},
"additionalProperties": false
},
"availableFilter": {
"filter": {
"description": "A selected value, with limited metadata as compared to available filters.",
"type": "object",
"properties": {
Expand Down Expand Up @@ -83,7 +91,7 @@
"single",
"multiple"
],
"description": "Whether one or more filter values can be selected at the same time. Only applies to a subset of available filter types."
"description": "Whether one or more filter values can be selected at the same time."
},
"cssClass": {
"type": "string",
Expand All @@ -105,6 +113,14 @@
"type": "integer",
"description": "This is the number of filter values that should always be shown, and any more values than that should be hidden, e.g. by putting them in a dropdown."
},
"combinationOperation": {
"type": "string",
"enum": [
"or",
"and"
],
"description": "This indicates whether multiple-filters are applied in a OR- or AND-condition and do only apply after a minimum of two filters have been selected. The AND-condition shrinks the result (A and B have to match), while the OR-condition makes it grow (A or B have to match)."
},
"totalRange": {
"description": "The usable range of a range slider.",
"properties": {
Expand Down Expand Up @@ -230,18 +246,6 @@
"relevanceBased",
"direction"
]
},
"selectedFilters": {
"description": "Filters that have previously been selected.",
"type": "object",
"patternProperties": {
"^.*$": {
"type": "array",
"items": {
"$ref": "#/definitions/filterMetadata"
}
}
}
}
},
"additionalProperties": false,
Expand All @@ -252,8 +256,7 @@
"serviceId",
"usergroup",
"userId",
"order",
"selectedFilters"
"order"
]
},
"result": {
Expand Down Expand Up @@ -478,22 +481,22 @@
]
}
},
"availableFilters": {
"filters": {
"description": "Filters available based on the query, and as configured in the filter configuration. Does not include inactive filters.",
"type": "object",
"properties": {
"main": {
"description": "Filters configured for primary visibility.",
"type": "array",
"items": {
"$ref": "#/definitions/availableFilter"
"$ref": "#/definitions/filter"
}
},
"other": {
"description": "Filters configured for secondary visibility. Should be initially hidden or collapsed.",
"type": "array",
"items": {
"$ref": "#/definitions/availableFilter"
"$ref": "#/definitions/filter"
}
}
},
Expand All @@ -509,7 +512,7 @@
"metadata",
"variant",
"items",
"availableFilters"
"filters"
]
}
},
Expand Down