Skip to content

Potential JSON Schema issues #129

@m-mohr

Description

@m-mohr

Some potential improvements and/or issues in the JSON Schema:

  • $defs keyword in the schema was only added in draft 2019-09 (see also Update JSON Schema version? #127 )
  • additionalProperties: true is the default and could be removed
  • "patternProperties": with a pattern ".*" is basically equivalent to additionalProperties and thus can be simplified a bit.
  • "enum": ["WKB"] is equivalent to "const": "WKB", the same applies to "enum": ["counterclockwise"]
  • PROJJSON has a new schema version, 0.5
  • The bbox schema looks weird. Are more than 4 values allowed? Right now it would allow [0,1,2,3,"asdsad"]. Could probably also be simplified using min/maxItems... I think you were looking for something like "items": {"type": "number"}, "minItems": 4
  • By the way, the spec says double for epoch, but this is not enforced in the schema and could be an int (or should this be "number" in the spec?)
  • I understand the spec that you can either specify an array of geometry types or a single geometry type as string or Unknown (so always as a string, not in an array). If this is the case, the schema doesn't check it. ["Polygon", "Unknown"] is valid.
  • The Z suffix to the geometry types is not part of the JSON Schema it seems

Happy to work on PRs, just let me know whether all this is correctly captured.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions