29 lines
1.3 KiB
PowerShell
29 lines
1.3 KiB
PowerShell
$ErrorActionPreference = 'Stop'
|
|
|
|
$root = Split-Path -Parent $PSScriptRoot
|
|
$jsonPath = Join-Path $root 'APP.openapi.json'
|
|
$yamlPath = Join-Path $root 'APP.openapi.yaml'
|
|
$document = Get-Content -Raw -Encoding UTF8 -LiteralPath $jsonPath | ConvertFrom-Json
|
|
$yaml = Get-Content -Raw -Encoding UTF8 -LiteralPath $yamlPath
|
|
|
|
foreach ($path in @(
|
|
'/genealogy/app/genealogies',
|
|
'/genealogy/app/genealogies/{genealogyId}'
|
|
)) {
|
|
if (-not $document.paths.PSObject.Properties[$path]) {
|
|
throw "G-series OpenAPI path missing: $path"
|
|
}
|
|
if (-not $yaml.Contains(" $path`:")) {
|
|
throw "G-series YAML path missing: $path"
|
|
}
|
|
}
|
|
|
|
# G03 原子创建、共享访问预设与旧 DTO 删除只由 g03-bootstrap-openapi-contract.ps1 管理。
|
|
# G11 设置 PUT、dirty-only body、版本 CAS、响应与错误只由 g11-settings-openapi-contract.ps1 管理。
|
|
# 普通加入申请只由 join-application-openapi-contract.ps1 管理;邀请码直入只由 invite-ticket-openapi-contract.ps1 管理。
|
|
# G12 字辈聚合读写、词法行身份、版本 CAS、候选集合与旧批量入口删除只由
|
|
# g12-generation-poem-openapi-contract.ps1 管理。本通用门禁不得重新锁定 poemText、0/1 状态、
|
|
# integer/int64 poemId、preview、batch/save、management 或逐行写入口,避免形成相反合同 owner。
|
|
|
|
Write-Output 'G-SERIES-OPENAPI-CONTRACT PASS'
|