lib/swagger/swagger.js
function (serviceInfo) {
		var config = {
			"type": "service",
			"prerequisites": {
				"cpu": " ",
				"memory": " "
			},
			"swagger": true,
			"injection": true,
			"serviceName": serviceInfo.serviceName,
			"serviceGroup": serviceInfo.serviceGroup,
			"serviceVersion": serviceInfo.serviceVersion,
			"servicePort": serviceInfo.servicePort,
			"requestTimeout": serviceInfo.requestTimeout,
			"requestTimeoutRenewal": serviceInfo.requestTimeoutRenewal,
			"extKeyRequired": serviceInfo.extKeyRequired,
			"oauth": serviceInfo.oauth,
			"session": serviceInfo.session,
			"errors": {},
			"schema": {}
		};
		
		if (serviceInfo.dbs && Array.isArray(serviceInfo.dbs) && serviceInfo.dbs.length > 0) {
			config["dbs"] = serviceInfo.dbs;
			config["models"] = {
				"path": '%__dirname% + "/lib/models/"',
				"name": ""
			};
			
			var modelProps = Object.keys(serviceInfo.dbs[0]);
			if (modelProps.indexOf("mongo") !== -1) {
				config.models.name = serviceInfo.dbs[0] = "mongo";
			}
			else {
				config.models.name = serviceInfo.dbs[0] = "es";
			}
		}
		
		return config;
	}
function (serviceInfo) {
		var config = {
			"type": "service",
			"prerequisites": {
				"cpu": " ",
				"memory": " "
			},
			"swagger": true,
			"injection": true,
			"serviceName": serviceInfo.serviceName,
			"serviceGroup": serviceInfo.serviceGroup,
			"serviceVersion": serviceInfo.serviceVersion,
			"servicePort": serviceInfo.servicePort,
			"requestTimeout": serviceInfo.requestTimeout,
			"requestTimeoutRenewal": serviceInfo.requestTimeoutRenewal,
			"extKeyRequired": serviceInfo.extKeyRequired,
			"oauth": serviceInfo.oauth,
			"session": serviceInfo.session,
			"errors": {},
			"schema": {}
		};
		
		if (serviceInfo.dbs && Array.isArray(serviceInfo.dbs) && serviceInfo.dbs.length > 0) {
			config["dbs"] = serviceInfo.dbs;
			config["models"] = {
				"path": '%__dirname% + "/lib/models/"',
				"name": ""
			};
			
			var modelProps = Object.keys(serviceInfo.dbs[0]);
			if (modelProps.indexOf("mongo") !== -1) {
				config.models.name = serviceInfo.dbs[0] = "mongo";
			}
			else {
				config.models.name = serviceInfo.dbs[0] = "es";
			}
		}
		
		return config;
	}
function ( serviceInfo ) { var config = { "type" : "service" , "prerequisites" : { "cpu" : " " , "memory" : " " } , "swagger" : true , "injection" : true , "serviceName" : serviceInfo . serviceName , "serviceGroup" : serviceInfo . serviceGroup , "serviceVersion" : serviceInfo . serviceVersion , "servicePort" : serviceInfo . servicePort , "requestTimeout" : serviceInfo . requestTimeout , "requestTimeoutRenewal" : serviceInfo . requestTimeoutRenewal , "extKeyRequired" : serviceInfo . extKeyRequired , "oauth" : serviceInfo . oauth , "session" : serviceInfo . session , "errors" : { } , "schema" : { } } ; if ( serviceInfo . dbs && Array . isArray ( serviceInfo . dbs ) && serviceInfo . dbs . length > 0 ) { config [ "dbs" ] = serviceInfo . dbs ; config [ "models" ] = { "path" : '%__dirname% + "/lib/models/"' , "name" : "" } ; var modelProps = Object . keys ( serviceInfo . dbs [ 0 ] ) ; if ( modelProps . indexOf ( "mongo" ) !== - 1 ) { config . models . name = serviceInfo . dbs [ 0 ] = "mongo" ; } else { config . models . name = serviceInfo . dbs [ 0 ] = "es" ; } } return config ; }
map variables to meet the service configuration object schema
@param serviceInfo
@returns {{type: string, prerequisites: {cpu: string, memory: string}, swagger: boolean, dbs, serviceName, serviceGroup, serviceVersion, servicePort, requestTimeout, requestTimeoutRenewal, extKeyRequired, oauth, session, errors: {}, schema: {}}}
map variables to meet the service configuration object schema