Permalink
Browse files

Expanded the verbs and object types

  • Loading branch information...
1 parent 21cb716 commit 76e2e73e6741f8503d5714d78fb8d10df343e978 Monica Keller committed Jul 23, 2010
View
@@ -1,17 +1,24 @@
{
"type" : "object",
"title" : "activity",
- "description" : "An activity construct specifies all the details about an event that occurred in the past. The current focus is on knowledge sharing and social broadcasting.",
+ "description" : "An activity construct recounts what an actor did to an object in the past",
"properties": {
+ "id" :{
+ "type" : "string",
+ "description" : "Uniquely identifies each activity within the service",
+ "default" :"{link}"
+ },
"actor" : {
"type": "object",
- "description": "Identifies the entity that performed the activity. Example: A person",
+ "description": "Identifies the entity that performed the activity. Example: A person or user",
"properties" : {"$ref":"http://activitystrea.ms/json-schema/object.properties"}
},
"verb" : {
- "optional" : true,
- "description" : "The type of action performed",
- "type" : {"$ref" : "http://activitystrea.ms/json-schema/verb.json"}
+ "title" : "verb",
+ "type" : "string",
+ "default": "post",
+ "optional" : "true",
+ "description" :"Represents the type of action performed by the actor."
},
"object" : {
"type": "object",
@@ -53,12 +60,21 @@
"format" : "html",
"optional" : true
},
+ 'link' : {
+ "type" : "string",
+ "description" : "Permalink to the activity",
+ "format" : "url",
+ "optional":true
+ },
"links" : {
"type" : "array",
"optional" : true,
- "description" :"Links between an this object and other resources as defined in Web Linking",
+ "description" :"Links between this object and other resources as defined in Web Linking",
"note": "Tell JSON schema team to not put links inside http://json-schema.org/hyper-schema#properties",
"properties" : {"$ref" : "http://json-schema.org/links#properties"}
}
- }
+ },
+ "links": [
+ {"rel": "describedby", "href": "http://activitystrea.ms/json-schema/verbs/{verb}.json"}
+ ]
}
View
@@ -1,7 +0,0 @@
-{
- "type" : "object",
- "title" : "event",
- "description" : "xCal fromat for vevent",
- "extends": {"$ref":"http://activitystrea.ms/json-schema/object"},
- "properties" :{"$ref":"http://www.json-schema.org/calendar#properties"}
-}
View
@@ -0,0 +1,33 @@
+{
+ "type" : "object",
+ "title" : "feed",
+ "description" : "This is the top level container which is typically the response for the API call. \n\
+ A feed contains an array of activities usually related to each other via a subject. Ex: Peter's Lifestream",
+ "properties" : {
+ "title" : {
+ "type" : "string",
+ "optional" : true,
+ "description": "Human readable name of the feed"
+ },
+ "subject" : {
+ "type" : "object",
+ "description" : "The main object of the feed. All objects default to being inReplyTo this object.\n\
+ If not present its the parent object",
+ "optional" : true,
+ "properties" :{"$ref":"http://activitystrea.ms/json-schema/object.json#properties"}
+ },
+ "items" : {
+ "type" : "array",
+ "items": {
+ "type" : "object",
+ "properties" :{"$ref":"http://activitystrea.ms/json-schema/activity.json#properties"}
+ }
+ },
+ "links" : {
+ "type" : "array",
+ "optional" : true,
+ "description" :"Links between an this object and other resources as defined in Web Linking",
+ "properties" : {"$ref" : "http://json-schema.org/links#properties"}
+ }
+ }
+}
View
@@ -4,17 +4,21 @@
"description" : "Generic object on the web",
"properties" : {
'id' : {
- "type" : "string"
+ "type" : "string",
+ "description" : "Uniquely identifies the object on the service",
+ "default" : "{link}"
},
'image' : {
"format":"image",
"type":"string",
- "description" : "A representative image.",
+ "description" : "A representative image of the object such as a profile \n\
+ picture for a person",
"optional":true
},
'displayName' : {
"type":"string",
- "optional":true
+ "description" : "The name of the object. Made required except for photos \n\
+ which will have a default"
},
'summary' : {
"type" : "string",
@@ -23,36 +27,24 @@
'link' : {
"type" : "string",
"format" : "url",
+ "description" : "Permalink to the object.",
"optional":true
},
'objectType' :{
"type" : "string",
"description" : "The type of social object used to select schema",
+ "optional" : true
+ },
+ "author" : {
+ "type" : "object",
"optional" : true,
- "unconstrained" : true,
- "options": [
- {"value": "article"},
- {"value": "audio"},
- {"value": "bookmark"},
- {"value": "comment"},
- {"value": "file"},
- {"value": "folder"},
- {"value": "group"},
- {"value": "list"},
- {"value": "note"},
- {"value": "person"},
- {"value": "photo"},
- {"value": "photo-album"},
- {"value": "place"},
- {"value": "playlist"},
- {"value": "product"},
- {"value": "review"},
- {"value": "service"},
- {"value": "status"},
- {"value": "video"},
- {"value": "event"},
- {"value": "song"}
- ]
+ "description" : "Entity who posted this object",
+ "properties" : {"$ref":"#properties"}
+ },
+ "postedTime" : {
+ "type" : "string",
+ "description": "Time at which the object was created. We should a last updated time.",
+ "format" : "date"
},
'inReplyTo':{
"optional" : true,
@@ -65,15 +57,17 @@
"optional" : true,
"type" : "array",
"uniqueItems" : true,
- "description": "",
- "note" : "Changed it from object to activity so we have time and actor",
+ "description" : "An array of feeds. Each feed has an array of activities \n\
+ which were done in response to this object",
"items": {
"type" : "object",
"properties" :{"$ref":"http://activitystrea.ms/json-schema/feed.json#properties"}
}
},
'reactions':{
"optional" : true,
+ "description" : "An array of reactions. A reactions object is itself an \n\
+ array of people who all had the same reaction",
"type" : "array",
"uniqueItems" : true,
"items": {
@@ -85,24 +79,32 @@
},
'attachedObjects':{
"optional" : true,
+ "title" : "Related objects",
+ "description" : "An array of objects which are related to this object...\n\
+ Generally photos for an article. This needs more clarification",
"type" : "array",
"items": {
"type" : "object",
"properties" :{"$ref":"#.properties"}
}
},
- 'upstreamDuplicates':{"optional" : true,
+ 'upstreamDuplicates':{
+ "optional" : true,
"type" : "array",
+ "description" : "When a publisher changes the id they can put the original \n\
+ id of the object in this field so consumers can de-duplicate",
"items": {"type" : "string"}
},
'downstreamDuplicates':{
"optional" : true,
"type" : "array",
+ "description" : "When a publisher creates a clone object in another system they can put that id\n\
+ here in order to let the consumer know how to de-duplicate",
"items": {"type" : "string"}
}
},
"links": [
- {"rel": "describedby", "href": "http://activitystrea.ms/json-schema/{objectType}.json"}
+ {"rel": "describedby", "href": "http://activitystrea.ms/json-schema/objectType/{objectType}.json"}
]
}
View
@@ -0,0 +1,11 @@
+{
+ "type" : "object",
+ "title" : "article",
+ "extends": {"$ref":"http://activitystrea.ms/json-schema/object.json"},
+ "properties" :{
+ "objectType" :{
+ "type" :"string",
+ "default" : "article"
+ }
+ }
+}
View
@@ -0,0 +1,11 @@
+{
+ "type" : "object",
+ "title" : "audio",
+ "extends": {"$ref":"http://activitystrea.ms/json-schema/object.json"},
+ "properties" :{
+ "objectType" :{
+ "type" :"string",
+ "default" : "audio"
+ }
+ }
+}
View
@@ -0,0 +1,11 @@
+{
+ "type" : "object",
+ "title" : "bookmark",
+ "extends": {"$ref":"http://activitystrea.ms/json-schema/object.json"},
+ "properties" :{
+ "objectType" :{
+ "type" :"string",
+ "default" : "bookmark"
+ }
+ }
+}
View
@@ -0,0 +1,11 @@
+{
+ "type" : "object",
+ "title" : "comment",
+ "extends": {"$ref":"http://activitystrea.ms/json-schema/object.json"},
+ "properties" :{
+ "objectType" :{
+ "type" :"string",
+ "default" : "comment"
+ }
+ }
+}
View
@@ -0,0 +1,13 @@
+{
+ "type" : "object",
+ "title" : "event",
+ "description" : "xCal fromat for vevent",
+ "extends": [{"$ref":"http://activitystrea.ms/json-schema/object.json"},
+ {"$ref":"http://www.json-schema.org/calendar"}],
+ "properties" :{
+ "objectType" :{
+ "type" :"string",
+ "default" : "event"
+ }
+ }
+}
View
@@ -0,0 +1,11 @@
+{
+ "type" : "object",
+ "title" : "file",
+ "extends": {"$ref":"http://activitystrea.ms/json-schema/object.json"},
+ "properties" :{
+ "objectType" :{
+ "type" :"string",
+ "default" : "file"
+ }
+ }
+}
View
@@ -0,0 +1,11 @@
+{
+ "type" : "object",
+ "title" : "folder",
+ "extends": {"$ref":"http://activitystrea.ms/json-schema/object.json"},
+ "properties" :{
+ "objectType" :{
+ "type" :"string",
+ "default" : "folder"
+ }
+ }
+}
View
@@ -0,0 +1,11 @@
+{
+ "type" : "object",
+ "title" : "group",
+ "extends": {"$ref":"http://activitystrea.ms/json-schema/object.json"},
+ "properties" :{
+ "objectType" :{
+ "type" :"string",
+ "default" : "group"
+ }
+ }
+}
View
@@ -0,0 +1,11 @@
+{
+ "type" : "object",
+ "title" : "list",
+ "extends": {"$ref":"http://activitystrea.ms/json-schema/object.json"},
+ "properties" :{
+ "objectType" :{
+ "type" :"string",
+ "default" : "list"
+ }
+ }
+}
View
@@ -0,0 +1,11 @@
+{
+ "type" : "object",
+ "title" : "note",
+ "extends": {"$ref":"http://activitystrea.ms/json-schema/object.json"},
+ "properties" :{
+ "objectType" :{
+ "type" :"string",
+ "default" : "note"
+ }
+ }
+}
View
@@ -0,0 +1,13 @@
+{
+ "type" : "object",
+ "title" : "person",
+ "description" : "vCard Format. Does not match PoCO",
+ "extends": [{"$ref":"http://activitystrea.ms/json-schema/object.json"},
+ {"$ref":"http://www.json-schema.org/card"}],
+ "properties" :{
+ "objectType" :{
+ "type" :"string",
+ "default" : "person"
+ }
+ }
+}
@@ -0,0 +1,11 @@
+{
+ "type" : "object",
+ "title" : "article",
+ "extends": {"$ref":"http://activitystrea.ms/json-schema/objectTypes/list.json"},
+ "properties" :{
+ "objectType" :{
+ "type" :"string",
+ "default" : "photo-album"
+ }
+ }
+}
View
@@ -0,0 +1,15 @@
+{
+ "type" : "object",
+ "title" : "photo",
+ "extends": {"$ref":"http://activitystrea.ms/json-schema/objectTypes/file.json"},
+ "properties" :{
+ "objectType" :{
+ "type" :"string",
+ "default" : "photo"
+ },
+ "displayName" : {
+ "type" : "string",
+ "default" : "a photo"
+ }
+ }
+}
Oops, something went wrong.

0 comments on commit 76e2e73

Please sign in to comment.