Skip to content

Commit 90172d8

Browse files
committed
chore(forensics): refresh types after mono details JSONB + reason cleanup
Picks up the schema changes from devhelmhq/mono#316: - IncidentStateTransitionDto gains a `details: dict[str, Any]` field. User-driven transitions carry `details["source"] = "public-api"`; pipeline-driven ones carry `details["source"] = "pipeline"`. - Transition `reason` description aligns with what the engine actually writes (trigger | confirm | resolve | auto_clear | reopen). The earlier `manually_resolved` was a parallel reason value for the same logical edge — replaced by reason="resolve" + details.source="public-api". Pure regen via `./scripts/typegen.sh`. The mono PR also added `@Schema(additionalProperties = TRUE)` on the Java DTO so Springdoc emits `additionalProperties: true` instead of `additionalProperties: {type: "object"}`, yielding `dict[str, Any]` here instead of `dict[str, dict[str, Any]]`. Without that fix the Pydantic model would fail to parse real responses (`details.source` is a string, not a nested dict). Made-with: Cursor
1 parent 6681850 commit 90172d8

2 files changed

Lines changed: 164 additions & 127 deletions

File tree

docs/openapi/monitoring-api.json

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25631,24 +25631,24 @@
2563125631
},
2563225632
"triggeringCheckId": {
2563325633
"type": "string",
25634-
"description": "Scheduler-minted check execution ID whose result confirmed this incident; joins to check_results, rule_evaluations, and incident_state_transitions",
25634+
"description": "Scheduler-minted check execution ID whose result confirmed this incident; joins to check_results, rule_evaluations, and incident_state_transitions. Omitted from JSON (undefined to SDKs) when null, treat missing as null.",
2563525635
"format": "uuid",
2563625636
"nullable": true
2563725637
},
2563825638
"triggeredByRuleSnapshotHashHex": {
2563925639
"type": "string",
25640-
"description": "Hex SHA-256 of the canonical policy snapshot that fired; combined with triggeredByRuleIndex points to the exact TriggerRule",
25640+
"description": "Hex SHA-256 of the canonical policy snapshot that fired; combined with triggeredByRuleIndex points to the exact TriggerRule. Omitted from JSON when null, treat missing as null.",
2564125641
"nullable": true
2564225642
},
2564325643
"triggeredByRuleIndex": {
2564425644
"type": "integer",
25645-
"description": "Index of the fired rule inside the policy's trigger_rules array",
25645+
"description": "Index of the fired rule inside the policy's trigger_rules array. Omitted from JSON when null, treat missing as null.",
2564625646
"format": "int32",
2564725647
"nullable": true
2564825648
},
2564925649
"engineVersion": {
2565025650
"type": "string",
25651-
"description": "Detection engine semver that evaluated the rule",
25651+
"description": "Detection engine semver that evaluated the rule. Omitted from JSON when null, treat missing as null.",
2565225652
"nullable": true
2565325653
}
2565425654
},
@@ -25864,6 +25864,7 @@
2586425864
"required": [
2586525865
"affectedRegions",
2586625866
"checkId",
25867+
"details",
2586725868
"engineVersion",
2586825869
"fromStatus",
2586925870
"id",
@@ -25910,7 +25911,7 @@
2591025911
"reason": {
2591125912
"minLength": 1,
2591225913
"type": "string",
25913-
"description": "Why the transition fired (rule_matched | confirmation_met | auto_cleared_by_timeout | recovery_met | reopened | manually_resolved | policy_changed)"
25914+
"description": "Why the transition fired (trigger | confirm | resolve | auto_clear | reopen)"
2591425915
},
2591525916
"triggeringEvaluationIds": {
2591625917
"type": "array",
@@ -25943,6 +25944,9 @@
2594325944
"type": "string",
2594425945
"description": "Scheduler-minted check execution ID (V92) of the triggering result",
2594525946
"format": "uuid"
25947+
},
25948+
"details": {
25949+
"$ref": "#/components/schemas/StateTransitionDetails"
2594625950
}
2594725951
},
2594825952
"description": "State-machine transitions this check caused (may be empty if nothing fired)"
@@ -30579,6 +30583,23 @@
3057930583
"minDaysRemaining"
3058030584
]
3058130585
},
30586+
"StateTransitionDetails": {
30587+
"required": [
30588+
"source"
30589+
],
30590+
"type": "object",
30591+
"properties": {
30592+
"source": {
30593+
"type": "string",
30594+
"description": "Actor that produced this transition (pipeline | public-api)",
30595+
"enum": [
30596+
"pipeline",
30597+
"public-api"
30598+
]
30599+
}
30600+
},
30601+
"description": "Typed metadata about this transition (currently: actor source)"
30602+
},
3058230603
"StatusCodeAssertion": {
3058330604
"required": [
3058430605
"type",

0 commit comments

Comments
 (0)