{
  "type": "object",
  "properties": {
    "schema_version": {
      "const": 1
    },
    "module_id": {
      "const": "ICHL-015"
    },
    "spacing_in": {
      "enum": [
        16,
        24
      ]
    },
    "quotes": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "supplier": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1200
          },
          "url": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1200,
            "pattern": "^https?://[^ ]+$"
          },
          "as_of": {
            "type": "string",
            "format": "date"
          },
          "unit_price_usd": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000
          },
          "stock_length_in": {
            "type": "number",
            "minimum": 91.5,
            "maximum": 240
          },
          "units_per_pack": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100000
          },
          "alternatives": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1200,
              "pattern": "^https?://[^ ]+$"
            },
            "maxItems": 6,
            "uniqueItems": true
          },
          "alternatives_note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1200
          }
        },
        "required": [
          "supplier",
          "url",
          "as_of",
          "unit_price_usd"
        ],
        "additionalProperties": false
      },
      "propertyNames": {
        "type": "string",
        "minLength": 1,
        "maxLength": 1200,
        "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,99}$"
      },
      "maxProperties": 64
    },
    "stock_length_in": {
      "type": "number",
      "minimum": 91.5,
      "maximum": 240
    },
    "kerf_in": {
      "type": "number",
      "minimum": 0,
      "maximum": 0.5
    }
  },
  "required": [
    "schema_version",
    "module_id",
    "spacing_in",
    "quotes",
    "stock_length_in",
    "kerf_in"
  ],
  "additionalProperties": false,
  "title": "Bill of Materials (BOM)",
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
