-
View source
ActivityPub JSON Schema
an inofficial proposal (JSON Schema, draft 07)

Specifications: https://www.w3.org/TR/activitypub/ https://www.w3.org/TR/activitystreams-vocabulary/ https://www.w3.org/TR/activitystreams-core/
Work in Progress
Story
Any implementor of ActivityPub wants to validate incoming data or build forms for any ActivityPub type. JSON Schema is a language independent way to describe, document and validate the Specification.
/ActivityPub.jsonis the JSON Schema you start with … All the other schemas are in/type/How do I use this package?
With any software consuming JSON Schema draft 07 … A Node.js script to validate all the examples from activitystreams-vocabulary is included:
cdto the project rootnpm inpm test
How do I contribute?
Fork, edit, pull ... Raise issues ...
NOTE There are blocking issues that need to be resolved before we can go on: https://github.com/w3c/activitystreams/issues/437 https://github.com/w3c/activitystreams/issues/443 https://github.com/w3c/activitystreams/issues/157 https://github.com/w3c/activitypub/issues/290 https://github.com/w3c/activitypub/issues/291
Licensing information
MIT
-
View source{ "$id": "http://www.w3.org/ns/activitystreams/ActivityPub.json", "title": "An INOFFICIAL PROPOSAL: JSON SCHEMAS for ActivityPub", "description": "ISSUES EXIST: https://github.com/w3c/activitystreams/issues/ e.g. 436, 437, 443", "$comment": "TODO - if content but NO mediaType then {\"contentMediaType\": \"text/html\"}", "allOf": [ { "type": "object", "required": ["type"] }, { "if": { "$ref": "Collection.json#/definitions/byTypeRef" }, "then": { "$ref": "Collection.json#" } }, { "if": { "$ref": "OrderedCollection.json#/definitions/byTypeRef" }, "then": { "$ref": "OrderedCollection.json#" } }, { "if": { "$ref": "CollectionPage.json#/definitions/byTypeRef" }, "then": { "$ref": "CollectionPage.json#" } }, { "if": { "$ref": "OrderedCollectionPage.json#/definitions/byTypeRef" }, "then": { "$ref": "OrderedCollectionPage.json#" } }, { "if": { "$ref": "Link.json#/definitions/byTypeRef" }, "then": { "$ref": "Link.json#" } }, { "if": { "$ref": "Mention.json#/definitions/byTypeRef" }, "then": { "$ref": "Mention.json#" } }, { "if": { "$ref": "Object.json#/definitions/byTypeRef" }, "then": { "$ref": "Object.json#" } }, { "if": { "$ref": "Article.json#/definitions/byTypeRef" }, "then": { "$ref": "Article.json#" } }, { "if": { "$ref": "Audio.json#/definitions/byTypeRef" }, "then": { "$ref": "Audio.json#" } }, { "if": { "$ref": "Document.json#/definitions/byTypeRef" }, "then": { "$ref": "Document.json#" } }, { "if": { "$ref": "Event.json#/definitions/byTypeRef" }, "then": { "$ref": "Event.json#" } }, { "if": { "$ref": "Image.json#/definitions/byTypeRef" }, "then": { "$ref": "Image.json#" } }, { "if": { "$ref": "Note.json#/definitions/byTypeRef" }, "then": { "$ref": "Note.json#" } }, { "if": { "$ref": "Page.json#/definitions/byTypeRef" }, "then": { "$ref": "Page.json#" } }, { "if": { "$ref": "Place.json#/definitions/byTypeRef" }, "then": { "$ref": "Place.json#" } }, { "if": { "$ref": "Profile.json#/definitions/byTypeRef" }, "then": { "$ref": "Profile.json#" } }, { "if": { "$ref": "Relationship.json#/definitions/byTypeRef" }, "then": { "$ref": "Relationship.json#" } }, { "if": { "$ref": "Tombstone.json#/definitions/byTypeRef" }, "then": { "$ref": "Tombstone.json#" } }, { "if": { "$ref": "Video.json#/definitions/byTypeRef" }, "then": { "$ref": "Video.json#" } }, { "if": { "$ref": "Activity.json#/definitions/byTypeRef" }, "then": { "$ref": "Activity.json#" } }, { "if": { "$ref": "Accept.json#/definitions/byTypeRef" }, "then": { "$ref": "Accept.json#" } }, { "if": { "$ref": "Add.json#/definitions/byTypeRef" }, "then": { "$ref": "Add.json#" } }, { "if": { "$ref": "Announce.json#/definitions/byTypeRef" }, "then": { "$ref": "Announce.json#" } }, { "if": { "$ref": "Arrive.json#/definitions/byTypeRef" }, "then": { "$ref": "Arrive.json#" } }, { "if": { "$ref": "Block.json#/definitions/byTypeRef" }, "then": { "$ref": "Block.json#" } }, { "if": { "$ref": "Create.json#/definitions/byTypeRef" }, "then": { "$ref": "Create.json#" } }, { "if": { "$ref": "Delete.json#/definitions/byTypeRef" }, "then": { "$ref": "Delete.json#" } }, { "if": { "$ref": "Dislike.json#/definitions/byTypeRef" }, "then": { "$ref": "Dislike.json#" } }, { "if": { "$ref": "Flag.json#/definitions/byTypeRef" }, "then": { "$ref": "Flag.json#" } }, { "if": { "$ref": "Follow.json#/definitions/byTypeRef" }, "then": { "$ref": "Follow.json#" } }, { "if": { "$ref": "Ignore.json#/definitions/byTypeRef" }, "then": { "$ref": "Ignore.json#" } }, { "if": { "$ref": "Invite.json#/definitions/byTypeRef" }, "then": { "$ref": "Invite.json#" } }, { "if": { "$ref": "Join.json#/definitions/byTypeRef" }, "then": { "$ref": "Join.json#" } }, { "if": { "$ref": "Leave.json#/definitions/byTypeRef" }, "then": { "$ref": "Leave.json#" } }, { "if": { "$ref": "Like.json#/definitions/byTypeRef" }, "then": { "$ref": "Like.json#" } }, { "if": { "$ref": "Listen.json#/definitions/byTypeRef" }, "then": { "$ref": "Listen.json#" } }, { "if": { "$ref": "Move.json#/definitions/byTypeRef" }, "then": { "$ref": "Move.json#" } }, { "if": { "$ref": "Offer.json#/definitions/byTypeRef" }, "then": { "$ref": "Offer.json#" } }, { "if": { "$ref": "Question.json#/definitions/byTypeRef" }, "then": { "$ref": "Question.json#" } }, { "if": { "$ref": "Read.json#/definitions/byTypeRef" }, "then": { "$ref": "Read.json#" } }, { "if": { "$ref": "Reject.json#/definitions/byTypeRef" }, "then": { "$ref": "Reject.json#" } }, { "if": { "$ref": "Remove.json#/definitions/byTypeRef" }, "then": { "$ref": "Remove.json#" } }, { "if": { "$ref": "TentativeAccept.json#/definitions/byTypeRef" }, "then": { "$ref": "TentativeAccept.json#" } }, { "if": { "$ref": "TentativeReject.json#/definitions/byTypeRef" }, "then": { "$ref": "TentativeReject.json#" } }, { "if": { "$ref": "Travel.json#/definitions/byTypeRef" }, "then": { "$ref": "Travel.json#" } }, { "if": { "$ref": "Undo.json#/definitions/byTypeRef" }, "then": { "$ref": "Undo.json#" } }, { "if": { "$ref": "Update.json#/definitions/byTypeRef" }, "then": { "$ref": "Update.json#" } }, { "if": { "$ref": "View.json#/definitions/byTypeRef" }, "then": { "$ref": "View.json#" } }, { "if": { "$ref": "Actor.json#/definitions/byTypeRef" }, "then": { "$ref": "Actor.json#" } }, { "if": { "$ref": "Application.json#/definitions/byTypeRef" }, "then": { "$ref": "Application.json#" } }, { "if": { "$ref": "Group.json#/definitions/byTypeRef" }, "then": { "$ref": "Group.json#" } }, { "if": { "$ref": "Organization.json#/definitions/byTypeRef" }, "then": { "$ref": "Organization.json#" } }, { "if": { "$ref": "Person.json#/definitions/byTypeRef" }, "then": { "$ref": "Person.json#" } }, { "if": { "$ref": "Service.json#/definitions/byTypeRef" }, "then": { "$ref": "Service.json#" } } ], "definitions": { "possibleRef": { "oneOf": [ { "$ref": "#" }, { "$ref": "Link.json#" }, { "type": "string", "format": "uri", "links": [{ "rel": "full", "href": "{+$}" }] } ] }, "possibleRefArray": { "oneOf": [ { "$ref": "#/definitions/possibleRef" }, { "type": "array", "items": { "$ref": "#/definitions/possibleRef" } } ] }, "objectTypes": { "enum": [ "Article", "Audio", "Document", "Event", "Image", "Note", "Page", "Place", "Profile", "Relationship", "Tombstone", "Video", "Object" ] }, "linkTypes": { "enum": [ "Mention", "Link" ] }, "actorTypes": { "enum": ["Application", "Group", "Organization", "Person", "Service", "Actor"] }, "activityTypes": { "enum": [ "Accept", "Add", "Announce", "Arrive", "Block", "Create", "Delete", "Dislike", "Flag", "Follow", "Ignore", "Invite", "Join", "Leave", "Like", "Listen", "Move", "Offer", "Question", "Reject", "Read", "Remove", "TentativeReject", "TentativeAccept", "Travel", "Undo", "Update", "View", "Activity" ] } } } -
View source{ "$id": "http://www.w3.org/ns/activitystreams/Accept.json", "title": "Accept", "description": "Indicates that the actor accepts the object. 'target' optionally indicates the context of acceptance.", "$comment": "https://www.w3.org/TR/activitystreams-vocabulary/#dfn-accept", "allOf": [ { "$ref": "Activity.json#" } ], "definitions": { "possibleType": { "enum": [ "Accept", "http://www.w3.org/ns/activitystreams#Accept", "https://www.w3.org/ns/activitystreams#Accept" ] }, "byTypeRef": { "properties": { "type": { "oneOf": [ { "$ref": "#/definitions/possibleType" }, { "type": "array", "contains": { "$ref": "#/definitions/possibleType" } } ] } } }, "possibleRef": { "oneOf": [ { "$ref": "#" }, { "$ref": "Link.json#" }, { "type": "string", "format": "uri", "links": [{ "rel": "full", "href": "{+$}" }] } ] }, "possibleRefArray": { "oneOf": [ { "$ref": "#/definitions/possibleRef" }, { "type": "array", "items": { "$ref": "#/definitions/possibleRef" } } ] } } } -
View source{ "$id": "http://www.w3.org/ns/activitystreams/Activity.json", "$schema": "http://json-schema.org/draft-07/schema#", "title": "Activity", "description": "https://www.w3.org/TR/activitystreams-vocabulary/#dfn-activity", "allOf": [ { "$ref": "Object.json#" }, { "type": "object", "properties": { "actor": { "$ref": "#/definitions/actor" }, "object": { "$ref": "#/definitions/object" }, "target": { "$ref": "#/definitions/target" }, "result": { "$ref": "#/definitions/result" }, "origin": { "$ref": "#/definitions/origin" }, "instrument": { "$ref": "#/definitions/instrument" } } } ], "definitions": { "actor": { "description": "Describes one or more entities that either performed or are expected to perform the activity.", "allOf": [{ "$ref": "Object.json#/definitions/possibleRefArray" }] }, "object": { "description": "Describes the direct object of the activity. E.g. if 'foo adds a movie' it means the movie added.", "allOf": [{ "$ref": "Object.json#/definitions/possibleRefArray" }] }, "target": { "description": "Describes the indirect object, or target, of the activity. E.g. where to was it added.", "allOf": [{ "$ref": "Object.json#/definitions/possibleRefArray" }] }, "result": { "description": "Describes the result of the activity.", "allOf": [{ "$ref": "Object.json#/definitions/possibleRefArray" }] }, "origin": { "description": "Describes an indirect object of the activity from which the activity is directed.", "allOf": [{ "$ref": "Object.json#/definitions/possibleRefArray" }] }, "instrument": { "description": "Identifies one or more objects used (or to be used) in the completion of an Activity.", "allOf": [{ "$ref": "Object.json#/definitions/possibleRefArray" }] }, "possibleType": { "enum": [ "Activity", "http://www.w3.org/ns/activitystreams#Activity", "https://www.w3.org/ns/activitystreams#Activity" ] }, "byTypeRef": { "properties": { "type": { "oneOf": [ { "$ref": "#/definitions/possibleType" }, { "type": "array", "contains": { "$ref": "#/definitions/possibleType" } } ] } } }, "possibleRef": { "oneOf": [ { "$ref": "#" }, { "$ref": "Link.json#" }, { "type": "string", "format": "uri", "links": [{ "rel": "full", "href": "{+$}" }] } ] }, "possibleRefArray": { "oneOf": [ { "$ref": "#/definitions/possibleRef" }, { "type": "array", "items": { "$ref": "#/definitions/possibleRef" } } ] } } } -
View source{ "$id": "http://www.w3.org/ns/activitystreams/Actor.json", "$schema": "http://json-schema.org/draft-07/schema#", "title": "Actor", "description": "https://www.w3.org/TR/activitypub", "allOf": [ { "$ref": "Object.json#" }, { "type": "object", "properties": { "outbox": { "$ref": "#/definitions/outbox" }, "inbox": { "$ref": "#/definitions/inbox" }, "followers": { "$ref": "#/definitions/followers" }, "following": { "$ref": "#/definitions/following" }, "liked": { "$ref": "#/definitions/liked" }, "preferredUsername": { "$ref": "#/definitions/preferredUsername" }, "endpoints": { "$ref": "#/definitions/endpoints" } } } ], "required": [ "@context", "id", "type", "inbox", "outbox" ], "definitions": { "outbox": { "description": "A link to an OrderedCollection comprised of all the messages produced by the actor; see 5.1 Outbox.", "type": "string", "format": "uri" }, "inbox": { "description": "A link to an OrderedCollection comprised of all the messages received by the actor; see 5.2 Inbox.", "type": "string", "format": "uri" }, "followers": { "description": "A link to a collection of the actors that follow this actor; see 5.3 Followers Collection.", "type": "string", "format": "uri" }, "following": { "description": "A link to a collection of the actors that this actor is following; see 5.4 Following Collection.", "type": "string", "format": "uri" }, "liked": { "description": "A link to a collection of objects this actor has liked; see 5.5 Liked Collection.", "type": "string", "format": "uri" }, "preferredUsername": { "description": "A short username which may be used to refer to the actor, with no uniqueness guarantees.", "type": "string" }, "endpoints": { "description": "A json object which maps additional endpoints which may be useful.", "type": "object", "additionalProperties": true, "properties": { "proxyUrl": { "description": "Endpoint URI so this actor's clients may access remote objects which require authentication to access.", "type": "string", "format": "uri" }, "oauthAuthorizationEndpoint": { "description": "URI for OAuth 2.0 bearer tokens [RFC6749] [RFC6750], so clients may obtain a new authorization grant.", "type": "string", "format": "uri" }, "oauthTokenEndpoint": { "description": "URI for OAuth 2.0 bearer tokens [RFC6749] [RFC6750], so clients may acquire an access token.", "type": "string", "format": "uri" }, "provideClientKey": { "description": "URI at which clients may authorize a client's public key for client to server interactions.", "type": "string", "format": "uri" }, "signClientKey": { "description": "URI at which clients key may be signed by the actor's key to act on behalf of actor with foreign servers.", "type": "string", "format": "uri" }, "sharedInbox": { "description": "URI optional used for wide delivery of publicly addressed activities and activities sent to followers.", "type": "string", "format": "uri" } } }, "possibleType": { "enum": [ "Actor", "http://www.w3.org/ns/activitystreams#Actor", "https://www.w3.org/ns/activitystreams#Actor" ] }, "byTypeRef": { "properties": { "type": { "oneOf": [ { "$ref": "#/definitions/possibleType" }, { "type": "array", "contains": { "$ref": "#/definitions/possibleType" } } ] } } }, "possibleRef": { "oneOf": [ { "$ref": "#" }, { "$ref": "Link.json#" }, { "type": "string", "format": "uri", "links": [{ "rel": "full", "href": "{+$}" }] } ] }, "possibleRefArray": { "oneOf": [ { "$ref": "#/definitions/possibleRef" }, { "type": "array", "items": { "$ref": "#/definitions/possibleRef" } } ] } } } -
View source{ "$id": "http://www.w3.org/ns/activitystreams/Add.json", "title": "Add", "description": "Indicates that the actor has added the object to the target.", "$comment": "https://www.w3.org/TR/activitystreams-vocabulary/#dfn-add", "allOf": [ { "$ref": "Activity.json#" } ], "definitions": { "possibleType": { "enum": [ "Add", "http://www.w3.org/ns/activitystreams#Add", "https://www.w3.org/ns/activitystreams#Add" ] }, "byTypeRef": { "properties": { "type": { "oneOf": [ { "$ref": "#/definitions/possibleType" }, { "type": "array", "contains": { "$ref": "#/definitions/possibleType" } } ] } } }, "possibleRef": { "oneOf": [ { "$ref": "#" }, { "$ref": "Link.json#" }, { "type": "string", "format": "uri", "links": [{ "rel": "full", "href": "{+$}" }] } ] }, "possibleRefArray": { "oneOf": [ { "$ref": "#/definitions/possibleRef" }, { "type": "array", "items": { "$ref": "#/definitions/possibleRef" } } ] } } } -
View source{ "$id": "http://www.w3.org/ns/activitystreams/Announce.json", "title": "Announce", "description": "Indicates that the actor is calling the target's attention the object.", "$comment": "https://www.w3.org/TR/activitystreams-vocabulary/#dfn-announce", "allOf": [ { "$ref": "Activity.json#" } ], "definitions": { "possibleType": { "enum": [ "Announce", "http://www.w3.org/ns/activitystreams#Announce", "https://www.w3.org/ns/activitystreams#Announce" ] }, "byTypeRef": { "properties": { "type": { "oneOf": [ { "$ref": "#/definitions/possibleType" }, { "type": "array", "contains": { "$ref": "#/definitions/possibleType" } } ] } } }, "possibleRef": { "oneOf": [ { "$ref": "#" }, { "$ref": "Link.json#" }, { "type": "string", "format": "uri", "links": [{ "rel": "full", "href": "{+$}" }] } ] }, "possibleRefArray": { "oneOf": [ { "$ref": "#/definitions/possibleRef" }, { "type": "array", "items": { "$ref": "#/definitions/possibleRef" } } ] } } } -
View source{ "$id": "http://www.w3.org/ns/activitystreams/Application.json", "title": "Application", "description": "Describes a software application.", "$comment": "https://www.w3.org/TR/activitystreams-vocabulary/#dfn-application", "allOf": [{ "$ref": "Object.json#" }], "definitions": { "possibleType": { "enum": [ "Application", "http://www.w3.org/ns/activitystreams#Application", "https://www.w3.org/ns/activitystreams#Application" ] }, "byTypeRef": { "properties": { "type": { "oneOf": [ { "$ref": "#/definitions/possibleType" }, { "type": "array", "contains": { "$ref": "#/definitions/possibleType" } } ] } } }, "possibleRef": { "oneOf": [ { "$ref": "#" }, { "$ref": "Link.json#" }, { "type": "string", "format": "uri", "links": [{ "rel": "full", "href": "{+$}" }] } ] }, "possibleRefArray": { "oneOf": [ { "$ref": "#/definitions/possibleRef" }, { "type": "array", "items": { "$ref": "#/definitions/possibleRef" } } ] } } } -
View source{ "$id": "http://www.w3.org/ns/activitystreams/Arrive.json", "title": "Arrive", "description": "An IntransitiveActivity that indicates that the actor has arrived at 'location'.", "$comment": "https://www.w3.org/TR/activitystreams-vocabulary/#dfn-arrive", "allOf": [ { "$ref": "Activity.json#" } ], "definitions": { "possibleType": { "enum": [ "Arrive", "http://www.w3.org/ns/activitystreams#Arrive", "https://www.w3.org/ns/activitystreams#Arrive" ] }, "byTypeRef": { "properties": { "type": { "oneOf": [ { "$ref": "#/definitions/possibleType" }, { "type": "array", "contains": { "$ref": "#/definitions/possibleType" } } ] } } }, "possibleRef": { "oneOf": [ { "$ref": "#" }, { "$ref": "Link.json#" }, { "type": "string", "format": "uri", "links": [{ "rel": "full", "href": "{+$}" }] } ] }, "possibleRefArray": { "oneOf": [ { "$ref": "#/definitions/possibleRef" }, { "type": "array", "items": { "$ref": "#/definitions/possibleRef" } } ] } } } -
View source{ "$id": "http://www.w3.org/ns/activitystreams/Article.json", "title": "Article", "description": "Represents any kind of multi-paragraph written work.", "$comment": "https://www.w3.org/TR/activitystreams-vocabulary/#dfn-article", "allOf": [ { "$ref": "Object.json#" } ], "definitions": { "possibleType": { "enum": [ "Article", "http://www.w3.org/ns/activitystreams#Article", "https://www.w3.org/ns/activitystreams#Article" ] }, "byTypeRef": { "properties": { "type": { "oneOf": [ { "$ref": "#/definitions/possibleType" }, { "type": "array", "contains": { "$ref": "#/definitions/possibleType" } } ] } } }, "possibleRef": { "oneOf": [ { "$ref": "#" }, { "$ref": "Link.json#" }, { "type": "string", "format": "uri", "links": [{ "rel": "full", "href": "{+$}" }] } ] }, "possibleRefArray": { "oneOf": [ { "$ref": "#/definitions/possibleRef" }, { "type": "array", "items": { "$ref": "#/definitions/possibleRef" } } ] } } } -
View source{ "$id": "http://www.w3.org/ns/activitystreams/Audio.json", "title": "Audio", "description": "Represents an audio document of any kind.", "$comment": "https://www.w3.org/TR/activitystreams-vocabulary/#dfn-audio", "allOf": [ { "$ref": "Object.json#" } ], "definitions": { "possibleType": { "enum": [ "Audio", "http://www.w3.org/ns/activitystreams#Audio", "https://www.w3.org/ns/activitystreams#Audio" ] }, "byTypeRef": { "properties": { "type": { "oneOf": [ { "$ref": "#/definitions/possibleType" }, { "type": "array", "contains": { "$ref": "#/definitions/possibleType" } } ] } } }, "possibleRef": { "oneOf": [ { "$ref": "#" }, { "$ref": "Link.json#" }, { "type": "string", "format": "uri", "links": [{ "rel": "full", "href": "{+$}" }] } ] }, "possibleRefArray": { "oneOf": [ { "$ref": "#/definitions/possibleRef" }, { "type": "array", "items": { "$ref": "#/definitions/possibleRef" } } ] } } } -
View source{ "$id": "http://www.w3.org/ns/activitystreams/Block.json", "title": "Block", "description": "Indicates that the actor is blocking the object. Blocking is a stronger form of Ignore.", "$comment": "https://www.w3.org/TR/activitystreams-vocabulary/#dfn-block", "allOf": [ { "$ref": "Activity.json#" } ], "definitions": { "possibleType": { "enum": [ "Block", "http://www.w3.org/ns/activitystreams#Block", "https://www.w3.org/ns/activitystreams#Block" ] }, "byTypeRef": { "properties": { "type": { "oneOf": [ { "$ref": "#/definitions/possibleType" }, { "type": "array", "contains": { "$ref": "#/definitions/possibleType" } } ] } } }, "possibleRef": { "oneOf": [ { "$ref": "#" }, { "$ref": "Link.json#" }, { "type": "string", "format": "uri", "links": [{ "rel": "full", "href": "{+$}" }] } ] }, "possibleRefArray": { "oneOf": [ { "$ref": "#/definitions/possibleRef" }, { "type": "array", "items": { "$ref": "#/definitions/possibleRef" } } ] } } } -
View source{ "$id": "http://www.w3.org/ns/activitystreams/Collection.json", "$schema": "http://json-schema.org/draft-07/schema#", "title": "Collection", "description": "https://www.w3.org/TR/activitystreams-vocabulary/#dfn-collection", "allOf": [ { "$ref": "Object.json#" }, { "properties": { "items": { "$ref": "#/definitions/items" }, "orderedItems": { "$ref": "#/definitions/orderedItems" }, "totalItems": { "$ref": "#/definitions/totalItems" }, "current": { "$ref": "#/definitions/current" }, "first": { "$ref": "#/definitions/first" }, "last": { "$ref": "#/definitions/last" } } } ], "definitions": { "items": { "description": "Identifies the unordered items contained in a collection.", "allOf": [{ "$ref": "Object.json#/definitions/possibleRefArray" }] }, "orderedItems": { "$comment": "FIXME ISSUE EXISTS https://github.com/w3c/activitystreams/issues/437", "description": "Identifies the ordered items contained in a collection.", "allOf": [{ "$ref": "Object.json#/definitions/possibleRefArray" }] }, "totalItems": { "description": "A non-negative integer specifying the total number of objects contained by the logical view of the collection.", "type": "integer", "minimum": 0 }, "current": { "description": "In a paged Collection, indicates the page that contains the most recently updated member items.", "allOf": [{ "$ref": "CollectionPage.json#/definitions/possibleRef" }] }, "first": { "description": "In a paged Collection, indicates the furthest preceeding page of items in the collection.", "allOf": [{ "$ref": "CollectionPage.json#/definitions/possibleRef" }] }, "last": { "description": "In a paged Collection, indicates the furthest proceeding page of the collection.", "allOf": [{ "$ref": "CollectionPage.json#/definitions/possibleRef" }] }, "possibleType": { "enum": [ "Collection", "http://www.w3.org/ns/activitystreams#Collection", "https://www.w3.org/ns/activitystreams#Collection" ] }, "byTypeRef": { "properties": { "type": { "oneOf": [ { "$ref": "#/definitions/possibleType" }, { "type": "array", "contains": { "$ref": "#/definitions/possibleType" } } ] } } }, "possibleRef": { "oneOf": [ { "$ref": "#" }, { "$ref": "Link.json#" }, { "type": "string", "format": "uri", "links": [{ "rel": "full", "href": "{+$}" }] } ] }, "possibleRefArray": { "oneOf": [ { "$ref": "#/definitions/possibleRef" }, { "type": "array", "items": { "$ref": "#/definitions/possibleRef" } } ] } } } -
View source{ "$id": "http://www.w3.org/ns/activitystreams/Collection.json", "$schema": "http://json-schema.org/draft-07/schema#", "title": "Collection", "description": "https://www.w3.org/TR/activitystreams-vocabulary/#dfn-collection", "allOf": [ { "$ref": "Object.json#" }, { "properties": { "items": { "$ref": "#/definitions/items" }, "orderedItems": { "$ref": "#/definitions/orderedItems" }, "totalItems": { "$ref": "#/definitions/totalItems" }, "current": { "$ref": "#/definitions/current" }, "first": { "$ref": "#/definitions/first" }, "last": { "$ref": "#/definitions/last" } } } ], "definitions": { "items": { "description": "Identifies the unordered items contained in a collection.", "allOf": [{ "$ref": "Object.json#/definitions/possibleRefArray" }] }, "orderedItems": { "$comment": "FIXME ISSUE EXISTS https://github.com/w3c/activitystreams/issues/437", "description": "Identifies the ordered items contained in a collection.", "allOf": [{ "$ref": "Object.json#/definitions/possibleRefArray" }] }, "totalItems": { "description": "A non-negative integer specifying the total number of objects contained by the logical view of the collection.", "type": "integer", "minimum": 0 }, "current": { "description": "In a paged Collection, indicates the page that contains the most recently updated member items.", "allOf": [{ "$ref": "CollectionPage.json#/definitions/possibleRef" }] }, "first": { "description": "In a paged Collection, indicates the furthest preceeding page of items in the collection.", "allOf": [{ "$ref": "CollectionPage.json#/definitions/possibleRef" }] }, "last": { "description": "In a paged Collection, indicates the furthest proceeding page of the collection.", "allOf": [{ "$ref": "CollectionPage.json#/definitions/possibleRef" }] }, "possibleType": { "enum": [ "Collection", "http://www.w3.org/ns/activitystreams#Collection", "https://www.w3.org/ns/activitystreams#Collection" ] }, "byTypeRef": { "properties": { "type": { "oneOf": [ { "$ref": "#/definitions/possibleType" }, { "type": "array", "contains": { "$ref": "#/definitions/possibleType" } } ] } } }, "possibleRef": { "oneOf": [ { "$ref": "#" }, { "$ref": "Link.json#" }, { "type": "string", "format": "uri", "links": [{ "rel": "full", "href": "{+$}" }] } ] }, "possibleRefArray": { "oneOf": [ { "$ref": "#/definitions/possibleRef" }, { "type": "array", "items": { "$ref": "#/definitions/possibleRef" } } ] } } } -
View source{ "$id": "http://www.w3.org/ns/activitystreams/CollectionPage.json", "$schema": "http://json-schema.org/draft-07/schema#", "title": "Collection Page", "description": "https://www.w3.org/TR/activitystreams-vocabulary/#dfn-collectionpage", "allOf": [ { "$ref": "Collection.json#" }, { "properties": { "partOf": { "$ref": "#/definitions/partOf" }, "next": { "$ref": "#/definitions/next" }, "prev": { "$ref": "#/definitions/prev" } } } ], "definitions": { "partOf": { "description": "Identifies the Collection to which a CollectionPage objects items belong.", "allOf": [{ "$ref": "Collection.json#/definitions/possibleRefArray" }] }, "next": { "description": "In a paged Collection, indicates the next page of items.", "allOf": [{ "$ref": "#/definitions/possibleRef" }] }, "prev": { "description": "In a paged Collection, identifies the previous page of items.", "allOf": [{ "$ref": "#/definitions/possibleRef" }] }, "possibleType": { "enum": [ "CollectionPage", "http://www.w3.org/ns/activitystreams#CollectionPage", "https://www.w3.org/ns/activitystreams#CollectionPage" ] }, "byTypeRef": { "properties": { "type": { "oneOf": [ { "$ref": "#/definitions/possibleType" }, { "type": "array", "contains": { "$ref": "#/definitions/possibleType" } } ] } } }, "possibleRef": { "oneOf": [ { "$ref": "#" }, { "$ref": "Link.json#" }, { "type": "string", "format": "uri", "links": [{ "rel": "full", "href": "{+$}" }] } ] }, "possibleRefArray": { "oneOf": [ { "$ref": "#/definitions/possibleRef" }, { "type": "array", "items": { "$ref": "#/definitions/possibleRef" } } ] } } } -
View source{ "$id": "http://www.w3.org/ns/activitystreams/Create.json", "title": "Create", "description": "Indicates that the actor has created the object.", "$comment": "https://www.w3.org/TR/activitystreams-vocabulary/#dfn-create", "allOf": [ { "$ref": "Activity.json#" } ], "definitions": { "possibleType": { "enum": [ "Create", "http://www.w3.org/ns/activitystreams#Create", "https://www.w3.org/ns/activitystreams#Create" ] }, "byTypeRef": { "properties": { "type": { "oneOf": [ { "$ref": "#/definitions/possibleType" }, { "type": "array", "contains": { "$ref": "#/definitions/possibleType" } } ] } } }, "possibleRef": { "oneOf": [ { "$ref": "#" }, { "$ref": "Link.json#" }, { "type": "string", "format": "uri", "links": [{ "rel": "full", "href": "{+$}" }] } ] }, "possibleRefArray": { "oneOf": [ { "$ref": "#/definitions/possibleRef" }, { "type": "array", "items": { "$ref": "#/definitions/possibleRef" } } ] } } } -
View source{ "$id": "http://www.w3.org/ns/activitystreams/Delete.json", "title": "Delete", "description": "Indicates that the actor has deleted the object.", "$comment": "https://www.w3.org/TR/activitystreams-vocabulary/#dfn-delete", "allOf": [ { "$ref": "Activity.json#" } ], "definitions": { "possibleType": { "enum": [ "Delete", "http://www.w3.org/ns/activitystreams#Delete", "https://www.w3.org/ns/activitystreams#Delete" ] }, "byTypeRef": { "properties": { "type": { "oneOf": [ { "$ref": "#/definitions/possibleType" }, { "type": "array", "contains": { "$ref": "#/definitions/possibleType" } } ] } } }, "possibleRef": { "oneOf": [ { "$ref": "#" }, { "$ref": "Link.json#" }, { "type": "string", "format": "uri", "links": [{ "rel": "full", "href": "{+$}" }] } ] }, "possibleRefArray": { "oneOf": [ { "$ref": "#/definitions/possibleRef" }, { "type": "array", "items": { "$ref": "#/definitions/possibleRef" } } ] } } }