Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jSchuetz88 opened this issue Sep 12, 2024 · 2 comments
Open
Labels
acknowledged Has been viewed by one of the maintainers and is ready for further work, discussion or other steps. bug Something isn't working

Comments

@jSchuetz88
Copy link

jSchuetz88 commented Sep 12, 2024

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)

  • generated json-schema by samm-cli-2.6.0.jar, but also tested with samm-cli-2.9.5.jar
@jSchuetz88 jSchuetz88 added the bug Something isn't working label Sep 12, 2024
@jSchuetz88 jSchuetz88 changed the title [BUG] Fixed Point Constraint (scale) is not validates by the json-schema [BUG] Fixed Point Constraint (scale) is not validated by the json-schema Sep 12, 2024
@atextor atextor added the acknowledged Has been viewed by one of the maintainers and is ready for further work, discussion or other steps. label Sep 16, 2024
@atextor
Copy link
Contributor

atextor commented Sep 16, 2024

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

@chris-volk
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledged Has been viewed by one of the maintainers and is ready for further work, discussion or other steps. bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants