Defines a category (also called a "value set") for grouping related enum values together. Categories help organize enum values into logical groups in the Portal UI.
To assign an enum value to a category, set the setKey property on the enum value configuration.
Properties
| Property | Type | Description |
|---|---|---|
label | object | Localized labels for the category. Keys are locale codes (e.g., default, sv-SE, en-US). |
Example Value
json
{
"label": {
"default": "Customer Tags",
"sv-SE": "Kundtaggar"
}
}Example Manifest
Create a category for customer-related order tags:
yaml
uri: /registry/enums/graph/order/tags/categories/customer
spec:
value:
label:
default: Customer Tags
sv-SE: KundtaggarUsage with Values
Values that don't have a setKey assigned, or where the setKey doesn't match any defined category, will appear in a default "uncategorized" group.
Example of a complete setup with a category and values:
yaml
# Define the category
uri: /registry/enums/graph/order/tags/categories/customer
spec:
value:
label:
default: Customer Tags
---
# Assign values to the category
uri: /registry/enums/graph/order/tags/values/vip
spec:
value:
label:
default: VIP Customer
hue: 280
setKey: customer
---
uri: /registry/enums/graph/order/tags/values/returning
spec:
value:
label:
default: Returning Customer
hue: 200
setKey: customer