parseServiceSchema(schema) {
		if (!isObject(schema))
			throw new ServiceSchemaError(
				"The service schema can't be null. Maybe is it not a service schema?"
			);

		this.originalSchema = _.cloneDeep(schema);

		if (schema.mixins) {
			schema = this.applyMixins(schema);
		}

		if (isFunction(schema.merged)) {
			schema.merged.call(this, schema);
		} else if (Array.isArray(schema.merged)) {
			schema.merged.forEach(fn => fn.call(this, schema));
		}

		this.broker.callMiddlewareHookSync("serviceCreating", [this, schema]);

		if (!schema.name) {
			/* eslint-disable-next-line no-console */
			console.error(
				"Service name can't be empty! Maybe it is not a valid Service schema. Maybe is it not a service schema?",
				{ schema }
			);
			throw new ServiceSchemaError(
				"Service name can't be empty! Maybe it is not a valid Service schema. Maybe is it not a service schema?",
				{ schema }
			);
		}

		this.name = schema.name;
		this.version = schema.version;
		this.settings = schema.settings || {};
		this.metadata = schema.metadata || {};
		this.schema = schema;

		this.fullName = Service.getVersionedFullName(
			this.name,
			this.settings.$noVersionPrefix !== true ? this.version : undefined
		);

		this.logger = this.broker.getLogger(this.fullName, {
			svc: this.name,
			ver: this.version
		});

		this.actions = {}; // external access to actions
		this.events = {}; // external access to event handlers.

		// Service item for Registry
		const serviceSpecification = {
			name: this.name,
			version: this.version,
			fullName: this.fullName,
			settings: this._getPublicSettings(this.settings),
			metadata: this.metadata,
			actions: {},
			events: {}
		};

		// Register methods
		if (isObject(schema.methods)) {
			_.forIn(schema.methods, (method, name) => {
				/* istanbul ignore next */
				if (
					[
						"name",
						"version",
						"settings",
						"metadata",
						"dependencies",
						"schema",
						"broker",
						"actions",
						"logger",
						"created",
						"started",
						"stopped",
						"_start",
						"_stop",
						"_init",
						"applyMixins"
					].indexOf(name) !== -1 ||
					name.startsWith("mergeSchema")
				) {
					throw new ServiceSchemaError(
						`Invalid method name '${name}' in '${this.name}' service!`
					);
				}

				this._createMethod(method, name);
			});
		}

		// Register actions
		if (isObject(schema.actions)) {
			_.forIn(schema.actions, (action, name) => {
				if (action === false) return;

				let innerAction = this._createAction(action, name);

				serviceSpecification.actions[innerAction.name] = innerAction;

				const wrappedHandler = this.broker.middlewares.wrapHandler(
					"localAction",
					innerAction.handler,
					innerAction
				);

				// Expose to be callable as `this.actions.find({ ...params })`
				const ep = this.broker.registry.createPrivateActionEndpoint(innerAction);
				this.actions[name] = (params, opts) => {
					let ctx;
					if (opts && opts.ctx) {
						// Reused context (in case of retry)
						ctx = opts.ctx;
					} else {
						ctx = this.broker.ContextFactory.create(
							this.broker,
							ep,
							params,
							opts || {}
						);
					}
					return wrappedHandler(ctx);
				};
			});
		}

		// Event subscriptions
		if (isObject(schema.events)) {
			_.forIn(schema.events, (event, name) => {
				const innerEvent = this._createEvent(event, name);
				serviceSpecification.events[innerEvent.name] = innerEvent;

				// Expose to be callable as `this.events[''](params, opts);
				this.events[innerEvent.name] = (params, opts) => {
					let ctx;
					if (opts && opts.ctx) {
						// Reused context (in case of retry)
						ctx = opts.ctx;
					} else {
						const ep = {
							id: this.broker.nodeID,
							event: innerEvent
						};
						ctx = this.broker.ContextFactory.create(
							this.broker,
							ep,
							params,
							opts || {}
						);
					}
					ctx.eventName = name;
					ctx.eventType = "emit";
					ctx.eventGroups = [innerEvent.group || this.name];

					return innerEvent.handler(ctx);
				};
			});
		}

		this._serviceSpecification = serviceSpecification;

		// Initialize
		this._init();
	}
Parse Service schema & register as local service

@param {Object} schema of Service