[Asterisk-code-review] ARI: Run 'make ari-stubs' (...asterisk[16])

George Joseph asteriskteam at digium.com
Fri Apr 12 07:34:21 CDT 2019


George Joseph has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/11273


Change subject: ARI:  Run 'make ari-stubs'
......................................................................

ARI:  Run 'make ari-stubs'

An earlier contributor apparently forgot to run 'make ari-stubs'
before committing after making ARI model changes.

Change-Id: I7813e5638e2821d11f4b968dc2aeab4f725190a6
---
M res/ari/ari_model_validators.c
M res/ari/ari_model_validators.h
2 files changed, 8 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/73/11273/1

diff --git a/res/ari/ari_model_validators.c b/res/ari/ari_model_validators.c
index e3ca10a..8910bbb 100644
--- a/res/ari/ari_model_validators.c
+++ b/res/ari/ari_model_validators.c
@@ -2455,6 +2455,7 @@
 	struct ast_json_iter *iter;
 	int has_type = 0;
 	int has_application = 0;
+	int has_timestamp = 0;
 	int has_args = 0;
 	int has_channel = 0;
 	int has_destination = 0;
@@ -2491,6 +2492,7 @@
 		} else
 		if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {
 			int prop_is_valid;
+			has_timestamp = 1;
 			prop_is_valid = ast_ari_validate_date(
 				ast_json_object_iter_value(iter));
 			if (!prop_is_valid) {
@@ -2547,6 +2549,11 @@
 		res = 0;
 	}
 
+	if (!has_timestamp) {
+		ast_log(LOG_ERROR, "ARI ApplicationMoveFailed missing required field timestamp\n");
+		res = 0;
+	}
+
 	if (!has_args) {
 		ast_log(LOG_ERROR, "ARI ApplicationMoveFailed missing required field args\n");
 		res = 0;
diff --git a/res/ari/ari_model_validators.h b/res/ari/ari_model_validators.h
index adf3e1a..f9285b4 100644
--- a/res/ari/ari_model_validators.h
+++ b/res/ari/ari_model_validators.h
@@ -1603,7 +1603,7 @@
  * - asterisk_id: string
  * - type: string (required)
  * - application: string (required)
- * - timestamp: Date
+ * - timestamp: Date (required)
  * - args: List[string] (required)
  * - channel: Channel (required)
  * - destination: string (required)

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11273
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I7813e5638e2821d11f4b968dc2aeab4f725190a6
Gerrit-Change-Number: 11273
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190412/7fb0b2e2/attachment.html>


More information about the asterisk-code-review mailing list