Skip to content

Commit db17ab5

Browse files
committed
Add getting started annex
Adds an Annex that walks through writing a JSON-LD SPDX document line by line Signed-off-by: Joshua Watt <[email protected]>
1 parent e0c6266 commit db17ab5

File tree

3 files changed

+759
-1
lines changed

3 files changed

+759
-1
lines changed

.github/workflows/validate_examples.yml

+19-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
10-
- name: Install dependencies
10+
- name: Install python dependencies
1111
run: |
1212
python3 -m pip install pyshacl==0.25.0 check-jsonschema==0.28.1
13+
- name: Install dependencies
14+
run: |
15+
sudo apt install -y gawk
1316
- name: Check files
1417
run: |
1518
set -e
@@ -27,3 +30,18 @@ jobs:
2730
$f
2831
done
2932
33+
- name: Check documentation examples
34+
run: |
35+
for f in $(grep -l '```json' docs/annexes/*.md); do
36+
echo "Checking $f"
37+
cat $f | awk '/^```json/, $0=="```" {if ($0 !~ /^```.*/ ) print}' > temp.json
38+
check-jsonschema \
39+
-v \
40+
--schemafile https://spdx.org/schema/3.0.0/spdx-json-schema.json \
41+
temp.json
42+
43+
pyshacl \
44+
-s https://spdx.org/rdf/3.0.0/spdx-model.ttl \
45+
-e https://spdx.org/rdf/3.0.0/spdx-model.ttl \
46+
temp.json
47+
done

0 commit comments

Comments
 (0)