When the ChannelHold event was added, the 'musicclass' parameter was
erroneously removed. This caused the ChannelHold events to be rejected as
they failed model validation. This patch updates the Swagger schema such that
it now properly reflects the event that is being created.
Hooray for tests that catch things like this.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434597
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
res = 0;
}
} else
+ if (strcmp("musicclass", ast_json_object_iter_key(iter)) == 0) {
+ int prop_is_valid;
+ prop_is_valid = ast_ari_validate_string(
+ ast_json_object_iter_value(iter));
+ if (!prop_is_valid) {
+ ast_log(LOG_ERROR, "ARI ChannelHold field musicclass failed validation\n");
+ res = 0;
+ }
+ } else
{
ast_log(LOG_ERROR,
"ARI ChannelHold has undocumented field %s\n",
* - application: string (required)
* - timestamp: Date
* - channel: Channel (required)
+ * - musicclass: string
* ChannelLeftBridge
* - type: string (required)
* - application: string (required)
"required": true,
"type": "Channel",
"description": "The channel that initiated the hold event."
+ },
+ "musicclass": {
+ "required": false,
+ "type": "string",
+ "description": "The music on hold class that the initiator requested."
}
}
},