-
Notifications
You must be signed in to change notification settings - Fork 9
Add schema file gen to README #24
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
base: main
Are you sure you want to change the base?
Conversation
Add the syntax for generating the schema file to the README.md file.
|
This time I tested the command line. @JPEWdev Feel free to replace this with a better description, just thought it would be helpful to document this special case since it took me some digging to figure it out. |
|
|
||
| `shacl2code` can generate a JSON schema with the following command: | ||
| ```shell | ||
| shacl2code generate -i spdx-model.json-ld -u spdx-context.jsonld https://spdx.org/rdf/3.0.1/spdx-context.jsonld jsonschema -o json-schema-3.0.1.json |
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.
Add -i annotations-file
044f11f to
5fadc0d
Compare
|
Since shacl2code can be used in non-SPDX context, we may like to have the documentation be more generic, what about: Generating a JSON Schema File
shacl2code generate -i <input_model> -x <context_url> jsonschema -o <output_schema>Note that shacl2code generate -i <input_model> -u <context_file> <context_url> jsonschema -o <output_schema>For instance, to generate the SPDX 3.0.1 JSON schema, you would use: shacl2code generate \
-i spdx-model.ttl \
-i annotations.ttl \
-u spdx-context.jsonld https://spdx.org/rdf/3.0.1/spdx-context.jsonld \
jsonschema \
-o schema.jsonNote that the context file ( For a complete list of available options, run This will make the doc more generic and at the same time retain the example that is useful for SPDX users. The above text is based on @goneall text in this PR and from @JPEWdev comment here #22 (comment) |
Add the syntax for generating the schema file to the README.md file.
Closes #22