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

Added JSON schema for v.1.1 #42

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anotherpit
Copy link

Having full spec as a text is cool, but having it as a JSON schema also gives you validation, autocomplete and auto documentation in modern IDEs.

Screen Shot 2022-10-16 at 00 18 47

Screen Shot 2022-10-16 at 00 19 05

Screen Shot 2022-10-16 at 00 24 03

Things to note:

  • Suggested JSON schema is permissive rather than restrictive: it only cares about known properties, and ignores unknown ones. Otherwise, some of the current examples in the repo would become invalid (e.g. diagonal-folded.fold contains unspecified vertices_edges property).
  • If you accept this PR, it's a good idea to publish the scheme, so that we can have a public URL (which should replace relative value of $scheme in the box-with-scheme.fold example), that people can use without downloading the schema from the repo.

@@ -0,0 +1,552 @@
{
"$id": "FOLD JSON Schema",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace with public URL once the schema is published

@@ -0,0 +1,295 @@
{
"$schema": "../dist/fold.1.1.schema.json",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace with public URL once the schema is published

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

Successfully merging this pull request may close these issues.

1 participant