Skip to content

Format of JSON files in validation folder #66

@labra

Description

@labra

I think the format of the JSON files in the validation folder is not updated to the new JSON structure which was using "shapeDecl".

For example, the file nPlus1.json has this structure:

{
  "@context": "http://www.w3.org/ns/shex.jsonld",
  "type": "Schema",
  "shapes": [
    {
      "id": "http://a.example.org/S",
      "type": "Shape",
      "expression": {
        "type": "EachOf",
        "expressions": [
          {
            "type": "TripleConstraint",
            "predicate": "http://a.example/a",
            "min": 0,
            "max": -1
          },
          {
            "type": "OneOf",
            "expressions": [
              {
                "type": "TripleConstraint",
                "predicate": "http://a.example/a",
                "min": 1,
                "max": -1
              },
              {
                "type": "TripleConstraint",
                "predicate": "http://a.example/a"
              }
            ]
          },
          {
            "type": "TripleConstraint",
            "predicate": "http://a.example/a"
          }
        ]
      }
    }
  ]
}

but I think it should be:

{
  "@context": "http://www.w3.org/ns/shex.jsonld",
  "type": "Schema",
  "shapes": [
    {
      "type": "ShapeDecl",
      "id": "http://a.example.org/S",
      "abstract": false,
      "shapeExpr": {
        "type": "Shape",
        "expression": {
          "type": "EachOf",
          "expressions": [
            {
              "type": "TripleConstraint",
              "predicate": "http://a.example/a",
              "min": 0,
              "max": -1
            },
            {
              "type": "OneOf",
              "expressions": [
                {
                  "type": "TripleConstraint",
                  "predicate": "http://a.example/a",
                  "min": 1,
                  "max": -1
                },
                {
                  "type": "TripleConstraint",
                  "predicate": "http://a.example/a"
                }
              ]
            },
            {
              "type": "TripleConstraint",
              "predicate": "http://a.example/a"
            }
          ]
        }
      }
    }
  ],
}

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