public function addOperation(Operation $operation)
    {
        $id    = $operation->getMethod().$operation->getPath();
        $group = 'Default';

        if ($operation->getOperation()->getOperationId()) {
            $id = $operation->getOperation()->getOperationId();
        }

        if ($operation->getOperation()->getTags() !== null && count($operation->getOperation()->getTags()) > 0) {
            $group = $operation->getOperation()->getTags()[0];
        }

        $group = trim(preg_replace('/[^a-z0-9 ]+/iu', '', $group));
        $group = Inflector::classify($group);

        if (!isset($this[$group])) {
            $this[$group] = [];
        }

        $this[$group][$id] = $operation;

        return $this;
    }
public function addOperation(Operation $operation)
    {
        $id    = $operation->getMethod().$operation->getPath();
        $group = 'Default';

        if ($operation->getOperation()->getOperationId()) {
            $id = $operation->getOperation()->getOperationId();
        }

        if ($operation->getOperation()->getTags() !== null && count($operation->getOperation()->getTags()) > 0) {
            $group = $operation->getOperation()->getTags()[0];
        }

        $group = trim(preg_replace('/[^a-z0-9 ]+/iu', '', $group));
        $group = Inflector::classify($group);

        if (!isset($this[$group])) {
            $this[$group] = [];
        }

        $this[$group][$id] = $operation;

        return $this;
    }
@param Operation $operation

@return self