lib/jsdoc/transform-apijson-for-sdk.js
function (aMethods) {
			var fnCreateTypesArr = function (sTypes) {
				return sTypes.split("|").map(function (sType) {
					return {value: sType}
				});
			};
			var fnExtractParameterProperties = function (oParameter, aParameters, iDepth, aPhoneName) {
				if (oParameter.parameterProperties) {
					Object.keys(oParameter.parameterProperties).forEach(function (sProperty) {
						var oProperty = oParameter.parameterProperties[sProperty];

						oProperty.depth = iDepth;

						// Handle types
						if (oProperty.type) {
							oProperty.types = fnCreateTypesArr(oProperty.type);
						}

						// Phone name - available only for parameters
						oProperty.phoneName = [aPhoneName.join("."), oProperty.name].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]));

						// Keep file size in check
						delete oProperty.type;
					});

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

				// Handle parameters
				if (oMethod.parameters) {
					oMethod.parameters.forEach(function (oParameter) {
						if (oParameter.type) {
							oParameter.types = fnCreateTypesArr(oParameter.type);
						}

						// Keep file size in check
						delete oParameter.type;

						// 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
					oMethod.parameters = aParameters;
				}

				// Handle return values
				if (oMethod.returnValue && oMethod.returnValue.type) {
					// Handle types
					oMethod.returnValue.types = fnCreateTypesArr(oMethod.returnValue.type);
				}

			});
		}
function (aMethods) {
			var fnCreateTypesArr = function (sTypes) {
				return sTypes.split("|").map(function (sType) {
					return {value: sType}
				});
			};
			var fnExtractParameterProperties = function (oParameter, aParameters, iDepth, aPhoneName) {
				if (oParameter.parameterProperties) {
					Object.keys(oParameter.parameterProperties).forEach(function (sProperty) {
						var oProperty = oParameter.parameterProperties[sProperty];

						oProperty.depth = iDepth;

						// Handle types
						if (oProperty.type) {
							oProperty.types = fnCreateTypesArr(oProperty.type);
						}

						// Phone name - available only for parameters
						oProperty.phoneName = [aPhoneName.join("."), oProperty.name].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]));

						// Keep file size in check
						delete oProperty.type;
					});

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

				// Handle parameters
				if (oMethod.parameters) {
					oMethod.parameters.forEach(function (oParameter) {
						if (oParameter.type) {
							oParameter.types = fnCreateTypesArr(oParameter.type);
						}

						// Keep file size in check
						delete oParameter.type;

						// 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
					oMethod.parameters = aParameters;
				}

				// Handle return values
				if (oMethod.returnValue && oMethod.returnValue.type) {
					// Handle types
					oMethod.returnValue.types = fnCreateTypesArr(oMethod.returnValue.type);
				}

			});
		}
function ( aMethods ) { var fnCreateTypesArr = function ( sTypes ) { return sTypes . split ( "|" ) . map ( function ( sType ) { return { value : sType } } ) ; } ; var fnExtractParameterProperties = function ( oParameter , aParameters , iDepth , aPhoneName ) { if ( oParameter . parameterProperties ) { Object . keys ( oParameter . parameterProperties ) . forEach ( function ( sProperty ) { var oProperty = oParameter . parameterProperties [ sProperty ] ; oProperty . depth = iDepth ; // Handle types if ( oProperty . type ) { oProperty . types = fnCreateTypesArr ( oProperty . type ) ; } // Phone name - available only for parameters oProperty . phoneName = [ aPhoneName . join ( "." ) , oProperty . name ] . 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 ] ) ) ; // Keep file size in check delete oProperty . type ; } ) ; // Keep file size in check delete oParameter . parameterProperties ; } } ; aMethods . forEach ( function ( oMethod ) { // New array to hold modified parameters var aParameters = [ ] ; // Handle parameters if ( oMethod . parameters ) { oMethod . parameters . forEach ( function ( oParameter ) { if ( oParameter . type ) { oParameter . types = fnCreateTypesArr ( oParameter . type ) ; } // Keep file size in check delete oParameter . type ; // 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 oMethod . parameters = aParameters ; } // Handle return values if ( oMethod . returnValue && oMethod . returnValue . type ) { // Handle types oMethod . returnValue . types = fnCreateTypesArr ( oMethod . returnValue . type ) ; } } ) ; }
Adjusts methods info so that it can be easily displayed in a table
@param aMethods - the methods array initially coming from the server
Adjusts methods info so that it can be easily displayed in a table