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

Validate documentation #938

Open
wants to merge 4 commits into
base: development/v3.0.1
Choose a base branch
from

Conversation

JPEWdev
Copy link
Contributor

@JPEWdev JPEWdev commented Apr 23, 2024

Validates security documentation

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.

Changes LGTM and it does pass the CI with the additional checking.

@goneall goneall added this to the 3.0.1 milestone Apr 30, 2024
@JPEWdev JPEWdev force-pushed the development/v3.0.1 branch 2 times, most recently from f8cb472 to 3615a65 Compare May 8, 2024 23:43
Markdown file, use the following command:

```shell
cat getting-started.md | awk 'BEGIN{flag=0} /^```json/, $0=="```" { if (/^---$/){flag++} else if ($0 !~ /^```.*/ ) print $0 > "doc-" flag ".spdx.json"}'
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
cat getting-started.md | awk 'BEGIN{flag=0} /^```json/, $0=="```" { if (/^---$/){flag++} else if ($0 !~ /^```.*/ ) print $0 > "doc-" flag ".spdx.json"}'
cat cross-reference.md | awk 'BEGIN{flag=0} /^```json/, $0=="```" { if (/^---$/){flag++} else if ($0 !~ /^```.*/ ) print $0 > "doc-" flag ".spdx.json"}'

@maxhbr
Copy link
Member

maxhbr commented May 9, 2024

I just added the functionality to load multiple documents to my tool https://github.com/maxhbr/spdx3ToGraph and this generates the following for the cross-reference.md example:

doc-0 spdx json

@JPEWdev
Copy link
Contributor Author

JPEWdev commented May 9, 2024

I just added the functionality to load multiple documents to my tool https://github.com/maxhbr/spdx3ToGraph and this generates the following for the cross-reference.md example:

doc-0 spdx json

Very cool!

@JPEWdev JPEWdev force-pushed the development/v3.0.1 branch 2 times, most recently from bceef54 to c5354db Compare May 9, 2024 14:18
@JPEWdev
Copy link
Contributor Author

JPEWdev commented May 9, 2024

I just added the functionality to load multiple documents to my tool https://github.com/maxhbr/spdx3ToGraph and this generates the following for the cross-reference.md example:

doc-0 spdx json

This made me realize I forgot the serializedInArtifact relationship, so I added that

@maxhbr
Copy link
Member

maxhbr commented May 9, 2024

update:

doc-0 spdx json

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Updates the security information Annex to conform to the SPDX 3.0 schema
and model. In addition, the CI workflow is updated to use a standalone
script to do the validation (making it easier to validate locally). When
validation documentation files, the script will now detect if the
documentation is a complete document or just fragements of a document.
In the latter case, a wrapper is made around the JSON from the
documentation to make it a valid document for validation (e.g.
"@context", "@graph", and a CreationInfo).

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Adds a markdown document with examples that explains how to refer to
elements across documents

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
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.

Very nice explanation - Thanks @JPEWdev

Copy link
Contributor

@kestewart kestewart left a comment

Choose a reason for hiding this comment

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

Thanks for adding this in Joshua!

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