Skip to content

Commit

Permalink
Add sub-schemas (#432)
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasNx committed Dec 21, 2020
1 parent e1ffa85 commit 740cad7
Show file tree
Hide file tree
Showing 12 changed files with 100 additions and 2 deletions.
8 changes: 8 additions & 0 deletions schemas/account.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$id": "account.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Account pages",
"description": "Accounts of the person",
"type": "string",
"format": "url"
}
8 changes: 8 additions & 0 deletions schemas/affiliate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$id": "affiliate.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Affiliation",
"description": "Affiliated school or organisation e.g. as stutent or lecturer.",
"type": "string",
"format": "uri"
}
8 changes: 8 additions & 0 deletions schemas/alumni.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$id": "alumni.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Alumni-Organisations",
"description": "Organisation that the person is alumni of.",
"type": "string",
"format": "uri"
}
8 changes: 8 additions & 0 deletions schemas/blog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$id": "blog.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Blog",
"description": "The blog of the person",
"type": "string",
"format": "uri"
}
11 changes: 11 additions & 0 deletions schemas/email.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$id": "email",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "E-Mail",
"description": "Email of the user",
"type": "string",
"format": "email",
"_display": {
"placeholder": "The Email of the Person"
}
}
11 changes: 11 additions & 0 deletions schemas/id.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$id": "id.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "URL",
"description": "The URL/URI of the resource",
"type": "string",
"format": "uri",
"_display": {
"placeholder": "The URL of the resource"
}
}
10 changes: 10 additions & 0 deletions schemas/image.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$id": "image.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Image",
"type": "string",
"format": "uri",
"_display": {
"placeholder": "A link to an image of the person"
}
}
7 changes: 7 additions & 0 deletions schemas/name.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$id": "name.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Name",
"description": "The name of the person",
"type": "string"
}
8 changes: 6 additions & 2 deletions schemas/person.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
"$ref": "id.json"
},
"type" : {
"$ref": "type.json"
"type": "string",
"const": "Person"
},
"email" : {
"$ref": "email.json"
},
"alternateName" : {
"$ref": "alternateName.json"
"$ref": "name.json"
},
"name" : {
"$ref": "name.json"
Expand All @@ -40,6 +41,9 @@
"colleague" : {
"$ref": "colleague.json"
},
"affiliate" : {
"$ref": "affiliate.json"
},
"alumniOf": {
"$ref": "alumniOf.json"
},
Expand Down
8 changes: 8 additions & 0 deletions schemas/sameAs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$id": "sameAs.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Other refrence pages",
"description": "Other refrence pages of the person",
"type": "string",
"format": "url"
}
7 changes: 7 additions & 0 deletions schemas/telephone.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$id": "telephone.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Telephone",
"description": "The telephone number of the person",
"type": "string"
}
8 changes: 8 additions & 0 deletions schemas/worksFor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$id": "worksFor.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Company",
"description": "The company that the person works for. Should use lobid organisation-URI.",
"type": "string",
"format": "uri"
}

0 comments on commit 740cad7

Please sign in to comment.