From 4157447337279d64f84d1e650fffd5f7ba539ac4 Mon Sep 17 00:00:00 2001 From: Jasper D'haene Date: Sun, 13 Apr 2014 15:23:24 +0200 Subject: [PATCH 1/2] completed bus schemas --- app/schemas/subscriptions/bus.coffee | 40 +++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/app/schemas/subscriptions/bus.coffee b/app/schemas/subscriptions/bus.coffee index abf03fbcc..91569ae7f 100644 --- a/app/schemas/subscriptions/bus.coffee +++ b/app/schemas/subscriptions/bus.coffee @@ -27,13 +27,45 @@ module.exports = $ref: "bus" "bus:new-message": - {} # TODO schema + title: "Message sent" + $schema: "http://json-schema.org/draft-04/schema#" + description: "A new message was sent" + type: "object" + properties: + message: + type: "string" + bus: + $ref: "bus" "bus:player-joined": - {} # TODO schema + title: "Player joined" + $schema: "http://json-schema.org/draft-04/schema#" + description: "A new player has joined" + type: "object" + properties: + player: + type: "object" + bus: + $ref: "bus" "bus:player-left": - {} # TODO schema + title: "Player left" + $schema: "http://json-schema.org/draft-04/schema#" + description: "A player has left" + type: "object" + properties: + player: + type: "object" + bus: + $ref: "bus" "bus:player-states-changed": - {} # TODO schema + title: "Player state changes" + $schema: "http://json-schema.org/draft-04/schema#" + description: "State of the players has changed" + type: "object" + properties: + player: + type: "array" + bus: + $ref: "bus" From 2cde44319c4dad32d543d46644d0534eb66b6a4a Mon Sep 17 00:00:00 2001 From: Jasper D'haene Date: Sun, 13 Apr 2014 16:05:11 +0200 Subject: [PATCH 2/2] added some app schemas + missing schema stub --- app/schemas/subscriptions/app.coffee | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/app/schemas/subscriptions/app.coffee b/app/schemas/subscriptions/app.coffee index 7d0673751..02471c801 100644 --- a/app/schemas/subscriptions/app.coffee +++ b/app/schemas/subscriptions/app.coffee @@ -2,11 +2,21 @@ module.exports = "application:idle-changed": {} # TODO schema + "fbapi-loaded": + {} # TODO schema + "logging-in-with-facebook": {} # TODO schema "facebook-logged-in": - {} # TODO schema + title: "Facebook logged in" + $schema: "http://json-schema.org/draft-04/schema#" + description: "Published when you successfully logged in with facebook" + type: "object" + properties: + response: + type: "string" + required: ["response"] "gapi-loaded": {} # TODO schema @@ -15,4 +25,11 @@ module.exports = {} # TODO schema "gplus-logged-in": - {} # TODO schema + title: "G+ logged in" + $schema: "http://json-schema.org/draft-04/schema#" + description: "Published when you successfully logged in with G+" + type: "object" + properties: + authResult: + type: "string" + required: ["authResult"]