Skip to content

Commit 8333294

Browse files
committed
Add JSON-LD changes
Corrected the examples to reflect the current json ld schema idea and added a section about the public shared namespace to the specification. Signed-off-by: Adolfo García Veytia (Puerco) <[email protected]>
1 parent 2876c34 commit 8333294

File tree

1 file changed

+63
-10
lines changed

1 file changed

+63
-10
lines changed

OPENVEX-SPEC.md

Lines changed: 63 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ Here is a sample of a minimal OpenVEX document:
137137

138138
```json
139139
{
140-
"@context": "https://openvex.dev/schema-ld.json",
141-
"@id": "VEX-9fb3463de1b57",
140+
"@context": "https://openvex.dev/ns",
141+
"@id": "https://openvex.dev/docs/example/vex-9fb3463de1b57",
142142
"author": "Wolfi J Inkinson",
143143
"role": "Document Creator",
144144
"timestamp": "2023-01-08T18:02:03.647787998-06:00",
@@ -163,7 +163,8 @@ The following table lists the fields in the document struct
163163

164164
| Field | Required | Description |
165165
| --- | --- | --- |
166-
| @id || id is the identifying string for the VEX document. This should be unique per document. |
166+
| @context || The URL linking to the OpenVEX context definition. Fixed to `https://openvex.dev/ns`. |
167+
| @id || The IRI identifying the VEX document. |
167168
| author || Author is the identifier for the author of the VEX statement. Ideally, a common name, may be a URI. `author` can be an individual or organization. The author identity SHOULD be cryptographically associated with the signature of the VEX statement or document or transport. |
168169
| role || role describes the role of the document author. |
169170
| timestamp || Timestamp defines the time at which the document was issued. |
@@ -337,9 +338,9 @@ example, the sole statement has its timestamp data derived from the document:
337338

338339
```json
339340
{
340-
"@context": "https://openvex.dev/schema-ld.json",
341-
"@id": "VEX-9fb3463de1b57",
342-
"author": "Unknown Author",
341+
"@context": "https://openvex.dev/ns",
342+
"@id": "https://openvex.dev/docs/example/vex-9fb3463de1b57",
343+
"author": "Wolfi J Inkinson",
343344
"role": "Document Creator",
344345
"timestamp": "2023-01-08T18:02:03-06:00",
345346
"version": "1",
@@ -362,9 +363,9 @@ to avoid duplication:
362363

363364
```json
364365
{
365-
"@context": "https://openvex.dev/schema-ld.json",
366-
"@id": "VEX-6ea13336fa2ffb7",
367-
"author": "Unknown Author",
366+
"@context": "https://openvex.dev/ns",
367+
"@id": "https://openvex.dev/docs/example/vex-84822c4e5028c",
368+
"author": "Wolfi J Inkinson",
368369
"role": "Document Creator",
369370
"timestamp": "2023-01-09T09:08:42-06:00",
370371
"version": "1",
@@ -388,12 +389,64 @@ to avoid duplication:
388389
}
389390
```
390391

392+
## OpenVEX and JSON-LD
393+
394+
OpenVEX documents express data that is by nature interlinked. Documents and are
395+
designed to be understood by [JSON-LD](https://www.w3.org/TR/json-ld11/) parsers,
396+
this lets them reference resources expressed in other json-ld formats such as
397+
[SPDX 3](https://github.com/spdx/spdx-3-model).
398+
399+
### VEX Extensions
400+
401+
To make VEX documents JSON-LD compatible, OpenVEX extends the VEX minimum
402+
requirements in the the following two ways:
403+
404+
1. OpenVEX extends the document identifier required by VEX to make the strings
405+
compatible with the Internationalized Resource Identifier (IRI) specification
406+
(see [RFC3987](https://www.rfc-editor.org/rfc/rfc3987)).
407+
408+
2. Addition of the `@context` field at the document level. The additional field is
409+
not required by VEX but it is added to make the documents parseable by json-ld
410+
processors.
411+
412+
### Public IRI Namespaces
413+
414+
As all documents are required to be identified by an IRI, open vex defines a
415+
public namespace that can be used by documents. Users of OpenVEX MAY choose to
416+
use the shared namespace.
417+
418+
The shared namespace is defined under the openvex.dev domain name:
419+
420+
` https://openvex.dev/docs/[name] `
421+
422+
Users can start issuing IRIs for their documents by appending a IRI valid string
423+
to the shared namespace:
424+
425+
` https://openvex.dev/docs/[myproject] `
426+
427+
There are two reserved shared namespaces with special meanings:
428+
429+
- `public` this is a public shared name where anybody that needs a valid IRI can
430+
issue identifiers. Only recommended for demos or experiments where name collisions
431+
don't matter.
432+
- `example` a namespace for documentation, demos or other uses where no systems
433+
are expected to run.
434+
435+
Please note that initially, OpenVEX does not provide a registry of namespaces or
436+
hosting or redirection of IRIs.
437+
438+
For more information check the OpenVEX [JSON-LD](JSON-LD.md) document and the
439+
W3C's [JSON-LD reommendation](https://www.w3.org/TR/json-ld11/).
440+
441+
442+
391443
## Revisions
392444

393445
| Date | Revision |
394446
| --- | --- |
395447
| 2023-01-08 | First Draft of the OpenVEX Specification |
396-
| 2023-01-16 | Updated to reflect @luhring's review |
448+
| 2023-01-16 | Updated specx draft to reflect initial review |
449+
| 2023-01-16 | Added JSON-LD and namespace section |
397450

398451

399452
## Sources

0 commit comments

Comments
 (0)