js/ZypSMDReader.js
function resolveProperties(schema) {

                logger.debug("Resolving sub-properties for " + schema.id);

                // resolve inherited global parameters
                resolveExtendedParameters(schema);

                Object.keys(schema.services || {}).forEach(function (key) {
                    var value = schema.services[key];
                    //value.target = value.target ? schema.target + value.target : schema.target; //TODO: should this build concat paths? that is currently handled in getServiceUrl function
                    value.returns = value.returns || schema.returns;
                    value.transport = value.transport || schema.transport;
                    value.contentType = value.contentType || schema.contentType;
                    value.envelope = value.envelope || schema.envelope || "URL";
                    value.description = value.description || "";

                    if (value.returns) {
                        resolveExtensions(value.returns);
                    }

                    if (value.parameters) {
                        value.parameters.forEach(function (item) {
                            item.envelope = item.envelope || value.envelope;
                            item.description = item.description || "";
                        });
                    }


                    var ext = value["extends"];

                    if (ext) {

                        //resolution hasn't been completed or extends object isn't proper JSONSchema
                        if (!ext.id) {
                            throw new Error("Parent schema for method [" + key + "] in schema " + schema.id + " is invalid.");
                        }

                        //TODO: resolveExtensions for params object properties? not really needed yet (the name is fine for now...)
                        if (!value.parameters) {
                            value.parameters = ext.parameters;
                        } else {
                            value.parameters = value.parameters.concat(ext.parameters);
                        }
                    }
                });

                if (!schema.tag) {
                    schema.tag = {};
                }
                schema.tag.resolved = true;
                schema.resolvedProperties = true;
            }
function resolveProperties(schema) {

                logger.debug("Resolving sub-properties for " + schema.id);

                // resolve inherited global parameters
                resolveExtendedParameters(schema);

                Object.keys(schema.services || {}).forEach(function (key) {
                    var value = schema.services[key];
                    //value.target = value.target ? schema.target + value.target : schema.target; //TODO: should this build concat paths? that is currently handled in getServiceUrl function
                    value.returns = value.returns || schema.returns;
                    value.transport = value.transport || schema.transport;
                    value.contentType = value.contentType || schema.contentType;
                    value.envelope = value.envelope || schema.envelope || "URL";
                    value.description = value.description || "";

                    if (value.returns) {
                        resolveExtensions(value.returns);
                    }

                    if (value.parameters) {
                        value.parameters.forEach(function (item) {
                            item.envelope = item.envelope || value.envelope;
                            item.description = item.description || "";
                        });
                    }


                    var ext = value["extends"];

                    if (ext) {

                        //resolution hasn't been completed or extends object isn't proper JSONSchema
                        if (!ext.id) {
                            throw new Error("Parent schema for method [" + key + "] in schema " + schema.id + " is invalid.");
                        }

                        //TODO: resolveExtensions for params object properties? not really needed yet (the name is fine for now...)
                        if (!value.parameters) {
                            value.parameters = ext.parameters;
                        } else {
                            value.parameters = value.parameters.concat(ext.parameters);
                        }
                    }
                });

                if (!schema.tag) {
                    schema.tag = {};
                }
                schema.tag.resolved = true;
                schema.resolvedProperties = true;
            }
function resolveProperties ( schema ) { logger . debug ( "Resolving sub-properties for " + schema . id ) ; // resolve inherited global parameters
 resolveExtendedParameters ( schema ) ; Object . keys ( schema . services || { } ) . forEach ( function ( key ) { var value = schema . services [ key ] ; //value.target = value.target ? schema.target + value.target : schema.target; //TODO: should this build concat paths? that is currently handled in getServiceUrl function
 value . returns = value . returns || schema . returns ; value . transport = value . transport || schema . transport ; value . contentType = value . contentType || schema . contentType ; value . envelope = value . envelope || schema . envelope || "URL" ; value . description = value . description || "" ; if ( value . returns ) { resolveExtensions ( value . returns ) ; } if ( value . parameters ) { value . parameters . forEach ( function ( item ) { item . envelope = item . envelope || value . envelope ; item . description = item . description || "" ; } ) ; } var ext = value [ "extends" ] ; if ( ext ) { //resolution hasn't been completed or extends object isn't proper JSONSchema
 if ( ! ext . id ) { throw new Error ( "Parent schema for method [" + key + "] in schema " + schema . id + " is invalid." ) ; } //TODO: resolveExtensions for params object properties? not really needed yet (the name is fine for now...)
 if ( ! value . parameters ) { value . parameters = ext . parameters ; } else { value . parameters = value . parameters . concat ( ext . parameters ) ; } } } ) ; if ( ! schema . tag ) { schema . tag = { } ; } schema . tag . resolved = true ; schema . resolvedProperties = true ; }
copies properties from parent as defaults, as well as extensions for params
copies properties from parent as defaults as well as extensions for params