Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spec: Add an optional $schema property at top level #18

Open
dolmen opened this issue Mar 14, 2024 · 3 comments
Open

spec: Add an optional $schema property at top level #18

dolmen opened this issue Mar 14, 2024 · 3 comments

Comments

@dolmen
Copy link

dolmen commented Mar 14, 2024

At top level, add a $schema property to allow to refer to a JSON Schema.

@nichtich
Copy link

This only makes sense if there can be multiple schemas and schema locations, depending on extensions, application profiles etc.

@dolmen
Copy link
Author

dolmen commented Mar 24, 2024

This also helps to document that a JSON Schema exists to validate the document. A text editor might use that to automatically enable linting.

@abitwired
Copy link

I think it makes sense to define a $schema for the node objects. Most applications will want more complexity than a single text attribute on a node. Nodes often represent services or lambdas. Applications using the node API should be allowed to shove their own metadata inside the node for the data relevant to their application's purposes.

e.g., an application which uses the infinite canvas to manage an ETL process. Such an application would need more than a text node. They would likely need additional attributes for each node to help define each ETL process. With the existing API, there is no way to include those additional attributes.

The $schema attribute should not be required for import/export of .canvas files since that would hurt interoperability between projects. They should still be able to load the graph relationship of the nodes/edges without necessarily needing to understand the custom $schema used by a different application.

Is what I described within the scope of your suggestion @dolmen ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants