Skip to content

json schema validation is fails on empty graph #53

Open

Description

@schaumb

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

Activity

  1. changed the title [-]json schema fails on empty graph[/-] [+]json schema validation is fails on empty graph[/+] on Mar 23, 2021
  2. wshayes commented on Mar 23, 2021

    @wshayes
    Member

    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?

  3. schaumb commented on Mar 23, 2021

    @schaumb
    Author

    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.

  4. wshayes commented on Mar 23, 2021

    @wshayes
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions