{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/car-gene-com/json-schema/car-gene-com-contact-inquiry-input-schema.json",
  "title": "ContactInquiryInput",
  "description": "お問い合わせフォームの中身\n\n上限は画面と揃える。メールアドレスは Reply-To に入るので、空白と改行を\n含むものは通さない (ヘッダーの差し込みを塞ぐ)。",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/car-gene-com-contact-api-openapi.yml#/components/schemas/ContactInquiryInput",
  "properties": {
    "topic": {
      "$ref": "#/$defs/ContactTopic"
    },
    "organization": {
      "type": "string",
      "maxLength": 200,
      "title": "Organization",
      "default": ""
    },
    "name": {
      "type": "string",
      "maxLength": 100,
      "minLength": 1,
      "title": "Name"
    },
    "email": {
      "type": "string",
      "maxLength": 254,
      "pattern": "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",
      "title": "Email"
    },
    "page_url": {
      "type": "string",
      "maxLength": 500,
      "title": "Page Url",
      "default": ""
    },
    "message": {
      "type": "string",
      "maxLength": 3000,
      "minLength": 1,
      "title": "Message"
    },
    "website": {
      "type": "string",
      "title": "Website",
      "description": "人には見えない欄。機械よけ",
      "default": ""
    },
    "elapsed_ms": {
      "type": "integer",
      "title": "Elapsed Ms",
      "description": "フォームを開いてから送るまでの時間",
      "default": 0
    }
  },
  "type": "object",
  "required": [
    "topic",
    "name",
    "email",
    "message"
  ],
  "$defs": {
    "ContactTopic": {
      "type": "string",
      "enum": [
        "used-car",
        "parts",
        "shop",
        "partnership",
        "correction",
        "info",
        "other"
      ],
      "title": "ContactTopic",
      "description": "ご用件。値は画面の選択肢の id、文言は `domains/contact` が持つ"
    }
  }
}