{

"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Fray Request",
"description": "Schema representing an initial request for processing",
"type": "object",
"required": [
  "resource_type",
  "uri",
  "root_uri",
  "headers",
  "query_parameters"
],

"properties": {
  "resource_type": {
    "description": "The type of the primary resource(s)",
    "type": "string"
  },
  "id": {
    "description": "The ID of a single resource (used when appropriate)",
    "type": "string"
  },
  "uri": {
    "description": "The protocol, domain, and path of the incoming request",
    "type": "string",
    "format": "uri"
  },
  "root_uri": {
    "description": "The root of the domain (used for links)",
    "type": "string",
    "format": "uri"
  },
  "headers": {
    "description": "HTTP headers",
    "type": "object",
    "additionalProperties": true
  },
  "query_parameters": {
    "description": "Query parameters from both query string and body",
    "type": "object",
    "required": [],
    "properties": {
      "page": {
        "type": "object",
        "required": [ "number", "size" ],
        "properties": {
          "number": { "type": "string" },
          "size": { "type": "string" }
        }
      }
    },
    "additionalProperties": true
  }
}

}