mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-15 03:27:24 +08:00
Suppress false-positive Spectral lint on WebSocket endpoint (#13842)
The /ws path uses HTTP 101 (Switching Protocols), which is the correct response for a WebSocket upgrade but not a 2xx. The built-in operation-success-response rule fires as a false positive because OpenAPI 3.x has no native WebSocket support. Add a path-scoped override in .spectral.yaml to disable the rule for /ws only, leaving it active for all other operations.
This commit is contained in:
parent
fb097bedc2
commit
a5f7bc5658
@ -89,3 +89,12 @@ rules:
|
|||||||
then:
|
then:
|
||||||
field: description
|
field: description
|
||||||
function: truthy
|
function: truthy
|
||||||
|
|
||||||
|
overrides:
|
||||||
|
# /ws uses HTTP 101 (Switching Protocols) — a legitimate response for a
|
||||||
|
# WebSocket upgrade, but not a 2xx, so operation-success-response fires
|
||||||
|
# as a false positive. OpenAPI 3.x has no native WebSocket support.
|
||||||
|
- files:
|
||||||
|
- "openapi.yaml#/paths/~1ws"
|
||||||
|
rules:
|
||||||
|
operation-success-response: off
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user