lib/jsdoc/transform-apijson-for-sdk.js
function (aEvents) {
			var fnExtractParameterProperties = function (oParameter, aParameters, iDepth, aPhoneName) {
				if (oParameter.parameterProperties) {
					Object.keys(oParameter.parameterProperties).forEach(function (sProperty) {
						var oProperty = oParameter.parameterProperties[sProperty],
							sPhoneTypeSuffix;

						oProperty.depth = iDepth;

						// Phone name - available only for parameters
						sPhoneTypeSuffix = oProperty.type === "array" ? "[]" : "";
						oProperty.phoneName = [aPhoneName.join("."), (oProperty.name + sPhoneTypeSuffix)].join(".");

						// Add property to parameter array as we need a simple structure
						aParameters.push(oProperty);

						// Handle child parameterProperties
						fnExtractParameterProperties(oProperty, aParameters, (iDepth + 1),
							aPhoneName.concat([oProperty.name + sPhoneTypeSuffix]));
					});

					// Keep file size in check
					delete oParameter.parameterProperties;
				}
			};
			aEvents.forEach(function (aEvents) {
				// New array to hold modified parameters
				var aParameters = [];

				// Handle parameters
				if (aEvents.parameters) {
					aEvents.parameters.forEach(function (oParameter) {
						// Add the parameter before the properties
						aParameters.push(oParameter);

						// Handle Parameter Properties
						// Note: We flatten the structure
						fnExtractParameterProperties(oParameter, aParameters, 1, [oParameter.name]);
					});

					// Override the old data
					aEvents.parameters = aParameters;
				}
			});
		}
function (aEvents) {
			var fnExtractParameterProperties = function (oParameter, aParameters, iDepth, aPhoneName) {
				if (oParameter.parameterProperties) {
					Object.keys(oParameter.parameterProperties).forEach(function (sProperty) {
						var oProperty = oParameter.parameterProperties[sProperty],
							sPhoneTypeSuffix;

						oProperty.depth = iDepth;

						// Phone name - available only for parameters
						sPhoneTypeSuffix = oProperty.type === "array" ? "[]" : "";
						oProperty.phoneName = [aPhoneName.join("."), (oProperty.name + sPhoneTypeSuffix)].join(".");

						// Add property to parameter array as we need a simple structure
						aParameters.push(oProperty);

						// Handle child parameterProperties
						fnExtractParameterProperties(oProperty, aParameters, (iDepth + 1),
							aPhoneName.concat([oProperty.name + sPhoneTypeSuffix]));
					});

					// Keep file size in check
					delete oParameter.parameterProperties;
				}
			};
			aEvents.forEach(function (aEvents) {
				// New array to hold modified parameters
				var aParameters = [];

				// Handle parameters
				if (aEvents.parameters) {
					aEvents.parameters.forEach(function (oParameter) {
						// Add the parameter before the properties
						aParameters.push(oParameter);

						// Handle Parameter Properties
						// Note: We flatten the structure
						fnExtractParameterProperties(oParameter, aParameters, 1, [oParameter.name]);
					});

					// Override the old data
					aEvents.parameters = aParameters;
				}
			});
		}
function ( aEvents ) { var fnExtractParameterProperties = function ( oParameter , aParameters , iDepth , aPhoneName ) { if ( oParameter . parameterProperties ) { Object . keys ( oParameter . parameterProperties ) . forEach ( function ( sProperty ) { var oProperty = oParameter . parameterProperties [ sProperty ] , sPhoneTypeSuffix ; oProperty . depth = iDepth ; // Phone name - available only for parameters sPhoneTypeSuffix = oProperty . type === "array" ? "[]" : "" ; oProperty . phoneName = [ aPhoneName . join ( "." ) , ( oProperty . name + sPhoneTypeSuffix ) ] . join ( "." ) ; // Add property to parameter array as we need a simple structure aParameters . push ( oProperty ) ; // Handle child parameterProperties fnExtractParameterProperties ( oProperty , aParameters , ( iDepth + 1 ) , aPhoneName . concat ( [ oProperty . name + sPhoneTypeSuffix ] ) ) ; } ) ; // Keep file size in check delete oParameter . parameterProperties ; } } ; aEvents . forEach ( function ( aEvents ) { // New array to hold modified parameters var aParameters = [ ] ; // Handle parameters if ( aEvents . parameters ) { aEvents . parameters . forEach ( function ( oParameter ) { // Add the parameter before the properties aParameters . push ( oParameter ) ; // Handle Parameter Properties // Note: We flatten the structure fnExtractParameterProperties ( oParameter , aParameters , 1 , [ oParameter . name ] ) ; } ) ; // Override the old data aEvents . parameters = aParameters ; } } ) ; }
Adjusts events info so that it can be easily displayed in a table
@param {Array} aEvents - the events array initially coming from the server
Adjusts events info so that it can be easily displayed in a table