working on JSON-LD validity, added CORS headers preparing external API

call support
This commit is contained in:
El RIDO
2015-10-18 14:37:58 +02:00
parent 22d0b1ec22
commit 14d08ec56d
10 changed files with 123 additions and 35 deletions

View File

@@ -1,17 +1,16 @@
{
"@context": {
"status": "http://schema.org/Integer",
"id": "http://schema.org/name",
"parentid": "http://schema.org/name",
"so": "http://schema.org/",
"status": "so:Integer",
"id": "so:name",
"parentid": "so:name",
"url: {
"@id": "http://schema.org/url",
"@id": "so:url",
"@type": "@id"
},
"data": "http://schema.org/Text",
"data": "so:Text",
"meta": {
"postdate": "http://schema.org/Integer",
"nickname": "http://schema.org/Text",
"vizhash": "http://schema.org/Text"
"@id": "?jsonld=commentmeta"
}
}
}

8
js/commentmeta.jsonld Normal file
View File

@@ -0,0 +1,8 @@
{
"@context": {
"so": "http://schema.org/",
"postdate": "so:Integer",
"nickname": "so:Text",
"vizhash": "so:Text"
}
}

View File

@@ -1,28 +1,24 @@
{
"@context": {
"status": http://schema.org/Integer",
"id": "http://schema.org/name",
"deletetoken": "http://schema.org/Text",
"url: {
"@id": "http://schema.org/url",
"@type": "@id"
"so": "http://schema.org/",
"status": {"@id": "so:Integer"},
"id": {"@id": "so:name"},
"deletetoken": {"@id": "so:Text"},
"url": {
"@type": "@id",
"@id": "so:url"
},
"data": "http://schema.org/Text",
"attachment": "http://schema.org/Text",
"attachmentname": "http://schema.org/Text",
"data": {"@id": "so:Text"},
"attachment": {"@id": "so:Text"},
"attachmentname": {"@id": "so:Text"},
"meta": {
"formatter": "http://schema.org/Text",
"postdate": "http://schema.org/Integer",
"opendiscussion": "http://schema.org/True",
"burnafterreading": "http://schema.org/True",
"expire_date": "http://schema.org/Integer",
"remaining_time": "http://schema.org/Integer"
"@id": "?jsonld=pastemeta"
},
"comments": {
"@id": "comment.jsonld",
"@id": "?jsonld=comment",
"@container": "@list"
},
"comment_count": "http://schema.org/Integer",
"comment_offset": "http://schema.org/Integer"
"comment_count": {"@id": "so:Integer"},
"comment_offset": {"@id": "so:Integer"}
}
}

11
js/pastemeta.jsonld Normal file
View File

@@ -0,0 +1,11 @@
{
"@context": {
"so": "http://schema.org/",
"formatter": {"@id": "so:Text"},
"postdate": {"@id": "so:Integer"},
"opendiscussion": {"@id": "so:True"},
"burnafterreading": {"@id": "so:True"},
"expire_date": {"@id": "so:Integer"},
"remaining_time": {"@id": "so:Integer"}
}
}