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

Add support for float values that are also valid integers #237

Open
nick-j-roberts opened this issue Oct 24, 2024 · 1 comment
Open

Add support for float values that are also valid integers #237

nick-j-roberts opened this issue Oct 24, 2024 · 1 comment

Comments

@nick-j-roberts
Copy link

When validating a JSON document against a schema which specifies a property as type number, the validator indicates that the document is malformed if the property is a float value which is also a valid integer (ie 1.0, 2.0, 3.0, etc) and indicates that it is an integer and should be a float.

Example:

When checking property shown below with flags --lint and --verbose an error message is shown:

"$comment": "example property",
"proj:transform": [
      1.0,
      0.0,
      5.0,
      0.0,
      1.0,
      5.0
    ]
-- Lint: File is malformed -> use `--format` to fix the issue
- Expected
+ Received
"proj:transform": [
-       1.0,
+       1,
-       0.0,
+       0,
-       5.0,
+       5,
-       0.0,
+       0,
-       1.0,
+       1,
-       5.0
+       5
      ]
@jonhealy1
Copy link
Collaborator

@nick-j-roberts Hi. You may have opened this issue in the wrong repo? In your message it says: use --format to fix the issue and stac-validator doesn't have a format option? Maybe you are thinking of stac-node-validator?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants