Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
simantvermasap committed May 15, 2024
2 parents aa144c2 + 33c1a2f commit 56d161d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/validate-shapes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,17 @@ jobs:
if [[ "$_base_filename" =~ _initial$ ]]; then
_base_filename=${_base_filename%_initial} # Remove "_initial" suffix
fi
shape_file="$folder/shape/${_base_filename}-shape.ttl"
# Use dcat-shapes.ttl for catalog.json
if [[ "$json_file" == "catalog/message/example/catalog.json" ]]; then
shape_file="catalog/message/shape/dcat-shapes.ttl"
# Use contract-agreement-message-shape.ttl for specific file
elif [[ "$json_file" == "negotiation/message/example/contract.agreement.message.http.transfer.json" ]]; then
shape_file="negotiation/message/shape/contract-agreement-message-shape.ttl"
else
shape_file="$folder/shape/${_base_filename}-shape.ttl"
fi
if [[ -f "$shape_file" ]]; then
echo "Validating $json_file against $shape_file"
pyshacl -df json-ld -sf turtle -s $shape_file $json_file
Expand Down

0 comments on commit 56d161d

Please sign in to comment.