fix(openapi): regenerate public API spec

This commit is contained in:
rookiestar28
2026-04-28 20:43:28 +08:00
parent 4de75e70d4
commit 55fbe67b2a
3 changed files with 31 additions and 26 deletions
+10 -10
View File
@@ -1,8 +1,8 @@
openapi: "3.0.3"
info:
title: "ComfyUI-OpenClaw API"
version: "1.0.8"
description: "Generated from docs/release/api_contract.md (R66 baseline)."
version: "1.0.9"
description: "Generated from docs/release/api_contract.md."
servers:
- url: "/openclaw"
description: "Direct OpenClaw prefix"
@@ -64,7 +64,7 @@ paths:
description: "OK"
x-openclaw-auth: "Observability"
x-openclaw-section: "1.1 Core Observability & System"
description: "Trace payloads redact provider reasoning/thinking fields by default. Privileged debug reveal is local-only and opt-in."
description: "Trace payloads redact provider reasoning/thinking fields and marked internal maintenance/helper content by default. Privileged reasoning reveal is local-only and opt-in."
x-openclaw-legacy-path: "/moltbot/trace/{id}"
x-openclaw-auth-tier: "observability"
security:
@@ -87,7 +87,7 @@ paths:
description: "OK"
x-openclaw-auth: "Observability"
x-openclaw-section: "1.1 Core Observability & System"
description: "Event payloads redact provider reasoning/thinking fields by default. Privileged debug reveal is local-only and opt-in."
description: "Event payloads redact provider reasoning/thinking fields and marked internal maintenance/helper content by default. Privileged reasoning reveal is local-only and opt-in."
x-openclaw-legacy-path: "/moltbot/events"
x-openclaw-auth-tier: "observability"
security:
@@ -105,7 +105,7 @@ paths:
description: "OK"
x-openclaw-auth: "Observability"
x-openclaw-section: "1.1 Core Observability & System"
description: "SSE event payloads redact provider reasoning/thinking fields by default. Privileged debug reveal is local-only and opt-in."
description: "SSE event payloads redact provider reasoning/thinking fields and marked internal maintenance/helper content by default. Privileged reasoning reveal is local-only and opt-in."
x-openclaw-legacy-path: "/moltbot/events/stream"
x-openclaw-auth-tier: "observability"
security:
@@ -263,7 +263,7 @@ paths:
description: "OK"
x-openclaw-auth: "Admin/Local"
x-openclaw-section: "1.3 Assist, LLM & Chat"
description: "Structured assist payloads preserve final answer fields while redacting provider reasoning/thinking fields by default. Privileged debug reveal is local-only and opt-in."
description: "Structured assist payloads preserve final answer fields while redacting provider reasoning/thinking fields and marked internal maintenance/helper content by default. Privileged reasoning reveal is local-only and opt-in."
x-openclaw-legacy-path: "/moltbot/assist/planner"
x-openclaw-auth-tier: "admin"
security:
@@ -281,7 +281,7 @@ paths:
description: "OK"
x-openclaw-auth: "Admin/Local"
x-openclaw-section: "1.3 Assist, LLM & Chat"
description: "Structured assist payloads preserve final answer fields while redacting provider reasoning/thinking fields by default. Privileged debug reveal is local-only and opt-in."
description: "Structured assist payloads preserve final answer fields while redacting provider reasoning/thinking fields and marked internal maintenance/helper content by default. Privileged reasoning reveal is local-only and opt-in."
x-openclaw-legacy-path: "/moltbot/assist/refiner"
x-openclaw-auth-tier: "admin"
security:
@@ -299,7 +299,7 @@ paths:
description: "OK"
x-openclaw-auth: "Admin/Local"
x-openclaw-section: "1.3 Assist, LLM & Chat"
description: "Streaming assist final payloads redact provider reasoning/thinking fields by default. Privileged debug reveal is local-only and opt-in."
description: "Streaming assist final payloads redact provider reasoning/thinking fields and marked internal maintenance/helper content by default. Privileged reasoning reveal is local-only and opt-in."
x-openclaw-legacy-path: "/moltbot/assist/planner/stream"
x-openclaw-auth-tier: "admin"
security:
@@ -318,7 +318,7 @@ paths:
description: "OK"
x-openclaw-auth: "Admin/Local"
x-openclaw-section: "1.3 Assist, LLM & Chat"
description: "Streaming assist final payloads redact provider reasoning/thinking fields by default. Privileged debug reveal is local-only and opt-in."
description: "Streaming assist final payloads redact provider reasoning/thinking fields and marked internal maintenance/helper content by default. Privileged reasoning reveal is local-only and opt-in."
x-openclaw-legacy-path: "/moltbot/assist/refiner/stream"
x-openclaw-auth-tier: "admin"
security:
@@ -393,7 +393,7 @@ paths:
/connector/extraction-contract:
get:
operationId: "get_connector_extraction_contract"
summary: "Get the machine-readable connector extraction recommendation, seam families, and current blockers."
summary: "Get the machine-readable connector extraction recommendation, seam families, static service-env SecretRef propagation policy, and current blockers."
responses:
200:
description: "OK"
+1 -1
View File
@@ -1,5 +1,5 @@
"""
R66 OpenAPI spec generator.
OpenAPI spec generator.
Generates docs/openapi.yaml from docs/release/api_contract.md.
"""
+20 -15
View File
@@ -1,5 +1,5 @@
"""
R66 OpenAPI spec generation from the release API contract markdown.
OpenAPI spec generation from the release API contract markdown.
"""
from __future__ import annotations
@@ -27,34 +27,39 @@ VERSION_RE = re.compile(r"^>\s+\*\*Version\*\*:\s*([0-9]+(?:\.[0-9]+)*)\s*$")
REASONING_REVEAL_ROUTE_DESCRIPTIONS = {
("GET", "/trace/{prompt_id}"): (
"Trace payloads redact provider reasoning/thinking fields by default. "
"Privileged debug reveal is local-only and opt-in."
"Trace payloads redact provider reasoning/thinking fields and marked "
"internal maintenance/helper content by default. Privileged reasoning "
"reveal is local-only and opt-in."
),
("GET", "/events"): (
"Event payloads redact provider reasoning/thinking fields by default. "
"Privileged debug reveal is local-only and opt-in."
"Event payloads redact provider reasoning/thinking fields and marked "
"internal maintenance/helper content by default. Privileged reasoning "
"reveal is local-only and opt-in."
),
("GET", "/events/stream"): (
"SSE event payloads redact provider reasoning/thinking fields by default. "
"Privileged debug reveal is local-only and opt-in."
"SSE event payloads redact provider reasoning/thinking fields and marked "
"internal maintenance/helper content by default. Privileged reasoning "
"reveal is local-only and opt-in."
),
("POST", "/assist/planner"): (
"Structured assist payloads preserve final answer fields while redacting "
"provider reasoning/thinking fields by default. Privileged debug reveal "
"is local-only and opt-in."
"provider reasoning/thinking fields and marked internal maintenance/helper "
"content by default. Privileged reasoning reveal is local-only and opt-in."
),
("POST", "/assist/refiner"): (
"Structured assist payloads preserve final answer fields while redacting "
"provider reasoning/thinking fields by default. Privileged debug reveal "
"is local-only and opt-in."
"provider reasoning/thinking fields and marked internal maintenance/helper "
"content by default. Privileged reasoning reveal is local-only and opt-in."
),
("POST", "/assist/planner/stream"): (
"Streaming assist final payloads redact provider reasoning/thinking "
"fields by default. Privileged debug reveal is local-only and opt-in."
"fields and marked internal maintenance/helper content by default. "
"Privileged reasoning reveal is local-only and opt-in."
),
("POST", "/assist/refiner/stream"): (
"Streaming assist final payloads redact provider reasoning/thinking "
"fields by default. Privileged debug reveal is local-only and opt-in."
"fields and marked internal maintenance/helper content by default. "
"Privileged reasoning reveal is local-only and opt-in."
),
}
@@ -255,7 +260,7 @@ def build_openapi_document(
)
operation["parameters"] = params
# IMPORTANT: keep generator-owned reveal params here; hand-editing docs/openapi.yaml
# causes drift against R66 parity tests and breaks pre-push verification.
# causes drift against parity tests and breaks pre-push verification.
if reasoning_reveal_description:
operation.setdefault("parameters", []).extend(
REASONING_REVEAL_PARAMETER_REFS
@@ -267,7 +272,7 @@ def build_openapi_document(
"info": {
"title": "ComfyUI-OpenClaw API",
"version": info_version,
"description": "Generated from docs/release/api_contract.md (R66 baseline).",
"description": "Generated from docs/release/api_contract.md.",
},
"servers": [
{"url": "/openclaw", "description": "Direct OpenClaw prefix"},