{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/car-gene-com/json-schema/car-gene-com-minor-change-response-schema.json",
  "title": "MinorChangeResponse",
  "description": "世代 (ModelResponse) の中のマイナーチェンジ・年次改良 (#1714 の Minor Change)\n\n**ModelResponse には含めない。** トップの系統樹は改良を使わないので、\nそこへ入れると全モデルの応答と orval の生成物が改良の分だけ太る。\n要る画面が `/api/minor-changes?model_id=` で別に引く。",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/car-gene-com-minor-changes-api-openapi.yml#/components/schemas/MinorChangeResponse",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id"
    },
    "name": {
      "type": "string",
      "title": "Name"
    },
    "model_id": {
      "type": "string",
      "title": "Model Id"
    },
    "common_name": {
      "type": "string",
      "title": "Common Name"
    },
    "start_year": {
      "type": "integer",
      "title": "Start Year"
    },
    "start_month": {
      "type": "integer",
      "title": "Start Month"
    },
    "end_year": {
      "type": "integer",
      "title": "End Year"
    },
    "end_month": {
      "type": "integer",
      "title": "End Month"
    },
    "chassis_code": {
      "type": "string",
      "title": "Chassis Code"
    },
    "description": {
      "type": "string",
      "title": "Description"
    },
    "source_url": {
      "type": "string",
      "title": "Source Url"
    },
    "provenance": {
      "type": "string",
      "title": "Provenance"
    },
    "translation_source_url": {
      "type": "string",
      "title": "Translation Source Url"
    },
    "classifications": {
      "items": {
        "$ref": "#/$defs/ClassificationResponse"
      },
      "type": "array",
      "title": "Classifications",
      "default": []
    },
    "details": {
      "items": {
        "$ref": "#/$defs/MinorChangeDetailResponse"
      },
      "type": "array",
      "title": "Details",
      "default": []
    },
    "grades": {
      "items": {
        "$ref": "#/$defs/GradeResponse"
      },
      "type": "array",
      "title": "Grades",
      "default": []
    }
  },
  "type": "object",
  "required": [
    "id",
    "name",
    "model_id",
    "start_year",
    "source_url"
  ],
  "$defs": {
    "ClassificationResponse": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "type": {
          "type": "string",
          "title": "Type"
        },
        "source_url": {
          "type": "string",
          "title": "Source Url"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name",
        "type"
      ],
      "title": "ClassificationResponse",
      "description": "改良に付いた分類・呼称1つ (#1714)。前期 / 後期 / 丸目 / 涙目 / 鷹目\n\n`type` は `api/domains/classification_types.py` の2つ (DB の check と同じ)。\n**世代に属さない語**で、同じ「前期」が 86 にもロードスターにも付く。\n`source_url` はこの改良をその語で括った根拠 (中間表の列) で、出典が\n無い紐づけは None。"
    },
    "GradeResponse": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "chassis_code": {
          "type": "string",
          "title": "Chassis Code"
        },
        "displacement_cc": {
          "type": "integer",
          "title": "Displacement Cc"
        },
        "doors": {
          "type": "integer",
          "title": "Doors"
        },
        "transmission": {
          "type": "string",
          "title": "Transmission"
        },
        "drivetrain": {
          "type": "string",
          "title": "Drivetrain"
        },
        "seats": {
          "type": "integer",
          "title": "Seats"
        },
        "fuel_economy_km_l": {
          "type": "number",
          "title": "Fuel Economy Km L"
        },
        "weight_kg": {
          "type": "integer",
          "title": "Weight Kg"
        },
        "length_mm": {
          "type": "integer",
          "title": "Length Mm"
        },
        "width_mm": {
          "type": "integer",
          "title": "Width Mm"
        },
        "height_mm": {
          "type": "integer",
          "title": "Height Mm"
        },
        "price_yen": {
          "type": "integer",
          "title": "Price Yen"
        },
        "sale_start_year": {
          "type": "integer",
          "title": "Sale Start Year"
        },
        "sale_start_month": {
          "type": "integer",
          "title": "Sale Start Month"
        },
        "sale_end_year": {
          "type": "integer",
          "title": "Sale End Year"
        },
        "sale_end_month": {
          "type": "integer",
          "title": "Sale End Month"
        },
        "engine_code": {
          "type": "string",
          "title": "Engine Code"
        },
        "max_power": {
          "type": "string",
          "title": "Max Power"
        },
        "max_power_ps": {
          "type": "integer",
          "title": "Max Power Ps"
        },
        "max_torque": {
          "type": "string",
          "title": "Max Torque"
        },
        "max_torque_nm": {
          "type": "number",
          "title": "Max Torque Nm"
        },
        "tire_size_front": {
          "type": "string",
          "title": "Tire Size Front"
        },
        "tire_size_rear": {
          "type": "string",
          "title": "Tire Size Rear"
        },
        "source_url": {
          "type": "string",
          "title": "Source Url"
        },
        "edition_id": {
          "type": "string",
          "title": "Edition Id"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name",
        "source_url"
      ],
      "title": "GradeResponse",
      "description": "改良1つの中のグレード1行 (#1493)。公開ページの表の1行\n\n列は goo-net のカタログの表に合わせてある (DB の `model_grades`)。**数値の無い\n列は None** で、出典がその値を持たない (古い車の価格・燃費など)。\n販売開始・終了は月単位で、終了の None は「世代の終わりまで」。"
    },
    "MinorChangeDetailResponse": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "aspect": {
          "type": "string",
          "title": "Aspect"
        },
        "description": {
          "type": "string",
          "title": "Description"
        },
        "source_url": {
          "type": "string",
          "title": "Source Url"
        },
        "part": {
          "type": "string",
          "title": "Part"
        },
        "provenance": {
          "type": "string",
          "title": "Provenance"
        },
        "translation_source_url": {
          "type": "string",
          "title": "Translation Source Url"
        }
      },
      "type": "object",
      "required": [
        "id",
        "aspect",
        "description",
        "source_url"
      ],
      "title": "MinorChangeDetailResponse",
      "description": "改良1つの中の、観点ごとの変更点 (#1493、#1714 で details に改名)\n\n`aspect` は `api/domains/minor_change_aspects.py` の6つ (DB の check と同じ)。\n**1行に出典1本。** 改良の行の `source_url` とは別で、名前の根拠 (ja.wikipedia)\nと中身の根拠 (メーカーのリリース) が違う文書にあるのが普通。"
    }
  }
}