Open stiebitzhofer opened 2 years ago
@BALA-KASI Does the problem https://github.com/thematerials-network/CoA-schemas/issues/57 apply to ranges as well? Or generalized to all numeric measurement results and specification values?
@getlarge Can you please review the requirement and my proposed solution? Thank you!
Since the purpose of our schemas is to allow automated read/write, i’m a bit concerned by the separator that would be used in a range value, should it be declared in another property ? Should there be a unique default ? then how to validate the value (using a JSON schema validator or in code )?
I didn’t take too much time to think about it, but i would rather modify the type of Inspection.Value
to be a union of string and array of string with exactly 2 items. Something like :
{
…
"Inspection": {
"title": "Inspection",
"description": "A structure to specify any kind of measurements. It follows the structure as defined by CAMPUS (https://www.campusplastics.com)",
"type": "object",
"properties": {
…
"Value": {
"description": "A measured or calculated Value (e.g. mean of individual measurements).",
"oneOf": [
{ "type": "string" },
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 2,
"maxItems": 2
}
]
},
….
},
…
}
Or eventually by using the more recent prefixItems
@getlarge I agree, that's how it should be done.
Will create an issue in the CoA and schema repositories.
do you want to go on with the PR, or should i do it ?
I would be happy if you take over. Thanks!
Describe the problem
For some inspections the results is a value range. One example is
Range of bulk density
99.0 .. 100.0
Specify the details
range
to attributeValueType
<value_1>;<value_2>
<value_1> .. <value_2>
Tasks
Explain the benefits
Value ranges for inspection results can be added to CoA in a proper data structure.