[Asterisk-code-review] ARI: Run 'make ari-stubs' (...asterisk[master])
Joshua Colp
asteriskteam at digium.com
Tue Apr 16 07:29:46 CDT 2019
Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/c/asterisk/+/11274 )
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(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
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/+/11274
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I7813e5638e2821d11f4b968dc2aeab4f725190a6
Gerrit-Change-Number: 11274
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190416/0307d17c/attachment-0001.html>
More information about the asterisk-code-review
mailing list