{
  "tool_id": "art-202-tdmrep-reservation-builder",
  "note": "golden_hash filled by `node golden-parity.test.mjs --update`.",
  "vectors": [
    {
      "name": "empty_input",
      "policy_parameters": {},
      "output_payload": {
        "tdm_reservation": 1,
        "location": "/",
        "tdmrep_json": [
          {
            "location": "/",
            "tdm-reservation": 1
          }
        ],
        "content_usage_header": "tdm-reservation: 1",
        "meta_tag_html": "<meta name=\"tdm-reservation\" content=\"1\">",
        "iscc_ref": null,
        "tdmrep_spec": "https://www.w3.org/community/reports/tdmrep/CG-FINAL-tdmrep-20240202/",
        "aipref_spec": "https://datatracker.ietf.org/doc/draft-ietf-aipref-attach/",
        "schema_checks": [
          {
            "check": "reservation_value",
            "pass": true,
            "detail": "tdm-reservation: 1 (rights reserved)"
          },
          {
            "check": "location_format",
            "pass": true,
            "detail": "location valid: /"
          },
          {
            "check": "policy_url_format",
            "pass": true,
            "detail": "policy_url not provided (optional)"
          }
        ],
        "all_checks_pass": true
      },
      "golden_hash": "74be70b2784563e802c1dbef76ca947e095200154144d653d37fc7f25e16b194"
    },
    {
      "name": "reserved_with_policy",
      "policy_parameters": {
        "reserved": 1,
        "location": "/articles/",
        "policy_url": "https://example.com/tdm-policy"
      },
      "output_payload": {
        "tdm_reservation": 1,
        "location": "/articles/",
        "tdmrep_json": [
          {
            "location": "/articles/",
            "tdm-reservation": 1,
            "tdm-policy": "https://example.com/tdm-policy"
          }
        ],
        "content_usage_header": "tdm-reservation: 1\ntdm-policy: https://example.com/tdm-policy",
        "meta_tag_html": "<meta name=\"tdm-reservation\" content=\"1\">\n<meta name=\"tdm-policy\" content=\"https://example.com/tdm-policy\">",
        "iscc_ref": null,
        "tdmrep_spec": "https://www.w3.org/community/reports/tdmrep/CG-FINAL-tdmrep-20240202/",
        "aipref_spec": "https://datatracker.ietf.org/doc/draft-ietf-aipref-attach/",
        "schema_checks": [
          {
            "check": "reservation_value",
            "pass": true,
            "detail": "tdm-reservation: 1 (rights reserved)"
          },
          {
            "check": "location_format",
            "pass": true,
            "detail": "location valid: /articles/"
          },
          {
            "check": "policy_url_format",
            "pass": true,
            "detail": "policy_url valid http(s): https://example.com/tdm-policy"
          }
        ],
        "all_checks_pass": true
      },
      "golden_hash": "cd641db6cfcd38f9d33f0912c7d66b2c0c9c901f849135e6bba0d6ca2c86381b"
    },
    {
      "name": "not_reserved",
      "policy_parameters": {
        "reserved": 0,
        "location": "/",
        "policy_url": "https://example.com/open-data-policy"
      },
      "output_payload": {
        "tdm_reservation": 0,
        "location": "/",
        "tdmrep_json": [
          {
            "location": "/",
            "tdm-reservation": 0,
            "tdm-policy": "https://example.com/open-data-policy"
          }
        ],
        "content_usage_header": "tdm-reservation: 0\ntdm-policy: https://example.com/open-data-policy",
        "meta_tag_html": "<meta name=\"tdm-reservation\" content=\"0\">\n<meta name=\"tdm-policy\" content=\"https://example.com/open-data-policy\">",
        "iscc_ref": null,
        "tdmrep_spec": "https://www.w3.org/community/reports/tdmrep/CG-FINAL-tdmrep-20240202/",
        "aipref_spec": "https://datatracker.ietf.org/doc/draft-ietf-aipref-attach/",
        "schema_checks": [
          {
            "check": "reservation_value",
            "pass": true,
            "detail": "tdm-reservation: 0 (not reserved)"
          },
          {
            "check": "location_format",
            "pass": true,
            "detail": "location valid: /"
          },
          {
            "check": "policy_url_format",
            "pass": true,
            "detail": "policy_url valid http(s): https://example.com/open-data-policy"
          }
        ],
        "all_checks_pass": true
      },
      "golden_hash": "d46f567ae0597743617e09c2624bc2ed292c99b1748486564f6b318099f890ef"
    },
    {
      "name": "with_iscc_ref",
      "policy_parameters": {
        "reserved": true,
        "location": "/images/",
        "iscc_ref": "ISCC:KACYPXW445FTYNJ3CYSXHAFJMA2HUWULUNRFE3BLHRSCXYH2M5AEGQY"
      },
      "output_payload": {
        "tdm_reservation": 1,
        "location": "/images/",
        "tdmrep_json": [
          {
            "location": "/images/",
            "tdm-reservation": 1
          }
        ],
        "content_usage_header": "tdm-reservation: 1",
        "meta_tag_html": "<meta name=\"tdm-reservation\" content=\"1\">",
        "iscc_ref": "ISCC:KACYPXW445FTYNJ3CYSXHAFJMA2HUWULUNRFE3BLHRSCXYH2M5AEGQY",
        "tdmrep_spec": "https://www.w3.org/community/reports/tdmrep/CG-FINAL-tdmrep-20240202/",
        "aipref_spec": "https://datatracker.ietf.org/doc/draft-ietf-aipref-attach/",
        "schema_checks": [
          {
            "check": "reservation_value",
            "pass": true,
            "detail": "tdm-reservation: 1 (rights reserved)"
          },
          {
            "check": "location_format",
            "pass": true,
            "detail": "location valid: /images/"
          },
          {
            "check": "policy_url_format",
            "pass": true,
            "detail": "policy_url not provided (optional)"
          }
        ],
        "all_checks_pass": true
      },
      "golden_hash": "ca314226b2a1d307ae354cf82ca2d9451ad5f08e244495eaf8020bf4b2e3073d"
    }
  ]
}
