{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/car-gene-com/json-schema/car-gene-com-shop-detail-response-schema.json",
  "title": "ShopDetailResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/car-gene-com-shops-api-openapi.yml#/components/schemas/ShopDetailResponse",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id"
    },
    "name": {
      "type": "string",
      "title": "Name"
    },
    "shop_type": {
      "type": "string",
      "title": "Shop Type"
    },
    "shop_type_code": {
      "type": "string",
      "title": "Shop Type Code"
    },
    "postal_code": {
      "type": "string",
      "title": "Postal Code"
    },
    "prefecture": {
      "type": "string",
      "title": "Prefecture"
    },
    "city": {
      "type": "string",
      "title": "City"
    },
    "address_line": {
      "type": "string",
      "title": "Address Line"
    },
    "latitude": {
      "type": "number",
      "title": "Latitude"
    },
    "longitude": {
      "type": "number",
      "title": "Longitude"
    },
    "phone": {
      "type": "string",
      "title": "Phone"
    },
    "website_url": {
      "type": "string",
      "title": "Website Url"
    },
    "reservation_url": {
      "type": "string",
      "title": "Reservation Url"
    },
    "reservation_method": {
      "type": "string",
      "title": "Reservation Method"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "last_verified_at": {
      "type": "string",
      "title": "Last Verified At"
    },
    "business_hours": {
      "$ref": "#/$defs/BusinessHoursResponse"
    },
    "photo": {
      "$ref": "#/$defs/ShopPhotoResponse"
    },
    "facts": {
      "items": {
        "$ref": "#/$defs/FactResponse"
      },
      "type": "array",
      "title": "Facts"
    },
    "missing_attributes": {
      "items": {
        "$ref": "#/$defs/ServiceAttributeResponse"
      },
      "type": "array",
      "title": "Missing Attributes"
    },
    "services": {
      "items": {
        "$ref": "#/$defs/ShopServiceDetailResponse"
      },
      "type": "array",
      "title": "Services"
    },
    "sources": {
      "items": {
        "$ref": "#/$defs/SourceResponse"
      },
      "type": "array",
      "title": "Sources"
    }
  },
  "type": "object",
  "required": [
    "id",
    "name",
    "status",
    "facts",
    "missing_attributes",
    "services",
    "sources"
  ],
  "$defs": {
    "BusinessHoursDayResponse": {
      "properties": {
        "open": {
          "type": "string",
          "title": "Open"
        },
        "close": {
          "type": "string",
          "title": "Close"
        }
      },
      "type": "object",
      "required": [
        "open",
        "close"
      ],
      "title": "BusinessHoursDayResponse",
      "description": "1日の営業時間。24 時間営業は 00:00 から 24:00 で表す"
    },
    "BusinessHoursResponse": {
      "properties": {
        "days": {
          "additionalProperties": {
            "anyOf": [
              {
                "$ref": "#/$defs/BusinessHoursDayResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": "object",
          "title": "Days"
        },
        "note": {
          "type": "string",
          "title": "Note"
        }
      },
      "type": "object",
      "required": [
        "days"
      ],
      "title": "BusinessHoursResponse",
      "description": "曜日ごとの営業時間\n\n**キーが無い曜日は未確認、値が null は定休。** 7日ぶんを埋めずに済む形に\nしているのは、出典が「月〜土 6:00〜22:00」までしか書いていないことが多いため。\n出典と確信度は返さない (画面に出さないものを API に出さない)。"
    },
    "FactResponse": {
      "properties": {
        "attribute_code": {
          "type": "string",
          "title": "Attribute Code"
        },
        "attribute_name": {
          "type": "string",
          "title": "Attribute Name"
        },
        "value_type": {
          "type": "string",
          "title": "Value Type"
        },
        "unit": {
          "type": "string",
          "title": "Unit"
        },
        "value_bool": {
          "type": "boolean",
          "title": "Value Bool"
        },
        "value_number": {
          "type": "number",
          "title": "Value Number"
        },
        "value_text": {
          "type": "string",
          "title": "Value Text"
        },
        "confidence": {
          "type": "number",
          "title": "Confidence"
        },
        "confirmed_at": {
          "type": "string",
          "title": "Confirmed At"
        },
        "source_url": {
          "type": "string",
          "title": "Source Url"
        }
      },
      "type": "object",
      "required": [
        "attribute_code",
        "attribute_name",
        "value_type"
      ],
      "title": "FactResponse",
      "description": "確認できた事実。どこから得たか、どれくらい確かかを併せて返す"
    },
    "ServiceAttributeResponse": {
      "properties": {
        "code": {
          "type": "string",
          "title": "Code"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "value_type": {
          "type": "string",
          "title": "Value Type"
        },
        "unit": {
          "type": "string",
          "title": "Unit"
        },
        "is_required": {
          "type": "boolean",
          "title": "Is Required"
        }
      },
      "type": "object",
      "required": [
        "code",
        "name",
        "value_type",
        "is_required"
      ],
      "title": "ServiceAttributeResponse",
      "description": "施術ごとに確認すべき条件。検索 UI の絞り込み項目にそのまま使える"
    },
    "ShopPhotoResponse": {
      "properties": {
        "url": {
          "type": "string",
          "title": "Url"
        },
        "page_url": {
          "type": "string",
          "title": "Page Url"
        },
        "credit": {
          "type": "string",
          "title": "Credit"
        }
      },
      "type": "object",
      "required": [
        "url"
      ],
      "title": "ShopPhotoResponse",
      "description": "店舗の写真。公式サイトのものだけ (Google の写真は保存できない)"
    },
    "ShopServiceDetailResponse": {
      "properties": {
        "service_code": {
          "type": "string",
          "title": "Service Code"
        },
        "service_name": {
          "type": "string",
          "title": "Service Name"
        },
        "availability": {
          "type": "string",
          "title": "Availability"
        },
        "price_min": {
          "type": "integer",
          "title": "Price Min"
        },
        "price_max": {
          "type": "integer",
          "title": "Price Max"
        },
        "price_note": {
          "type": "string",
          "title": "Price Note"
        },
        "duration_minutes": {
          "type": "integer",
          "title": "Duration Minutes"
        },
        "last_verified_at": {
          "type": "string",
          "title": "Last Verified At"
        },
        "business_hours": {
          "$ref": "#/$defs/BusinessHoursResponse"
        },
        "prices": {
          "items": {
            "$ref": "#/$defs/ShopServicePriceResponse"
          },
          "type": "array",
          "title": "Prices",
          "default": []
        },
        "facts": {
          "items": {
            "$ref": "#/$defs/FactResponse"
          },
          "type": "array",
          "title": "Facts"
        },
        "missing_attributes": {
          "items": {
            "$ref": "#/$defs/ServiceAttributeResponse"
          },
          "type": "array",
          "title": "Missing Attributes"
        }
      },
      "type": "object",
      "required": [
        "service_code",
        "service_name",
        "availability",
        "facts",
        "missing_attributes"
      ],
      "title": "ShopServiceDetailResponse"
    },
    "ShopServicePriceResponse": {
      "properties": {
        "label": {
          "type": "string",
          "title": "Label"
        },
        "price_yen": {
          "type": "integer",
          "title": "Price Yen"
        },
        "duration_minutes": {
          "type": "number",
          "title": "Duration Minutes"
        },
        "note": {
          "type": "string",
          "title": "Note"
        }
      },
      "type": "object",
      "required": [
        "label",
        "price_yen"
      ],
      "title": "ShopServicePriceResponse",
      "description": "料金メニューの1コース。price_min / price_max では表せない区別を持つ"
    },
    "SourceResponse": {
      "properties": {
        "kind": {
          "type": "string",
          "title": "Kind"
        },
        "url": {
          "type": "string",
          "title": "Url"
        },
        "fetched_at": {
          "type": "string",
          "title": "Fetched At"
        }
      },
      "type": "object",
      "required": [
        "kind"
      ],
      "title": "SourceResponse",
      "description": "店の値の根拠の fact の source 1つ (#1933 の 5d)\n\n**逐語は返さない** (#1026)。`fetched_at` は、その source の fact を初めて読んだ日\n(日付だけ)。"
    }
  }
}