[asterisk-commits] kmoore: branch kmoore/stasis-bridging-channel_events r386934 - in /team/kmoor...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Apr 30 08:52:46 CDT 2013
Author: kmoore
Date: Tue Apr 30 08:52:43 2013
New Revision: 386934
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=386934
Log:
Back out some changes to remain conformant with Swagger
Modified:
team/kmoore/stasis-bridging-channel_events/res/stasis_http/resource_events.h
team/kmoore/stasis-bridging-channel_events/res/stasis_http/resource_recordings.h
team/kmoore/stasis-bridging-channel_events/res/stasis_http/resource_sounds.h
team/kmoore/stasis-bridging-channel_events/rest-api-templates/swagger_model.py
team/kmoore/stasis-bridging-channel_events/rest-api/api-docs/events.json
Modified: team/kmoore/stasis-bridging-channel_events/res/stasis_http/resource_events.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-bridging-channel_events/res/stasis_http/resource_events.h?view=diff&rev=386934&r1=386933&r2=386934
==============================================================================
--- team/kmoore/stasis-bridging-channel_events/res/stasis_http/resource_events.h (original)
+++ team/kmoore/stasis-bridging-channel_events/res/stasis_http/resource_events.h Tue Apr 30 08:52:43 2013
@@ -135,8 +135,8 @@
*
* \param channel The channel on which the hangup was requested.
* \param blob JSON blob containing the following parameters:
- * - soft: integer - Whether the hangup request was a soft hangup request.
- * - cause: integer - Integer representation of the cause of the hangup
+ * - soft: integer - Whether the hangup request was a soft hangup request.
+ * - cause: integer - Integer representation of the cause of the hangup.
*
* \retval NULL on error
* \retval JSON (ast_json) describing the event
@@ -162,7 +162,7 @@
* \brief Notification that another WebSocket has taken over for an application.
*
* \param blob JSON blob containing the following parameters:
- * - application: string (required)
+ * - application: string (required)
*
* \retval NULL on error
* \retval JSON (ast_json) describing the event
Modified: team/kmoore/stasis-bridging-channel_events/res/stasis_http/resource_recordings.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-bridging-channel_events/res/stasis_http/resource_recordings.h?view=diff&rev=386934&r1=386933&r2=386934
==============================================================================
--- team/kmoore/stasis-bridging-channel_events/res/stasis_http/resource_recordings.h (original)
+++ team/kmoore/stasis-bridging-channel_events/res/stasis_http/resource_recordings.h Tue Apr 30 08:52:43 2013
@@ -196,8 +196,8 @@
* Recording
* - id: string (required)
* StoredRecording
- * - durationSeconds: int
- * - time: Date
+ * - durationSeconds: int
+ * - time: Date
* - id: string (required)
* - formats: List[string] (required)
* LiveRecording
Modified: team/kmoore/stasis-bridging-channel_events/res/stasis_http/resource_sounds.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-bridging-channel_events/res/stasis_http/resource_sounds.h?view=diff&rev=386934&r1=386933&r2=386934
==============================================================================
--- team/kmoore/stasis-bridging-channel_events/res/stasis_http/resource_sounds.h (original)
+++ team/kmoore/stasis-bridging-channel_events/res/stasis_http/resource_sounds.h Tue Apr 30 08:52:43 2013
@@ -71,7 +71,7 @@
*
* Sound
* - lang: string (required)
- * - text: string
+ * - text: string
* - id: string (required)
* - formats: List[string] (required)
*/
Modified: team/kmoore/stasis-bridging-channel_events/rest-api-templates/swagger_model.py
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-bridging-channel_events/rest-api-templates/swagger_model.py?view=diff&rev=386934&r1=386933&r2=386934
==============================================================================
--- team/kmoore/stasis-bridging-channel_events/rest-api-templates/swagger_model.py (original)
+++ team/kmoore/stasis-bridging-channel_events/rest-api-templates/swagger_model.py Tue Apr 30 08:52:43 2013
@@ -299,12 +299,12 @@
self.properties = None
def load(self, id, model_json, processor, context):
- self.id = id
- model_json['id'] = id
context = add_context(context, model_json, 'id')
+ self.id = model_json.get('id')
+ if id != self.id:
+ raise SwaggerError("Model id doesn't match name", c)
self.description = model_json.get('description')
props = model_json.get('properties').items() or []
-
self.properties = [
Property(k).load(j, processor, context) for (k, j) in props]
return self
Modified: team/kmoore/stasis-bridging-channel_events/rest-api/api-docs/events.json
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-bridging-channel_events/rest-api/api-docs/events.json?view=diff&rev=386934&r1=386933&r2=386934
==============================================================================
--- team/kmoore/stasis-bridging-channel_events/rest-api/api-docs/events.json (original)
+++ team/kmoore/stasis-bridging-channel_events/rest-api/api-docs/events.json Tue Apr 30 08:52:43 2013
@@ -73,6 +73,7 @@
}
},
"ApplicationReplaced": {
+ "id": "ApplicationReplaced",
"description": "Notification that another WebSocket has taken over for an application.",
"notes": "An application may only be subscribed to by a single WebSocket at a time. If multiple WebSockets attempt to subscribe to the same application, the newer WebSocket wins, and the older one receives this event.",
"properties": {
@@ -83,6 +84,7 @@
}
},
"BridgeCreated": {
+ "id": "BridgeCreated",
"description": "Notification that a bridge has been created.",
"properties": {
"bridge": {
@@ -92,6 +94,7 @@
}
},
"BridgeDestroyed": {
+ "id": "BridgeDestroyed",
"description": "Notification that a bridge has been destroyed.",
"properties": {
"bridge": {
@@ -101,6 +104,7 @@
}
},
"ChannelCreated": {
+ "id": "ChannelCreated",
"description": "Notification that a channel has been created.",
"properties": {
"channel": {
@@ -110,6 +114,7 @@
}
},
"ChannelSnapshot": {
+ "id": "ChannelSnapshot",
"description": "Some part of channel state changed.",
"properties": {
"channel": {
@@ -119,6 +124,7 @@
}
},
"ChannelDestroyed": {
+ "id": "ChannelDestroyed",
"description": "Notification that a channel has been destroyed.",
"properties": {
"Cause": {
@@ -138,6 +144,7 @@
}
},
"ChannelEnteredBridge": {
+ "id": "ChannelEnteredBridge",
"description": "Notification that a channel has entered a bridge.",
"properties": {
"bridge": {
@@ -150,6 +157,7 @@
}
},
"ChannelLeftBridge": {
+ "id": "ChannelLeftBridge",
"description": "Notification that a channel has left a bridge.",
"properties": {
"bridge": {
@@ -163,6 +171,7 @@
}
},
"ChannelStateChange": {
+ "id": "ChannelStateChange",
"description": "Notification of a channel's state change.",
"properties": {
"channel": {
@@ -172,6 +181,7 @@
}
},
"ChannelDtmfReceived": {
+ "id": "ChannelDtmfReceived",
"description": "DTMF received on a channel.",
"notes": "This event is sent when the DTMF ends. There is no notification about the start of DTMF",
"properties": {
@@ -188,6 +198,7 @@
}
},
"ChannelDialplan": {
+ "id": "ChannelDialplan",
"description": "Channel changed location in the dialplan.",
"properties": {
"Application": {
@@ -208,6 +219,7 @@
}
},
"ChannelCallerId": {
+ "id": "ChannelCallerId",
"description": "Channel changed Caller ID.",
"properties": {
"CallerPresentation": {
@@ -228,6 +240,7 @@
}
},
"ChannelUserevent": {
+ "id": "ChannelUserevent",
"description": "Channel changed Caller ID.",
"properties": {
"eventname": {
@@ -248,6 +261,7 @@
}
},
"ChannelHangupRequest": {
+ "id": "ChannelHangupRequest",
"description": "Channel changed Caller ID.",
"properties": {
"cause": {
@@ -266,6 +280,7 @@
}
},
"ChannelVarset": {
+ "id": "ChannelVarset",
"description": "Channel variable changed.",
"properties": {
"variable": {
@@ -286,6 +301,7 @@
}
},
"StasisEnd": {
+ "id": "StasisEnd",
"description": "Notification that a channel has left a Stasis appliction.",
"properties": {
"channel": {
@@ -295,6 +311,7 @@
}
},
"StasisStart": {
+ "id": "StasisStart",
"description": "Notification that a channel has entered a Stasis appliction.",
"properties": {
"args": {
More information about the asterisk-commits
mailing list