Skip to content

Commit 373391f

Browse files
kwentclaude
andcommitted
Remove array items patching from escalation paths fix script
Upstream spec now correctly defines items on all array properties. Only the inline oneOf → $ref extraction is still needed (client bug). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent c9061e3 commit 373391f

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

tools/fix_openapi_escalation_paths.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
but no $ref. This script extracts each rule variant into a named component schema
77
and replaces inline definitions with $ref pointers.
88
9-
Also fixes upstream bug where urgency_ids array is missing items definition.
10-
119
Run after downloading swagger.json, before generating:
1210
python tools/fix_openapi_escalation_paths.py tools/swagger.json
1311
@@ -53,11 +51,6 @@ def fix_spec(data: dict) -> int:
5351

5452
ref_name = RULE_NAMES[rule_type]
5553
variant["type"] = "object"
56-
57-
for prop in variant.get("properties", {}).values():
58-
if prop.get("type") == "array" and "items" not in prop:
59-
prop["items"] = {"type": "string"}
60-
6154
schemas[ref_name] = variant
6255
extracted += 1
6356

0 commit comments

Comments
 (0)