{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://fdc3.finos.org/schemas/2.2/context/chatRoom.schema.json",
  "type": "object",
  "title": "ChatRoom",
  "description": "Reference to the chat room which could be used to send a message to the room",
  "allOf": [{
    "type": "object",
    "properties": {      
      "type": { "const": "fdc3.chat.room" },
      "providerName": { 
        "title": "Chat provider name",
        "description": "The name of the service that hosts the chat",
        "type": "string"
      },
      "id": { 
        "title": "Chat room id",
        "description": "Identifier(s) for the chat - currently unstandardized",
        "type": "object",
        "additionalProperties": {
          "type": "string"
        }
      },
      "url": { 
        "title": "Chat URL",
        "description": "Universal url to access to the room. It could be opened from a browser, a mobile app, etc...",
        "type": "string",
        "format": "uri"
      },
      "name": {
        "title": "Chat name",
        "description": "Display name for the chat room",
        "type": "string"
      }
    },
    "required": ["providerName", "id"]
    },
    { "$ref": "context.schema.json#/definitions/BaseContext" }
  ],
  "examples": [
    {
      "type": "fdc3.chat.room",
      "providerName": "Symphony",
      "id": {
          "streamId": "j75xqXy25NBOdacUI3FNBH"
      },
      "url": "http://symphony.com/ref/room/j75xqXy25NBOdacUI3FNBH___pqSsuJRdA",
      "name": "My new room"
    }
  ]
}
