Skip to content

Commit

Permalink
#94 Make sure examples are valid YAML-LD
Browse files Browse the repository at this point in the history
  • Loading branch information
anatoly-scherbakov committed Aug 17, 2023
1 parent a82183a commit ef4a91c
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 62 deletions.
13 changes: 10 additions & 3 deletions spec/data/json-vs-yaml.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
"@context":
- https://json-ld.org/contexts/dollar-convenience.jsonld
- "@base": https://json-ld.github.io/
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfs: http://www.w3.org/2000/01/rdf-schema#
prov: http://www.w3.org/ns/prov#

$id: JSONOrYAMLFeature
$reverse:
$type:
rdf:type:
- rdfs:label: UTF-8
$type: Encoding
json:
Expand All @@ -27,7 +34,7 @@ $reverse:
prov:wasDerivedFrom: YAML#52-character-encodings

- rdfs:label: "<code>{}</code> object"
$type:
rdf:type:
$id: native-data-types
rdfs:label: Native data types
json:
Expand Down Expand Up @@ -85,7 +92,7 @@ $reverse:
prov:wasDerivedFrom: YAML#10211-null

- rdfs:label: Custom types
$type:
rdf:type:
$id: features
rdfs:label: Features
json: no
Expand Down
7 changes: 7 additions & 0 deletions spec/data/namespace-prefixes.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
"@context":
- https://json-ld.org/contexts/dollar-convenience.jsonld
- "@base": https://json-ld.github.io/
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#

$id: NamespacePrefix
$reverse:
rdf:type:
Expand All @@ -7,6 +12,8 @@ $reverse:
iri: "https://www.w3.org/ns/i18n#"
- prefix: rdf
iri: "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- prefix: rdfs
iri: "http://www.w3.org/2000/01/rdf-schema#"
- prefix: xsd
iri: "http://www.w3.org/2001/XMLSchema#"
- prefix: schema
Expand Down
116 changes: 57 additions & 59 deletions spec/data/spec.yaml
Original file line number Diff line number Diff line change
@@ -1,75 +1,73 @@
"@context":
"@base": https://json-ld.github.io/yaml-ld/spec/
rdfs: http://www.w3.org/2000/01/rdf-schema#
schema: https://schema.org/
- https://json-ld.org/contexts/dollar-convenience.jsonld
- "@base": https://json-ld.github.io/yaml-ld/spec/
rdfs: http://www.w3.org/2000/01/rdf-schema#
schema: https://schema.org/

$id: "@id"
$type: "@type"
rdfs:range:
"@type": "@id"

$id: https://json-ld.github.io/yaml-ld/spec/
schema:author:
- name: Vladimir Alexiev
$id: https://github.com/VladimirAlexiev
$type: Person
$included:
- $id: schema:author
rdfs:range: schema:Person

- name: Pierre-Antoine Champin
$id: https://github.com/pchampin
$type: schema:Person
- $id: https://json-ld.github.io/yaml-ld/spec/
schema:author:
- name: Vladimir Alexiev
$id: https://github.com/VladimirAlexiev

- name: Gregg Kellogg
$id: https://github.com/gkellogg
$type: schema:Person
- name: Pierre-Antoine Champin
$id: https://github.com/pchampin

- name: Roberto Polli
$id: https://github.com/ioggstream
$type: schema:Person
- name: Gregg Kellogg
$id: https://github.com/gkellogg

- name: Anatoly Scherbakov
country: am
$id: https://github.com/anatoly-scherbakov
$type: schema:Person
- name: Roberto Polli
$id: https://github.com/ioggstream

- name: Ted Thibodeau Jr
$id: https://github.com/TallTed
$type: schema:Person
- name: Anatoly Scherbakov
country: am
$id: https://github.com/anatoly-scherbakov

- name: Benjamin Young
$id: https://github.com/BigBlueHat
$type: schema:Person
- name: Ted Thibodeau Jr
$id: https://github.com/TallTed

license:
- name: Benjamin Young
$id: https://github.com/BigBlueHat

license:

schema:hasPart:
- rdfs:label: Introduction
schema:hasPart:
- rdfs:label: How to read this document
- rdfs:label: Terminology
- rdfs:label: Namespace prefixes
- rdfs:label: Conformance
- rdfs:label: Basic concepts
schema:hasPart:
- rdfs:label: JSON vs YAML comparison
- rdfs:label: Core requirements
$type: NormativeSection
schema:hasPart:
- rdfs:label: Encoding
- rdfs:label: Comments
- rdfs:label: Anchors and aliases
- rdfs:label: Streams
- rdfs:label: Introduction
schema:hasPart:
- rdfs:label: How to read this document
- rdfs:label: Terminology
- rdfs:label: Namespace prefixes
- rdfs:label: Conformance
- rdfs:label: Basic concepts
schema:hasPart:
- rdfs:label: JSON vs YAML comparison
- rdfs:label: Core requirements
$type: NormativeSection
schema:hasPart:
- rdfs:label: Encoding
- rdfs:label: Comments
- rdfs:label: Anchors and aliases
- rdfs:label: Streams

- rdfs:label: Security Considerations
- rdfs:label: Interoperability Considerations
- rdfs:label: Security Considerations
- rdfs:label: Interoperability Considerations

- rdfs:label: IANA Considerations
$type: NormativeSection
schema:hasPart:
- rdfs:label: application/ld+yaml
- rdfs:label: Fragment identifiers
- rdfs:label: Examples
- rdfs:label: IANA Considerations
$type: NormativeSection
schema:hasPart:
- rdfs:label: application/ld+yaml
- rdfs:label: Fragment identifiers
- rdfs:label: Examples

- rdfs:label: Best Practices
- rdfs:label: Why are comments treated as whitespace?
- rdfs:label: Streams
- rdfs:label: Best Practices
- rdfs:label: Why are comments treated as whitespace?
- rdfs:label: Streams

- rdfs:label: Extended YAML-LD Profile
- rdfs:label: References
- rdfs:label: Extended YAML-LD Profile
- rdfs:label: References

0 comments on commit ef4a91c

Please sign in to comment.