"@type": "ProductSpecification",
"name": "xxxx",
"productSpecCharacteristic": [
{
"name": "Serial Number",
"valueType": "string",
"configurable": true,
"maxCardinality": 1,
"minCardinality": 1,
"productSpecCharacteristicValue": [],
},
{
"name": "Low Latency",
"valueType": "boolean",
"configurable": true,
"maxCardinality": 1,
"minCardinality": 0,
"productSpecCharacteristicValue": [],
},
{
"name": "Colour",
"valueType": "string",
"configurable": true,
"maxCardinality": 1,
"minCardinality": 1,
"productSpecCharacteristicValue": [
{
"value": "blue"
},
{
"value": "white"
}
]
}
]
}
Original Message:
Sent: Aug 23, 2024 06:43
From: Vance Shipley
Subject: ProductCharacteristic without Characteristicvalue
Are you thinking characteristicValueSpecification is a mandatory attribute?
------------------------------
Vance Shipley
SigScale
------------------------------
Original Message:
Sent: Aug 23, 2024 06:16
From: Matthieu Hattab
Subject: ProductCharacteristic without Characteristicvalue
it seems my question was not clear. Sorry for that.
I don't want TMF620 (or any backend APIs) to have an opinion on how the product characteristics are displayed (html tag, radio button etc). That is not its job.
The challenge is how TMF620 represents the 3 types of product characteristics in the payload:
- a char with an enum list of values (that's easy, all examples of char in TMF620 user guide have a predefined list of char values) => example: colour
- a char without value (no example in TMF620 user guide) => example: Low Latency
- a char with a free text field value (no example in TMF620 user guide) => example: Serial Number
@Bostjan Keber, do you have payload examples from 620 or (maybe 760) with characteristics similar to my low latency and serial number?
------------------------------
Kind regards,
Matthieu Hattab
Lyse Platform
Original Message:
Sent: Aug 23, 2024 05:03
From: Vance Shipley
Subject: ProductCharacteristic without Characteristicvalue
@Matthieu Hattab wrote:
> With the above payload, it's not that easy for the product configurator to know what to show to the client UI.
All of the information used to validate the value may be used to prompt the user, it's a data model.
The regular expression can define precisely what to prompt the user for. In fact, you can use it directly in a pattern attribute of an HTML <input> tag.
I did make an error though, the valueType should be string if regex is used.
For the boolean you could use either checkbox or radio button <input> type.
For the characteristicValueSpecification enumerations use a radio button <input> type.
You could also put the description in a tooltip!
The expressivity and function lines up quite well.
------------------------------
Vance Shipley
SigScale
Original Message:
Sent: Aug 23, 2024 03:43
From: Matthieu Hattab
Subject: ProductCharacteristic without Characteristicvalue
Hello Vance,
Thanks for your reply.
Unfortunately, the question is not how to validate the length of the serial number. it's about the characteristicValueSpecification
------------------------------
Kind regards,
Matthieu Hattab
Lyse Platform
Original Message:
Sent: Aug 23, 2024 01:08
From: Vance Shipley
Subject: ProductCharacteristic without Characteristicvalue
The serial number is ten digits (0-9):
{
"name": "Serial Number",
"valueType": "integer",
"configurable": true,
"maxCardinality": 1,
"minCardinality": 1
"regex": "^[0-9]{10}$"
},
------------------------------
Vance Shipley
SigScale