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

add CreationInfo to all Elements in json-ld examples #414

Merged
merged 2 commits into from
Jul 28, 2023

Conversation

armintaenzertng
Copy link
Contributor

CreationInfo has been made mandatory again in #401, so the examples have to be updated.

This uses the de-duplication method of extracting the CreationInfo as a blank node.

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 @armintaenzertng - I like the approach of using the blank node.

@goneall goneall added this to the 3.0-rc2 milestone Jul 12, 2023
{
"type": "Tool",
"spdxId": "spdx-example:SPDXRef-Actor-LicenseFind-1.0",
"name": "LicenseFind-1.0"
"name": "LicenseFind-1.0",
"creationInfo": {"@id": "_:creationInfo1"}
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason, why you do not use this shorthand?

Suggested change
"creationInfo": {"@id": "_:creationInfo1"}
"creationInfo": "_:creationInfo1"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the nudge, I realized that we have to change the context to have "@type": "@id" for creationInfo in order for this to work.

CreationInfo has been made mandatory again in spdx#401, so the examples have to be updated.

Signed-off-by: Armin Tänzer <[email protected]>
@armintaenzertng
Copy link
Contributor Author

I replaced all occurrences of {"@id": "_:creationInfo1"} with "_:creationInfo1". In order for this to work, the context has to be adapted; I already fixed the context generation in spdx/spec-parser#58.

I also noticed that all DateTime were missing the "Z" at the end and added those.

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.

LGTM

@goneall goneall merged commit 79abdab into spdx:main Jul 28, 2023
1 check 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.

3 participants