{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/asterwise-com/json-schema/asterwise-com-api-response-natal-crystal-response-schema.json",
  "title": "ApiResponse[NatalCrystalResponse]",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/asterwise-com-crystals-api-openapi.yml#/components/schemas/ApiResponse_NatalCrystalResponse_",
  "properties": {
    "success": {
      "type": "boolean",
      "title": "Success",
      "description": "True if the request succeeded",
      "default": true
    },
    "message": {
      "type": "string",
      "title": "Message",
      "description": "Human-readable status message",
      "default": "success"
    },
    "data": {
      "$ref": "#/$defs/NatalCrystalResponse",
      "description": "The endpoint response payload"
    }
  },
  "type": "object",
  "required": [
    "data"
  ],
  "$defs": {
    "NatalCrystalContext": {
      "properties": {
        "lagna_sign": {
          "type": "string",
          "title": "Lagna Sign",
          "description": "Ascendant sign (English)."
        },
        "lagna_lord": {
          "type": "string",
          "title": "Lagna Lord",
          "description": "Lord of the 1st house."
        },
        "fifth_sign": {
          "type": "string",
          "title": "Fifth Sign",
          "description": "5th house sign (English)."
        },
        "fifth_lord": {
          "type": "string",
          "title": "Fifth Lord",
          "description": "Lord of the 5th house (Panchamesh — Lucky Stone)."
        },
        "ninth_sign": {
          "type": "string",
          "title": "Ninth Sign",
          "description": "9th house sign (English)."
        },
        "ninth_lord": {
          "type": "string",
          "title": "Ninth Lord",
          "description": "Lord of the 9th house (Bhagyesh — Fortune Stone)."
        },
        "yogakaraka": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Yogakaraka",
          "description": "Yogakaraka planet — lords both a non-1st Kendra and a non-1st Trikona. Null if none for this Lagna."
        },
        "contraindicated_lords": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Contraindicated Lords",
          "description": "Planets whose gems are contraindicated in this chart: Dusthana (6/8/12) lords that own no Trikona, plus debilitated or combust planets. Same rule as POST /v1/astro/gemstones."
        },
        "ayanamsa": {
          "type": "string",
          "title": "Ayanamsa",
          "description": "Ayanamsa the chart was cast with: the request's `ayanamsa` (until 2026-10 this always read \"lahiri\").",
          "default": "lahiri"
        }
      },
      "type": "object",
      "required": [
        "lagna_sign",
        "lagna_lord",
        "fifth_sign",
        "fifth_lord",
        "ninth_sign",
        "ninth_lord",
        "contraindicated_lords"
      ],
      "title": "NatalCrystalContext"
    },
    "NatalCrystalEntry": {
      "properties": {
        "slug": {
          "type": "string",
          "title": "Slug"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "colors": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Colors"
        },
        "hardness_mohs": {
          "type": "number",
          "title": "Hardness Mohs"
        },
        "chakras": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Chakras"
        },
        "element": {
          "type": "string",
          "title": "Element"
        },
        "zodiac_signs": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Zodiac Signs"
        },
        "vedic_planet": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Vedic Planet"
        },
        "vedic_correspondence": {
          "type": "string",
          "title": "Vedic Correspondence"
        },
        "western_planet": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Western Planet"
        },
        "keywords": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Keywords"
        },
        "healing_physical": {
          "type": "string",
          "title": "Healing Physical"
        },
        "healing_emotional": {
          "type": "string",
          "title": "Healing Emotional"
        },
        "healing_spiritual": {
          "type": "string",
          "title": "Healing Spiritual"
        },
        "description": {
          "type": "string",
          "title": "Description"
        },
        "origins": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Origins"
        },
        "affirmation": {
          "type": "string",
          "title": "Affirmation"
        },
        "caution": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Caution"
        },
        "match_score": {
          "type": "integer",
          "title": "Match Score",
          "description": "Gemstone match score based on house lordship."
        },
        "match_reasons": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Match Reasons",
          "description": "Classical factors — which house lordship triggered this recommendation."
        },
        "warnings": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Warnings",
          "description": "Classical cautions for this specific chart context."
        }
      },
      "type": "object",
      "required": [
        "slug",
        "name",
        "colors",
        "hardness_mohs",
        "chakras",
        "element",
        "zodiac_signs",
        "vedic_planet",
        "vedic_correspondence",
        "western_planet",
        "keywords",
        "healing_physical",
        "healing_emotional",
        "healing_spiritual",
        "description",
        "origins",
        "affirmation",
        "caution",
        "match_score",
        "match_reasons"
      ],
      "title": "NatalCrystalEntry"
    },
    "NatalCrystalResponse": {
      "properties": {
        "birth_time_provided": {
          "type": "boolean",
          "title": "Birth Time Provided",
          "description": "True when a birth time was supplied. False when it was not: house, Ascendant and Moon-dependent results then carry the accuracy limits of an unknown birth time.",
          "default": true
        },
        "natal_context": {
          "$ref": "#/$defs/NatalCrystalContext"
        },
        "total": {
          "type": "integer",
          "title": "Total"
        },
        "crystals": {
          "items": {
            "$ref": "#/$defs/NatalCrystalEntry"
          },
          "type": "array",
          "title": "Crystals"
        }
      },
      "type": "object",
      "required": [
        "natal_context",
        "total",
        "crystals"
      ],
      "title": "NatalCrystalResponse"
    }
  }
}