{
  "openapi": "3.0.1",
  "info": {
    "title": "Factory Certificate API",
    "description": "車機工廠批次申請 X.509 憑證(/api/v1/factory/*)。\n\n**認證**:先打 `/api/v1/factory/auth/token` 取得 Bearer Token。\n\n**每一支業務 API 都要帶三個標頭**:`Authorization`、`X-Factory-ID`(你的 clientId)、`X-Request-ID`(單一值、≤128 字元、僅英數與 `- _ . :`)。缺任一個一律 400。\n\n**`X-Request-ID` 是三支寫入端點的防重複鍵**(batch-request / batch-activate / revoke-registration):逾時重送請沿用同一個值,換新的等於送出一筆新請求 —— 對申請批次而言就是多簽一批憑證。查詢與下載不做冪等。\n\n**`revoke-registration` 註銷前會先確認這台車有沒有車主在使用**(§4.6):只要仍有有效綁定(不論車主本人或被授權的使用者),一律回 `409 DEVICE_ALREADY_BOUND`,必須先由管理平台解綁才能註銷。\n\n⚠️ 這些不是壓測用的端點 —— 每一次申請都會真的簽發憑證並占用車機身分名額,無法收回。",
    "version": "v1"
  },
  "paths": {
    "/api/v1/factory/auth/token": {
      "post": {
        "tags": [
          "FactoryAuth"
        ],
        "summary": "以 clientId / clientSecret 換取存取權杖。",
        "description": "request body 為 JSON,包含 `clientId` / `clientSecret` / `grantType` 三個欄位,\r\n非 OAuth2 標準的 form-urlencoded 格式。",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FactoryTokenRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FactoryTokenRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FactoryTokenRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/FactoryTokenResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FactoryTokenResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/FactoryTokenResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/factory/certificates/batch-request": {
      "post": {
        "tags": [
          "FactoryCertificates"
        ],
        "summary": "② 批次申請憑證(§4.2)。",
        "description": "回 `202 Accepted` + `Retry-After` —— 受理當下憑證還沒簽出來,\r\n實際簽發由背景程序處理,請透過 ③ 批次狀態查詢端點輪詢進度。\r\n\n\r\n🔴 <b>冪等是這支端點的必要條件,不是加分項</b>:重送一次就是多簽一批憑證,\r\n而 CA 沒有冪等鍵也沒有查詢端點 —— 多簽出來的那批是活的,工廠卻不知道它存在。\r\n",
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/FactoryBatchRequestResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FactoryBatchRequestResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/FactoryBatchRequestResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/factory/certificates/batch/{batchId}/status": {
      "get": {
        "tags": [
          "FactoryCertificates"
        ],
        "summary": "③ 查詢批次狀態(§4.4)。",
        "description": "唯讀 —— **不走冪等**(§4.1.1 的冪等只涵蓋三支寫入型 API,查詢本來就可安全重送)。\r\n\n\r\n⚠️ <b>分頁是 offset,不是全庫慣例的 keyset</b>:規格明訂查詢參數是 `page` / `pageSize`,\r\n那是對外契約。單一批次上限 500 張,offset 最深就是 500,不是無界的深分頁。\r\n",
        "parameters": [
          {
            "name": "batchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "includeCertificates",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "certStatus",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/FactoryBatchStatusResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FactoryBatchStatusResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/FactoryBatchStatusResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/factory/certificates/{certId}/revoke-registration": {
      "post": {
        "tags": [
          "FactoryCertificates"
        ],
        "summary": "⑥ 註銷憑證的車機註冊資料(§4.6)。",
        "description": "依 `reason` 分流:`wrong_assignment` 只清序號對照、憑證可重新分配;\r\n其餘四個原因一律**真撤銷**(進 CRL、不可重用)。\r\n規格的安全原則:只有 `wrong_assignment` 那個情境憑證與私鑰仍在產線掌控範圍內。\r\n\n\r\n📌 <b>這是「車還沒交到消費者手上」時的流程。</b>\r\n註銷前會先確認該車機是否仍有有效綁定(不論綁定者是車主本人,或被授權的使用者):\r\n若仍有綁定,回 `409 DEVICE_ALREADY_BOUND`,須先透過管理平台解綁才能註銷。\r\n\n\r\n⚠️ 若我方暫時查不到綁定狀態(例如內部查詢失敗),會回\r\n`503 DEVICE_OWNERSHIP_UNAVAILABLE` 並中止本次註銷 ——\r\n查不到時寧可不撤銷,也不能誤撤(憑證撤銷不可回復)。請沿用同一個 `X-Request-ID` 稍後重試。\r\n",
        "parameters": [
          {
            "name": "certId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/FactoryRevokeRegistrationResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FactoryRevokeRegistrationResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/FactoryRevokeRegistrationResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/factory/certificates/{certId}/status": {
      "get": {
        "tags": [
          "FactoryCertificates"
        ],
        "summary": "⑦ 查詢單一憑證狀態(§4.7)。",
        "description": "唯讀,不走冪等;§4.7 也**沒有**規定速率限制(比照 ③④,不掛具名桶)。\r\n\n\r\n🔴 <b>`deviceStatus` 固定回 `null`</b> —— 裝置狀態(`status` / `owner` /\r\n`lastSeen`)由上游的裝置資料系統掌管,我方不是權威來源,故不填。\r\n\n`history[]` 由我方既有資料誠實組出來(`IssuedAt` + 每一筆 `ActivationRecord`\r\n+ 終止時間戳)。`ActivationRecord` 保留 `Superseded` 的舊記錄本來就是為了\r\n「這張憑證發給過哪幾台車」查得到(UN R155),這支端點正好是它的出口。\r\n",
        "parameters": [
          {
            "name": "certId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/FactoryCertificateStatusResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FactoryCertificateStatusResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/FactoryCertificateStatusResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/factory/certificates/batch/{batchId}/download": {
      "get": {
        "tags": [
          "FactoryCertificates"
        ],
        "summary": "④ 下載憑證 ZIP 包(§4.3)。",
        "description": "唯讀,不走冪等(可重複下載;§6.2 的 `DownloadedAt` 只記**第一次**)。\r\n\n\r\n🔴 <b>預載資料缺任何一項就拒絕出包</b>(`503`)—— ZIP 的內容會被燒進車機的安全儲存區、\r\n而且改不了。少一個 `ca-chain.pem` 或型號公鑰的包看起來是完整的,\r\n症狀要到車機開機連線(或第一次 OTA)才會出現,那時已經量產完了。\r\n這與「Key Vault 未接通時 stub 一律失敗、絕不產假金鑰」是同一條政策。\r\n",
        "parameters": [
          {
            "name": "batchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/factory/certificates/batch-activate": {
      "post": {
        "tags": [
          "FactoryCertificates"
        ],
        "summary": "⑤ 批次沖銷:上傳序號-憑證對照(§4.5)。",
        "description": "規格的處理順序是**兩層**(§4.5「後端處理邏輯」1~6):先做批次層級的前置檢查\r\n(存在、歸屬、並行、過期),通過之後才逐筆驗證並回逐筆結果。\r\n兩層混在一起的話,一筆壞資料會讓整批 400,而規格明確要求部分成功。\r\n\n\r\n⚠️ <b>`replaceExisting` 目前一律逐筆拒絕</b>:帶 `true` 該筆一律回覆失敗,\r\n現階段本端點不支援序號衝突時強制撤銷舊憑證並重新分配。\r\n\n\r\n⚠️ <b>不檢查批次是否 `Ready`</b>:規格 §4.5 的錯誤表沒有 `BATCH_NOT_READY`\r\n(那是 §4.3 下載才有的),這是規格自己的分工,不是我方放寬。\r\n\n\r\n✅ 沖銷成功後,序號會同步寫入車機的 Device Twin tag(`tags.serialNumber`)——\r\n盡力而為,不影響沖銷本身的成敗;序號-憑證對照本身已完整落地,tag 寫不進去只是投影沒同步。\r\n",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/FactoryBatchActivateResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FactoryBatchActivateResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/FactoryBatchActivateResponse"
                }
              }
            }
          },
          "207": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/FactoryBatchActivateResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FactoryBatchActivateResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/FactoryBatchActivateResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "FactoryActivationResult": {
        "type": "object",
        "properties": {
          "certId": {
            "type": "string",
            "description": "憑證 ID。",
            "format": "uuid",
            "nullable": true
          },
          "serialNumber": {
            "type": "string",
            "description": "工廠送來的序號(原樣回填,方便對方對照)。",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "`activated` 或 `failed`。",
            "nullable": true
          },
          "deviceId": {
            "type": "string",
            "description": "成功時的裝置 ID(IoT Hub DeviceId 與憑證 CN),失敗為 null。",
            "format": "uuid",
            "nullable": true
          },
          "message": {
            "type": "string",
            "description": "處理結果的說明訊息;程式判讀請用 `errorCode`。",
            "nullable": true
          },
          "errorCode": {
            "type": "string",
            "description": "失敗時的錯誤碼;成功時整個欄位不出現。",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "§4.5 回應的 `results[]` 一筆。"
      },
      "FactoryBatchActivateResponse": {
        "type": "object",
        "properties": {
          "batchId": {
            "type": "string",
            "description": "批次 ID。",
            "format": "uuid"
          },
          "totalSubmitted": {
            "type": "integer",
            "description": "本次送出的筆數。",
            "format": "int32"
          },
          "successCount": {
            "type": "integer",
            "description": "成功筆數。",
            "format": "int32"
          },
          "failedCount": {
            "type": "integer",
            "description": "失敗筆數。",
            "format": "int32"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FactoryActivationResult"
            },
            "description": "逐筆結果。",
            "nullable": true
          },
          "activatedAt": {
            "type": "string",
            "description": "本次沖銷時間 —— **頂層一個,所有成功筆共用**。\r\n\n\r\n🔴 規格的 result item **沒有** `activatedAt` 欄位(200 範例只在頂層有,207 範例連頂層都沒給)。\r\n替每筆補一個就是擴張契約。一次請求取同一個 `now`,所有 `ActivationRecord` 共用它。\r\n",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "⑤ 的回應(§4.5):全成功 `200`、含失敗 `207 Multi-Status`。"
      },
      "FactoryBatchRequestResponse": {
        "type": "object",
        "properties": {
          "batchId": {
            "type": "string",
            "description": "批次唯一識別碼。",
            "format": "uuid"
          },
          "modelId": {
            "type": "string",
            "description": "型號代碼。",
            "nullable": true
          },
          "requestedQuantity": {
            "type": "integer",
            "description": "申請數量。",
            "format": "int32"
          },
          "status": {
            "type": "string",
            "description": "批次狀態(此刻必為 `processing`)。",
            "nullable": true
          },
          "estimatedReadyAt": {
            "type": "string",
            "description": "預估可下載時間。",
            "format": "date-time"
          },
          "downloadUrl": {
            "type": "string",
            "description": "ZIP 下載 URL。",
            "nullable": true
          },
          "statusUrl": {
            "type": "string",
            "description": "狀態查詢 URL。",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "description": "受理時間。",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "description": "批次有效期限。⚠️ 規格明文:此刻批次尚未就緒,這個值是**依 EstimatedReadyAt\r\n暫估**的;真值以 `readyAt + 批次有效期`(預設 30 天,依環境設定)為準,透過 status API 取得。",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "② 的成功回應:`202 Accepted`(規格 §4.2)。"
      },
      "FactoryBatchStatusResponse": {
        "type": "object",
        "properties": {
          "batchId": {
            "type": "string",
            "description": "批次唯一識別碼。",
            "format": "uuid"
          },
          "modelId": {
            "type": "string",
            "description": "型號代碼。",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "批次狀態(六值,見 `CertificateBatch.DeriveExternalStatus`)。",
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "description": "批次憑證總數。",
            "format": "int32"
          },
          "assignedCount": {
            "type": "integer",
            "description": "已沖銷。",
            "format": "int32"
          },
          "unassignedCount": {
            "type": "integer",
            "description": "未分配。",
            "format": "int32"
          },
          "revokePendingCount": {
            "type": "integer",
            "description": "已清除序號對照、可重新分配。",
            "format": "int32"
          },
          "certRevokedCount": {
            "type": "integer",
            "description": "已真撤銷。",
            "format": "int32"
          },
          "expiredCount": {
            "type": "integer",
            "description": "批次過期而撤銷。",
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "description": "受理時間。",
            "format": "date-time"
          },
          "readyAt": {
            "type": "string",
            "description": "就緒時間;尚未就緒為 null。",
            "format": "date-time",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "description": "批次有效期限;尚未就緒為 null(§5.4 明文從 `readyAt` 起算)。",
            "format": "date-time",
            "nullable": true
          },
          "lastActivatedAt": {
            "type": "string",
            "description": "最後一次沖銷時間;從未沖銷為 null。",
            "format": "date-time",
            "nullable": true
          },
          "certificates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FactoryCertificateStatusEntry"
            },
            "description": "逐筆憑證。`includeCertificates=false` 時為 null,**整個欄位不出現**\r\n(規格 §4.4 的「效能說明」:不需逐筆檢視時只取計數摘要)。\r\n\n\r\n🔴 這是**唯一**一個 null 時要消失的欄位,所以用屬性層級的 `[JsonIgnore]` ——\r\n其餘欄位(`readyAt` / `serialNumber` …)的 null 是契約的一部分,\r\n規格範例明確寫出來,不能一起被全域規則吃掉。\r\n",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "③ `GET /api/v1/factory/certificates/batch/{batchId}/status` 的回應(規格 §4.4)。"
      },
      "FactoryCertificateHistoryEntry": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "description": "動作名稱:`created`(憑證簽發完成)、`assigned`(配給某個序號)、\r\n`superseded`(該序號的配對被解除,重配或撤銷時)、`revoked`(憑證被註銷)、\r\n`expired`(隨批次逾期而作廢)。",
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "description": "事件時間。",
            "format": "date-time"
          },
          "details": {
            "type": "string",
            "description": "事件的說明文字(規格範例就是自由文字)。",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "§4.7 回應的 `history[]` 一筆。"
      },
      "FactoryCertificateStatusEntry": {
        "type": "object",
        "properties": {
          "certId": {
            "type": "string",
            "description": "憑證唯一識別碼(沖銷時用它對照序號)。",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "description": "憑證狀態(小寫底線,見 §4.4「單一憑證狀態值」)。",
            "nullable": true
          },
          "serialNumber": {
            "type": "string",
            "description": "已沖銷時的車機序號,否則 null。",
            "nullable": true
          },
          "assignedAt": {
            "type": "string",
            "description": "沖銷時間,否則 null。",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "§4.4 回應的 `certificates[]` 一筆。"
      },
      "FactoryCertificateStatusResponse": {
        "type": "object",
        "properties": {
          "certId": {
            "type": "string",
            "format": "uuid"
          },
          "batchId": {
            "type": "string",
            "format": "uuid"
          },
          "modelId": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "serialNumber": {
            "type": "string",
            "description": "**目前**配對的序號;未沖銷、或已撤銷(`Terminate` 會把序號放開)時為 null。\r\n\n⚠️ 歷史上配對過的序號不會消失,查詢請看 `history` 欄位。",
            "nullable": true
          },
          "deviceId": {
            "type": "string",
            "format": "uuid"
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "assignedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "deviceStatus": {
            "description": "固定回 `null`。這個物件的三個欄位(`status` / `owner` / `lastSeen`)\r\n由上游的裝置資料系統掌管,我方不是權威來源,故不填 ——\r\n規格自己的範例本來就把裡面的 `owner` / `lastSeen` 寫成 null。",
            "nullable": true
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FactoryCertificateHistoryEntry"
            },
            "description": "依時間排序的歷程,見 `FactoryCertificateHistoryEntry`。",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "⑦ `GET /api/v1/factory/certificates/{certId}/status` 的回應(規格 §4.7)。"
      },
      "FactoryRevokeRegistrationResponse": {
        "type": "object",
        "properties": {
          "certId": {
            "type": "string",
            "format": "uuid"
          },
          "previousSerialNumber": {
            "type": "string",
            "description": "註銷**之前**綁著的序號。\r\n\n\r\n🔴 <b>必須在呼叫 service 之前先抓下來</b> —— 終止會把憑證上的序號清成 null,\r\n事後再讀就沒有了(而這個欄位正是要回報「剛剛解除的是哪一個序號」)。\r\n",
            "nullable": true
          },
          "action": {
            "type": "string",
            "description": "`reassignable`(wrong_assignment)或 `permanently_revoked`(其餘)。",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "revokedAt": {
            "type": "string",
            "format": "date-time"
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "canReassign": {
            "type": "boolean"
          },
          "addedToCrl": {
            "type": "boolean",
            "description": "是否**已經**進入撤銷清單。常態為 `true`(撤銷會在本次回應之前同步寫入 CRL),\r\n並附上 `crlUpdatedAt`。撤銷服務暫時不可用時為 `false`,`crlUpdatedAt` 不出現,\r\n我方背景作業會自動重試到完成 —— 這種情況下憑證的撤銷本身已生效且不可回復,只是還沒進 CRL。\r\n`reassignable`(即 `wrong_assignment`)那條路不會進 CRL,此欄位恆為 `false`。"
          },
          "crlUpdatedAt": {
            "type": "string",
            "description": "已確認進 CRL 的時間;尚未確認時整個欄位不出現(不是回 null)。",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "⑥ 的回應(規格 §4.6,兩種處置共用同一個形狀)。"
      },
      "FactoryTokenRequest": {
        "required": [
          "clientId",
          "clientSecret",
          "grantType"
        ],
        "type": "object",
        "properties": {
          "clientId": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "clientSecret": {
            "maxLength": 512,
            "minLength": 1,
            "type": "string"
          },
          "grantType": {
            "maxLength": 64,
            "minLength": 1,
            "type": "string",
            "description": "固定為 `client_credentials`。"
          }
        },
        "additionalProperties": false,
        "description": "登入請求內容(`POST /api/v1/factory/auth/token`)。"
      },
      "FactoryTokenResponse": {
        "type": "object",
        "properties": {
          "accessToken": {
            "type": "string",
            "nullable": true
          },
          "tokenType": {
            "type": "string",
            "nullable": true
          },
          "expiresIn": {
            "type": "integer",
            "format": "int32"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "成功回應(權威規格 `03-車機認證機制.md §3.2.10`)。"
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "description": "貼上 JWT Access Token(不需加 'Bearer ' 前綴)。",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "Bearer": [ ]
    }
  ]
}