[asterisk-commits] kmoore: branch 12 r401018 - in /branches/12:	res/ rest-api/api-docs/
    SVN commits to the Asterisk project 
    asterisk-commits at lists.digium.com
       
    Tue Oct 15 15:02:10 CDT 2013
    
    
  
Author: kmoore
Date: Tue Oct 15 15:02:08 2013
New Revision: 401018
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=401018
Log:
Ensure bridge record error responses validate
This adds the list of expected errors to the /bridges/{bridgeId}/record
ARI documentation so that outbound 4xx errors validate properly.
Previously, this would result in a response validation failure.
(closes issue ASTERISK-22627)
Reported by: Joshua Colp
Modified:
    branches/12/res/res_ari_bridges.c
    branches/12/rest-api/api-docs/bridges.json
Modified: branches/12/res/res_ari_bridges.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_ari_bridges.c?view=diff&rev=401018&r1=401017&r2=401018
==============================================================================
--- branches/12/res/res_ari_bridges.c (original)
+++ branches/12/res/res_ari_bridges.c Tue Oct 15 15:02:08 2013
@@ -742,6 +742,9 @@
 		break;
 	case 500: /* Internal Server Error */
 	case 501: /* Not Implemented */
+	case 400: /* Recording name invalid */
+	case 404: /* Bridge not found */
+	case 409: /* Bridge not in Stasis application; Recording already in progress */
 		is_valid = 1;
 		break;
 	default:
Modified: branches/12/rest-api/api-docs/bridges.json
URL: http://svnview.digium.com/svn/asterisk/branches/12/rest-api/api-docs/bridges.json?view=diff&rev=401018&r1=401017&r2=401018
==============================================================================
--- branches/12/rest-api/api-docs/bridges.json (original)
+++ branches/12/rest-api/api-docs/bridges.json Tue Oct 15 15:02:08 2013
@@ -452,6 +452,20 @@
 									"#"
 								]
 							}
+						}
+					],
+					"errorResponses": [
+						{
+							"code": 400,
+							"reason": "Recording name invalid"
+						},
+						{
+							"code": 404,
+							"reason": "Bridge not found"
+						},
+						{
+							"code": 409,
+							"reason": "Bridge not in Stasis application; Recording already in progress"
 						}
 					]
 				}
    
    
More information about the asterisk-commits
mailing list