JSON Schema for Defining Providers

Providers must conform to the following JSON provider definition schema published the server. A provider must provide its description and register itself with Expresso by invoking the RESTful provider registration service of the Expresso server. The provider registration service adds the provider to the Expresso's provider inventory. The provider is then made available to the mobile app users.

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Schema for Expresso provider definition",
  "title": "Provider",
  "required": [
    "events",
    "name",
    "description",
    "actions"
  ],
  "properties": {
    "events": {
      "type": "array",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "Event definition",
        "title": "Event",
        "required": [
          "uniqueName",
          "eventSubscriptionUrl",
          "usage",
          "eventSchema",
          "description"
        ],
        "properties": {
          "uniqueName": {
            "type": "string",
            "description": "Unique name of the event"
          },
          "eventSubscriptionUrl": {
            "type": "string",
            "description": "The resource url for susbcription to the event "
          },
          "usage": {
            "type": "string",
            "description": "Sample usage of this event"
          },
          "eventSchema": {
            "type": "string",
            "description": "Schema of the event data"
          },
          "description": {
            "type": "string",
            "description": "Short description of the event"
          }
        }
      },
      "description": "Events supported by the provider"
    },
    "name": {
      "type": "string",
      "description": "Unique name for the provider"
    },
    "outputSchemaForEvent": {
      "type": "string"
    },
    "description": {
      "type": "string",
      "description": "Short description of the provider"
    },
    "userActivation": {
      "type": "string",
      "description": "Optional schema for activation of the provider"
    },
    "modifiedDate": {
      "type": "integer"
    },
    "actions": {
      "type": "array",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "Definition of Action supported by the provider",
        "title": "Action",
        "required": [
          "actionEndpointUrl",
          "description",
          "actionSchema",
          "uniqueName"
        ],
        "properties": {
          "actionEndpointUrl": {
            "type": "string",
            "description": "The resource URL for invoking the action"
          },
          "description": {
            "type": "string",
            "description": "Short description of the action"
          },
          "actionSchema": {
            "type": "string",
            "description": "Input schema for the action"
          },
          "uniqueName": {
            "type": "string",
            "description": "Unique name of the action within the provider definition"
          }
        }
      },
      "description": "Actions supported by the provider"
    },
    "createdDate": {
      "type": "integer"
    }
  }
}