{
  "$id": "https://schema.nfh.global/Commitment/v2.0",
  "x-iri": "https://schema.nfh.global/Commitment/v2.0",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "required": [
    "status",
    "resources",
    "offer"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "type": "object",
      "properties": {
        "descriptor": {
          "allOf": [
            {
              "$ref": "https://schema.nfh.global/Descriptor/v2.0/schema.json"
            },
            {
              "properties": {
                "code": {
                  "enum": [
                    "DRAFT",
                    "ACTIVE",
                    "CLOSED"
                  ]
                }
              }
            }
          ]
        }
      }
    },
    "resources": {
      "type": "array",
      "items": {
        "$ref": "https://schema.nfh.global/Resource/v2.0/schema.json"
      }
    },
    "offer": {
      "$ref": "https://schema.nfh.global/Offer/v2.0/schema.json"
    },
    "commitmentAttributes": {
      "description": "Domain-specific extension attributes for this commitment.",
      "allOf": [
        {
          "$ref": "https://schema.nfh.global/Attributes/v2.0/schema.json"
        },
        {
          "properties": {}
        }
      ]
    }
  }
}
