{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adadiamonds-com/json-schema/adadiamonds-com-diamond-schema.json",
  "title": "Diamond",
  "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/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"
      ]
    }
  }
}