feat: 上线历史剩余氢质量批量查询接口
This commit is contained in:
@@ -116,3 +116,19 @@ func TestLiveContractDocumentationCoversSerializedFieldsAndQuality(t *testing.T)
|
||||
t.Error("HTML must not advertise sourceProtocol as realtime field")
|
||||
}
|
||||
}
|
||||
|
||||
func TestHistoricalHydrogenDocumentationDefinesEvidenceAndFailureBoundaries(t *testing.T) {
|
||||
for name, doc := range map[string]string{"OpenAPI": string(openAPISpec), "HTML": string(simpleDocsHTML)} {
|
||||
for _, want := range []string{
|
||||
"/api/v1/vehicles/hydrogen-remaining/history/query",
|
||||
"requestId", "maxTimeDifferenceSeconds", "sourceRecordId",
|
||||
"hydrogenCapacityVersion", "sourceDataVersion", "reasonCode", "2026-08-01", "FORBIDDEN", "ERROR",
|
||||
"STALE", "429", "Retry-After", "event_time", "历史容量", "非原子",
|
||||
"20个不同点", "去重",
|
||||
} {
|
||||
if !strings.Contains(doc, want) {
|
||||
t.Errorf("%s missing history contract evidence/failure boundary %q", name, want)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user