Skip to content

RFP: Allow additional properties at top-level #49

Open
@wshayes

Description

@wshayes

I'd like to propose allowing additional properties by changing additionalProperties seen below to true. The purpose is to allow top-level attributes for simpler round-tripping into databases. Keeping the graph attribute tightly controlled makes a lot of sense for interoperability but allowing other top-level attributes to support easier record mgmt would make life easier for me and hopefully others when working with JGF in specific applications.

Expectation is that these additional properties would be completely ignorable when reading the JGF file in a different application - e.g. graph specific metadata should still be in graph.metadata object, application specific metadata would be the additional top-level attributes.

This would be a semantic versioning MINOR change.

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "http://jsongraphformat.info/v2.0/json-graph-schema.json",
  "title": "JSON Graph Schema",
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "graph": {
          "$ref": "#/definitions/graph"
        }
      },
      "additionalProperties": false,
      "required": [
        "graph"
      ]
    },
    {
      "type": "object",
      "properties": {
        "graphs": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/graph"
          }
        }
      },
      "additionalProperties": false
    }
  ],
...

Metadata

Metadata

Assignees

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