{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://www.edikka.com/docbd/data/ia-fiable-controles-v1/context.schema.json",
  "title": "Trusted application context — never generated by the model",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "allowed_source_ids",
    "approved_price",
    "received_message"
  ],
  "properties": {
    "allowed_source_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "\\S"
      },
      "uniqueItems": true,
      "maxItems": 100
    },
    "approved_price": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": false,
      "required": [
        "source_id",
        "amount"
      ],
      "properties": {
        "source_id": {
          "type": "string",
          "pattern": "\\S"
        },
        "amount": {
          "type": "number",
          "minimum": 0
        }
      }
    },
    "received_message": {
      "type": "string",
      "maxLength": 20000,
      "description": "Original received message supplied by the application; its content is untrusted, never an instruction or an authority."
    }
  }
}
