{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "http://openinterconnect.org/rm/oic.web-link.json",
  "type": "object",
  "properties": {
    "href": {
      "type": "string",
      "description": "RFC5988 style web-links serialized into JSON. This is the target URI",
      "format": "uri"
    },
    "rel": {
      "type": "string",
      "default": "advertises",
      "description": "The relation of the target URI referenced by the link to the context URI"
    },
    "rt": {
      "type": "string",
      "description": "Resource Type - A standard OIC specified or vendor defined resource type of the resource referenced by the target URI"
    },
    "if": {
      "type": "string",
      "description": "Interface - The interfaces supported by the resource referenced by the target URI"
    },
    "p": {
      "readOnly": true,
      "description": "JSON object containing a Bitmap indicating observable and discoverable plus security and port",
      "type": "object",
      "properties": {
        "bm": {
          "type": "integer"
        },
        "sec": {
          "type": "boolean"
        },
        "port": {
          "type": "integer"
        }
      }
    },
    "obs": {
      "type": "boolean",
      "description": "Specifies if the resource referenced by the target URIis observable or not",
      "default": false
    },
    "title": {
      "type": "string",
      "description": "A title for the link relation. Can be used by the UI to provide a context"
    },
    "type": {
      "type": "string",
      "description": "A hint at the representation of the resource referenced by the target URI",
      "default": "application/json"
    }
  },
  "required": [ "href", "rt", "if" ]
}
