Skip to content

Commit

Permalink
Remove sub_facets field from label_value definition
Browse files Browse the repository at this point in the history
We have changed approach in the way we implemented nested facets. Nested facets are now sent as two separate facets independently with a cross reference link between them, therefore we no longer need to send sub-facets as part of the finder schema.

#3160
  • Loading branch information
lauraghiorghisor-tw authored and minhngocd committed Feb 26, 2025
1 parent 779010c commit 3cfa90d
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 158 deletions.
40 changes: 1 addition & 39 deletions content_schemas/dist/formats/finder/frontend/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@
"description": "Possible values to show for non-dynamic select facets. All values are shown regardless of the search.",
"type": "array",
"items": {
"$ref": "#/definitions/label_value_pair_with_sub_facets"
"$ref": "#/definitions/label_value_pair"
}
},
"closed_value": {
Expand Down Expand Up @@ -839,44 +839,6 @@
}
}
},
"label_value_pair_with_sub_facets": {
"description": "One of many possible values a user can select from",
"type": "object",
"required": [
"label",
"value"
],
"additionalProperties": false,
"properties": {
"default": {
"description": "The default option for a radio facet",
"type": "boolean"
},
"label": {
"description": "A human readable label",
"type": "string"
},
"main_facet_label": {
"description": "A label that refers to the main facet label of this facet if it is a sub facet. The label is used to generate sub facet labels on frontend apps.",
"type": "string"
},
"main_facet_value": {
"description": "A value that refers to the main facet value of this facet if it is a sub facet. The value is used to group sub facets into sub category groupings for navigational purposes.",
"type": "string"
},
"sub_facets": {
"description": "Possible values to show for non-dynamic select nested facets. All values are shown regardless of the search.",
"type": "array",
"items": {
"$ref": "#/definitions/label_value_pair"
}
},
"value": {
"description": "A value to use for form controls",
"type": "string"
}
}
},
"locale": {
"type": "string",
"enum": [
Expand Down
40 changes: 1 addition & 39 deletions content_schemas/dist/formats/finder/notification/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@
"description": "Possible values to show for non-dynamic select facets. All values are shown regardless of the search.",
"type": "array",
"items": {
"$ref": "#/definitions/label_value_pair_with_sub_facets"
"$ref": "#/definitions/label_value_pair"
}
},
"closed_value": {
Expand Down Expand Up @@ -952,44 +952,6 @@
}
}
},
"label_value_pair_with_sub_facets": {
"description": "One of many possible values a user can select from",
"type": "object",
"required": [
"label",
"value"
],
"additionalProperties": false,
"properties": {
"default": {
"description": "The default option for a radio facet",
"type": "boolean"
},
"label": {
"description": "A human readable label",
"type": "string"
},
"main_facet_label": {
"description": "A label that refers to the main facet label of this facet if it is a sub facet. The label is used to generate sub facet labels on frontend apps.",
"type": "string"
},
"main_facet_value": {
"description": "A value that refers to the main facet value of this facet if it is a sub facet. The value is used to group sub facets into sub category groupings for navigational purposes.",
"type": "string"
},
"sub_facets": {
"description": "Possible values to show for non-dynamic select nested facets. All values are shown regardless of the search.",
"type": "array",
"items": {
"$ref": "#/definitions/label_value_pair"
}
},
"value": {
"description": "A value to use for form controls",
"type": "string"
}
}
},
"locale": {
"type": "string",
"enum": [
Expand Down
40 changes: 1 addition & 39 deletions content_schemas/dist/formats/finder/publisher_v2/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
"description": "Possible values to show for non-dynamic select facets. All values are shown regardless of the search.",
"type": "array",
"items": {
"$ref": "#/definitions/label_value_pair_with_sub_facets"
"$ref": "#/definitions/label_value_pair"
}
},
"closed_value": {
Expand Down Expand Up @@ -601,44 +601,6 @@
}
}
},
"label_value_pair_with_sub_facets": {
"description": "One of many possible values a user can select from",
"type": "object",
"required": [
"label",
"value"
],
"additionalProperties": false,
"properties": {
"default": {
"description": "The default option for a radio facet",
"type": "boolean"
},
"label": {
"description": "A human readable label",
"type": "string"
},
"main_facet_label": {
"description": "A label that refers to the main facet label of this facet if it is a sub facet. The label is used to generate sub facet labels on frontend apps.",
"type": "string"
},
"main_facet_value": {
"description": "A value that refers to the main facet value of this facet if it is a sub facet. The value is used to group sub facets into sub category groupings for navigational purposes.",
"type": "string"
},
"sub_facets": {
"description": "Possible values to show for non-dynamic select nested facets. All values are shown regardless of the search.",
"type": "array",
"items": {
"$ref": "#/definitions/label_value_pair"
}
},
"value": {
"description": "A value to use for form controls",
"type": "string"
}
}
},
"locale": {
"type": "string",
"enum": [
Expand Down
2 changes: 1 addition & 1 deletion content_schemas/formats/shared/definitions/finder.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
description: "Possible values to show for non-dynamic select facets. All values are shown regardless of the search.",
type: "array",
items: {
"$ref": "#/definitions/label_value_pair_with_sub_facets",
"$ref": "#/definitions/label_value_pair",
},
},
option_lookup: {
Expand Down

This file was deleted.

0 comments on commit 3cfa90d

Please sign in to comment.