[asterisk-commits] dlee: branch dlee/stasis-http r384600 - in /team/dlee/stasis-http: build_tool...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 2 16:46:06 CDT 2013


Author: dlee
Date: Tue Apr  2 16:46:03 2013
New Revision: 384600

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=384600
Log:
Reorg RESTful API to get swagger-codgen and swagger-ui both happy.

Swagger-codegen assumes that the first element in the path of a resource's
path is the class name for the resource. All of ours started with /api,
which meant that everything landed in a single ApiApi class.

So instead of putting the docs in /stasis and the API in /stasis/api,
we now have the API in /stasis and the docs i /stasis/api-docs. The
sources were also rearranged so that codegen can be run from the source
without running Asterisk.


Added:
    team/dlee/stasis-http/rest-api/api-docs/
    team/dlee/stasis-http/rest-api/api-docs/asterisk.json
      - copied, changed from r384587, team/dlee/stasis-http/rest-api/asterisk.json
    team/dlee/stasis-http/rest-api/api-docs/bridges.json
      - copied, changed from r384587, team/dlee/stasis-http/rest-api/bridges.json
    team/dlee/stasis-http/rest-api/api-docs/channels.json
      - copied, changed from r384587, team/dlee/stasis-http/rest-api/channels.json
    team/dlee/stasis-http/rest-api/api-docs/endpoints.json
      - copied, changed from r384587, team/dlee/stasis-http/rest-api/endpoints.json
    team/dlee/stasis-http/rest-api/api-docs/events.json
      - copied, changed from r384590, team/dlee/stasis-http/rest-api/events.json
    team/dlee/stasis-http/rest-api/api-docs/recordings.json
      - copied, changed from r384587, team/dlee/stasis-http/rest-api/recordings.json
Removed:
    team/dlee/stasis-http/rest-api/asterisk.json
    team/dlee/stasis-http/rest-api/bridges.json
    team/dlee/stasis-http/rest-api/channels.json
    team/dlee/stasis-http/rest-api/endpoints.json
    team/dlee/stasis-http/rest-api/events.json
    team/dlee/stasis-http/rest-api/recordings.json
Modified:
    team/dlee/stasis-http/build_tools/make_stasis_http_stubs
    team/dlee/stasis-http/res/res_stasis_http.c
    team/dlee/stasis-http/res/stasis_http/resources.c
    team/dlee/stasis-http/rest-api/resources.json

Modified: team/dlee/stasis-http/build_tools/make_stasis_http_stubs
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-http/build_tools/make_stasis_http_stubs?view=diff&rev=384600&r1=384599&r2=384600
==============================================================================
--- team/dlee/stasis-http/build_tools/make_stasis_http_stubs (original)
+++ team/dlee/stasis-http/build_tools/make_stasis_http_stubs Tue Apr  2 16:46:03 2013
@@ -22,25 +22,23 @@
 
 sources=""
 
-for json in rest-api/*.json; do
+# Generate resource_*.h files
+for json in rest-api/api-docs/*.json; do
     echo "Cogging ${json}"
     name=$(basename ${json} .json)
-    if test ${name} = resources; then
-	sources="${sources} stasis_http/${name}.o"
-    else
-	sources="${sources} stasis_http/resource_${name}.o"
-    fi
-    if test ${name} = resources; then
-        ${COG} -I cog/ -D RESOURCES=${json} -d -o res/stasis_http/resources.c cog/stasis_http_resources.c.cog
-    else
-        ${COG} -I cog/ -D RESOURCE=${json} -d -o res/stasis_http/resource_${name}.h cog/stasis_http_resource.h.cog
-	if ! test -e res/stasis_http/resource_${name}.c; then
-	    # Only write the file if it doesn't exist; otherwise you'll overwrite someone's hard work.
-	    echo "  Generating source stubs"
-            ${COG} -I cog/ -D RESOURCE=${json} -d -o res/stasis_http/resource_${name}.c cog/stasis_http_resource.c.cog
-	fi
+    sources="${sources} stasis_http/resource_${name}.o"
+    ${COG} -I cog/ -D RESOURCE=${json} -d -o res/stasis_http/resource_${name}.h cog/stasis_http_resource.h.cog
+    if ! test -e res/stasis_http/resource_${name}.c; then
+	# Only write the file if it doesn't exist; otherwise you'll overwrite someone's hard work.
+	echo "  Generating source stubs"
+        ${COG} -I cog/ -D RESOURCE=${json} -d -o res/stasis_http/resource_${name}.c cog/stasis_http_resource.c.cog
     fi
 done
+
+# Generate the resources.c file
+echo "Cogging rest-api/resources.json"
+sources="${sources} stasis_http/resources.o"
+${COG} -I cog/ -D RESOURCES=rest-api/resources.json -d -o res/stasis_http/resources.c cog/stasis_http_resources.c.cog
 
 # Generate the makefile for the dependencies
 echo "Cogging res_stasis_http.make"

Modified: team/dlee/stasis-http/res/res_stasis_http.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-http/res/res_stasis_http.c?view=diff&rev=384600&r1=384599&r2=384600
==============================================================================
--- team/dlee/stasis-http/res/res_stasis_http.c (original)
+++ team/dlee/stasis-http/res/res_stasis_http.c Tue Apr  2 16:46:03 2013
@@ -704,10 +704,7 @@
 
 	if (ast_ends_with(uri, "/")) {
 		remove_trailing_slash(uri, &response);
-	} else if (ast_begins_with(uri, "api/")) {
-		/* Other RESTful resources */
-		stasis_http_invoke(uri, method, get_params, headers, &response);
-	} else {
+	} else if (ast_begins_with(uri, "api-docs/")) {
 		/* Serving up API docs */
 		if (method != AST_HTTP_GET) {
 			response.message =
@@ -716,8 +713,12 @@
 			response.response_code = 405;
 			response.response_text = "Method Not Allowed";
 		} else {
-			stasis_http_get_docs(uri, headers, &response);
-		}
+			/* Skip the api-docs prefix */
+			stasis_http_get_docs(strchr(uri, '/') + 1, headers, &response);
+		}
+	} else {
+		/* Other RESTful resources */
+		stasis_http_invoke(uri, method, get_params, headers, &response);
 	}
 
 	/* Leaving message unset is only allowed for 204 (No Content).

Modified: team/dlee/stasis-http/res/stasis_http/resources.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-http/res/stasis_http/resources.c?view=diff&rev=384600&r1=384599&r2=384600
==============================================================================
--- team/dlee/stasis-http/res/stasis_http/resources.c (original)
+++ team/dlee/stasis-http/res/stasis_http/resources.c Tue Apr  2 16:46:03 2013
@@ -488,7 +488,7 @@
 	stasis_http_event_websocket(headers, &args, response);
 }
 
-static struct stasis_rest_handlers stasis_api_asterisk_info = {
+static struct stasis_rest_handlers stasis_asterisk_info = {
 	.path_segment = "info",
 	.callbacks = {
 		[AST_HTTP_GET] = stasis_http_get_asterisk_info_cb,
@@ -497,15 +497,15 @@
 	.children = { },
 };
 
-static struct stasis_rest_handlers stasis_api_asterisk = {
+static struct stasis_rest_handlers stasis_asterisk = {
 	.path_segment = "asterisk",
 	.callbacks = {
 	},
 	.num_children = 1,
-	.children = { &stasis_api_asterisk_info, },
-};
-
-static struct stasis_rest_handlers stasis_api_endpoints_endpointId = {
+	.children = { &stasis_asterisk_info, },
+};
+
+static struct stasis_rest_handlers stasis_endpoints_endpointId = {
 	.path_segment = "endpointId",
 	.is_wildcard = 1,
 	.callbacks = {
@@ -515,16 +515,16 @@
 	.children = { },
 };
 
-static struct stasis_rest_handlers stasis_api_endpoints = {
+static struct stasis_rest_handlers stasis_endpoints = {
 	.path_segment = "endpoints",
 	.callbacks = {
 		[AST_HTTP_GET] = stasis_http_get_endpoints_cb,
 	},
 	.num_children = 1,
-	.children = { &stasis_api_endpoints_endpointId, },
-};
-
-static struct stasis_rest_handlers stasis_api_channels_channelId_dial = {
+	.children = { &stasis_endpoints_endpointId, },
+};
+
+static struct stasis_rest_handlers stasis_channels_channelId_dial = {
 	.path_segment = "dial",
 	.callbacks = {
 		[AST_HTTP_POST] = stasis_http_dial_cb,
@@ -533,7 +533,7 @@
 	.children = { },
 };
 
-static struct stasis_rest_handlers stasis_api_channels_channelId_continue = {
+static struct stasis_rest_handlers stasis_channels_channelId_continue = {
 	.path_segment = "continue",
 	.callbacks = {
 		[AST_HTTP_POST] = stasis_http_continue_in_dialplan_cb,
@@ -542,7 +542,7 @@
 	.children = { },
 };
 
-static struct stasis_rest_handlers stasis_api_channels_channelId_reject = {
+static struct stasis_rest_handlers stasis_channels_channelId_reject = {
 	.path_segment = "reject",
 	.callbacks = {
 		[AST_HTTP_POST] = stasis_http_reject_channel_cb,
@@ -551,7 +551,7 @@
 	.children = { },
 };
 
-static struct stasis_rest_handlers stasis_api_channels_channelId_answer = {
+static struct stasis_rest_handlers stasis_channels_channelId_answer = {
 	.path_segment = "answer",
 	.callbacks = {
 		[AST_HTTP_POST] = stasis_http_answer_channel_cb,
@@ -560,7 +560,7 @@
 	.children = { },
 };
 
-static struct stasis_rest_handlers stasis_api_channels_channelId_mute = {
+static struct stasis_rest_handlers stasis_channels_channelId_mute = {
 	.path_segment = "mute",
 	.callbacks = {
 		[AST_HTTP_POST] = stasis_http_mute_channel_cb,
@@ -569,7 +569,7 @@
 	.children = { },
 };
 
-static struct stasis_rest_handlers stasis_api_channels_channelId_unmute = {
+static struct stasis_rest_handlers stasis_channels_channelId_unmute = {
 	.path_segment = "unmute",
 	.callbacks = {
 		[AST_HTTP_POST] = stasis_http_unmute_channel_cb,
@@ -578,7 +578,7 @@
 	.children = { },
 };
 
-static struct stasis_rest_handlers stasis_api_channels_channelId_record = {
+static struct stasis_rest_handlers stasis_channels_channelId_record = {
 	.path_segment = "record",
 	.callbacks = {
 		[AST_HTTP_POST] = stasis_http_record_channel_cb,
@@ -587,7 +587,7 @@
 	.children = { },
 };
 
-static struct stasis_rest_handlers stasis_api_channels_channelId = {
+static struct stasis_rest_handlers stasis_channels_channelId = {
 	.path_segment = "channelId",
 	.is_wildcard = 1,
 	.callbacks = {
@@ -595,20 +595,20 @@
 		[AST_HTTP_DELETE] = stasis_http_delete_channel_cb,
 	},
 	.num_children = 7,
-	.children = { &stasis_api_channels_channelId_dial, &stasis_api_channels_channelId_continue, &stasis_api_channels_channelId_reject, &stasis_api_channels_channelId_answer, &stasis_api_channels_channelId_mute, &stasis_api_channels_channelId_unmute, &stasis_api_channels_channelId_record, },
-};
-
-static struct stasis_rest_handlers stasis_api_channels = {
+	.children = { &stasis_channels_channelId_dial, &stasis_channels_channelId_continue, &stasis_channels_channelId_reject, &stasis_channels_channelId_answer, &stasis_channels_channelId_mute, &stasis_channels_channelId_unmute, &stasis_channels_channelId_record, },
+};
+
+static struct stasis_rest_handlers stasis_channels = {
 	.path_segment = "channels",
 	.callbacks = {
 		[AST_HTTP_GET] = stasis_http_get_channels_cb,
 		[AST_HTTP_POST] = stasis_http_originate_cb,
 	},
 	.num_children = 1,
-	.children = { &stasis_api_channels_channelId, },
-};
-
-static struct stasis_rest_handlers stasis_api_bridges_bridgeId_addChannel = {
+	.children = { &stasis_channels_channelId, },
+};
+
+static struct stasis_rest_handlers stasis_bridges_bridgeId_addChannel = {
 	.path_segment = "addChannel",
 	.callbacks = {
 		[AST_HTTP_POST] = stasis_http_add_channel_to_bridge_cb,
@@ -617,7 +617,7 @@
 	.children = { },
 };
 
-static struct stasis_rest_handlers stasis_api_bridges_bridgeId_removeChannel = {
+static struct stasis_rest_handlers stasis_bridges_bridgeId_removeChannel = {
 	.path_segment = "removeChannel",
 	.callbacks = {
 		[AST_HTTP_POST] = stasis_http_remove_channel_from_bridge_cb,
@@ -626,7 +626,7 @@
 	.children = { },
 };
 
-static struct stasis_rest_handlers stasis_api_bridges_bridgeId_record = {
+static struct stasis_rest_handlers stasis_bridges_bridgeId_record = {
 	.path_segment = "record",
 	.callbacks = {
 		[AST_HTTP_POST] = stasis_http_record_bridge_cb,
@@ -635,7 +635,7 @@
 	.children = { },
 };
 
-static struct stasis_rest_handlers stasis_api_bridges_bridgeId = {
+static struct stasis_rest_handlers stasis_bridges_bridgeId = {
 	.path_segment = "bridgeId",
 	.is_wildcard = 1,
 	.callbacks = {
@@ -643,20 +643,20 @@
 		[AST_HTTP_DELETE] = stasis_http_delete_bridge_cb,
 	},
 	.num_children = 3,
-	.children = { &stasis_api_bridges_bridgeId_addChannel, &stasis_api_bridges_bridgeId_removeChannel, &stasis_api_bridges_bridgeId_record, },
-};
-
-static struct stasis_rest_handlers stasis_api_bridges = {
+	.children = { &stasis_bridges_bridgeId_addChannel, &stasis_bridges_bridgeId_removeChannel, &stasis_bridges_bridgeId_record, },
+};
+
+static struct stasis_rest_handlers stasis_bridges = {
 	.path_segment = "bridges",
 	.callbacks = {
 		[AST_HTTP_GET] = stasis_http_get_bridges_cb,
 		[AST_HTTP_POST] = stasis_http_new_bridge_cb,
 	},
 	.num_children = 1,
-	.children = { &stasis_api_bridges_bridgeId, },
-};
-
-static struct stasis_rest_handlers stasis_api_recordings_recordingId_stop = {
+	.children = { &stasis_bridges_bridgeId, },
+};
+
+static struct stasis_rest_handlers stasis_recordings_recordingId_stop = {
 	.path_segment = "stop",
 	.callbacks = {
 		[AST_HTTP_POST] = stasis_http_stop_recording_cb,
@@ -665,7 +665,7 @@
 	.children = { },
 };
 
-static struct stasis_rest_handlers stasis_api_recordings_recordingId_pause = {
+static struct stasis_rest_handlers stasis_recordings_recordingId_pause = {
 	.path_segment = "pause",
 	.callbacks = {
 		[AST_HTTP_POST] = stasis_http_pause_recording_cb,
@@ -674,7 +674,7 @@
 	.children = { },
 };
 
-static struct stasis_rest_handlers stasis_api_recordings_recordingId_unpause = {
+static struct stasis_rest_handlers stasis_recordings_recordingId_unpause = {
 	.path_segment = "unpause",
 	.callbacks = {
 		[AST_HTTP_POST] = stasis_http_unpause_recording_cb,
@@ -683,7 +683,7 @@
 	.children = { },
 };
 
-static struct stasis_rest_handlers stasis_api_recordings_recordingId_mute = {
+static struct stasis_rest_handlers stasis_recordings_recordingId_mute = {
 	.path_segment = "mute",
 	.callbacks = {
 		[AST_HTTP_POST] = stasis_http_mute_recording_cb,
@@ -692,7 +692,7 @@
 	.children = { },
 };
 
-static struct stasis_rest_handlers stasis_api_recordings_recordingId_unmute = {
+static struct stasis_rest_handlers stasis_recordings_recordingId_unmute = {
 	.path_segment = "unmute",
 	.callbacks = {
 		[AST_HTTP_POST] = stasis_http_unmute_recording_cb,
@@ -701,7 +701,7 @@
 	.children = { },
 };
 
-static struct stasis_rest_handlers stasis_api_recordings_recordingId = {
+static struct stasis_rest_handlers stasis_recordings_recordingId = {
 	.path_segment = "recordingId",
 	.is_wildcard = 1,
 	.callbacks = {
@@ -709,41 +709,33 @@
 		[AST_HTTP_DELETE] = stasis_http_delete_recording_cb,
 	},
 	.num_children = 5,
-	.children = { &stasis_api_recordings_recordingId_stop, &stasis_api_recordings_recordingId_pause, &stasis_api_recordings_recordingId_unpause, &stasis_api_recordings_recordingId_mute, &stasis_api_recordings_recordingId_unmute, },
-};
-
-static struct stasis_rest_handlers stasis_api_recordings = {
+	.children = { &stasis_recordings_recordingId_stop, &stasis_recordings_recordingId_pause, &stasis_recordings_recordingId_unpause, &stasis_recordings_recordingId_mute, &stasis_recordings_recordingId_unmute, },
+};
+
+static struct stasis_rest_handlers stasis_recordings = {
 	.path_segment = "recordings",
 	.callbacks = {
 		[AST_HTTP_GET] = stasis_http_get_recordings_cb,
 	},
 	.num_children = 1,
-	.children = { &stasis_api_recordings_recordingId, },
-};
-
-static struct stasis_rest_handlers stasis_api_events = {
+	.children = { &stasis_recordings_recordingId, },
+};
+
+static struct stasis_rest_handlers stasis_events = {
 	.path_segment = "events",
 	.callbacks = {
 		[AST_HTTP_GET] = stasis_http_event_websocket_cb,
 	},
 	.num_children = 0,
 	.children = { },
-};
-
-static struct stasis_rest_handlers stasis_api = {
-	.path_segment = "api",
-	.callbacks = {
-	},
-	.num_children = 6,
-	.children = { &stasis_api_asterisk, &stasis_api_endpoints, &stasis_api_channels, &stasis_api_bridges, &stasis_api_recordings, &stasis_api_events, },
 };
 
 static struct stasis_rest_handlers stasis = {
 	.path_segment = "stasis",
 	.callbacks = {
 	},
-	.num_children = 1,
-	.children = { &stasis_api, },
+	.num_children = 6,
+	.children = { &stasis_asterisk, &stasis_endpoints, &stasis_channels, &stasis_bridges, &stasis_recordings, &stasis_events, },
 };
 
 

Copied: team/dlee/stasis-http/rest-api/api-docs/asterisk.json (from r384587, team/dlee/stasis-http/rest-api/asterisk.json)
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-http/rest-api/api-docs/asterisk.json?view=diff&rev=384600&p1=team/dlee/stasis-http/rest-api/asterisk.json&r1=384587&p2=team/dlee/stasis-http/rest-api/api-docs/asterisk.json&r2=384600
==============================================================================
--- team/dlee/stasis-http/rest-api/asterisk.json (original)
+++ team/dlee/stasis-http/rest-api/api-docs/asterisk.json Tue Apr  2 16:46:03 2013
@@ -8,7 +8,7 @@
     "resourcePath": "/asterisk.{format}",
     "apis": [
         {
-            "path": "/api/asterisk/info",
+            "path": "/asterisk/info",
             "description": "Asterisk system information (similar to core show settings)",
             "operations": [
                 {

Copied: team/dlee/stasis-http/rest-api/api-docs/bridges.json (from r384587, team/dlee/stasis-http/rest-api/bridges.json)
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-http/rest-api/api-docs/bridges.json?view=diff&rev=384600&p1=team/dlee/stasis-http/rest-api/bridges.json&r1=384587&p2=team/dlee/stasis-http/rest-api/api-docs/bridges.json&r2=384600
==============================================================================
--- team/dlee/stasis-http/rest-api/bridges.json (original)
+++ team/dlee/stasis-http/rest-api/api-docs/bridges.json Tue Apr  2 16:46:03 2013
@@ -8,7 +8,7 @@
     "resourcePath": "/bridges.{format}",
     "apis": [
         {
-            "path": "/api/bridges",
+            "path": "/bridges",
             "description": "Active bridges",
             "operations": [
                 {
@@ -26,7 +26,7 @@
              ]
         },
         {
-            "path": "/api/bridges/{bridgeId}",
+            "path": "/bridges/{bridgeId}",
             "description": "Individual bridge",
             "operations": [
                 {
@@ -64,7 +64,7 @@
             ]
         },
         {
-            "path": "/api/bridges/{bridgeId}/addChannel",
+            "path": "/bridges/{bridgeId}/addChannel",
             "description": "Add a channel to a bridge",
             "operations": [
                 {
@@ -94,7 +94,7 @@
             ]
         },
         {
-            "path": "/api/bridges/{bridgeId}/removeChannel",
+            "path": "/bridges/{bridgeId}/removeChannel",
             "description": "Remove a channel from a bridge",
             "operations": [
                 {
@@ -124,7 +124,7 @@
             ]
         },
         {
-            "path": "/api/bridges/{bridgeId}/record",
+            "path": "/bridges/{bridgeId}/record",
             "description": "Record audio to/from a bridge",
             "operations": [
                 {

Copied: team/dlee/stasis-http/rest-api/api-docs/channels.json (from r384587, team/dlee/stasis-http/rest-api/channels.json)
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-http/rest-api/api-docs/channels.json?view=diff&rev=384600&p1=team/dlee/stasis-http/rest-api/channels.json&r1=384587&p2=team/dlee/stasis-http/rest-api/api-docs/channels.json&r2=384600
==============================================================================
--- team/dlee/stasis-http/rest-api/channels.json (original)
+++ team/dlee/stasis-http/rest-api/api-docs/channels.json Tue Apr  2 16:46:03 2013
@@ -8,7 +8,7 @@
     "resourcePath": "/channels.{format}",
     "apis": [
         {
-            "path": "/api/channels",
+            "path": "/channels",
             "description": "Active channels",
             "operations": [
                 {
@@ -52,7 +52,7 @@
             ]
         },
         {
-            "path": "/api/channels/{channelId}",
+            "path": "/channels/{channelId}",
             "description": "Active channel",
             "operations": [
                 {
@@ -90,7 +90,7 @@
             ]
         },
         {
-            "path": "/api/channels/{channelId}/dial",
+            "path": "/channels/{channelId}/dial",
             "description": "Create a new channel (originate) and bridge to this channel",
             "operations": [
                 {
@@ -128,7 +128,7 @@
             ]
         },
         {
-            "path": "/api/channels/{channelId}/continue",
+            "path": "/channels/{channelId}/continue",
             "description": "Exit application; continue execution in the dialplan",
             "operations": [
                 {
@@ -160,7 +160,7 @@
             ]
         },
         {
-            "path": "/api/channels/{channelId}/reject",
+            "path": "/channels/{channelId}/reject",
             "description": "Reject a channel",
             "operations": [
                 {
@@ -182,7 +182,7 @@
             ]
         },
         {
-            "path": "/api/channels/{channelId}/answer",
+            "path": "/channels/{channelId}/answer",
             "description": "Answer a channel",
             "operations": [
                 {
@@ -204,7 +204,7 @@
             ]
         },
         {
-            "path": "/api/channels/{channelId}/mute",
+            "path": "/channels/{channelId}/mute",
             "description": "Mute a channel",
             "operations": [
                 {
@@ -243,7 +243,7 @@
             ]
         },
         {
-            "path": "/api/channels/{channelId}/unmute",
+            "path": "/channels/{channelId}/unmute",
             "description": "Unmute a channel",
             "operations": [
                 {
@@ -282,7 +282,7 @@
             ]
         },
         {
-            "path": "/api/channels/{channelId}/record",
+            "path": "/channels/{channelId}/record",
             "description": "Record audio to/from a channel",
             "operations": [
                 {

Copied: team/dlee/stasis-http/rest-api/api-docs/endpoints.json (from r384587, team/dlee/stasis-http/rest-api/endpoints.json)
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-http/rest-api/api-docs/endpoints.json?view=diff&rev=384600&p1=team/dlee/stasis-http/rest-api/endpoints.json&r1=384587&p2=team/dlee/stasis-http/rest-api/api-docs/endpoints.json&r2=384600
==============================================================================
--- team/dlee/stasis-http/rest-api/endpoints.json (original)
+++ team/dlee/stasis-http/rest-api/api-docs/endpoints.json Tue Apr  2 16:46:03 2013
@@ -8,7 +8,7 @@
     "resourcePath": "/endpoints.{format}",
     "apis": [
         {
-            "path": "/api/endpoints",
+            "path": "/endpoints",
             "description": "Asterisk endpoints",
             "operations": [
                 {
@@ -30,7 +30,7 @@
             ]
         },
         {
-            "path": "/api/endpoints/{endpointId}",
+            "path": "/endpoints/{endpointId}",
             "description": "Single endpoint",
             "operations": [
                 {

Copied: team/dlee/stasis-http/rest-api/api-docs/events.json (from r384590, team/dlee/stasis-http/rest-api/events.json)
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-http/rest-api/api-docs/events.json?view=diff&rev=384600&p1=team/dlee/stasis-http/rest-api/events.json&r1=384590&p2=team/dlee/stasis-http/rest-api/api-docs/events.json&r2=384600
==============================================================================
--- team/dlee/stasis-http/rest-api/events.json (original)
+++ team/dlee/stasis-http/rest-api/api-docs/events.json Tue Apr  2 16:46:03 2013
@@ -8,7 +8,7 @@
     "resourcePath": "/events.{format}",
     "apis": [
         {
-            "path": "/api/events",
+            "path": "/events",
             "description": "Events from Asterisk to applications",
             "operations": [
                 {

Copied: team/dlee/stasis-http/rest-api/api-docs/recordings.json (from r384587, team/dlee/stasis-http/rest-api/recordings.json)
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-http/rest-api/api-docs/recordings.json?view=diff&rev=384600&p1=team/dlee/stasis-http/rest-api/recordings.json&r1=384587&p2=team/dlee/stasis-http/rest-api/api-docs/recordings.json&r2=384600
==============================================================================
--- team/dlee/stasis-http/rest-api/recordings.json (original)
+++ team/dlee/stasis-http/rest-api/api-docs/recordings.json Tue Apr  2 16:46:03 2013
@@ -8,7 +8,7 @@
     "resourcePath": "/recordings.{format}",
     "apis": [
         {
-            "path": "/api/recordings",
+            "path": "/recordings",
             "description": "Recordings",
             "operations": [
                 {
@@ -20,7 +20,7 @@
              ]
         },
         {
-            "path": "/api/recordings/{recordingId}",
+            "path": "/recordings/{recordingId}",
             "description": "Individual recording",
             "operations": [
                 {
@@ -58,7 +58,7 @@
             ]
         },
         {
-            "path": "/api/recordings/{recordingId}/stop",
+            "path": "/recordings/{recordingId}/stop",
             "operations": [
                 {
                     "httpMethod": "POST",
@@ -79,7 +79,7 @@
             ]
         },
         {
-            "path": "/api/recordings/{recordingId}/pause",
+            "path": "/recordings/{recordingId}/pause",
             "operations": [
                 {
                     "httpMethod": "POST",
@@ -100,7 +100,7 @@
             ]
         },
         {
-            "path": "/api/recordings/{recordingId}/unpause",
+            "path": "/recordings/{recordingId}/unpause",
             "operations": [
                 {
                     "httpMethod": "POST",
@@ -121,7 +121,7 @@
             ]
         },
         {
-            "path": "/api/recordings/{recordingId}/mute",
+            "path": "/recordings/{recordingId}/mute",
             "operations": [
                 {
                     "httpMethod": "POST",
@@ -142,7 +142,7 @@
             ]
         },
         {
-            "path": "/api/recordings/{recordingId}/unmute",
+            "path": "/recordings/{recordingId}/unmute",
             "operations": [
                 {
                     "httpMethod": "POST",

Modified: team/dlee/stasis-http/rest-api/resources.json
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-http/rest-api/resources.json?view=diff&rev=384600&r1=384599&r2=384600
==============================================================================
--- team/dlee/stasis-http/rest-api/resources.json (original)
+++ team/dlee/stasis-http/rest-api/resources.json Tue Apr  2 16:46:03 2013
@@ -7,27 +7,27 @@
     "basePath": "http://localhost:8088/stasis",
     "apis": [
         {
-            "path": "/asterisk.{format}",
+            "path": "/api-docs/asterisk.{format}",
             "description": "Asterisk resources"
         },
         {
-            "path": "/endpoints.{format}",
+            "path": "/api-docs/endpoints.{format}",
             "description": "Endpoint resources"
         },
         {
-            "path": "/channels.{format}",
+            "path": "/api-docs/channels.{format}",
             "description": "Channel resources"
         },
         {
-            "path": "/bridges.{format}",
+            "path": "/api-docs/bridges.{format}",
             "description": "Bridge resources"
         },
         {
-            "path": "/recordings.{format}",
+            "path": "/api-docs/recordings.{format}",
             "description": "Recording resources"
         },
         {
-            "path": "/events.{format}",
+            "path": "/api-docs/events.{format}",
             "description": "WebSocket resource"
         }
     ]




More information about the asterisk-commits mailing list