{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adadiamonds-com/json-schema/adadiamonds-com-diamond-list-schema.json",
  "title": "DiamondList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adadiamonds-com-catalog-api-openapi.yml#/components/schemas/DiamondList",
  "type": "object",
  "required": [
    "object",
    "currency",
    "data",
    "pagination"
  ],
  "properties": {
    "object": {
      "type": "string",
      "const": "list"
    },
    "currency": {
      "type": "string",
      "const": "USD"
    },
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Diamond"
      }
    },
    "pagination": {
      "$ref": "#/$defs/Pagination"
    }
  },
  "$defs": {
    "Diamond": {
      "type": "object",
      "required": [
        "id",
        "name",
        "url",
        "price"
      ],
      "properties": {
        "object": {
          "type": "string",
          "const": "diamond",
          "description": "Present on single-item responses."
        },
        "currency": {
          "type": "string",
          "const": "USD"
        },
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "price": {
          "type": [
            "number",
            "null"
          ],
          "description": "USD, loose stone only."
        },
        "carat": {
          "type": [
            "number",
            "null"
          ]
        },
        "shape": {
          "type": [
            "string",
            "null"
          ]
        },
        "color": {
          "type": [
            "string",
            "null"
          ]
        },
        "clarity": {
          "type": [
            "string",
            "null"
          ]
        },
        "cut": {
          "type": [
            "string",
            "null"
          ]
        },
        "certificate": {
          "type": [
            "string",
            "null"
          ],
          "description": "Grading report number."
        },
        "lab": {
          "type": [
            "string",
            "null"
          ],
          "description": "Grading laboratory (GCAL, IGI, GIA)."
        },
        "measurements": {
          "type": [
            "string",
            "null"
          ]
        },
        "lengthToWidthRatio": {
          "type": [
            "number",
            "null"
          ]
        }
      }
    },
    "Pagination": {
      "type": "object",
      "required": [
        "total",
        "limit",
        "offset",
        "has_more"
      ],
      "properties": {
        "total": {
          "type": "integer",
          "description": "Matches before pagination."
        },
        "limit": {
          "type": "integer"
        },
        "offset": {
          "type": "integer"
        },
        "has_more": {
          "type": "boolean",
          "description": "Whether `offset + limit` would return more."
        }
      }
    }
  }
}