[asterisk-commits] rest-api: Swagger scripts were not replacing format variable... (asterisk[14])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Aug 19 12:54:17 CDT 2016


Anonymous Coward #1000019 has submitted this change and it was merged.

Change subject: rest-api: Swagger scripts were not replacing format variable in file brief
......................................................................


rest-api: Swagger scripts were not replacing format variable in file brief

Given resource paths did not have 'json' substituted in for the '{format}'. For
some auto generated documentation/comment strings it resulted in something like
the following:

"... REST handler for /api-docs/sounds.{format}"

This patch makes sure the resource api's path is properly substituted.

ASTERISK-25472 #close

Change-Id: Ie3e950a35db4043e284019d6c9061f3b03922e23
---
M res/res_ari_applications.c
M res/res_ari_asterisk.c
M res/res_ari_bridges.c
M res/res_ari_channels.c
M res/res_ari_device_states.c
M res/res_ari_endpoints.c
M res/res_ari_events.c
M res/res_ari_mailboxes.c
M res/res_ari_playbacks.c
M res/res_ari_recordings.c
M res/res_ari_sounds.c
M rest-api-templates/swagger_model.py
12 files changed, 72 insertions(+), 72 deletions(-)

Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/res/res_ari_applications.c b/res/res_ari_applications.c
index f25fd07..7ce9722 100644
--- a/res/res_ari_applications.c
+++ b/res/res_ari_applications.c
@@ -496,7 +496,7 @@
 	return;
 }
 
-/*! \brief REST handler for /api-docs/applications.{format} */
+/*! \brief REST handler for /api-docs/applications.json */
 static struct stasis_rest_handlers applications_applicationName_subscription = {
 	.path_segment = "subscription",
 	.callbacks = {
@@ -506,7 +506,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/applications.{format} */
+/*! \brief REST handler for /api-docs/applications.json */
 static struct stasis_rest_handlers applications_applicationName = {
 	.path_segment = "applicationName",
 	.is_wildcard = 1,
@@ -516,7 +516,7 @@
 	.num_children = 1,
 	.children = { &applications_applicationName_subscription, }
 };
-/*! \brief REST handler for /api-docs/applications.{format} */
+/*! \brief REST handler for /api-docs/applications.json */
 static struct stasis_rest_handlers applications = {
 	.path_segment = "applications",
 	.callbacks = {
diff --git a/res/res_ari_asterisk.c b/res/res_ari_asterisk.c
index a9f82eb..71f72ee 100644
--- a/res/res_ari_asterisk.c
+++ b/res/res_ari_asterisk.c
@@ -1178,7 +1178,7 @@
 	return;
 }
 
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
 static struct stasis_rest_handlers asterisk_config_dynamic_configClass_objectType_id = {
 	.path_segment = "id",
 	.is_wildcard = 1,
@@ -1190,7 +1190,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
 static struct stasis_rest_handlers asterisk_config_dynamic_configClass_objectType = {
 	.path_segment = "objectType",
 	.is_wildcard = 1,
@@ -1199,7 +1199,7 @@
 	.num_children = 1,
 	.children = { &asterisk_config_dynamic_configClass_objectType_id, }
 };
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
 static struct stasis_rest_handlers asterisk_config_dynamic_configClass = {
 	.path_segment = "configClass",
 	.is_wildcard = 1,
@@ -1208,7 +1208,7 @@
 	.num_children = 1,
 	.children = { &asterisk_config_dynamic_configClass_objectType, }
 };
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
 static struct stasis_rest_handlers asterisk_config_dynamic = {
 	.path_segment = "dynamic",
 	.callbacks = {
@@ -1216,7 +1216,7 @@
 	.num_children = 1,
 	.children = { &asterisk_config_dynamic_configClass, }
 };
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
 static struct stasis_rest_handlers asterisk_config = {
 	.path_segment = "config",
 	.callbacks = {
@@ -1224,7 +1224,7 @@
 	.num_children = 1,
 	.children = { &asterisk_config_dynamic, }
 };
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
 static struct stasis_rest_handlers asterisk_info = {
 	.path_segment = "info",
 	.callbacks = {
@@ -1233,7 +1233,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
 static struct stasis_rest_handlers asterisk_modules_moduleName = {
 	.path_segment = "moduleName",
 	.is_wildcard = 1,
@@ -1246,7 +1246,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
 static struct stasis_rest_handlers asterisk_modules = {
 	.path_segment = "modules",
 	.callbacks = {
@@ -1255,7 +1255,7 @@
 	.num_children = 1,
 	.children = { &asterisk_modules_moduleName, }
 };
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
 static struct stasis_rest_handlers asterisk_logging_logChannelName_rotate = {
 	.path_segment = "rotate",
 	.callbacks = {
@@ -1264,7 +1264,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
 static struct stasis_rest_handlers asterisk_logging_logChannelName = {
 	.path_segment = "logChannelName",
 	.is_wildcard = 1,
@@ -1275,7 +1275,7 @@
 	.num_children = 1,
 	.children = { &asterisk_logging_logChannelName_rotate, }
 };
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
 static struct stasis_rest_handlers asterisk_logging = {
 	.path_segment = "logging",
 	.callbacks = {
@@ -1284,7 +1284,7 @@
 	.num_children = 1,
 	.children = { &asterisk_logging_logChannelName, }
 };
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
 static struct stasis_rest_handlers asterisk_variable = {
 	.path_segment = "variable",
 	.callbacks = {
@@ -1294,7 +1294,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
 static struct stasis_rest_handlers asterisk = {
 	.path_segment = "asterisk",
 	.callbacks = {
diff --git a/res/res_ari_bridges.c b/res/res_ari_bridges.c
index 1196879..a60b701 100644
--- a/res/res_ari_bridges.c
+++ b/res/res_ari_bridges.c
@@ -1452,7 +1452,7 @@
 	return;
 }
 
-/*! \brief REST handler for /api-docs/bridges.{format} */
+/*! \brief REST handler for /api-docs/bridges.json */
 static struct stasis_rest_handlers bridges_bridgeId_addChannel = {
 	.path_segment = "addChannel",
 	.callbacks = {
@@ -1461,7 +1461,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/bridges.{format} */
+/*! \brief REST handler for /api-docs/bridges.json */
 static struct stasis_rest_handlers bridges_bridgeId_removeChannel = {
 	.path_segment = "removeChannel",
 	.callbacks = {
@@ -1470,7 +1470,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/bridges.{format} */
+/*! \brief REST handler for /api-docs/bridges.json */
 static struct stasis_rest_handlers bridges_bridgeId_moh = {
 	.path_segment = "moh",
 	.callbacks = {
@@ -1480,7 +1480,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/bridges.{format} */
+/*! \brief REST handler for /api-docs/bridges.json */
 static struct stasis_rest_handlers bridges_bridgeId_play_playbackId = {
 	.path_segment = "playbackId",
 	.is_wildcard = 1,
@@ -1490,7 +1490,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/bridges.{format} */
+/*! \brief REST handler for /api-docs/bridges.json */
 static struct stasis_rest_handlers bridges_bridgeId_play = {
 	.path_segment = "play",
 	.callbacks = {
@@ -1499,7 +1499,7 @@
 	.num_children = 1,
 	.children = { &bridges_bridgeId_play_playbackId, }
 };
-/*! \brief REST handler for /api-docs/bridges.{format} */
+/*! \brief REST handler for /api-docs/bridges.json */
 static struct stasis_rest_handlers bridges_bridgeId_record = {
 	.path_segment = "record",
 	.callbacks = {
@@ -1508,7 +1508,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/bridges.{format} */
+/*! \brief REST handler for /api-docs/bridges.json */
 static struct stasis_rest_handlers bridges_bridgeId = {
 	.path_segment = "bridgeId",
 	.is_wildcard = 1,
@@ -1520,7 +1520,7 @@
 	.num_children = 5,
 	.children = { &bridges_bridgeId_addChannel,&bridges_bridgeId_removeChannel,&bridges_bridgeId_moh,&bridges_bridgeId_play,&bridges_bridgeId_record, }
 };
-/*! \brief REST handler for /api-docs/bridges.{format} */
+/*! \brief REST handler for /api-docs/bridges.json */
 static struct stasis_rest_handlers bridges = {
 	.path_segment = "bridges",
 	.callbacks = {
diff --git a/res/res_ari_channels.c b/res/res_ari_channels.c
index 0952d49..25da17d 100644
--- a/res/res_ari_channels.c
+++ b/res/res_ari_channels.c
@@ -2954,7 +2954,7 @@
 	return;
 }
 
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
 static struct stasis_rest_handlers channels_create = {
 	.path_segment = "create",
 	.callbacks = {
@@ -2963,7 +2963,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
 static struct stasis_rest_handlers channels_channelId_continue = {
 	.path_segment = "continue",
 	.callbacks = {
@@ -2972,7 +2972,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
 static struct stasis_rest_handlers channels_channelId_redirect = {
 	.path_segment = "redirect",
 	.callbacks = {
@@ -2981,7 +2981,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
 static struct stasis_rest_handlers channels_channelId_answer = {
 	.path_segment = "answer",
 	.callbacks = {
@@ -2990,7 +2990,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
 static struct stasis_rest_handlers channels_channelId_ring = {
 	.path_segment = "ring",
 	.callbacks = {
@@ -3000,7 +3000,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
 static struct stasis_rest_handlers channels_channelId_dtmf = {
 	.path_segment = "dtmf",
 	.callbacks = {
@@ -3009,7 +3009,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
 static struct stasis_rest_handlers channels_channelId_mute = {
 	.path_segment = "mute",
 	.callbacks = {
@@ -3019,7 +3019,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
 static struct stasis_rest_handlers channels_channelId_hold = {
 	.path_segment = "hold",
 	.callbacks = {
@@ -3029,7 +3029,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
 static struct stasis_rest_handlers channels_channelId_moh = {
 	.path_segment = "moh",
 	.callbacks = {
@@ -3039,7 +3039,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
 static struct stasis_rest_handlers channels_channelId_silence = {
 	.path_segment = "silence",
 	.callbacks = {
@@ -3049,7 +3049,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
 static struct stasis_rest_handlers channels_channelId_play_playbackId = {
 	.path_segment = "playbackId",
 	.is_wildcard = 1,
@@ -3059,7 +3059,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
 static struct stasis_rest_handlers channels_channelId_play = {
 	.path_segment = "play",
 	.callbacks = {
@@ -3068,7 +3068,7 @@
 	.num_children = 1,
 	.children = { &channels_channelId_play_playbackId, }
 };
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
 static struct stasis_rest_handlers channels_channelId_record = {
 	.path_segment = "record",
 	.callbacks = {
@@ -3077,7 +3077,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
 static struct stasis_rest_handlers channels_channelId_variable = {
 	.path_segment = "variable",
 	.callbacks = {
@@ -3087,7 +3087,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
 static struct stasis_rest_handlers channels_channelId_snoop_snoopId = {
 	.path_segment = "snoopId",
 	.is_wildcard = 1,
@@ -3097,7 +3097,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
 static struct stasis_rest_handlers channels_channelId_snoop = {
 	.path_segment = "snoop",
 	.callbacks = {
@@ -3106,7 +3106,7 @@
 	.num_children = 1,
 	.children = { &channels_channelId_snoop_snoopId, }
 };
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
 static struct stasis_rest_handlers channels_channelId_dial = {
 	.path_segment = "dial",
 	.callbacks = {
@@ -3115,7 +3115,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
 static struct stasis_rest_handlers channels_channelId = {
 	.path_segment = "channelId",
 	.is_wildcard = 1,
@@ -3127,7 +3127,7 @@
 	.num_children = 14,
 	.children = { &channels_channelId_continue,&channels_channelId_redirect,&channels_channelId_answer,&channels_channelId_ring,&channels_channelId_dtmf,&channels_channelId_mute,&channels_channelId_hold,&channels_channelId_moh,&channels_channelId_silence,&channels_channelId_play,&channels_channelId_record,&channels_channelId_variable,&channels_channelId_snoop,&channels_channelId_dial, }
 };
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
 static struct stasis_rest_handlers channels = {
 	.path_segment = "channels",
 	.callbacks = {
diff --git a/res/res_ari_device_states.c b/res/res_ari_device_states.c
index f6d5781..c3876af 100644
--- a/res/res_ari_device_states.c
+++ b/res/res_ari_device_states.c
@@ -320,7 +320,7 @@
 	return;
 }
 
-/*! \brief REST handler for /api-docs/deviceStates.{format} */
+/*! \brief REST handler for /api-docs/deviceStates.json */
 static struct stasis_rest_handlers deviceStates_deviceName = {
 	.path_segment = "deviceName",
 	.is_wildcard = 1,
@@ -332,7 +332,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/deviceStates.{format} */
+/*! \brief REST handler for /api-docs/deviceStates.json */
 static struct stasis_rest_handlers deviceStates = {
 	.path_segment = "deviceStates",
 	.callbacks = {
diff --git a/res/res_ari_endpoints.c b/res/res_ari_endpoints.c
index af50a09..fd38531 100644
--- a/res/res_ari_endpoints.c
+++ b/res/res_ari_endpoints.c
@@ -434,7 +434,7 @@
 	return;
 }
 
-/*! \brief REST handler for /api-docs/endpoints.{format} */
+/*! \brief REST handler for /api-docs/endpoints.json */
 static struct stasis_rest_handlers endpoints_sendMessage = {
 	.path_segment = "sendMessage",
 	.callbacks = {
@@ -443,7 +443,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/endpoints.{format} */
+/*! \brief REST handler for /api-docs/endpoints.json */
 static struct stasis_rest_handlers endpoints_tech_resource_sendMessage = {
 	.path_segment = "sendMessage",
 	.callbacks = {
@@ -452,7 +452,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/endpoints.{format} */
+/*! \brief REST handler for /api-docs/endpoints.json */
 static struct stasis_rest_handlers endpoints_tech_resource = {
 	.path_segment = "resource",
 	.is_wildcard = 1,
@@ -462,7 +462,7 @@
 	.num_children = 1,
 	.children = { &endpoints_tech_resource_sendMessage, }
 };
-/*! \brief REST handler for /api-docs/endpoints.{format} */
+/*! \brief REST handler for /api-docs/endpoints.json */
 static struct stasis_rest_handlers endpoints_tech = {
 	.path_segment = "tech",
 	.is_wildcard = 1,
@@ -472,7 +472,7 @@
 	.num_children = 1,
 	.children = { &endpoints_tech_resource, }
 };
-/*! \brief REST handler for /api-docs/endpoints.{format} */
+/*! \brief REST handler for /api-docs/endpoints.json */
 static struct stasis_rest_handlers endpoints = {
 	.path_segment = "endpoints",
 	.callbacks = {
diff --git a/res/res_ari_events.c b/res/res_ari_events.c
index e4fda0a..40a18b8 100644
--- a/res/res_ari_events.c
+++ b/res/res_ari_events.c
@@ -408,7 +408,7 @@
 	return;
 }
 
-/*! \brief REST handler for /api-docs/events.{format} */
+/*! \brief REST handler for /api-docs/events.json */
 static struct stasis_rest_handlers events_user_eventName = {
 	.path_segment = "eventName",
 	.is_wildcard = 1,
@@ -418,7 +418,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/events.{format} */
+/*! \brief REST handler for /api-docs/events.json */
 static struct stasis_rest_handlers events_user = {
 	.path_segment = "user",
 	.callbacks = {
@@ -426,7 +426,7 @@
 	.num_children = 1,
 	.children = { &events_user_eventName, }
 };
-/*! \brief REST handler for /api-docs/events.{format} */
+/*! \brief REST handler for /api-docs/events.json */
 static struct stasis_rest_handlers events = {
 	.path_segment = "events",
 	.callbacks = {
diff --git a/res/res_ari_mailboxes.c b/res/res_ari_mailboxes.c
index 4f3c731..5b05323 100644
--- a/res/res_ari_mailboxes.c
+++ b/res/res_ari_mailboxes.c
@@ -326,7 +326,7 @@
 	return;
 }
 
-/*! \brief REST handler for /api-docs/mailboxes.{format} */
+/*! \brief REST handler for /api-docs/mailboxes.json */
 static struct stasis_rest_handlers mailboxes_mailboxName = {
 	.path_segment = "mailboxName",
 	.is_wildcard = 1,
@@ -338,7 +338,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/mailboxes.{format} */
+/*! \brief REST handler for /api-docs/mailboxes.json */
 static struct stasis_rest_handlers mailboxes = {
 	.path_segment = "mailboxes",
 	.callbacks = {
diff --git a/res/res_ari_playbacks.c b/res/res_ari_playbacks.c
index d018021..b4dfd1c 100644
--- a/res/res_ari_playbacks.c
+++ b/res/res_ari_playbacks.c
@@ -270,7 +270,7 @@
 	return;
 }
 
-/*! \brief REST handler for /api-docs/playbacks.{format} */
+/*! \brief REST handler for /api-docs/playbacks.json */
 static struct stasis_rest_handlers playbacks_playbackId_control = {
 	.path_segment = "control",
 	.callbacks = {
@@ -279,7 +279,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/playbacks.{format} */
+/*! \brief REST handler for /api-docs/playbacks.json */
 static struct stasis_rest_handlers playbacks_playbackId = {
 	.path_segment = "playbackId",
 	.is_wildcard = 1,
@@ -290,7 +290,7 @@
 	.num_children = 1,
 	.children = { &playbacks_playbackId_control, }
 };
-/*! \brief REST handler for /api-docs/playbacks.{format} */
+/*! \brief REST handler for /api-docs/playbacks.json */
 static struct stasis_rest_handlers playbacks = {
 	.path_segment = "playbacks",
 	.callbacks = {
diff --git a/res/res_ari_recordings.c b/res/res_ari_recordings.c
index a219435..aee3d3d 100644
--- a/res/res_ari_recordings.c
+++ b/res/res_ari_recordings.c
@@ -797,7 +797,7 @@
 	return;
 }
 
-/*! \brief REST handler for /api-docs/recordings.{format} */
+/*! \brief REST handler for /api-docs/recordings.json */
 static struct stasis_rest_handlers recordings_stored_recordingName_file = {
 	.path_segment = "file",
 	.callbacks = {
@@ -806,7 +806,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/recordings.{format} */
+/*! \brief REST handler for /api-docs/recordings.json */
 static struct stasis_rest_handlers recordings_stored_recordingName_copy = {
 	.path_segment = "copy",
 	.callbacks = {
@@ -815,7 +815,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/recordings.{format} */
+/*! \brief REST handler for /api-docs/recordings.json */
 static struct stasis_rest_handlers recordings_stored_recordingName = {
 	.path_segment = "recordingName",
 	.is_wildcard = 1,
@@ -826,7 +826,7 @@
 	.num_children = 2,
 	.children = { &recordings_stored_recordingName_file,&recordings_stored_recordingName_copy, }
 };
-/*! \brief REST handler for /api-docs/recordings.{format} */
+/*! \brief REST handler for /api-docs/recordings.json */
 static struct stasis_rest_handlers recordings_stored = {
 	.path_segment = "stored",
 	.callbacks = {
@@ -835,7 +835,7 @@
 	.num_children = 1,
 	.children = { &recordings_stored_recordingName, }
 };
-/*! \brief REST handler for /api-docs/recordings.{format} */
+/*! \brief REST handler for /api-docs/recordings.json */
 static struct stasis_rest_handlers recordings_live_recordingName_stop = {
 	.path_segment = "stop",
 	.callbacks = {
@@ -844,7 +844,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/recordings.{format} */
+/*! \brief REST handler for /api-docs/recordings.json */
 static struct stasis_rest_handlers recordings_live_recordingName_pause = {
 	.path_segment = "pause",
 	.callbacks = {
@@ -854,7 +854,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/recordings.{format} */
+/*! \brief REST handler for /api-docs/recordings.json */
 static struct stasis_rest_handlers recordings_live_recordingName_mute = {
 	.path_segment = "mute",
 	.callbacks = {
@@ -864,7 +864,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/recordings.{format} */
+/*! \brief REST handler for /api-docs/recordings.json */
 static struct stasis_rest_handlers recordings_live_recordingName = {
 	.path_segment = "recordingName",
 	.is_wildcard = 1,
@@ -875,7 +875,7 @@
 	.num_children = 3,
 	.children = { &recordings_live_recordingName_stop,&recordings_live_recordingName_pause,&recordings_live_recordingName_mute, }
 };
-/*! \brief REST handler for /api-docs/recordings.{format} */
+/*! \brief REST handler for /api-docs/recordings.json */
 static struct stasis_rest_handlers recordings_live = {
 	.path_segment = "live",
 	.callbacks = {
@@ -883,7 +883,7 @@
 	.num_children = 1,
 	.children = { &recordings_live_recordingName, }
 };
-/*! \brief REST handler for /api-docs/recordings.{format} */
+/*! \brief REST handler for /api-docs/recordings.json */
 static struct stasis_rest_handlers recordings = {
 	.path_segment = "recordings",
 	.callbacks = {
diff --git a/res/res_ari_sounds.c b/res/res_ari_sounds.c
index 8bb2171..f5a1d41 100644
--- a/res/res_ari_sounds.c
+++ b/res/res_ari_sounds.c
@@ -208,7 +208,7 @@
 	return;
 }
 
-/*! \brief REST handler for /api-docs/sounds.{format} */
+/*! \brief REST handler for /api-docs/sounds.json */
 static struct stasis_rest_handlers sounds_soundId = {
 	.path_segment = "soundId",
 	.is_wildcard = 1,
@@ -218,7 +218,7 @@
 	.num_children = 0,
 	.children = {  }
 };
-/*! \brief REST handler for /api-docs/sounds.{format} */
+/*! \brief REST handler for /api-docs/sounds.json */
 static struct stasis_rest_handlers sounds = {
 	.path_segment = "sounds",
 	.callbacks = {
diff --git a/rest-api-templates/swagger_model.py b/rest-api-templates/swagger_model.py
index c76cb7f..c71352a 100644
--- a/rest-api-templates/swagger_model.py
+++ b/rest-api-templates/swagger_model.py
@@ -691,7 +691,7 @@
     def load(self, api_json, processor, context):
         context = context.next_stack(api_json, 'path')
         validate_required_fields(api_json, self.required_fields, context)
-        self.path = api_json['path']
+        self.path = api_json['path'].replace('{format}', 'json')
         self.description = api_json['description']
 
         if not self.path or self.path[0] != '/':
@@ -700,7 +700,7 @@
         return self
 
     def load_api_declaration(self, base_dir, processor):
-        self.file = (base_dir + self.path).replace('{format}', 'json')
+        self.file = (base_dir + self.path)
         self.api_declaration = ApiDeclaration().load_file(self.file, processor)
         processor.process_resource_api(self, [self.file])
 

-- 
To view, visit https://gerrit.asterisk.org/3647
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie3e950a35db4043e284019d6c9061f3b03922e23
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-commits mailing list