Skip to content

Commit

Permalink
Update URLs in serialization docs to 3.0.1 (#849)
Browse files Browse the repository at this point in the history
Signed-off-by: Arthit Suriyawongkul <[email protected]>
  • Loading branch information
bact authored Sep 10, 2024
1 parent 80d18d9 commit 5254f46
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 17 deletions.
12 changes: 6 additions & 6 deletions serialization/jsonld/validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Unfortunately, `ajv` does not allow referencing a schema from a URL, so it must
first be downloaded locally in order to do validation:

```shell
wget -O spdx-3-schema.json https://spdx.org/schema/3.0.0/spdx-json-schema.json
wget -O spdx-3-schema.json https://spdx.org/schema/3.0.1/spdx-json-schema.json
```

Validation of a document can now be done with the command:
Expand Down Expand Up @@ -67,7 +67,7 @@ python3 -m pip install --user check-jsonschema
no need to download it first. To validate a document, run the command:

```shell
check-jsonschema -v --schemafile https://spdx.org/schema/3.0.0/spdx-json-schema.json <DOCUMENT>
check-jsonschema -v --schemafile https://spdx.org/schema/3.0.1/spdx-json-schema.json <DOCUMENT>
```

## Validating the semantics against the SHACL model
Expand Down Expand Up @@ -96,8 +96,8 @@ means a document can be validated using the command:

```shell:
pyshacl \
--shacl https://spdx.org/rdf/3.0.0/spdx-model.ttl \
--ont-graph https://spdx.org/rdf/3.0.0/spdx-model.ttl \
--shacl https://spdx.org/rdf/3.0.1/spdx-model.ttl \
--ont-graph https://spdx.org/rdf/3.0.1/spdx-model.ttl \
<DOCUMENT>
```

Expand All @@ -122,7 +122,7 @@ by navigating to `Settings` > `Extensions` and activate the
![Visual Studio Code settings for JSON validation](./validation-vscode.png "A screenshot of Visual Studio Code settings for JSON validation")

Next, edit your `settings.json` file and add the SPDX JSON Schema
(`https://spdx.org/schema/3.0.0/spdx-json-schema.json`)
(`https://spdx.org/schema/3.0.1/spdx-json-schema.json`)
to the `json.schemas` array.

```json
Expand All @@ -131,7 +131,7 @@ to the `json.schemas` array.
"fileMatch": [
"*.spdx3.json"
],
"url": "https://spdx.org/schema/3.0.0/spdx-json-schema.json"
"url": "https://spdx.org/schema/3.0.1/spdx-json-schema.json"
}
]
```
Expand Down
33 changes: 22 additions & 11 deletions serialization/rdf.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,39 @@
# RDF serialization

SPDX data can be serialized in RDF. This can be saved in a variety of formats, like XML, JSON-LD, Turtle, etc.
SPDX data can be serialized in RDF.
This can be saved in a variety of formats, like XML, JSON-LD, Turtle, etc.

1. The namespace for SPDX v3 is `https://spdx.org/rdf/3.0.0/terms`
1. The namespace for SPDX v3.0.1 is
`https://spdx.org/rdf/3.0.1/terms`

1. IRIs for a namespace/profile are of the form: `https://spdx.org/rdf/3.0.0/terms/{Namespacename}`
1. IRIs for a namespace/profile are of the form:
`https://spdx.org/rdf/3.0.1/terms/{Namespacename}`

1. IRIs for a class are of the form: `https://spdx.org/rdf/3.0.0/terms/{Namespacename}/{Classname}`
1. IRIs for a class are of the form:
`https://spdx.org/rdf/3.0.1/terms/{Namespacename}/{Classname}`

1. IRIs for a property are of the form: `https://spdx.org/rdf/3.0.0/terms/{Namespacename}/{Propertyname}`
1. IRIs for a property are of the form:
`https://spdx.org/rdf/3.0.1/terms/{Namespacename}/{Propertyname}`

1. IRIs for a vocabulary (an enumerated value list) are of the form: `https://spdx.org/rdf/3.0.0/terms/{Namespacename}/{Vocabularyname}`
1. IRIs for a vocabulary (an enumerated value list) are of the form:
`https://spdx.org/rdf/3.0.1/terms/{Namespacename}/{Vocabularyname}`

1. IRIs for an enumerated value are of the form: `https://spdx.org/rdf/3.0.0/terms/{Namespacename}/{Vocabularyname}/{Entryname}`
1. IRIs for an enumerated value are of the form:
`https://spdx.org/rdf/3.0.1/terms/{Namespacename}/{Vocabularyname}/{Entryname}`

1. IRIs for an individual value list are of the form: `https://spdx.org/rdf/3.0.0/terms/{Namespacename}/{Individualname}`
1. IRIs for an individual value list are of the form:
`https://spdx.org/rdf/3.0.1/terms/{Namespacename}/{Individualname}`

Please note that entries appearing in the
[SPDX License List](https://spdx.org/licenses/) are not under this namespace!

## Resources

1. The ontology is available at: <https://spdx.org/rdf/3.0.0/spdx-model.ttl>
1. The ontology is available at:
<https://spdx.org/rdf/3.0.1/spdx-model.ttl>

1. The JSON-LD context definition is available at: <https://spdx.org/rdf/3.0.0/spdx-context.jsonld>
1. The JSON-LD context definition is available at:
<https://spdx.org/rdf/3.0.1/spdx-context.jsonld>

1. The JSON schema is available at: <https://spdx.org/schema/3.0.0/spdx-json-schema.json>
1. The JSON schema is available at:
<https://spdx.org/schema/3.0.1/spdx-json-schema.json>

0 comments on commit 5254f46

Please sign in to comment.