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

Generate JSON Schema using shacl2code #893

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

JPEWdev
Copy link
Contributor

@JPEWdev JPEWdev commented Mar 26, 2024

Generates the JSON schema for validating JSON-LD documents using shacl2code

@JPEWdev
Copy link
Contributor Author

JPEWdev commented Mar 26, 2024

@licquia Here is the actions to generate the JSON schema. Note that the schema is still incorrect until the model & spec parser are fixed

Copy link
Member

@goneall goneall left a comment

Choose a reason for hiding this comment

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

Thanks @JPEWdev - This will be quite helpful for validation

@goneall goneall requested review from zvr and maxhbr April 2, 2024 15:40
.github/workflows/publish_v3.yml Outdated Show resolved Hide resolved
shacl2code-annotations.ttl Outdated Show resolved Hide resolved
.github/workflows/publish_v3.yml Outdated Show resolved Hide resolved
.github/workflows/publish_v3.yml Outdated Show resolved Hide resolved
@JPEWdev JPEWdev force-pushed the development/v3.0 branch 3 times, most recently from 4627e23 to 2481958 Compare April 2, 2024 20:20
Generates the JSON schema for validating JSON-LD documents using
`shacl2code`

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Copy link
Member

@maxhbr maxhbr left a comment

Choose a reason for hiding this comment

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

One question, but looks fine

shacl2code generate \
--input spdx-spec/docs/model/ontology.rdf.ttl \
--input spdx-spec/docs/model/jsonld-annotations.ttl \
--context-url spdx-spec/docs/model/context.jsonld https://spdx.org/rdf/3.0.0/spdx-context.jsonld \
Copy link
Member

Choose a reason for hiding this comment

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

I am confused? why is there an argument before the url?

Suggested change
--context-url spdx-spec/docs/model/context.jsonld https://spdx.org/rdf/3.0.0/spdx-context.jsonld \
--context-url https://spdx.org/rdf/3.0.0/spdx-context.jsonld \

Maybe I am just not aware of the API of your tool

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The tool lets you either specify a URL (with --context) or a local file and URL (with --context-url) in which case the data is read from the local file, but the URL is used in the bindings. The later is useful to generate bindings before the URL is published

@goneall
Copy link
Member

goneall commented Apr 3, 2024

@licquia @JPEWdev - Is this ready to be merged?

@goneall goneall merged commit 8f171e5 into spdx:development/v3.0 Apr 3, 2024
2 checks passed
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.

None yet

4 participants