Add OpenAPI fixture validation and fix fixtures to match API spec

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-22 23:58:17 +08:00
parent 56bee336db
commit 55986a1965
11 changed files with 5580 additions and 3398 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,249 +1,249 @@
{
"tasks": [
{
"label": "a",
"occurrences": 187,
"occurrence_ratio": 0.10048361096184846,
"cases": 184,
"case_ratio": 0.7301587301587301
},
{
"label": "d",
"occurrences": 241,
"occurrence_ratio": 0.12950026867275657,
"cases": 241,
"case_ratio": 0.9563492063492064
},
{
"label": "e",
"occurrences": 249,
"occurrence_ratio": 0.1337990327780763,
"cases": 249,
"case_ratio": 0.9880952380952381
},
{
"label": "f",
"occurrences": 249,
"occurrence_ratio": 0.1337990327780763,
"cases": 249,
"case_ratio": 0.9880952380952381
},
{
"label": "g",
"occurrences": 253,
"occurrence_ratio": 0.13594841483073616,
"cases": 250,
"case_ratio": 0.9920634920634921
},
{
"label": "h",
"occurrences": 163,
"occurrence_ratio": 0.08758731864588931,
"cases": 163,
"case_ratio": 0.6468253968253969
},
{
"label": "i",
"occurrences": 185,
"occurrence_ratio": 0.09940891993551854,
"cases": 175,
"case_ratio": 0.6944444444444444
},
{
"label": "l",
"occurrences": 182,
"occurrence_ratio": 0.09779688339602365,
"cases": 182,
"case_ratio": 0.7222222222222222
},
{
"label": "c",
"occurrences": 48,
"occurrence_ratio": 0.025792584631918324,
"cases": 48,
"case_ratio": 0.19047619047619047
},
{
"label": "k",
"occurrences": 48,
"occurrence_ratio": 0.025792584631918324,
"cases": 48,
"case_ratio": 0.19047619047619047
},
{
"label": "b",
"occurrences": 34,
"occurrence_ratio": 0.018269747447608814,
"cases": 32,
"case_ratio": 0.12698412698412698
},
{
"label": "j",
"occurrences": 22,
"occurrence_ratio": 0.011821601289629231,
"cases": 22,
"case_ratio": 0.0873015873015873
}
],
"sources": [
{
"label": "a",
"occurrences": 175,
"occurrence_ratio": 0.6944444444444444,
"sinks": [
"k",
"l"
]
},
{
"label": "c",
"occurrences": 45,
"occurrence_ratio": 0.17857142857142858,
"sinks": [
"k"
]
},
{
"label": "b",
"occurrences": 32,
"occurrence_ratio": 0.12698412698412698,
"sinks": [
"k",
"j",
"l"
]
}
],
"sinks": [
{
"label": "l",
"occurrences": 182,
"occurrence_ratio": 0.7222222222222222,
"sources": [
"a",
"b"
]
},
{
"label": "k",
"occurrences": 48,
"occurrence_ratio": 0.19047619047619047,
"sources": [
"a",
"b",
"c"
]
},
{
"label": "j",
"occurrences": 22,
"occurrence_ratio": 0.0873015873015873,
"sources": [
"b"
]
}
],
"timeframe": {
"data": [
{
"x": "2022-01-21T03:21:48",
"y": 347
},
{
"x": "2022-02-26T08:13:24",
"y": 426
},
{
"x": "2022-04-03T13:05:00",
"y": 394
},
{
"x": "2022-05-09T17:56:36",
"y": 375
},
{
"x": "2022-06-14T22:48:12",
"y": 431
},
{
"x": "2022-07-21T03:39:48",
"y": 393
},
{
"x": "2022-08-26T08:31:24",
"y": 284
},
{
"x": "2022-10-01T13:23:00",
"y": 359
},
{
"x": "2022-11-06T18:14:36",
"y": 386
},
{
"x": "2022-12-12T23:06:12",
"y": 327
}
],
"x_axis": {
"min": "2022-01-03T00:56:00",
"max": "2022-12-31T01:32:00"
},
"y_axis": {
"min": 0,
"max": 431
}
"tasks": [
{
"label": "a",
"occurrences": 187,
"occurrence_ratio": 0.10048361096184846,
"cases": 184,
"case_ratio": 0.7301587301587301
},
"traces": [
{
"id": 1,
"count": 95
},
{
"id": 2,
"count": 74
},
{
"id": 3,
"count": 45
},
{
"id": 4,
"count": 22
},
{
"id": 5,
"count": 8
},
{
"id": 6,
"count": 2
},
{
"id": 7,
"count": 1
},
{
"id": 8,
"count": 1
},
{
"id": 9,
"count": 1
},
{
"id": 10,
"count": 1
},
{
"id": 11,
"count": 1
},
{
"id": 12,
"count": 1
}
{
"label": "d",
"occurrences": 241,
"occurrence_ratio": 0.12950026867275657,
"cases": 241,
"case_ratio": 0.9563492063492064
},
{
"label": "e",
"occurrences": 249,
"occurrence_ratio": 0.1337990327780763,
"cases": 249,
"case_ratio": 0.9880952380952381
},
{
"label": "f",
"occurrences": 249,
"occurrence_ratio": 0.1337990327780763,
"cases": 249,
"case_ratio": 0.9880952380952381
},
{
"label": "g",
"occurrences": 253,
"occurrence_ratio": 0.13594841483073616,
"cases": 250,
"case_ratio": 0.9920634920634921
},
{
"label": "h",
"occurrences": 163,
"occurrence_ratio": 0.08758731864588931,
"cases": 163,
"case_ratio": 0.6468253968253969
},
{
"label": "i",
"occurrences": 185,
"occurrence_ratio": 0.09940891993551854,
"cases": 175,
"case_ratio": 0.6944444444444444
},
{
"label": "l",
"occurrences": 182,
"occurrence_ratio": 0.09779688339602365,
"cases": 182,
"case_ratio": 0.7222222222222222
},
{
"label": "c",
"occurrences": 48,
"occurrence_ratio": 0.025792584631918324,
"cases": 48,
"case_ratio": 0.19047619047619047
},
{
"label": "k",
"occurrences": 48,
"occurrence_ratio": 0.025792584631918324,
"cases": 48,
"case_ratio": 0.19047619047619047
},
{
"label": "b",
"occurrences": 34,
"occurrence_ratio": 0.018269747447608814,
"cases": 32,
"case_ratio": 0.12698412698412698
},
{
"label": "j",
"occurrences": 22,
"occurrence_ratio": 0.011821601289629231,
"cases": 22,
"case_ratio": 0.0873015873015873
}
],
"sources": [
{
"label": "a",
"occurrences": 175,
"occurrence_ratio": 0.6944444444444444,
"sinks": [
"k",
"l"
]
},
{
"label": "c",
"occurrences": 45,
"occurrence_ratio": 0.17857142857142858,
"sinks": [
"k"
]
},
{
"label": "b",
"occurrences": 32,
"occurrence_ratio": 0.12698412698412698,
"sinks": [
"k",
"j",
"l"
]
}
],
"sinks": [
{
"label": "l",
"occurrences": 182,
"occurrence_ratio": 0.7222222222222222,
"sources": [
"a",
"b"
]
},
{
"label": "k",
"occurrences": 48,
"occurrence_ratio": 0.19047619047619047,
"sources": [
"a",
"b",
"c"
]
},
{
"label": "j",
"occurrences": 22,
"occurrence_ratio": 0.0873015873015873,
"sources": [
"b"
]
}
],
"timeframe": {
"data": [
{
"x": "2022-01-21T03:21:48Z",
"y": 347
},
{
"x": "2022-02-26T08:13:24Z",
"y": 426
},
{
"x": "2022-04-03T13:05:00Z",
"y": 394
},
{
"x": "2022-05-09T17:56:36Z",
"y": 375
},
{
"x": "2022-06-14T22:48:12Z",
"y": 431
},
{
"x": "2022-07-21T03:39:48Z",
"y": 393
},
{
"x": "2022-08-26T08:31:24Z",
"y": 284
},
{
"x": "2022-10-01T13:23:00Z",
"y": 359
},
{
"x": "2022-11-06T18:14:36Z",
"y": 386
},
{
"x": "2022-12-12T23:06:12Z",
"y": 327
}
],
"attrs": []
"x_axis": {
"min": "2022-01-03T00:56:00Z",
"max": "2022-12-31T01:32:00Z"
},
"y_axis": {
"min": 0,
"max": 431
}
},
"traces": [
{
"id": 1,
"count": 95
},
{
"id": 2,
"count": 74
},
{
"id": 3,
"count": 45
},
{
"id": 4,
"count": 22
},
{
"id": 5,
"count": 8
},
{
"id": 6,
"count": 2
},
{
"id": 7,
"count": 1
},
{
"id": 8,
"count": 1
},
{
"id": 9,
"count": 1
},
{
"id": 10,
"count": 1
},
{
"id": 11,
"count": 1
},
{
"id": 12,
"count": 1
}
],
"attrs": []
}

File diff suppressed because it is too large Load Diff

View File

@@ -12,141 +12,141 @@
"cases": [
{
"id": "H00564053",
"started_at": "2022-01-03T00:56:00",
"completed_at": "2022-01-12T02:29:00",
"started_at": "2022-01-03T00:56:00Z",
"completed_at": "2022-01-12T02:29:00Z",
"attributes": [],
"facets": []
},
{
"id": "H00723931",
"started_at": "2022-01-04T17:51:00",
"completed_at": "2022-01-17T10:00:00",
"started_at": "2022-01-04T17:51:00Z",
"completed_at": "2022-01-17T10:00:00Z",
"attributes": [],
"facets": []
},
{
"id": "H00542949",
"started_at": "2022-01-10T19:05:00",
"completed_at": "2022-01-28T09:38:00",
"started_at": "2022-01-10T19:05:00Z",
"completed_at": "2022-01-28T09:38:00Z",
"attributes": [],
"facets": []
},
{
"id": "H00320575",
"started_at": "2022-01-12T21:35:00",
"completed_at": "2022-01-24T19:38:00",
"started_at": "2022-01-12T21:35:00Z",
"completed_at": "2022-01-24T19:38:00Z",
"attributes": [],
"facets": []
},
{
"id": "H00565387",
"started_at": "2022-01-20T20:30:00",
"completed_at": "2022-02-06T10:57:00",
"started_at": "2022-01-20T20:30:00Z",
"completed_at": "2022-02-06T10:57:00Z",
"attributes": [],
"facets": []
},
{
"id": "H00832338",
"started_at": "2022-01-29T15:00:00",
"completed_at": "2022-02-13T17:46:00",
"started_at": "2022-01-29T15:00:00Z",
"completed_at": "2022-02-13T17:46:00Z",
"attributes": [],
"facets": []
},
{
"id": "H00525137",
"started_at": "2022-02-05T23:26:00",
"completed_at": "2022-02-14T19:47:00",
"started_at": "2022-02-05T23:26:00Z",
"completed_at": "2022-02-14T19:47:00Z",
"attributes": [],
"facets": []
},
{
"id": "H00093124",
"started_at": "2022-02-09T16:56:00",
"completed_at": "2022-02-28T17:38:00",
"started_at": "2022-02-09T16:56:00Z",
"completed_at": "2022-02-28T17:38:00Z",
"attributes": [],
"facets": []
},
{
"id": "H00657586",
"started_at": "2022-02-14T20:07:00",
"completed_at": "2022-02-28T15:21:00",
"started_at": "2022-02-14T20:07:00Z",
"completed_at": "2022-02-28T15:21:00Z",
"attributes": [],
"facets": []
},
{
"id": "H00141668",
"started_at": "2022-02-17T13:57:00",
"completed_at": "2022-03-06T00:01:00",
"started_at": "2022-02-17T13:57:00Z",
"completed_at": "2022-03-06T00:01:00Z",
"attributes": [],
"facets": []
},
{
"id": "H00493818",
"started_at": "2022-02-20T19:54:00",
"completed_at": "2022-03-05T05:06:00",
"started_at": "2022-02-20T19:54:00Z",
"completed_at": "2022-03-05T05:06:00Z",
"attributes": [],
"facets": []
},
{
"id": "H00488827",
"started_at": "2022-02-21T00:38:00",
"completed_at": "2022-03-03T16:24:00",
"started_at": "2022-02-21T00:38:00Z",
"completed_at": "2022-03-03T16:24:00Z",
"attributes": [],
"facets": []
},
{
"id": "H00874806",
"started_at": "2022-02-24T15:15:00",
"completed_at": "2022-03-12T01:12:00",
"started_at": "2022-02-24T15:15:00Z",
"completed_at": "2022-03-12T01:12:00Z",
"attributes": [],
"facets": []
},
{
"id": "H00395448",
"started_at": "2022-02-26T03:35:00",
"completed_at": "2022-03-08T23:11:00",
"started_at": "2022-02-26T03:35:00Z",
"completed_at": "2022-03-08T23:11:00Z",
"attributes": [],
"facets": []
},
{
"id": "H00414605",
"started_at": "2022-02-26T17:11:00",
"completed_at": "2022-03-10T08:50:00",
"started_at": "2022-02-26T17:11:00Z",
"completed_at": "2022-03-10T08:50:00Z",
"attributes": [],
"facets": []
},
{
"id": "H00564269",
"started_at": "2022-03-04T01:18:00",
"completed_at": "2022-03-16T08:14:00",
"started_at": "2022-03-04T01:18:00Z",
"completed_at": "2022-03-16T08:14:00Z",
"attributes": [],
"facets": []
},
{
"id": "H00729845",
"started_at": "2022-03-05T09:29:00",
"completed_at": "2022-03-17T15:25:00",
"started_at": "2022-03-05T09:29:00Z",
"completed_at": "2022-03-17T15:25:00Z",
"attributes": [],
"facets": []
},
{
"id": "H00194115",
"started_at": "2022-03-09T18:58:00",
"completed_at": "2022-03-23T09:01:00",
"started_at": "2022-03-09T18:58:00Z",
"completed_at": "2022-03-23T09:01:00Z",
"attributes": [],
"facets": []
},
{
"id": "H00517238",
"started_at": "2022-03-21T06:30:00",
"completed_at": "2022-04-05T05:27:00",
"started_at": "2022-03-21T06:30:00Z",
"completed_at": "2022-04-05T05:27:00Z",
"attributes": [],
"facets": []
},
{
"id": "H00377237",
"started_at": "2022-03-24T12:06:00",
"completed_at": "2022-04-04T15:44:00",
"started_at": "2022-03-24T12:06:00Z",
"completed_at": "2022-04-04T15:44:00Z",
"attributes": [],
"facets": []
}

View File

@@ -1,14 +1,15 @@
{
"username": "testadmin",
"name": "Test Admin",
"is_admin": true,
"is_active": true,
"is_sso": false,
"has_data": true,
"visits": 42,
"visited_at": "2025-06-12T09:00:00Z",
"created_at": "2024-01-01T00:00:00Z",
"created_by": { "username": "system", "name": "System" },
"updated_at": "2025-06-10T14:30:00Z",
"updated_by": { "username": "testadmin", "name": "Test Admin" },
"roles": [
{ "code": "admin", "name": "Administrator" }
],
"detail": {
"visits": 42
}
]
}

View File

@@ -63,6 +63,6 @@ const is_active = computed(() => currentViewingUser.value.is_active);
onBeforeMount(async () => {
await acctMgmtStore.getUserDetail(currentViewingUser.value.username);
visitTime.value = currentViewingUser.value.detail?.visits ?? 0;
visitTime.value = currentViewingUser.value.visits ?? 0;
});
</script>