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

Using min in a precision range results in an InvalidSchemaException #239

Open
popematt opened this issue Mar 3, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@popematt
Copy link
Contributor

popematt commented Mar 3, 2023

E.g.:

$ion_schema_2_0
type::{
  name: foo,
  precision: range::[min, 5]
}

Results in:

Precision must be at least 1 (range::[min,4])
com.amazon.ionschema.InvalidSchemaException: Precision must be at least 1 (range::[min,4])
	at com.amazon.ionschema.internal.constraint.Precision.<init>(Precision.kt:33)
        ...

The spec says that any positive int range is okay for precision, so the precision constraint should be interpreting min as 1 rather than 0.

This issue affects all versions of ISL.

@popematt popematt added the bug Something isn't working label Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant