eclipse-esmf / esmf-sdk

Load Aspect Models and their artifacts as Java code; share components to realize SAMM as code
https://eclipse-esmf.github.io/esmf-developer-guide/index.html
Mozilla Public License 2.0
25 stars 12 forks source link

[BUG] Fixed Point Constraint (scale) is not validated by the json-schema #654

Open jSchuetz88 opened 2 months ago

jSchuetz88 commented 2 months ago

I'm not sure, whether it is an actual issue or an misunderstanding of the documentary from my side.

How: List of performed steps The documentation for samm-c:scale states:

The scaling factor for a fixed point number. E.g., if a fixedpoint number is 123.04, the scaling factor is 2 (the number of digits after the decimal point). Must be given as xsd:positiveInteger.`

What: Actual result vs expected result In my understanding, if I have for example

samm-c:integer "18"^^xsd:positiveInteger ; samm-c:scale "3"^^xsd:positiveInteger .

the JSON schema should't validate a value with more than 3 digits after the decimal point? e.g. "1000000.324454" should not be a valid value? The scale seems to be ignored within the json-schema.

Where: (e.g. component, version, url, your system info)

atextor commented 2 months ago

Yes, this should be evaluated, I'd also consider it a bug.

chris-volk commented 2 months ago

Related: https://github.com/json-schema-org/json-schema-vocabularies/issues/8