Skip to content

Commit 47addb4

Browse files
committed
fix: restore top-level security, health probe overrides, and additionalProperties after swag regen
swag init does not emit global security or per-operation security overrides, so these must be re-patched after every regeneration run. Restores: - Top-level `security: [{ApiKeyAuth: []}, {OIDCAuth: []}]` in both swagger files - `security: []` on /healthz and /readyz so probes remain unauthenticated once the global default is active - `additionalProperties: true` on WorkflowDetailResponse.definition (free-form JSON object) Addresses CodeRabbit feedback on PR #129. https://claude.ai/code/session_01LZPDwwXPmh3NoRfpJ7qNrc
1 parent 02821fc commit 47addb4

2 files changed

Lines changed: 24 additions & 7 deletions

File tree

packages/engine/internal/server/docs/swagger.json

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"swagger": "2.0",
33
"info": {
4-
"description": "Headless AI workflow automation BYOK, IaC-first, enterprise-grade.",
4+
"description": "Headless AI workflow automation \u2014 BYOK, IaC-first, enterprise-grade.",
55
"title": "Mantle API",
66
"contact": {
77
"name": "Mantle",
@@ -632,7 +632,8 @@
632632
"$ref": "#/definitions/server.HealthResponse"
633633
}
634634
}
635-
}
635+
},
636+
"security": []
636637
}
637638
},
638639
"/readyz": {
@@ -657,7 +658,8 @@
657658
"$ref": "#/definitions/server.ReadyzResponse"
658659
}
659660
}
660-
}
661+
},
662+
"security": []
661663
}
662664
}
663665
},
@@ -932,7 +934,8 @@
932934
"properties": {
933935
"definition": {
934936
"description": "Free-form workflow definition as stored (YAML parsed to JSON).",
935-
"type": "object"
937+
"type": "object",
938+
"additionalProperties": true
936939
},
937940
"name": {
938941
"type": "string"
@@ -1025,10 +1028,18 @@
10251028
"in": "header"
10261029
},
10271030
"OIDCAuth": {
1028-
"description": "Bearer OIDC JWT. Format: \"Bearer \u003cjwt\u003e\"",
1031+
"description": "Bearer OIDC JWT. Format: \"Bearer <jwt>\"",
10291032
"type": "apiKey",
10301033
"name": "Authorization",
10311034
"in": "header"
10321035
}
1033-
}
1034-
}
1036+
},
1037+
"security": [
1038+
{
1039+
"ApiKeyAuth": []
1040+
},
1041+
{
1042+
"OIDCAuth": []
1043+
}
1044+
]
1045+
}

packages/engine/internal/server/docs/swagger.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ definitions:
180180
server.WorkflowDetailResponse:
181181
properties:
182182
definition:
183+
additionalProperties: true
183184
description: Free-form workflow definition as stored (YAML parsed to JSON).
184185
type: object
185186
name:
@@ -641,6 +642,7 @@ paths:
641642
description: OK
642643
schema:
643644
$ref: '#/definitions/server.HealthResponse'
645+
security: []
644646
summary: Liveness probe
645647
tags:
646648
- system
@@ -657,9 +659,13 @@ paths:
657659
description: Service Unavailable
658660
schema:
659661
$ref: '#/definitions/server.ReadyzResponse'
662+
security: []
660663
summary: Readiness probe
661664
tags:
662665
- system
666+
security:
667+
- ApiKeyAuth: []
668+
- OIDCAuth: []
663669
securityDefinitions:
664670
ApiKeyAuth:
665671
description: 'Bearer API key. Format: "Bearer mk_..."'

0 commit comments

Comments
 (0)