Skip to content

Commit 3cd0ee1

Browse files
fix(server): clarify public controls schema openapi
1 parent a9dfc42 commit 3cd0ee1

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

server/src/agent_control_server/endpoints/controls.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,6 @@ async def create_control(
551551
response_model=GetControlSchemaResponse,
552552
summary="Get control definition JSON schema",
553553
response_description="JSON schema for ControlDefinition",
554-
openapi_extra={"security": []},
555554
)
556555
# Public schema metadata: no tenant state, no auth operation.
557556
async def get_control_schema() -> GetControlSchemaResponse:

server/src/agent_control_server/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,8 @@ def custom_openapi() -> dict[str, Any]:
347347
if "JSONValue" in schemas:
348348
schemas["JSONValue"] = {"description": "Any JSON value"}
349349

350+
# This route is intentionally public metadata. FastAPI still emits inherited
351+
# API-key security for it, so patch only this operation in the generated spec.
350352
controls_schema_path = f"{api_v1_prefix}/controls/schema"
351353
controls_schema_operation = (
352354
openapi_schema.get("paths", {})

0 commit comments

Comments
 (0)