Last active
September 16, 2019 11:57
-
-
Save kibotu/c42603ecb1b4a5ac67675af38700a81a to your computer and use it in GitHub Desktop.
graph.json schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"definitions": {}, | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"$id": "http://example.com/root.json", | |
"type": "object", | |
"title": "The Root Schema", | |
"required": [ | |
"nodes", | |
"edges" | |
], | |
"properties": { | |
"nodes": { | |
"$id": "#/properties/nodes", | |
"type": "array", | |
"title": "The Nodes Schema", | |
"items": { | |
"$id": "#/properties/nodes/items", | |
"type": "object", | |
"title": "The Items Schema", | |
"required": [ | |
"id", | |
"lat", | |
"long" | |
], | |
"properties": { | |
"id": { | |
"$id": "#/properties/nodes/items/properties/id", | |
"type": "integer", | |
"title": "The Id Schema", | |
"default": 0, | |
"examples": [ | |
0 | |
] | |
}, | |
"lat": { | |
"$id": "#/properties/nodes/items/properties/lat", | |
"type": "number", | |
"title": "The Lat Schema", | |
"default": 0.0, | |
"examples": [ | |
48.269178 | |
] | |
}, | |
"long": { | |
"$id": "#/properties/nodes/items/properties/long", | |
"type": "number", | |
"title": "The Long Schema", | |
"default": 0.0, | |
"examples": [ | |
7.722403 | |
] | |
} | |
} | |
} | |
}, | |
"edges": { | |
"$id": "#/properties/edges", | |
"type": "array", | |
"title": "The Edges Schema", | |
"items": { | |
"$id": "#/properties/edges/items", | |
"type": "object", | |
"title": "The Items Schema", | |
"required": [ | |
"from", | |
"to", | |
"weight" | |
], | |
"properties": { | |
"from": { | |
"$id": "#/properties/edges/items/properties/from", | |
"type": "integer", | |
"title": "The From Schema", | |
"default": 0, | |
"examples": [ | |
1 | |
] | |
}, | |
"to": { | |
"$id": "#/properties/edges/items/properties/to", | |
"type": "integer", | |
"title": "The To Schema", | |
"default": 0, | |
"examples": [ | |
2 | |
] | |
}, | |
"weight": { | |
"$id": "#/properties/edges/items/properties/weight", | |
"type": "number", | |
"title": "The Weight Schema", | |
"default": 0.0, | |
"examples": [ | |
43.81 | |
] | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment