aas-specs icon indicating copy to clipboard operation
aas-specs copied to clipboard

Do not change Value-Only type for Range: stay with number

Open BirgitBoss opened this issue 10 months ago • 3 comments

Is your feature request related to a problem? Please describe. Up to V3.0 Part 2 the Value-only schema requested

"RangeValue": { "type": "object", "properties": { "min": { "type": "number" }, "max": { "type": "number" } },

Now the request came up why this is limited to numbers and there was a decision to allow all types for Range as well. However, this does not really make sense from my point of view.

The types for a Property are like follows:

"PropertyValue": { "oneOf": [ { "$ref": "#/definitions/StringValue" }, { "$ref": "#/definitions/NumberValue" }, { "$ref": "#/definitions/BooleanValue" } ] },

However, a Range of Boolean does not make any sense. A Range of strings may exist but is the order clearly defined?

BirgitBoss avatar Apr 12 '24 14:04 BirgitBoss

I think it also needs to be defined what happens if a non-value-only POST request sends a Range with strings or other types.

Non-value-only GET can retrieve such Ranges. Is value-only endpoint expected to crash? Or what should it do?

(This is a broader issue and applies to everything number in the API. We use strings for non-value-only representation.)

mristin avatar Apr 12 '24 15:04 mristin

Decision Proposal TF AAS Part 1:

  • no change It is true that Boolean Range does not make sense but it is the task of SMT creators to only define elements that are useful

==> Schema Value-Only needs to be adapted

BirgitBoss avatar May 15 '24 14:05 BirgitBoss

Workstream AAS Spec 2024-06-13 accepted: no change

BirgitBoss avatar Jun 13 '24 08:06 BirgitBoss