lib

Core libraries for Radroots
git clone https://radroots.dev/git/lib.git
Log | Files | Refs | README

json_models.v1.json (3464B)


      1 {
      2   "suite": "replica_schema",
      3   "contract_version": "1.0.0",
      4   "vectors": [
      5     {
      6       "id": "replica_schema_farm_json_valid_001",
      7       "kind": "replica_schema.farm_json.valid",
      8       "input": {
      9         "json": {
     10           "id": "farm-alpha",
     11           "created_at": "2026-07-14T00:00:00Z",
     12           "updated_at": "2026-07-14T00:00:00Z",
     13           "d_tag": "farm-alpha",
     14           "pubkey": "1111111111111111111111111111111111111111111111111111111111111111",
     15           "name": "Radroots Fixture Farm",
     16           "about": null,
     17           "website": null,
     18           "picture": null,
     19           "banner": null,
     20           "location_primary": null,
     21           "location_city": "Fixture City",
     22           "location_region": "Fixture Region",
     23           "location_country": "Fixture Country"
     24         }
     25       },
     26       "expected": {
     27         "id": "farm-alpha"
     28       }
     29     },
     30     {
     31       "id": "replica_schema_farm_json_missing_required_002",
     32       "kind": "replica_schema.farm_json.invalid",
     33       "input": {
     34         "json": {
     35           "id": "farm-alpha",
     36           "created_at": "2026-07-14T00:00:00Z",
     37           "updated_at": "2026-07-14T00:00:00Z",
     38           "d_tag": "farm-alpha",
     39           "pubkey": "1111111111111111111111111111111111111111111111111111111111111111"
     40         }
     41       },
     42       "expected": {
     43         "error": "missing_required_field"
     44       }
     45     },
     46     {
     47       "id": "replica_schema_trade_product_json_valid_003",
     48       "kind": "replica_schema.trade_product_json.valid",
     49       "input": {
     50         "json": {
     51           "id": "trade-product-alpha",
     52           "created_at": "2026-07-14T00:00:00Z",
     53           "updated_at": "2026-07-14T00:00:00Z",
     54           "key": "fixture-carrot",
     55           "category": "produce",
     56           "title": "Fixture Carrots",
     57           "summary": "Synthetic fixture product",
     58           "process": "fresh",
     59           "lot": "lot-alpha",
     60           "profile": "farm-alpha",
     61           "year": 2026,
     62           "qty_amt": 12.5,
     63           "qty_amt_exact": "12.5",
     64           "qty_unit": "kg",
     65           "qty_label": null,
     66           "qty_avail": 12,
     67           "price_amt": 6.25,
     68           "price_amt_exact": "6.25",
     69           "price_currency": "USD",
     70           "price_qty_amt": 1.0,
     71           "price_qty_amt_exact": "1.0",
     72           "price_qty_unit": "kg",
     73           "listing_addr": null,
     74           "primary_bin_id": null,
     75           "verified_primary_bin_id": null,
     76           "notes": null
     77         }
     78       },
     79       "expected": {
     80         "id": "trade-product-alpha"
     81       }
     82     },
     83     {
     84       "id": "replica_schema_trade_product_json_wrong_type_004",
     85       "kind": "replica_schema.trade_product_json.invalid",
     86       "input": {
     87         "json": {
     88           "id": "trade-product-alpha",
     89           "created_at": "2026-07-14T00:00:00Z",
     90           "updated_at": "2026-07-14T00:00:00Z",
     91           "key": "fixture-carrot",
     92           "category": "produce",
     93           "title": "Fixture Carrots",
     94           "summary": "Synthetic fixture product",
     95           "process": "fresh",
     96           "lot": "lot-alpha",
     97           "profile": "farm-alpha",
     98           "year": "2026",
     99           "qty_amt": 12.5,
    100           "qty_amt_exact": "12.5",
    101           "qty_unit": "kg",
    102           "price_amt": 6.25,
    103           "price_amt_exact": "6.25",
    104           "price_currency": "USD",
    105           "price_qty_amt": 1.0,
    106           "price_qty_amt_exact": "1.0",
    107           "price_qty_unit": "kg"
    108         }
    109       },
    110       "expected": {
    111         "error": "wrong_type"
    112       }
    113     }
    114   ]
    115 }