{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/car-gene-com/json-schema/car-gene-com-get-model-relations-response-schema.json",
  "title": "GetModelRelationsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/car-gene-com-model-relations-api-openapi.yml#/components/schemas/GetModelRelationsResponse",
  "properties": {
    "relations": {
      "items": {
        "$ref": "#/$defs/ModelRelationResponse"
      },
      "type": "array",
      "title": "Relations"
    }
  },
  "type": "object",
  "required": [
    "relations"
  ],
  "$defs": {
    "ModelRelationEndpointResponse": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "chassis_code": {
          "type": "string",
          "title": "Chassis Code"
        },
        "start_year": {
          "type": "integer",
          "title": "Start Year"
        },
        "end_year": {
          "type": "integer",
          "title": "End Year"
        },
        "series_id": {
          "type": "string",
          "title": "Series Id"
        },
        "series_name": {
          "type": "string",
          "title": "Series Name"
        },
        "maker_id": {
          "type": "string",
          "title": "Maker Id"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name",
        "start_year",
        "series_id",
        "series_name",
        "maker_id"
      ],
      "title": "ModelRelationEndpointResponse",
      "description": "つながりの端点。**シリーズではなく世代**\n\n「86 は BRZ の兄弟車」は初代と2代目のそれぞれで成り立っている別の事実で、\nシリーズを端点にすると、まだ出ていない次の世代にも同じ関係があるという、\n出典の無い主張が行に含まれる (issue #1229)。\n\nシリーズ名とメーカー id を添えているのは、画面が相手を「トヨタ 86 の\n初代 86」と書くのに `/api/models` を引き直さずに済ませるため\n(`EngineerModelResponse` が series_name を添えているのと同じ理由)。"
    },
    "ModelRelationResponse": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "kind": {
          "type": "string",
          "title": "Kind"
        },
        "kind_name": {
          "type": "string",
          "title": "Kind Name"
        },
        "kind_directed": {
          "type": "boolean",
          "title": "Kind Directed"
        },
        "from_model": {
          "$ref": "#/$defs/ModelRelationEndpointResponse"
        },
        "to_model": {
          "$ref": "#/$defs/ModelRelationEndpointResponse"
        },
        "source_url": {
          "type": "string",
          "title": "Source Url"
        },
        "source_excerpt": {
          "type": "string",
          "title": "Source Excerpt"
        },
        "rationale": {
          "type": "string",
          "title": "Rationale"
        },
        "provenance": {
          "type": "string",
          "title": "Provenance"
        },
        "translation_source_url": {
          "type": "string",
          "title": "Translation Source Url"
        }
      },
      "type": "object",
      "required": [
        "id",
        "kind",
        "kind_name",
        "kind_directed",
        "from_model",
        "to_model"
      ],
      "title": "ModelRelationResponse",
      "description": "世代と世代のつながり、1行\n\n**同じシリーズの中の世代交代もここに入る** (issue #1254 §1 で #1229 の判断を\n覆した)。直系の置き場はこの行だけで、`models.start_year` の並びは後継を\n主張しない。**行が無い世代交代は「未確認」**で、後継がなかったことでは\nない。`models.group` (画面では「系統」) は描画の列だけを表す。"
    }
  }
}