-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add CLI package for parsing schema files #1286
base: main
Are you sure you want to change the base?
Conversation
this is an experiment in defining atjson schemas (specifically annotation definitions) as data instead of as code. by doing so, we can provide some benefits like allowing for clients to download sources and be able to hydrate documents using the atjson libraries without having to install lots of code.
cc @blaine I'm interested in hearing some feedback on what sorts of things may be important for this. No worries if you're busy with some other stuff 😄 |
A small sample schema may look like: name: rosetta
version: 0.1.0
description: A Rosetta Stone set of annotations used to interoperate between many formats
schema:
bold:
type: mark
description: Emphasizes marked text with a heavier weight font
link:
type: mark
description: Links marked text with a URL
data:
url:
type: string
required: true
paragraph:
type: block
description: A paragraph of text
data:
decorations:
type: enum[]
values: [dropCap, leadIn]
small-caps:
type: mark |
@@ -46,10 +47,11 @@ | |||
"react": "17.0.2", | |||
"react-dom": "17.0.2", | |||
"ts-loader": "9.2.8", | |||
"typescript": "4.6.2", | |||
"typescript": "^4.8.0-dev.20220628", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this....right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops lol
This is an experiment in defining atjson schemas (specifically annotation definitions) as data
instead of as code.
By doing so, we can provide some benefits like allowing for clients to download sources and be able to hydrate documents using the atjson libraries without having to install lots of code.
nb. I'll be providing some concrete examples of why this is a nice thing to have alongside some sample schema definitions. A possible end result of this is a registry of schemas that can be fetched (that is probably overkill though, a simpler solution would probably be better 😄)