cytoscape / cytoscape.js

Graph theory (network) library for visualisation and analysis
https://js.cytoscape.org
MIT License
10.09k stars 1.64k forks source link

Machine readable schema for core cytoscape #2847

Closed AZaitzeff closed 3 years ago

AZaitzeff commented 3 years ago

Description of new feature

Machine readable schema for the json that core cytoscape uses for initialization.

Motivation for new feature

AZaitzeff commented 3 years ago

Though if anyone is looking for one, I have one partially typed up using JSON Schema draft 7.

maxkfranz commented 3 years ago

How would your spec be integrated into the npm package?

AZaitzeff commented 3 years ago

I was thinking of it being made available on the cytoscape.js website. It is a compact form of documentation. If you have a json for inputting into cytoscape then one could use a json validator to see if the json is valid.

AZaitzeff commented 3 years ago

For context, I am making UI to interface with a database (SQL, noSQL, Elasticnet) and then plot the network (as a option as a type of plot) in cytoscape.js see https://github.com/twosixlabs/escalation

maxkfranz commented 3 years ago

I was thinking of it being made available on the cytoscape.js website. It is a compact form of documentation. If you have a json for inputting into cytoscape then one could use a json validator to see if the json is valid.

Good idea. Could you put up your spec on Github somewhere? Then it could be linked in the extensions section in the docs. Maybe your readme could include links to JSON schema validation tools etc., since some people may not be familiar. Or eventually you could build it out to a fully-fledged extension that performs the validation.

AZaitzeff commented 3 years ago

For sure. Update forthcoming

AZaitzeff commented 3 years ago

@maxkfranz I put the spec at https://github.com/AZaitzeff/cytoscape_js_schema. The readme links to JSON schema website and tools for validators.

maxkfranz commented 3 years ago

Added to the list. Thanks