lib/swagger/swagger.js
function recursiveMapping(source) {
			if (source.type === 'array') {
				if (source.items['$ref'] || source.items.type === 'object') {
					source.items = mapSimpleField(source.items);
				}
				else if (source.items.type === 'object') {
					recursiveMapping(source.items);
				}
				else mapSimpleField(source);
			}
			else if (source.type === 'object') {
				for (var property in source.properties) {
					if (source.properties[property]['$ref']) {
						source.properties[property] = mapSimpleField(source.properties[property]);
					}
					else if (source.properties[property].type === 'object' || source.properties[property].type === 'array') {
						recursiveMapping(source.properties[property]);
					}
				}
			}
			else if (source.schema) {
				if (source.schema.type === 'object') {
					for (var property in source.schema.properties) {
						if (source.schema.properties[property]['$ref']) {
							source.schema.properties[property] = mapSimpleField(source.schema.properties[property]);
						}
					}
				}
			}
			else {
				//map simple inputs if any
				source = mapSimpleField(source);
			}
		}
function recursiveMapping(source) {
			if (source.type === 'array') {
				if (source.items['$ref'] || source.items.type === 'object') {
					source.items = mapSimpleField(source.items);
				}
				else if (source.items.type === 'object') {
					recursiveMapping(source.items);
				}
				else mapSimpleField(source);
			}
			else if (source.type === 'object') {
				for (var property in source.properties) {
					if (source.properties[property]['$ref']) {
						source.properties[property] = mapSimpleField(source.properties[property]);
					}
					else if (source.properties[property].type === 'object' || source.properties[property].type === 'array') {
						recursiveMapping(source.properties[property]);
					}
				}
			}
			else if (source.schema) {
				if (source.schema.type === 'object') {
					for (var property in source.schema.properties) {
						if (source.schema.properties[property]['$ref']) {
							source.schema.properties[property] = mapSimpleField(source.schema.properties[property]);
						}
					}
				}
			}
			else {
				//map simple inputs if any
				source = mapSimpleField(source);
			}
		}
function recursiveMapping ( source ) { if ( source . type === 'array' ) { if ( source . items [ '$ref' ] || source . items . type === 'object' ) { source . items = mapSimpleField ( source . items ) ; } else if ( source . items . type === 'object' ) { recursiveMapping ( source . items ) ; } else mapSimpleField ( source ) ; } else if ( source . type === 'object' ) { for ( var property in source . properties ) { if ( source . properties [ property ] [ '$ref' ] ) { source . properties [ property ] = mapSimpleField ( source . properties [ property ] ) ; } else if ( source . properties [ property ] . type === 'object' || source . properties [ property ] . type === 'array' ) { recursiveMapping ( source . properties [ property ] ) ; } } } else if ( source . schema ) { if ( source . schema . type === 'object' ) { for ( var property in source . schema . properties ) { if ( source . schema . properties [ property ] [ '$ref' ] ) { source . schema . properties [ property ] = mapSimpleField ( source . schema . properties [ property ] ) ; } } } } else { //map simple inputs if any source = mapSimpleField ( source ) ; } }
loop through one common field recursively constructing and populating all its children imfv
loop through one common field recursively constructing and populating all its children imfv