mirror of
https://github.com/clawdbot/clawdbot.git
synced 2026-01-31 19:37:45 +01:00
Gateway: discriminated protocol schema + CLI updates
This commit is contained in:
@@ -31,6 +31,17 @@ async function writeJsonSchema() {
|
||||
{ $ref: "#/definitions/ResponseFrame" },
|
||||
{ $ref: "#/definitions/EventFrame" },
|
||||
],
|
||||
discriminator: {
|
||||
propertyName: "type",
|
||||
mapping: {
|
||||
hello: "#/definitions/Hello",
|
||||
"hello-ok": "#/definitions/HelloOk",
|
||||
"hello-error": "#/definitions/HelloError",
|
||||
req: "#/definitions/RequestFrame",
|
||||
res: "#/definitions/ResponseFrame",
|
||||
event: "#/definitions/EventFrame",
|
||||
},
|
||||
},
|
||||
definitions,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user