{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://api.supasaju.com/schemas/tojeong.json",
  "title": "tojeong 모듈 응답",
  "description": "실제 엔진 출력에서 생성된 스키마입니다.",
  "type": "object",
  "properties": {
    "lunarYear": {
      "type": "integer",
      "examples": [
        2026
      ]
    },
    "ganji": {
      "type": "string",
      "examples": [
        "병오"
      ]
    },
    "ganjiHan": {
      "type": "string",
      "examples": [
        "丙午"
      ]
    },
    "startsOn": {
      "type": "string",
      "examples": [
        "2026-02-17"
      ]
    },
    "endsOn": {
      "type": "string",
      "examples": [
        "2027-02-06"
      ]
    },
    "koreanAge": {
      "type": "integer",
      "examples": [
        39,
        37
      ]
    },
    "code": {
      "type": "string",
      "examples": [
        "732",
        "531"
      ]
    },
    "upper": {
      "type": "integer",
      "examples": [
        7,
        5
      ]
    },
    "middle": {
      "type": "integer",
      "examples": [
        3,
        5
      ]
    },
    "lower": {
      "type": "integer",
      "examples": [
        2,
        1
      ]
    },
    "work": {
      "type": "object",
      "properties": {
        "taese": {
          "type": "object",
          "properties": {
            "ganji": {
              "type": "string",
              "examples": [
                "병오"
              ]
            },
            "ganjiHan": {
              "type": "string",
              "examples": [
                "丙午"
              ]
            },
            "value": {
              "type": "integer",
              "examples": [
                16
              ]
            }
          },
          "required": [
            "ganji",
            "ganjiHan",
            "value"
          ]
        },
        "wolgeon": {
          "type": "object",
          "properties": {
            "ganji": {
              "type": "string",
              "examples": [
                "경인",
                "무술"
              ]
            },
            "ganjiHan": {
              "type": "string",
              "examples": [
                "庚寅",
                "戊戌"
              ]
            },
            "value": {
              "type": "integer",
              "examples": [
                15,
                10
              ]
            },
            "monthDays": {
              "type": "integer",
              "examples": [
                30,
                29
              ]
            }
          },
          "required": [
            "ganji",
            "ganjiHan",
            "monthDays",
            "value"
          ]
        },
        "iljin": {
          "type": "object",
          "properties": {
            "ganji": {
              "type": "string",
              "examples": [
                "정해",
                "임신"
              ]
            },
            "ganjiHan": {
              "type": "string",
              "examples": [
                "丁亥",
                "壬申"
              ]
            },
            "value": {
              "type": "integer",
              "examples": [
                15,
                16
              ]
            },
            "solarDate": {
              "type": "string",
              "examples": [
                "2026-03-14",
                "2026-10-25"
              ]
            }
          },
          "required": [
            "ganji",
            "ganjiHan",
            "solarDate",
            "value"
          ]
        }
      },
      "required": [
        "iljin",
        "taese",
        "wolgeon"
      ]
    },
    "assumptions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "examples": [
              "leapBirth",
              "missingDay"
            ]
          },
          "note": {
            "type": "string",
            "examples": [
              "윤5월생은 평달 5월로 본다.",
              "윤4월생은 평달 4월로 본다."
            ]
          }
        },
        "required": [
          "id",
          "note"
        ]
      }
    },
    "months": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "lunarMonth": {
            "type": "integer",
            "examples": [
              1,
              2
            ]
          },
          "isLeapMonth": {
            "type": "boolean"
          },
          "startsOn": {
            "type": "string",
            "examples": [
              "2026-02-17",
              "2026-03-19"
            ]
          },
          "endsOn": {
            "type": "string",
            "examples": [
              "2026-03-18",
              "2026-04-16"
            ]
          },
          "ganji": {
            "type": "string",
            "examples": [
              "경인",
              "신묘"
            ]
          },
          "ganjiHan": {
            "type": "string",
            "examples": [
              "庚寅",
              "辛卯"
            ]
          },
          "isCurrent": {
            "type": "boolean"
          },
          "offsetFromCurrent": {
            "type": "integer",
            "examples": [
              -7,
              -6
            ]
          },
          "relativeKo": {
            "type": "string",
            "examples": [
              "7개월 전",
              "6개월 전"
            ]
          }
        },
        "required": [
          "endsOn",
          "ganji",
          "ganjiHan",
          "isCurrent",
          "isLeapMonth",
          "lunarMonth",
          "offsetFromCurrent",
          "relativeKo",
          "startsOn"
        ]
      }
    },
    "passage": {
      "type": [
        "null",
        "object"
      ],
      "properties": {
        "edition": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "examples": [
                "sample-45"
              ]
            },
            "publisher": {
              "type": "string",
              "examples": [
                "(견본 출판사)"
              ]
            },
            "title": {
              "type": "string",
              "examples": [
                "토정비결"
              ]
            },
            "gu": {
              "type": "integer",
              "examples": [
                45
              ]
            },
            "publishedYear": {
              "type": "integer",
              "examples": [
                2000
              ]
            },
            "license": {
              "type": "string",
              "examples": [
                "licensed"
              ]
            },
            "attribution": {
              "type": "string",
              "examples": [
                "(견본) 계약상 출처 표시 문구"
              ]
            },
            "layout": {
              "type": "object",
              "properties": {
                "generalGu": {
                  "type": "integer"
                },
                "perMonthGu": {
                  "type": "integer"
                }
              },
              "required": [
                "generalGu",
                "perMonthGu"
              ]
            }
          },
          "required": [
            "attribution",
            "gu",
            "id",
            "layout",
            "license",
            "publishedYear",
            "publisher",
            "title"
          ]
        },
        "general": {
          "type": "object",
          "properties": {
            "original": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "modernKo": {
              "type": "string",
              "examples": [
                "【견본 현대어 요지】"
              ]
            },
            "tone": {
              "type": "string",
              "examples": [
                "길"
              ]
            }
          },
          "required": [
            "modernKo",
            "original",
            "tone"
          ]
        },
        "months": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "original": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "modernKo": {
                "type": [
                  "null",
                  "string"
                ]
              },
              "tone": {
                "type": [
                  "null",
                  "string"
                ]
              },
              "lunarMonth": {
                "type": "integer"
              }
            },
            "required": [
              "lunarMonth",
              "modernKo",
              "original",
              "tone"
            ]
          }
        }
      },
      "required": [],
      "description": "괘의 원문 — general(총운)과 months(음력 1~12월, 윤달은 그 달 글). **출판사 계약 전에는 늘 null** 이고 passageStatus 가 \"unavailable\" 입니다. 이 스키마의 문자열 예시는 견본입니다. original 은 구 단위 원문, modernKo 는 현대어 요지(없으면 null), tone(길·평·흉)은 원문의 표시일 뿐 점수가 아닙니다. 원문을 보일 때는 edition.attribution(계약상 출처 표시)을 함께 보이십시오."
    },
    "passageStatus": {
      "type": "string",
      "examples": [
        "unavailable",
        "available"
      ],
      "enum": [
        "available",
        "unavailable"
      ],
      "description": "passage 가 있으면 available. 계약 전에는 늘 unavailable — 괘 번호로 원문을 지어내지 마십시오."
    },
    "basis": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "assumptions",
    "code",
    "endsOn",
    "ganji",
    "ganjiHan",
    "koreanAge",
    "lower",
    "lunarYear",
    "middle",
    "months",
    "passage",
    "passageStatus",
    "startsOn",
    "upper",
    "work"
  ]
}