-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
Hi all! Thanks so much for open sourcing this tool.
I noticed that the linter fails when checking a file with a large integer (9223372036854776000), even if it's valid JSON. I ran into this when trying to bundle several files, one of which included the one that failed the linter. Here's the file in its entirety (you'll want to remove the // FAILS HERE
text, obviously):
{
"$id": "main.v1.Pricing.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"amount": {
"$ref": "google.type.Money.schema.json"
},
"count": {
"anyOf": [
{
"exclusiveMaximum": 9223372036854776000, // FAILS HERE
"minimum": -9223372036854775808,
"type": "integer"
},
{
"pattern": "^-?[0-9]+$",
"type": "string"
}
]
},
},
"title": "Pricing",
"type": "object"
}
Invocation:
$ jsonschema lint main.v1.Pricing.schema.json
error: Failed to parse the JSON document at line 12 and column 31
REDACTEDPATH/main.v1.Pricing.schema.json
Metadata
Metadata
Assignees
Labels
No labels