diff --git a/specs/swml/calling/Methods/hangup/main.tsp b/specs/swml/calling/Methods/hangup/main.tsp index f5ec9f2078..fcbebfa937 100644 --- a/specs/swml/calling/Methods/hangup/main.tsp +++ b/specs/swml/calling/Methods/hangup/main.tsp @@ -4,7 +4,7 @@ namespace SWML.Calling; model Hangup { @doc("End the call with an optional reason.") @summary("hangup") - hangup: { + hangup: null | { @doc("The reason for hanging up the call.") @example("busy") reason?: "hangup" | "busy" | "decline"; diff --git a/specs/swml/calling/tsp-output/@typespec/json-schema/SWMLObject.json b/specs/swml/calling/tsp-output/@typespec/json-schema/SWMLObject.json index c4dc4311dd..0d9c60286b 100644 --- a/specs/swml/calling/tsp-output/@typespec/json-schema/SWMLObject.json +++ b/specs/swml/calling/tsp-output/@typespec/json-schema/SWMLObject.json @@ -580,32 +580,39 @@ "type": "object", "properties": { "hangup": { - "type": "object", - "properties": { - "reason": { - "anyOf": [ - { - "type": "string", - "const": "hangup" - }, - { - "type": "string", - "const": "busy" - }, - { - "type": "string", - "const": "decline" + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "reason": { + "anyOf": [ + { + "type": "string", + "const": "hangup" + }, + { + "type": "string", + "const": "busy" + }, + { + "type": "string", + "const": "decline" + } + ], + "examples": [ + "busy" + ], + "description": "The reason for hanging up the call." } - ], - "examples": [ - "busy" - ], - "description": "The reason for hanging up the call." + }, + "unevaluatedProperties": { + "not": {} + } } - }, - "unevaluatedProperties": { - "not": {} - }, + ], "description": "End the call with an optional reason.", "title": "hangup" }