From 9bc4947409d726ca444a1bde17e59e05fff83639 Mon Sep 17 00:00:00 2001 From: Gary O'Neall Date: Thu, 29 Aug 2024 14:39:01 -0700 Subject: [PATCH 1/2] Add schema file gen to README Add the syntax for generating the schema file to the README.md file. --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 572a9afc..40176ed0 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,15 @@ The available language bindings can be viewed by running: shacl2code list ``` +### Generating the JSON Schema file + +`shacl2code` can generate a JSON schema with the following command: +```shell +shacl2code generate -i model.jsonld jsonschema -u context.json -o json-schema.json +``` + +Note that the context.json file should match the model described in the model.jsonld file. + ## Developing Developing on `shacl2code` is best done using a virtual environment. You can From 4b46e8516d5a22f463adfd90c663c64aa534ac12 Mon Sep 17 00:00:00 2001 From: Gary O'Neall Date: Fri, 30 Aug 2024 11:02:44 -0700 Subject: [PATCH 2/2] Correct syntax for generating the JSON Schema file --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 40176ed0..b27d331c 100644 --- a/README.md +++ b/README.md @@ -40,10 +40,10 @@ shacl2code list `shacl2code` can generate a JSON schema with the following command: ```shell -shacl2code generate -i model.jsonld jsonschema -u context.json -o json-schema.json +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 ``` -Note that the context.json file should match the model described in the model.jsonld file. +Note that the spdx-context.jsonld file should match the model described in the spdx-model.json-ld file. ## Developing