jsongraph/json-graph-specification

json schema validation is fails on empty graph

schaumb opened this issue · 3 comments

Json schema fails on empty graph.

The python testcase is missing. The https://www.jsonschemavalidator.net/ and the python validator are shows the error.

image

Not sure I'm following - it should fail on an empty graph object as there are required properties in the graph object.

Are you saying it should not fail? or that we have a test that is passing that should fail?

Schema:
https://github.com/jsongraph/json-graph-specification/blob/ce5ed4007c61df23dd0835094a7b69364ab445d9/json-graph-schema_v2.json

Graph:

Examples

Additional examples
empty single graph

{
  "graph": {}
}

The documentation says this is the empty graph representation.
The schema is failing on this graph, because oneOf matches on multiple subschema (see: img).

This empty graph is not tested in the test directory.