diff --git a/composer.json b/composer.json index d693e7580..fe3dcf99c 100644 --- a/composer.json +++ b/composer.json @@ -18,6 +18,7 @@ "fusio/cli": "^4.0", "fusio/model": "^4.0", "fusio/engine": "^6.0", + "fusio/sdk": "^7.0", "fusio/adapter-ai": "^0.2", "fusio/adapter-amqp": "^6.0", "fusio/adapter-beanstalk": "^6.0", diff --git a/src/Backend/View/Action.php b/src/Backend/View/Action.php index 93897fbd6..c6727cf89 100644 --- a/src/Backend/View/Action.php +++ b/src/Backend/View/Action.php @@ -24,6 +24,7 @@ use Fusio\Impl\Backend\Filter\QueryFilter; use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Sql\OrderBy; use PSX\Sql\ViewAbstract; @@ -52,10 +53,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\ActionCollection::class)), 'totalResults' => $this->getTable(Table\Action::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Action::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Action::class)), 'id' => $builder->fieldInteger(Table\Generated\ActionTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\ActionTable::COLUMN_STATUS), 'name' => Table\Generated\ActionTable::COLUMN_NAME, @@ -73,6 +76,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Action::class), 'findOneByIdentifier'], [$context->getTenantId(), $context->getUser()->getCategoryId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Action::class)), 'id' => $builder->fieldInteger(Table\Generated\ActionTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\ActionTable::COLUMN_STATUS), 'name' => Table\Generated\ActionTable::COLUMN_NAME, diff --git a/src/Backend/View/Action/Commit.php b/src/Backend/View/Action/Commit.php index 92428028d..67d367462 100644 --- a/src/Backend/View/Action/Commit.php +++ b/src/Backend/View/Action/Commit.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Nested\Reference; use PSX\Sql\OrderBy; @@ -50,10 +52,12 @@ public function getCollection(int $actionId, QueryFilter $filter, ContextInterfa $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\ActionCommitCollection::class)), 'totalResults' => $this->getTable(Table\Action\Commit::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Action\Commit::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\ActionCommit::class)), 'id' => $builder->fieldInteger(Table\Generated\ActionCommitTable::COLUMN_ID), 'user' => $builder->doEntity([$this->getTable(Table\User::class), 'find'], [new Reference(Table\Generated\ActionCommitTable::COLUMN_USER_ID)], [ 'id' => $builder->fieldInteger(Table\Generated\UserTable::COLUMN_ID), diff --git a/src/Backend/View/Agent.php b/src/Backend/View/Agent.php index 851c07a5d..216cfe8c5 100644 --- a/src/Backend/View/Agent.php +++ b/src/Backend/View/Agent.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Sql\OrderBy; use PSX\Sql\ViewAbstract; @@ -50,10 +52,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\AgentCollection::class)), 'totalResults' => $this->getTable(Table\Agent::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Agent::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Agent::class)), 'id' => $builder->fieldInteger(Table\Generated\AgentTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\AgentTable::COLUMN_STATUS), 'connection' => $builder->fieldInteger(Table\Generated\AgentTable::COLUMN_CONNECTION_ID), @@ -74,6 +78,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Agent::class), 'findOneByIdentifier'], [$context->getTenantId(), $context->getUser()->getCategoryId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Agent::class)), 'id' => $builder->fieldInteger(Table\Generated\AgentTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\AgentTable::COLUMN_STATUS), 'connection' => $builder->fieldInteger(Table\Generated\AgentTable::COLUMN_CONNECTION_ID), diff --git a/src/Backend/View/Agent/Message.php b/src/Backend/View/Agent/Message.php index 9c563e537..c5ef3ae5a 100644 --- a/src/Backend/View/Agent/Message.php +++ b/src/Backend/View/Agent/Message.php @@ -24,6 +24,7 @@ use Fusio\Impl\Backend\Filter\QueryFilter; use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Sql\Condition; use PSX\Sql\OrderBy; @@ -63,10 +64,12 @@ public function getCollection(int $agentId, ?string $chatId, ContextInterface $c $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\AgentMessageCollection::class)), 'totalResults' => $count, 'startIndex' => 0, 'itemsPerPage' => Service\Agent\Sender::CONTEXT_MESSAGES_LENGTH, 'entry' => $builder->doCollection([$this->getTable(Table\Agent\Message::class), 'findBy'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\AgentMessage::class)), 'id' => $builder->fieldInteger(Table\Generated\AgentMessageTable::COLUMN_ID), 'chatId' => Table\Generated\AgentMessageTable::COLUMN_CHAT_ID, 'role' => $builder->fieldCallback(Table\Generated\AgentMessageTable::COLUMN_ORIGIN, function ($value) { diff --git a/src/Backend/View/App.php b/src/Backend/View/App.php index 6368840c6..72b1a43f4 100644 --- a/src/Backend/View/App.php +++ b/src/Backend/View/App.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Nested\Reference; use PSX\Sql\OrderBy; @@ -51,10 +53,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\AppCollection::class)), 'totalResults' => $this->getTable(Table\App::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\App::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\App::class)), 'id' => $builder->fieldInteger(Table\Generated\AppTable::COLUMN_ID), 'userId' => $builder->fieldInteger(Table\Generated\AppTable::COLUMN_USER_ID), 'status' => $builder->fieldInteger(Table\Generated\AppTable::COLUMN_STATUS), @@ -73,6 +77,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\App::class), 'findOneByIdentifier'], [$context->getTenantId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\App::class)), 'id' => $builder->fieldInteger(Table\Generated\AppTable::COLUMN_ID), 'userId' => $builder->fieldInteger(Table\Generated\AppTable::COLUMN_USER_ID), 'status' => $builder->fieldInteger(Table\Generated\AppTable::COLUMN_STATUS), diff --git a/src/Backend/View/Audit.php b/src/Backend/View/Audit.php index 9324c4194..5def3ef66 100644 --- a/src/Backend/View/Audit.php +++ b/src/Backend/View/Audit.php @@ -24,7 +24,9 @@ use Fusio\Impl\Backend\Filter\Audit\AuditQueryFilter; use Fusio\Impl\Backend\Filter\DateQueryFilter; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Nested\Reference; use PSX\Sql\OrderBy; @@ -52,10 +54,12 @@ public function getCollection(AuditQueryFilter $filter, ContextInterface $contex $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\AuditCollection::class)), 'totalResults' => $this->getTable(Table\Audit::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Audit::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Audit::class)), 'id' => $builder->fieldInteger(Table\Generated\AuditTable::COLUMN_ID), 'event' => Table\Generated\AuditTable::COLUMN_EVENT, 'ip' => Table\Generated\AuditTable::COLUMN_IP, @@ -72,6 +76,7 @@ public function getEntity(int $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Audit::class), 'findOneByIdentifier'], [$context->getTenantId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Audit::class)), 'id' => $builder->fieldInteger(Table\Generated\AuditTable::COLUMN_ID), 'app' => $builder->doEntity([$this->getTable(Table\App::class), 'find'], [new Reference('app_id')], [ 'id' => $builder->fieldInteger(Table\Generated\AppTable::COLUMN_ID), diff --git a/src/Backend/View/Bundle.php b/src/Backend/View/Bundle.php index 6dd3f46f3..586118073 100644 --- a/src/Backend/View/Bundle.php +++ b/src/Backend/View/Bundle.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Sql\OrderBy; use PSX\Sql\ViewAbstract; @@ -50,10 +52,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\BundleCollection::class)), 'totalResults' => $this->getTable(Table\Bundle::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Bundle::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Bundle::class)), 'id' => $builder->fieldInteger(Table\Generated\BundleTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\BundleTable::COLUMN_STATUS), 'name' => Table\Generated\BundleTable::COLUMN_NAME, @@ -71,6 +75,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Bundle::class), 'findOneByIdentifier'], [$context->getTenantId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Bundle::class)), 'id' => $builder->fieldInteger(Table\Generated\BundleTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\BundleTable::COLUMN_STATUS), 'name' => Table\Generated\BundleTable::COLUMN_NAME, diff --git a/src/Backend/View/Category.php b/src/Backend/View/Category.php index 188ab0bd6..63ec52419 100644 --- a/src/Backend/View/Category.php +++ b/src/Backend/View/Category.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Sql\OrderBy; use PSX\Sql\ViewAbstract; @@ -50,10 +52,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\CategoryCollection::class)), 'totalResults' => $this->getTable(Table\Category::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Category::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Category::class)), 'id' => $builder->fieldInteger(Table\Generated\CategoryTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\CategoryTable::COLUMN_STATUS), 'name' => Table\Generated\CategoryTable::COLUMN_NAME, @@ -68,6 +72,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Category::class), 'findOneByIdentifier'], [$context->getTenantId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Category::class)), 'id' => $builder->fieldInteger(Table\Generated\CategoryTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\CategoryTable::COLUMN_STATUS), 'name' => Table\Generated\CategoryTable::COLUMN_NAME, diff --git a/src/Backend/View/Config.php b/src/Backend/View/Config.php index 198d6d422..d45d756df 100644 --- a/src/Backend/View/Config.php +++ b/src/Backend/View/Config.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Record\RecordInterface; use PSX\Sql\OrderBy; @@ -50,10 +52,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\ConfigCollection::class)), 'totalResults' => $this->getTable(Table\Config::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Config::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Config::class)), 'id' => $builder->fieldInteger(Table\Generated\ConfigTable::COLUMN_ID), 'type' => $builder->fieldInteger(Table\Generated\ConfigTable::COLUMN_TYPE), 'name' => Table\Generated\ConfigTable::COLUMN_NAME, @@ -72,6 +76,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Config::class), 'findOneByIdentifier'], [$context->getTenantId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Config::class)), 'id' => $builder->fieldInteger(Table\Generated\ConfigTable::COLUMN_ID), 'type' => $builder->fieldInteger(Table\Generated\ConfigTable::COLUMN_TYPE), 'name' => Table\Generated\ConfigTable::COLUMN_NAME, diff --git a/src/Backend/View/Connection.php b/src/Backend/View/Connection.php index 83b2fe4e1..f5ab8a946 100644 --- a/src/Backend/View/Connection.php +++ b/src/Backend/View/Connection.php @@ -27,6 +27,7 @@ use Fusio\Impl\Provider\ConnectionProvider; use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use Fusio\Model\Common\FormElementInput; use PSX\Nested\Builder; use PSX\Sql\OrderBy; @@ -56,10 +57,12 @@ public function getCollection(ClassQueryFilter $filter, ContextInterface $contex $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\ConnectionCollection::class)), 'totalResults' => $this->getTable(Table\Connection::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Connection::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Connection::class)), 'id' => $builder->fieldInteger(Table\Generated\ConnectionTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\ConnectionTable::COLUMN_STATUS), 'name' => Table\Generated\ConnectionTable::COLUMN_NAME, @@ -76,6 +79,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Connection::class), 'findOneByIdentifier'], [$context->getTenantId(), $context->getUser()->getCategoryId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Connection::class)), 'id' => $builder->fieldInteger(Table\Generated\ConnectionTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\ConnectionTable::COLUMN_STATUS), 'name' => Table\Generated\ConnectionTable::COLUMN_NAME, diff --git a/src/Backend/View/Cronjob.php b/src/Backend/View/Cronjob.php index 6a3210ecc..19b6c95b4 100644 --- a/src/Backend/View/Cronjob.php +++ b/src/Backend/View/Cronjob.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Nested\Reference; use PSX\Sql\OrderBy; @@ -52,10 +54,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\CronjobCollection::class)), 'totalResults' => $this->getTable(Table\Cronjob::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Cronjob::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Cronjob::class)), 'id' => $builder->fieldInteger(Table\Generated\CronjobTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\CronjobTable::COLUMN_STATUS), 'name' => Table\Generated\CronjobTable::COLUMN_NAME, @@ -75,6 +79,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Cronjob::class), 'findOneByIdentifier'], [$context->getTenantId(), $context->getUser()->getCategoryId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Cronjob::class)), 'id' => Table\Generated\CronjobTable::COLUMN_ID, 'status' => $builder->fieldInteger(Table\Generated\CronjobTable::COLUMN_STATUS), 'name' => Table\Generated\CronjobTable::COLUMN_NAME, diff --git a/src/Backend/View/Event.php b/src/Backend/View/Event.php index 83b409a8f..b9381d4e1 100644 --- a/src/Backend/View/Event.php +++ b/src/Backend/View/Event.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Sql\OrderBy; use PSX\Sql\ViewAbstract; @@ -51,10 +53,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\EventCollection::class)), 'totalResults' => $this->getTable(Table\Event::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Event::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Event::class)), 'id' => $builder->fieldInteger(Table\Generated\EventTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\EventTable::COLUMN_STATUS), 'name' => Table\Generated\EventTable::COLUMN_NAME, @@ -71,6 +75,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Event::class), 'findOneByIdentifier'], [$context->getTenantId(), $context->getUser()->getCategoryId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Event::class)), 'id' => $builder->fieldInteger(Table\Generated\EventTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\EventTable::COLUMN_STATUS), 'name' => Table\Generated\EventTable::COLUMN_NAME, diff --git a/src/Backend/View/Firewall.php b/src/Backend/View/Firewall.php index 6c8661c96..0f925e00b 100644 --- a/src/Backend/View/Firewall.php +++ b/src/Backend/View/Firewall.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Sql\OrderBy; use PSX\Sql\ViewAbstract; @@ -50,10 +52,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\FirewallCollection::class)), 'totalResults' => $this->getTable(Table\Firewall::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Firewall::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Firewall::class)), 'id' => $builder->fieldInteger(Table\Generated\FirewallTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\FirewallTable::COLUMN_STATUS), 'name' => Table\Generated\FirewallTable::COLUMN_NAME, @@ -72,6 +76,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Firewall::class), 'findOneByIdentifier'], [$context->getTenantId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Firewall::class)), 'id' => $builder->fieldInteger(Table\Generated\FirewallTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\FirewallTable::COLUMN_STATUS), 'name' => Table\Generated\FirewallTable::COLUMN_NAME, diff --git a/src/Backend/View/Form.php b/src/Backend/View/Form.php index c8451dcda..89c26f4ab 100644 --- a/src/Backend/View/Form.php +++ b/src/Backend/View/Form.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Sql\OrderBy; use PSX\Sql\ViewAbstract; @@ -50,10 +52,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\FormCollection::class)), 'totalResults' => $this->getTable(Table\Form::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Form::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Form::class)), 'id' => $builder->fieldInteger(Table\Generated\FormTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\FormTable::COLUMN_STATUS), 'name' => Table\Generated\FormTable::COLUMN_NAME, @@ -70,6 +74,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Form::class), 'findOneByIdentifier'], [$context->getTenantId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Form::class)), 'id' => $builder->fieldInteger(Table\Generated\FormTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\FormTable::COLUMN_STATUS), 'name' => Table\Generated\FormTable::COLUMN_NAME, diff --git a/src/Backend/View/Identity.php b/src/Backend/View/Identity.php index 66245cdf5..b7ae94887 100644 --- a/src/Backend/View/Identity.php +++ b/src/Backend/View/Identity.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Sql\OrderBy; use PSX\Sql\ViewAbstract; @@ -50,10 +52,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\IdentityCollection::class)), 'totalResults' => $this->getTable(Table\Identity::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Identity::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Identity::class)), 'id' => $builder->fieldInteger(Table\Generated\IdentityTable::COLUMN_ID), 'roleId' => $builder->fieldInteger(Table\Generated\IdentityTable::COLUMN_ROLE_ID), 'appId' => $builder->fieldInteger(Table\Generated\IdentityTable::COLUMN_APP_ID), @@ -73,6 +77,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Identity::class), 'findOneByIdentifier'], [$context->getTenantId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Identity::class)), 'id' => $builder->fieldInteger(Table\Generated\IdentityTable::COLUMN_ID), 'roleId' => $builder->fieldInteger(Table\Generated\IdentityTable::COLUMN_ROLE_ID), 'appId' => $builder->fieldInteger(Table\Generated\IdentityTable::COLUMN_APP_ID), diff --git a/src/Backend/View/Log.php b/src/Backend/View/Log.php index 8d38b4a1a..de1b507d0 100644 --- a/src/Backend/View/Log.php +++ b/src/Backend/View/Log.php @@ -24,7 +24,9 @@ use Fusio\Impl\Backend\Filter\DateQueryFilter; use Fusio\Impl\Backend\Filter\Log\LogQueryFilter; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Nested\Reference; use PSX\Sql\OrderBy; @@ -53,10 +55,12 @@ public function getCollection(LogQueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\LogCollection::class)), 'totalResults' => $this->getTable(Table\Log::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Log::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Log::class)), 'id' => $builder->fieldInteger(Table\Generated\LogTable::COLUMN_ID), 'appId' => $builder->fieldInteger(Table\Generated\LogTable::COLUMN_APP_ID), 'operationId' => $builder->fieldInteger(Table\Generated\LogTable::COLUMN_OPERATION_ID), @@ -76,6 +80,7 @@ public function getEntity(int $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Log::class), 'findOneByIdentifier'], [$context->getTenantId(), $context->getUser()->getCategoryId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Log::class)), 'id' => $builder->fieldInteger(Table\Generated\LogTable::COLUMN_ID), 'appId' => $builder->fieldInteger(Table\Generated\LogTable::COLUMN_APP_ID), 'operationId' => $builder->fieldInteger(Table\Generated\LogTable::COLUMN_OPERATION_ID), diff --git a/src/Backend/View/Log/Error.php b/src/Backend/View/Log/Error.php index 466d7be7d..606b7d7dd 100644 --- a/src/Backend/View/Log/Error.php +++ b/src/Backend/View/Log/Error.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Sql\Condition; use PSX\Sql\ViewAbstract; @@ -72,10 +74,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\LogErrorCollection::class)), 'totalResults' => $builder->doValue($countBuilder->getSQL(), $countBuilder->getParameters(), $builder->fieldInteger('cnt')), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection($queryBuilder->getSQL(), $queryBuilder->getParameters(), [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\LogError::class)), 'id' => $builder->fieldInteger(Table\Generated\LogErrorTable::COLUMN_ID), 'logId' => $builder->fieldInteger(Table\Generated\LogErrorTable::COLUMN_LOG_ID), 'message' => Table\Generated\LogErrorTable::COLUMN_MESSAGE, @@ -113,6 +117,7 @@ public function getEntity(int $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity($queryBuilder->getSQL(), $queryBuilder->getParameters(), [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\LogError::class)), 'id' => $builder->fieldInteger(Table\Generated\LogErrorTable::COLUMN_ID), 'logId' => $builder->fieldInteger(Table\Generated\LogErrorTable::COLUMN_LOG_ID), 'message' => Table\Generated\LogErrorTable::COLUMN_MESSAGE, diff --git a/src/Backend/View/Operation.php b/src/Backend/View/Operation.php index 8a68e760a..c23947185 100644 --- a/src/Backend/View/Operation.php +++ b/src/Backend/View/Operation.php @@ -23,7 +23,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; use Fusio\Impl\Framework\Api\Scanner\CategoryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Api\Scanner\FilterInterface; use PSX\Nested\Builder; use PSX\Nested\Reference; @@ -55,10 +57,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\OperationCollection::class)), 'totalResults' => $this->getTable(Table\Operation::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Operation::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Operation::class)), 'id' => $builder->fieldInteger(Table\Generated\OperationTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\OperationTable::COLUMN_STATUS), 'active' => $builder->fieldBoolean(Table\Generated\OperationTable::COLUMN_ACTIVE), @@ -81,6 +85,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Operation::class), 'findOneByIdentifier'], [$context->getTenantId(), $context->getUser()->getCategoryId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Operation::class)), 'id' => $builder->fieldInteger(Table\Generated\OperationTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\OperationTable::COLUMN_STATUS), 'name' => Table\Generated\OperationTable::COLUMN_NAME, diff --git a/src/Backend/View/Page.php b/src/Backend/View/Page.php index 37603f427..21c3d5111 100644 --- a/src/Backend/View/Page.php +++ b/src/Backend/View/Page.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Sql\OrderBy; use PSX\Sql\ViewAbstract; @@ -50,10 +52,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\PageCollection::class)), 'totalResults' => $this->getTable(Table\Page::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Page::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Page::class)), 'id' => $builder->fieldInteger(Table\Generated\PageTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\PageTable::COLUMN_STATUS), 'title' => Table\Generated\PageTable::COLUMN_TITLE, @@ -71,6 +75,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Page::class), 'findOneByIdentifier'], [$context->getTenantId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Page::class)), 'id' => $builder->fieldInteger(Table\Generated\PageTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\PageTable::COLUMN_STATUS), 'title' => Table\Generated\PageTable::COLUMN_TITLE, diff --git a/src/Backend/View/Plan.php b/src/Backend/View/Plan.php index 768544681..83cec73d9 100644 --- a/src/Backend/View/Plan.php +++ b/src/Backend/View/Plan.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Nested\Reference; use PSX\Sql\OrderBy; @@ -51,10 +53,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\PlanCollection::class)), 'totalResults' => $this->getTable(Table\Plan::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Plan::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Plan::class)), 'id' => $builder->fieldInteger(Table\Generated\PlanTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\PlanTable::COLUMN_STATUS), 'name' => Table\Generated\PlanTable::COLUMN_NAME, @@ -77,6 +81,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Plan::class), 'findOneByIdentifier'], [$context->getTenantId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Plan::class)), 'id' => $builder->fieldInteger(Table\Generated\PlanTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\PlanTable::COLUMN_STATUS), 'name' => Table\Generated\PlanTable::COLUMN_NAME, diff --git a/src/Backend/View/Rate.php b/src/Backend/View/Rate.php index e5d94d3ba..c2c058a52 100644 --- a/src/Backend/View/Rate.php +++ b/src/Backend/View/Rate.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Nested\Reference; use PSX\Sql\OrderBy; @@ -51,10 +53,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\RateCollection::class)), 'totalResults' => $this->getTable(Table\Rate::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Rate::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Rate::class)), 'id' => $builder->fieldInteger(Table\Generated\RateTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\RateTable::COLUMN_STATUS), 'priority' => $builder->fieldInteger(Table\Generated\RateTable::COLUMN_PRIORITY), @@ -73,6 +77,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Rate::class), 'findOneByIdentifier'], [$context->getTenantId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Rate::class)), 'id' => $builder->fieldInteger(Table\Generated\RateTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\RateTable::COLUMN_STATUS), 'priority' => $builder->fieldInteger(Table\Generated\RateTable::COLUMN_PRIORITY), diff --git a/src/Backend/View/Role.php b/src/Backend/View/Role.php index bb684253b..ee597c397 100644 --- a/src/Backend/View/Role.php +++ b/src/Backend/View/Role.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Nested\Reference; use PSX\Sql\OrderBy; @@ -51,10 +53,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\RoleCollection::class)), 'totalResults' => $this->getTable(Table\Role::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Role::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Role::class)), 'id' => $builder->fieldInteger(Table\Generated\RoleTable::COLUMN_ID), 'categoryId' => $builder->fieldInteger(Table\Generated\RoleTable::COLUMN_CATEGORY_ID), 'status' => $builder->fieldInteger(Table\Generated\RoleTable::COLUMN_STATUS), @@ -70,6 +74,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Role::class), 'findOneByIdentifier'], [$context->getTenantId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Role::class)), 'id' => $builder->fieldInteger(Table\Generated\RoleTable::COLUMN_ID), 'categoryId' => $builder->fieldInteger(Table\Generated\RoleTable::COLUMN_CATEGORY_ID), 'status' => $builder->fieldInteger(Table\Generated\RoleTable::COLUMN_STATUS), diff --git a/src/Backend/View/Schema.php b/src/Backend/View/Schema.php index 1d8d328b6..e4809ba4c 100644 --- a/src/Backend/View/Schema.php +++ b/src/Backend/View/Schema.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Sql\OrderBy; use PSX\Sql\ViewAbstract; @@ -51,10 +53,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\SchemaCollection::class)), 'totalResults' => $this->getTable(Table\Schema::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Schema::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Schema::class)), 'id' => $builder->fieldInteger(Table\Generated\SchemaTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\SchemaTable::COLUMN_STATUS), 'name' => Table\Generated\SchemaTable::COLUMN_NAME, @@ -70,6 +74,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Schema::class), 'findOneByIdentifier'], [$context->getTenantId(), $context->getUser()->getCategoryId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Schema::class)), 'id' => $builder->fieldInteger(Table\Generated\SchemaTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\SchemaTable::COLUMN_STATUS), 'name' => Table\Generated\SchemaTable::COLUMN_NAME, diff --git a/src/Backend/View/Schema/Commit.php b/src/Backend/View/Schema/Commit.php index 84a24ccb8..6f29e0ef5 100644 --- a/src/Backend/View/Schema/Commit.php +++ b/src/Backend/View/Schema/Commit.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Nested\Reference; use PSX\Sql\OrderBy; @@ -50,10 +52,12 @@ public function getCollection(int $schemaId, QueryFilter $filter, ContextInterfa $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\SchemaCommitCollection::class)), 'totalResults' => $this->getTable(Table\Schema\Commit::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Schema\Commit::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\SchemaCommit::class)), 'id' => $builder->fieldInteger(Table\Generated\SchemaCommitTable::COLUMN_ID), 'user' => $builder->doEntity([$this->getTable(Table\User::class), 'find'], [new Reference(Table\Generated\SchemaCommitTable::COLUMN_USER_ID)], [ 'id' => $builder->fieldInteger(Table\Generated\UserTable::COLUMN_ID), diff --git a/src/Backend/View/Scope.php b/src/Backend/View/Scope.php index 39aae3edb..e35db6e05 100644 --- a/src/Backend/View/Scope.php +++ b/src/Backend/View/Scope.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Nested\Reference; use PSX\Sql\Condition; @@ -53,10 +55,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\ScopeCollection::class)), 'totalResults' => $this->getTable(Table\Scope::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Scope::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Scope::class)), 'id' => $builder->fieldInteger(Table\Generated\ScopeTable::COLUMN_ID), 'name' => Table\Generated\ScopeTable::COLUMN_NAME, 'description' => Table\Generated\ScopeTable::COLUMN_DESCRIPTION, @@ -72,6 +76,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Scope::class), 'findOneByIdentifier'], [$context->getTenantId(), $context->getUser()->getCategoryId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Scope::class)), 'id' => $builder->fieldInteger(Table\Generated\ScopeTable::COLUMN_ID), 'name' => Table\Generated\ScopeTable::COLUMN_NAME, 'description' => Table\Generated\ScopeTable::COLUMN_DESCRIPTION, diff --git a/src/Backend/View/Statistic/RequestsPerIP.php b/src/Backend/View/Statistic/RequestsPerIP.php index 59d614c24..07336ae22 100644 --- a/src/Backend/View/Statistic/RequestsPerIP.php +++ b/src/Backend/View/Statistic/RequestsPerIP.php @@ -21,7 +21,6 @@ namespace Fusio\Impl\Backend\View\Statistic; use Fusio\Engine\ContextInterface; -use Fusio\Impl\Backend\Filter\Audit\AuditQueryFilter; use Fusio\Impl\Backend\Filter\Log; use Fusio\Impl\Backend\Filter\QueryFilter; use Fusio\Impl\Table; diff --git a/src/Backend/View/Statistic/RequestsPerOperation.php b/src/Backend/View/Statistic/RequestsPerOperation.php index f7053eadd..b657daa4e 100644 --- a/src/Backend/View/Statistic/RequestsPerOperation.php +++ b/src/Backend/View/Statistic/RequestsPerOperation.php @@ -21,7 +21,6 @@ namespace Fusio\Impl\Backend\View\Statistic; use Fusio\Engine\ContextInterface; -use Fusio\Impl\Backend\Filter\Audit\AuditQueryFilter; use Fusio\Impl\Backend\Filter\Log; use Fusio\Impl\Backend\Filter\QueryFilter; use Fusio\Impl\Table; diff --git a/src/Backend/View/Statistic/RequestsPerUser.php b/src/Backend/View/Statistic/RequestsPerUser.php index 7410edace..9db685f55 100644 --- a/src/Backend/View/Statistic/RequestsPerUser.php +++ b/src/Backend/View/Statistic/RequestsPerUser.php @@ -21,7 +21,6 @@ namespace Fusio\Impl\Backend\View\Statistic; use Fusio\Engine\ContextInterface; -use Fusio\Impl\Backend\Filter\Audit\AuditQueryFilter; use Fusio\Impl\Backend\Filter\Log; use Fusio\Impl\Backend\Filter\QueryFilter; use Fusio\Impl\Table; diff --git a/src/Backend/View/Statistic/UsedPoints.php b/src/Backend/View/Statistic/UsedPoints.php index 476966114..27a40fec5 100644 --- a/src/Backend/View/Statistic/UsedPoints.php +++ b/src/Backend/View/Statistic/UsedPoints.php @@ -22,7 +22,6 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\Plan\Usage\UsageQueryFilter; -use Fusio\Impl\Backend\Filter\QueryFilter; use Fusio\Impl\Table; use Fusio\Model\Backend\StatisticChart; diff --git a/src/Backend/View/Taxonomy.php b/src/Backend/View/Taxonomy.php index d2ff04017..38ba168ce 100644 --- a/src/Backend/View/Taxonomy.php +++ b/src/Backend/View/Taxonomy.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Sql\OrderBy; use PSX\Sql\ViewAbstract; @@ -50,10 +52,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\TaxonomyCollection::class)), 'totalResults' => $this->getTable(Table\Taxonomy::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Taxonomy::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Taxonomy::class)), 'id' => $builder->fieldInteger(Table\Generated\TaxonomyTable::COLUMN_ID), 'parentId' => $builder->fieldInteger(Table\Generated\TaxonomyTable::COLUMN_PARENT_ID), 'status' => $builder->fieldInteger(Table\Generated\TaxonomyTable::COLUMN_STATUS), @@ -69,6 +73,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Taxonomy::class), 'findOneByIdentifier'], [$context->getTenantId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Taxonomy::class)), 'id' => $builder->fieldInteger(Table\Generated\TaxonomyTable::COLUMN_ID), 'parentId' => $builder->fieldInteger(Table\Generated\TaxonomyTable::COLUMN_PARENT_ID), 'status' => $builder->fieldInteger(Table\Generated\TaxonomyTable::COLUMN_STATUS), diff --git a/src/Backend/View/Test.php b/src/Backend/View/Test.php index fd46cc077..734bac3f6 100644 --- a/src/Backend/View/Test.php +++ b/src/Backend/View/Test.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Nested\Reference; use PSX\Sql\OrderBy; @@ -52,10 +54,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\TestCollection::class)), 'totalResults' => $this->getTable(Table\Test::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Test::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Test::class)), 'id' => $builder->fieldInteger(Table\Generated\TestTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\TestTable::COLUMN_STATUS), 'operationName' => $builder->doValue([$this->getTable(Table\Operation::class), 'find'], [new Reference(Table\Generated\TestTable::COLUMN_OPERATION_ID)], Table\Generated\OperationTable::COLUMN_NAME), @@ -71,6 +75,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Test::class), 'findOneByTenantAndId'], [$context->getTenantId(), $context->getUser()->getCategoryId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Test::class)), 'id' => $builder->fieldInteger(Table\Generated\TestTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\TestTable::COLUMN_STATUS), 'operationName' => $builder->doValue([$this->getTable(Table\Operation::class), 'find'], [new Reference(Table\Generated\TestTable::COLUMN_OPERATION_ID)], Table\Generated\OperationTable::COLUMN_NAME), diff --git a/src/Backend/View/Token.php b/src/Backend/View/Token.php index fc5a630ba..365b1b090 100644 --- a/src/Backend/View/Token.php +++ b/src/Backend/View/Token.php @@ -24,7 +24,9 @@ use Fusio\Impl\Backend\Filter\App\Token\TokenQueryFilter; use Fusio\Impl\Backend\Filter\DateQueryFilter; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Sql\OrderBy; use PSX\Sql\ViewAbstract; @@ -51,10 +53,12 @@ public function getCollection(TokenQueryFilter $filter, ContextInterface $contex $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\TokenCollection::class)), 'totalResults' => $this->getTable(Table\Token::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Token::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Token::class)), 'id' => $builder->fieldInteger(Table\Generated\TokenTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\TokenTable::COLUMN_STATUS), 'name' => Table\Generated\TokenTable::COLUMN_NAME, @@ -72,6 +76,7 @@ public function getEntity(int $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Token::class), 'findOneByTenantAndId'], [$context->getTenantId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Token::class)), 'id' => Table\Generated\TokenTable::COLUMN_ID, 'status' => Table\Generated\TokenTable::COLUMN_STATUS, 'name' => Table\Generated\TokenTable::COLUMN_NAME, diff --git a/src/Backend/View/Transaction.php b/src/Backend/View/Transaction.php index e8f98cdce..1c8d20dc2 100644 --- a/src/Backend/View/Transaction.php +++ b/src/Backend/View/Transaction.php @@ -24,7 +24,9 @@ use Fusio\Impl\Backend\Filter\DateQueryFilter; use Fusio\Impl\Backend\Filter\QueryFilter; use Fusio\Impl\Backend\Filter\Transaction\TransactionQueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Sql\OrderBy; use PSX\Sql\ViewAbstract; @@ -51,10 +53,12 @@ public function getCollection(TransactionQueryFilter $filter, ContextInterface $ $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\TransactionCollection::class)), 'totalResults' => $this->getTable(Table\Transaction::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Transaction::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Transaction::class)), 'id' => $builder->fieldInteger(Table\Generated\TransactionTable::COLUMN_ID), 'userId' => $builder->fieldInteger(Table\Generated\TransactionTable::COLUMN_USER_ID), 'planId' => $builder->fieldInteger(Table\Generated\TransactionTable::COLUMN_PLAN_ID), @@ -77,6 +81,7 @@ public function getEntity(int $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Transaction::class), 'findOneByIdentifier'], [$context->getTenantId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Transaction::class)), 'id' => $builder->fieldInteger(Table\Generated\TransactionTable::COLUMN_ID), 'userId' => $builder->fieldInteger(Table\Generated\TransactionTable::COLUMN_USER_ID), 'planId' => $builder->fieldInteger(Table\Generated\TransactionTable::COLUMN_PLAN_ID), diff --git a/src/Backend/View/Trigger.php b/src/Backend/View/Trigger.php index b95ea62b3..1b68093da 100644 --- a/src/Backend/View/Trigger.php +++ b/src/Backend/View/Trigger.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Sql\OrderBy; use PSX\Sql\ViewAbstract; @@ -51,10 +53,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\TriggerCollection::class)), 'totalResults' => $this->getTable(Table\Trigger::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Trigger::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Trigger::class)), 'id' => $builder->fieldInteger(Table\Generated\TriggerTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\TriggerTable::COLUMN_STATUS), 'name' => Table\Generated\TriggerTable::COLUMN_NAME, @@ -72,6 +76,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Trigger::class), 'findOneByIdentifier'], [$context->getTenantId(), $context->getUser()->getCategoryId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Trigger::class)), 'id' => Table\Generated\TriggerTable::COLUMN_ID, 'status' => $builder->fieldInteger(Table\Generated\TriggerTable::COLUMN_STATUS), 'name' => Table\Generated\TriggerTable::COLUMN_NAME, diff --git a/src/Backend/View/User.php b/src/Backend/View/User.php index 24d040368..e09b1982e 100644 --- a/src/Backend/View/User.php +++ b/src/Backend/View/User.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Nested\Reference; use PSX\Sql\OrderBy; @@ -51,10 +53,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\UserCollection::class)), 'totalResults' => $this->getTable(Table\User::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\User::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\User::class)), 'id' => $builder->fieldInteger(Table\Generated\UserTable::COLUMN_ID), 'roleId' => $builder->fieldInteger(Table\Generated\UserTable::COLUMN_ROLE_ID), 'planId' => $builder->fieldInteger(Table\Generated\UserTable::COLUMN_PLAN_ID), @@ -76,6 +80,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\User::class), 'findOneByIdentifier'], [$context->getTenantId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\User::class)), 'id' => $builder->fieldInteger(Table\Generated\UserTable::COLUMN_ID), 'roleId' => $builder->fieldInteger(Table\Generated\UserTable::COLUMN_ROLE_ID), 'planId' => $builder->fieldInteger(Table\Generated\UserTable::COLUMN_PLAN_ID), diff --git a/src/Backend/View/Webhook.php b/src/Backend/View/Webhook.php index c62dfd105..1800634d9 100644 --- a/src/Backend/View/Webhook.php +++ b/src/Backend/View/Webhook.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Nested\Reference; use PSX\Sql\OrderBy; @@ -50,10 +52,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\WebhookCollection::class)), 'totalResults' => $this->getTable(Table\Webhook::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Webhook::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Webhook::class)), 'id' => $builder->fieldInteger(Table\Generated\WebhookTable::COLUMN_ID), 'eventId' => $builder->fieldInteger(Table\Generated\WebhookTable::COLUMN_EVENT_ID), 'userId' => $builder->fieldInteger(Table\Generated\WebhookTable::COLUMN_USER_ID), @@ -70,6 +74,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Webhook::class), 'findOneByIdentifier'], [$context->getTenantId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Backend\Webhook::class)), 'id' => $builder->fieldInteger(Table\Generated\WebhookTable::COLUMN_ID), 'eventId' => $builder->fieldInteger(Table\Generated\WebhookTable::COLUMN_EVENT_ID), 'userId' => $builder->fieldInteger(Table\Generated\WebhookTable::COLUMN_USER_ID), diff --git a/src/Consumer/View/App.php b/src/Consumer/View/App.php index 7ca9826fa..a84f6b041 100644 --- a/src/Consumer/View/App.php +++ b/src/Consumer/View/App.php @@ -24,6 +24,7 @@ use Fusio\Impl\Backend\Filter\QueryFilter; use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Http\Exception as StatusCode; use PSX\Nested\Builder; use PSX\Nested\Reference; @@ -55,10 +56,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\AppCollection::class)), 'totalResults' => $this->getTable(Table\App::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => 16, 'entry' => $builder->doCollection([$this->getTable(Table\App::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\App::class)), 'id' => $builder->fieldInteger(Table\Generated\AppTable::COLUMN_ID), 'userId' => $builder->fieldInteger(Table\Generated\AppTable::COLUMN_USER_ID), 'status' => $builder->fieldInteger(Table\Generated\AppTable::COLUMN_STATUS), @@ -84,6 +87,7 @@ public function getEntity(int $appId, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\App::class), 'findOneBy'], [$condition], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\App::class)), 'id' => $builder->fieldInteger(Table\Generated\AppTable::COLUMN_ID), 'userId' => $builder->fieldInteger(Table\Generated\AppTable::COLUMN_USER_ID), 'status' => $builder->fieldInteger(Table\Generated\AppTable::COLUMN_STATUS), diff --git a/src/Consumer/View/Event.php b/src/Consumer/View/Event.php index 95a76202d..f462dd556 100644 --- a/src/Consumer/View/Event.php +++ b/src/Consumer/View/Event.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Sql\OrderBy; use PSX\Sql\ViewAbstract; @@ -51,10 +53,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\EventCollection::class)), 'totalResults' => $this->getTable(Table\Event::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Event::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\Event::class)), 'id' => $builder->fieldInteger(Table\Generated\EventTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\EventTable::COLUMN_STATUS), 'name' => Table\Generated\EventTable::COLUMN_NAME, @@ -71,6 +75,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Event::class), 'findOneByIdentifier'], [$context->getTenantId(), $context->getUser()->getCategoryId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\Event::class)), 'id' => $builder->fieldInteger(Table\Generated\EventTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\EventTable::COLUMN_STATUS), 'name' => Table\Generated\EventTable::COLUMN_NAME, diff --git a/src/Consumer/View/Form.php b/src/Consumer/View/Form.php index f42ea4e51..981db7311 100644 --- a/src/Consumer/View/Form.php +++ b/src/Consumer/View/Form.php @@ -22,9 +22,11 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Service\Form\JsonSchemaResolver; use Fusio\Impl\Service\System\FrameworkConfig; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Sql\OrderBy; use PSX\Sql\TableManager; @@ -64,10 +66,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\FormCollection::class)), 'totalResults' => $this->getTable(Table\Form::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Form::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\Form::class)), 'id' => $builder->fieldInteger(Table\Generated\FormTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\FormTable::COLUMN_STATUS), 'name' => Table\Generated\FormTable::COLUMN_NAME, @@ -83,6 +87,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Form::class), 'findOneByIdentifier'], [$context->getTenantId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\Form::class)), 'id' => $builder->fieldInteger(Table\Generated\FormTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\FormTable::COLUMN_STATUS), 'name' => Table\Generated\FormTable::COLUMN_NAME, diff --git a/src/Consumer/View/Identity.php b/src/Consumer/View/Identity.php index 6bb7ce6b8..5031e5b06 100644 --- a/src/Consumer/View/Identity.php +++ b/src/Consumer/View/Identity.php @@ -22,8 +22,10 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Service\System\FrameworkConfig; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Http\Exception as StatusCode; use PSX\Nested\Builder; use PSX\Sql\OrderBy; @@ -75,10 +77,12 @@ public function getCollection(?int $appId, ?string $appKey, QueryFilter $filter, $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\IdentityCollection::class)), 'totalResults' => $this->getTable(Table\Identity::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Identity::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\Identity::class)), 'id' => $builder->fieldInteger(Table\Generated\IdentityTable::COLUMN_ID), 'name' => Table\Generated\IdentityTable::COLUMN_NAME, 'icon' => Table\Generated\IdentityTable::COLUMN_ICON, diff --git a/src/Consumer/View/Log.php b/src/Consumer/View/Log.php index f80fa56f9..747bbdd58 100644 --- a/src/Consumer/View/Log.php +++ b/src/Consumer/View/Log.php @@ -23,7 +23,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\Log\LogQueryFilter; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Sql\Condition; use PSX\Sql\OrderBy; @@ -53,10 +55,12 @@ public function getCollection(LogQueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\LogCollection::class)), 'totalResults' => $this->getTable(Table\Log::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Log::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\Log::class)), 'id' => $builder->fieldInteger(Table\Generated\LogTable::COLUMN_ID), 'appId' => $builder->fieldInteger(Table\Generated\LogTable::COLUMN_APP_ID), 'ip' => Table\Generated\LogTable::COLUMN_IP, @@ -81,6 +85,7 @@ public function getEntity(int $logId, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Log::class), 'findOneBy'], [$condition], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\Log::class)), 'id' => $builder->fieldInteger(Table\Generated\LogTable::COLUMN_ID), 'appId' => $builder->fieldInteger(Table\Generated\LogTable::COLUMN_APP_ID), 'ip' => Table\Generated\LogTable::COLUMN_IP, diff --git a/src/Consumer/View/Page.php b/src/Consumer/View/Page.php index c12e180da..84e3d7833 100644 --- a/src/Consumer/View/Page.php +++ b/src/Consumer/View/Page.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Sql\OrderBy; use PSX\Sql\ViewAbstract; @@ -50,10 +52,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\PageCollection::class)), 'totalResults' => $this->getTable(Table\Page::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Page::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\Page::class)), 'id' => $builder->fieldInteger(Table\Generated\PageTable::COLUMN_ID), 'title' => Table\Generated\PageTable::COLUMN_TITLE, 'slug' => Table\Generated\PageTable::COLUMN_SLUG, @@ -70,6 +74,7 @@ public function getEntity(string $pageId, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Page::class), 'findOneByIdentifier'], [$context->getTenantId(), $pageId], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\Page::class)), 'id' => $builder->fieldInteger(Table\Generated\PageTable::COLUMN_ID), 'title' => Table\Generated\PageTable::COLUMN_TITLE, 'slug' => Table\Generated\PageTable::COLUMN_SLUG, diff --git a/src/Consumer/View/Plan.php b/src/Consumer/View/Plan.php index 99898641a..c717f3364 100644 --- a/src/Consumer/View/Plan.php +++ b/src/Consumer/View/Plan.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Sql\Condition; use PSX\Sql\OrderBy; @@ -51,10 +53,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\PlanCollection::class)), 'totalResults' => $this->getTable(Table\Plan::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Plan::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\Plan::class)), 'id' => $builder->fieldInteger(Table\Generated\PlanTable::COLUMN_ID), 'name' => Table\Generated\PlanTable::COLUMN_NAME, 'description' => Table\Generated\PlanTable::COLUMN_DESCRIPTION, @@ -80,6 +84,7 @@ public function getEntity(int $planId, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Plan::class), 'findOneBy'], [$condition], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\Plan::class)), 'id' => $builder->fieldInteger(Table\Generated\PlanTable::COLUMN_ID), 'name' => Table\Generated\PlanTable::COLUMN_NAME, 'description' => Table\Generated\PlanTable::COLUMN_DESCRIPTION, diff --git a/src/Consumer/View/Scope.php b/src/Consumer/View/Scope.php index e06a922f6..bfce9ef56 100644 --- a/src/Consumer/View/Scope.php +++ b/src/Consumer/View/Scope.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Nested\Reference; use PSX\Sql\Condition; @@ -79,10 +81,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\ScopeCollection::class)), 'totalResults' => $builder->doValue($countBuilder->getSQL(), $countBuilder->getParameters(), $builder->fieldInteger('cnt')), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection($queryBuilder->getSQL(), $queryBuilder->getParameters(), [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\Scope::class)), 'id' => $builder->fieldInteger(Table\Generated\ScopeTable::COLUMN_ID), 'name' => Table\Generated\ScopeTable::COLUMN_NAME, 'description' => Table\Generated\ScopeTable::COLUMN_DESCRIPTION, @@ -98,6 +102,7 @@ public function getEntity(string $id, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Scope::class), 'findOneByIdentifier'], [$context->getTenantId(), $context->getUser()->getCategoryId(), $id], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\Scope::class)), 'id' => $builder->fieldInteger(Table\Generated\ScopeTable::COLUMN_ID), 'name' => Table\Generated\ScopeTable::COLUMN_NAME, 'description' => Table\Generated\ScopeTable::COLUMN_DESCRIPTION, diff --git a/src/Consumer/View/Token.php b/src/Consumer/View/Token.php index 7a75af036..1d70d8f9f 100644 --- a/src/Consumer/View/Token.php +++ b/src/Consumer/View/Token.php @@ -23,7 +23,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\App\Token\TokenQueryFilter; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Sql\Condition; use PSX\Sql\OrderBy; @@ -54,10 +56,12 @@ public function getCollection(TokenQueryFilter $filter, ContextInterface $contex $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\TokenCollection::class)), 'totalResults' => $this->getTable(Table\Token::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => 16, 'entry' => $builder->doCollection([$this->getTable(Table\Token::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\Token::class)), 'id' => Table\Generated\TokenTable::COLUMN_ID, 'status' => Table\Generated\TokenTable::COLUMN_STATUS, 'name' => Table\Generated\TokenTable::COLUMN_NAME, @@ -83,6 +87,7 @@ public function getEntity(int $tokenId, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Token::class), 'findOneBy'], [$condition], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\Token::class)), 'id' => Table\Generated\TokenTable::COLUMN_ID, 'status' => Table\Generated\TokenTable::COLUMN_STATUS, 'name' => Table\Generated\TokenTable::COLUMN_NAME, diff --git a/src/Consumer/View/Transaction.php b/src/Consumer/View/Transaction.php index ead289bdc..b5b7aace7 100644 --- a/src/Consumer/View/Transaction.php +++ b/src/Consumer/View/Transaction.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Nested\Reference; use PSX\Sql\Condition; @@ -52,10 +54,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\TransactionCollection::class)), 'totalResults' => $this->getTable(Table\Transaction::class)->getCount($condition), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Transaction::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\Transaction::class)), 'id' => $builder->fieldInteger(Table\Generated\TransactionTable::COLUMN_ID), 'userId' => $builder->fieldInteger(Table\Generated\TransactionTable::COLUMN_USER_ID), 'planId' => $builder->fieldInteger(Table\Generated\TransactionTable::COLUMN_PLAN_ID), @@ -81,6 +85,7 @@ public function getEntity(int $transactionId, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\Transaction::class), 'findOneBy'], [$condition], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\Transaction::class)), 'id' => $builder->fieldInteger(Table\Generated\TransactionTable::COLUMN_ID), 'userId' => $builder->fieldInteger(Table\Generated\TransactionTable::COLUMN_USER_ID), 'planId' => $builder->fieldInteger(Table\Generated\TransactionTable::COLUMN_PLAN_ID), diff --git a/src/Consumer/View/User.php b/src/Consumer/View/User.php index b0ba40399..48c6d963f 100644 --- a/src/Consumer/View/User.php +++ b/src/Consumer/View/User.php @@ -21,7 +21,9 @@ namespace Fusio\Impl\Consumer\View; use Fusio\Engine\ContextInterface; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Nested\Reference; use PSX\Sql\Condition; @@ -45,6 +47,7 @@ public function getEntity(ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity([$this->getTable(Table\User::class), 'findOneBy'], [$condition], [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\UserAccount::class)), 'id' => $builder->fieldInteger(Table\Generated\UserTable::COLUMN_ID), 'roleId' => $builder->fieldInteger(Table\Generated\UserTable::COLUMN_ROLE_ID), 'planId' => $builder->fieldInteger(Table\Generated\UserTable::COLUMN_PLAN_ID), diff --git a/src/Consumer/View/User/Grant.php b/src/Consumer/View/User/Grant.php index 09d415ec8..0d42ea9dc 100644 --- a/src/Consumer/View/User/Grant.php +++ b/src/Consumer/View/User/Grant.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Sql\Condition; use PSX\Sql\ViewAbstract; @@ -73,10 +75,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\GrantCollection::class)), 'totalResults' => $builder->doValue($countBuilder->getSQL(), $countBuilder->getParameters(), $builder->fieldInteger('cnt')), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection($queryBuilder->getSQL(), $queryBuilder->getParameters(), [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\Grant::class)), 'id' => $builder->fieldInteger(Table\Generated\UserGrantTable::COLUMN_ID), 'allow' => $builder->fieldInteger(Table\Generated\UserGrantTable::COLUMN_ALLOW), 'createDate' => $builder->fieldDateTime(Table\Generated\UserGrantTable::COLUMN_DATE), diff --git a/src/Consumer/View/Webhook.php b/src/Consumer/View/Webhook.php index 59f257bb0..fa6daa404 100644 --- a/src/Consumer/View/Webhook.php +++ b/src/Consumer/View/Webhook.php @@ -22,7 +22,9 @@ use Fusio\Engine\ContextInterface; use Fusio\Impl\Backend\Filter\QueryFilter; +use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Nested\Builder; use PSX\Nested\Reference; use PSX\Sql\Condition; @@ -79,10 +81,12 @@ public function getCollection(QueryFilter $filter, ContextInterface $context) $builder = new Builder($this->connection); $definition = [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\WebhookCollection::class)), 'totalResults' => $builder->doValue($countBuilder->getSQL(), $countBuilder->getParameters(), $builder->fieldInteger('cnt')), 'startIndex' => $startIndex, 'itemsPerPage' => $count, 'entry' => $builder->doCollection($queryBuilder->getSQL(), $queryBuilder->getParameters(), [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\Webhook::class)), 'id' => $builder->fieldInteger(Table\Generated\WebhookTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\WebhookTable::COLUMN_STATUS), 'name' => Table\Generated\WebhookTable::COLUMN_NAME, @@ -118,6 +122,7 @@ public function getEntity(int $webhookId, ContextInterface $context) $builder = new Builder($this->connection); $definition = $builder->doEntity($queryBuilder->getSQL(), $queryBuilder->getParameters(), [ + '@type' => $builder->fieldValue(Service\JsonLD\TypeBuilder::build(Model\Consumer\Webhook::class)), 'id' => $builder->fieldInteger(Table\Generated\WebhookTable::COLUMN_ID), 'status' => $builder->fieldInteger(Table\Generated\WebhookTable::COLUMN_STATUS), 'name' => Table\Generated\WebhookTable::COLUMN_NAME, diff --git a/src/Service/JsonLD/TypeBuilder.php b/src/Service/JsonLD/TypeBuilder.php new file mode 100644 index 000000000..119ed34c7 --- /dev/null +++ b/src/Service/JsonLD/TypeBuilder.php @@ -0,0 +1,50 @@ + + * + * Copyright (c) Christoph Kappestein + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +namespace Fusio\Impl\Service\JsonLD; + +use Composer\InstalledVersions; + +/** + * TypeBuilder + * + * @author Christoph Kappestein + * @license http://www.apache.org/licenses/LICENSE-2.0 + * @link https://www.fusio-project.org + */ +readonly class TypeBuilder +{ + /** + * @param class-string $modelClass + */ + public static function build(string $modelClass): ?string + { + $version = ltrim(InstalledVersions::getPrettyVersion('fusio/sdk'), 'v'); + $parts = explode('\\', $modelClass); + $component = $parts[count($parts) - 2] ?? null; + $name = $parts[count($parts) - 1] ?? null; + + if (empty($component) || empty($name)) { + return null; + } + + return 'https://typehub.cloud/s/fusio/sdk/' . $version . '/' . $component . '_' . $name; + } +} diff --git a/src/System/Action/Meta/GetAbout.php b/src/System/Action/Meta/GetAbout.php index 5f2550ed9..42c1dd8d7 100644 --- a/src/System/Action/Meta/GetAbout.php +++ b/src/System/Action/Meta/GetAbout.php @@ -27,6 +27,7 @@ use Fusio\Impl\Base; use Fusio\Impl\Service; use Fusio\Impl\Table; +use Fusio\Model; use PSX\Sql\Condition; use PSX\Sql\OrderBy; @@ -50,6 +51,7 @@ public function __construct( public function handle(RequestInterface $request, ParametersInterface $configuration, ContextInterface $context): mixed { return array_filter([ + '@type' => Service\JsonLD\TypeBuilder::build(Model\System\About::class), 'apiVersion' => Base::getVersion(), 'title' => $this->configService->getValue('info_title') ?: 'Fusio', 'description' => $this->configService->getValue('info_description') ?: null, diff --git a/tests/Authorization/WhoamiTest.php b/tests/Authorization/WhoamiTest.php index cbd8671b9..46e64736b 100644 --- a/tests/Authorization/WhoamiTest.php +++ b/tests/Authorization/WhoamiTest.php @@ -44,6 +44,7 @@ public function testGet() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_UserAccount", "id": 2, "roleId": 3, "planId": 1, diff --git a/tests/Backend/Api/Account/AccountTest.php b/tests/Backend/Api/Account/AccountTest.php index d058c3177..239c9869f 100644 --- a/tests/Backend/Api/Account/AccountTest.php +++ b/tests/Backend/Api/Account/AccountTest.php @@ -44,6 +44,7 @@ public function testGet() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_User", "id": 4, "roleId": 2, "status": 1, diff --git a/tests/Backend/Api/Action/CollectionTest.php b/tests/Backend/Api/Action/CollectionTest.php index 984f5fbe4..af539d268 100644 --- a/tests/Backend/Api/Action/CollectionTest.php +++ b/tests/Backend/Api/Action/CollectionTest.php @@ -47,11 +47,13 @@ public function testGet() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_ActionCollection", "totalResults": 6, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Action", "id": 6, "status": 1, "name": "MIME-Action", @@ -59,6 +61,7 @@ public function testGet() "date": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Action", "id": 5, "status": 1, "name": "Inspect-Action", @@ -66,6 +69,7 @@ public function testGet() "date": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Action", "id": 4, "status": 1, "name": "PHP-Local", @@ -73,6 +77,7 @@ public function testGet() "date": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Action", "id": 3, "status": 1, "name": "Sql-Insert", @@ -80,6 +85,7 @@ public function testGet() "date": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Action", "id": 2, "status": 1, "name": "Sql-Select-All", @@ -87,6 +93,7 @@ public function testGet() "date": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Action", "id": 1, "status": 1, "name": "Util-Static-Response", @@ -116,11 +123,13 @@ public function testGetSearch() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_ActionCollection", "totalResults": 2, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Action", "id": 3, "status": 1, "name": "Sql-Insert", @@ -128,6 +137,7 @@ public function testGetSearch() "date": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Action", "id": 2, "status": 1, "name": "Sql-Select-All", @@ -154,11 +164,13 @@ public function testGetTaxonomy() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_ActionCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Action", "id": 2, "status": 1, "name": "Sql-Select-All", @@ -185,11 +197,13 @@ public function testGetCount() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_ActionCollection", "totalResults": 6, "startIndex": 0, "itemsPerPage": 80, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Action", "id": 6, "status": 1, "name": "MIME-Action", @@ -197,6 +211,7 @@ public function testGetCount() "date": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Action", "id": 5, "status": 1, "name": "Inspect-Action", @@ -204,6 +219,7 @@ public function testGetCount() "date": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Action", "id": 4, "status": 1, "name": "PHP-Local", @@ -211,6 +227,7 @@ public function testGetCount() "date": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Action", "id": 3, "status": 1, "name": "Sql-Insert", @@ -218,6 +235,7 @@ public function testGetCount() "date": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Action", "id": 2, "status": 1, "name": "Sql-Select-All", @@ -225,6 +243,7 @@ public function testGetCount() "date": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Action", "id": 1, "status": 1, "name": "Util-Static-Response", diff --git a/tests/Backend/Api/Action/Commit/CollectionTest.php b/tests/Backend/Api/Action/Commit/CollectionTest.php index a1fa0aeb9..81ddf8d02 100644 --- a/tests/Backend/Api/Action/Commit/CollectionTest.php +++ b/tests/Backend/Api/Action/Commit/CollectionTest.php @@ -58,11 +58,13 @@ public function testGet() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_ActionCommitCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_ActionCommit", "id": 1, "user": { "id": 2, diff --git a/tests/Backend/Api/Action/EntityTest.php b/tests/Backend/Api/Action/EntityTest.php index 08af7195f..c597c258f 100644 --- a/tests/Backend/Api/Action/EntityTest.php +++ b/tests/Backend/Api/Action/EntityTest.php @@ -56,6 +56,7 @@ public function testGet() $expect = <<id}, "status": 1, "name": "Sql-Insert", @@ -85,6 +86,7 @@ public function testGetByName() $expect = <<id}, "status": 1, "name": "Sql-Insert", diff --git a/tests/Backend/Api/Agent/CollectionTest.php b/tests/Backend/Api/Agent/CollectionTest.php index 39d08a907..db2a4ea85 100644 --- a/tests/Backend/Api/Agent/CollectionTest.php +++ b/tests/Backend/Api/Agent/CollectionTest.php @@ -45,11 +45,13 @@ public function testGet() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_AgentCollection", "totalResults": 6, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Agent", "id": 6, "status": 1, "connection": 8, @@ -60,6 +62,7 @@ public function testGet() "insertDate": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Agent", "id": 5, "status": 1, "type": 4, @@ -69,6 +72,7 @@ public function testGet() "insertDate": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Agent", "id": 4, "status": 1, "type": 3, @@ -78,6 +82,7 @@ public function testGet() "insertDate": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Agent", "id": 3, "status": 1, "type": 2, @@ -86,6 +91,7 @@ public function testGet() "insertDate": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Agent", "id": 2, "status": 1, "type": 1, @@ -95,6 +101,7 @@ public function testGet() "insertDate": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Agent", "id": 1, "status": 1, "type": 0, @@ -120,11 +127,13 @@ public function testGetSearch() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_AgentCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Agent", "id": 6, "status": 1, "connection": 8, @@ -154,11 +163,13 @@ public function testGetCount() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_AgentCollection", "totalResults": 6, "startIndex": 0, "itemsPerPage": 80, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Agent", "id": 6, "status": 1, "connection": 8, @@ -169,6 +180,7 @@ public function testGetCount() "insertDate": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Agent", "id": 5, "status": 1, "type": 4, @@ -178,6 +190,7 @@ public function testGetCount() "insertDate": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Agent", "id": 4, "status": 1, "type": 3, @@ -187,6 +200,7 @@ public function testGetCount() "insertDate": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Agent", "id": 3, "status": 1, "type": 2, @@ -195,6 +209,7 @@ public function testGetCount() "insertDate": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Agent", "id": 2, "status": 1, "type": 1, @@ -204,6 +219,7 @@ public function testGetCount() "insertDate": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Agent", "id": 1, "status": 1, "type": 0, diff --git a/tests/Backend/Api/Agent/EntityTest.php b/tests/Backend/Api/Agent/EntityTest.php index c6a384c09..e16603f92 100644 --- a/tests/Backend/Api/Agent/EntityTest.php +++ b/tests/Backend/Api/Agent/EntityTest.php @@ -51,6 +51,7 @@ public function testGet() $body = (string) $response->getBody(); $expect = <<id}, "status": 1, "connection": 8, diff --git a/tests/Backend/Api/Agent/Message/CollectionTest.php b/tests/Backend/Api/Agent/Message/CollectionTest.php index a5ec2d58c..7bfc0706f 100644 --- a/tests/Backend/Api/Agent/Message/CollectionTest.php +++ b/tests/Backend/Api/Agent/Message/CollectionTest.php @@ -45,11 +45,13 @@ public function testGet() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_AgentMessageCollection", "totalResults": 16, "startIndex": 0, "itemsPerPage": 10, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_AgentMessage", "id": 1, "chatId": "41fd19b2-2dc0-46d9-b904-85c0d0b61a77", "role": "user", @@ -78,11 +80,13 @@ public function testGetParent() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_AgentMessageCollection", "totalResults": 2, "startIndex": 0, "itemsPerPage": 10, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_AgentMessage", "id": 1, "chatId": "41fd19b2-2dc0-46d9-b904-85c0d0b61a77", "role": "user", @@ -93,6 +97,7 @@ public function testGetParent() "insertDate": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_AgentMessage", "id": 2, "chatId": "41fd19b2-2dc0-46d9-b904-85c0d0b61a77", "role": "assistant", diff --git a/tests/Backend/Api/App/CollectionTest.php b/tests/Backend/Api/App/CollectionTest.php index 2bf6ed8bb..a25e68bb0 100644 --- a/tests/Backend/Api/App/CollectionTest.php +++ b/tests/Backend/Api/App/CollectionTest.php @@ -47,11 +47,13 @@ public function testGet() $expect = <<getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_BundleCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Bundle", "id": 1, "status": 1, "name": "Test-Bundle", @@ -72,11 +74,13 @@ public function testGetSearch() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_BundleCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Bundle", "id": 1, "status": 1, "name": "Test-Bundle", @@ -102,11 +106,13 @@ public function testGetCount() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_BundleCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 80, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Bundle", "id": 1, "status": 1, "name": "Test-Bundle", diff --git a/tests/Backend/Api/Bundle/EntityTest.php b/tests/Backend/Api/Bundle/EntityTest.php index 9ed128585..2d65a640c 100644 --- a/tests/Backend/Api/Bundle/EntityTest.php +++ b/tests/Backend/Api/Bundle/EntityTest.php @@ -51,6 +51,7 @@ public function testGet() $body = (string) $response->getBody(); $expect = <<getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_CategoryCollection", "totalResults": 5, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Category", "id": 5, "status": 1, "name": "authorization" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Category", "id": 2, "status": 1, "name": "backend" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Category", "id": 3, "status": 1, "name": "consumer" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Category", "id": 1, "status": 1, "name": "default" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Category", "id": 4, "status": 1, "name": "system" @@ -88,11 +94,13 @@ public function testGetSearch() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_CategoryCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Category", "id": 2, "status": 1, "name": "backend" @@ -115,31 +123,37 @@ public function testGetCount() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_CategoryCollection", "totalResults": 5, "startIndex": 0, "itemsPerPage": 80, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Category", "id": 5, "status": 1, "name": "authorization" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Category", "id": 2, "status": 1, "name": "backend" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Category", "id": 3, "status": 1, "name": "consumer" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Category", "id": 1, "status": 1, "name": "default" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Category", "id": 4, "status": 1, "name": "system" diff --git a/tests/Backend/Api/Category/EntityTest.php b/tests/Backend/Api/Category/EntityTest.php index 89bfb50d3..e9b52b480 100644 --- a/tests/Backend/Api/Category/EntityTest.php +++ b/tests/Backend/Api/Category/EntityTest.php @@ -51,6 +51,7 @@ public function testGet() $body = (string) $response->getBody(); $expect = <<getBody(); $expect = <<<'JSON' { - "totalResults": 37, + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_ConfigCollection", + "totalResults": 38, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 1, "type": 2, "name": "app_approval", @@ -53,6 +55,7 @@ public function testGet() "value": false }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 5, "type": 1, "name": "authorization_url", @@ -60,6 +63,7 @@ public function testGet() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 2, "type": 3, "name": "consumer_max_apps", @@ -67,6 +71,7 @@ public function testGet() "value": 16 }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 3, "type": 3, "name": "consumer_max_tokens", @@ -74,6 +79,7 @@ public function testGet() "value": 16 }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 4, "type": 3, "name": "consumer_max_webhooks", @@ -81,6 +87,7 @@ public function testGet() "value": 8 }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 11, "type": 1, "name": "info_contact_email", @@ -88,6 +95,7 @@ public function testGet() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 9, "type": 1, "name": "info_contact_name", @@ -95,6 +103,7 @@ public function testGet() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 10, "type": 1, "name": "info_contact_url", @@ -102,6 +111,7 @@ public function testGet() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 7, "type": 1, "name": "info_description", @@ -109,6 +119,7 @@ public function testGet() "value": "Self-Hosted API Management for Builders." }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 12, "type": 1, "name": "info_license_name", @@ -116,6 +127,7 @@ public function testGet() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 13, "type": 1, "name": "info_license_url", @@ -123,6 +135,7 @@ public function testGet() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 6, "type": 1, "name": "info_title", @@ -130,6 +143,7 @@ public function testGet() "value": "Fusio" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 8, "type": 1, "name": "info_tos", @@ -137,6 +151,7 @@ public function testGet() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 19, "type": 6, "name": "mail_points_body", @@ -144,6 +159,7 @@ public function testGet() "value": "Hello {name},\n\nyour account has reached the configured threshold of {points} points.\nIf your account reaches 0 points your are not longer able to invoke specific endpoints.\nTo prevent this please go to the developer portal to purchase new points:\n{apps_url}\/developer" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 18, "type": 1, "name": "mail_points_subject", @@ -151,6 +167,7 @@ public function testGet() "value": "Fusio points threshold reached" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 17, "type": 6, "name": "mail_pw_reset_body", @@ -175,11 +192,13 @@ public function testGetSearch() $actual = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_ConfigCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 14, "type": 1, "name": "mail_register_subject", @@ -204,11 +223,13 @@ public function testGetCount() $actual = (string) $response->getBody(); $expect = <<<'JSON' { - "totalResults": 37, + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_ConfigCollection", + "totalResults": 38, "startIndex": 0, "itemsPerPage": 80, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 1, "type": 2, "name": "app_approval", @@ -216,6 +237,7 @@ public function testGetCount() "value": false }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 5, "type": 1, "name": "authorization_url", @@ -223,6 +245,7 @@ public function testGetCount() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 2, "type": 3, "name": "consumer_max_apps", @@ -230,6 +253,7 @@ public function testGetCount() "value": 16 }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 3, "type": 3, "name": "consumer_max_tokens", @@ -237,6 +261,7 @@ public function testGetCount() "value": 16 }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 4, "type": 3, "name": "consumer_max_webhooks", @@ -244,6 +269,7 @@ public function testGetCount() "value": 8 }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 11, "type": 1, "name": "info_contact_email", @@ -251,6 +277,7 @@ public function testGetCount() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 9, "type": 1, "name": "info_contact_name", @@ -258,6 +285,7 @@ public function testGetCount() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 10, "type": 1, "name": "info_contact_url", @@ -265,6 +293,7 @@ public function testGetCount() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 7, "type": 1, "name": "info_description", @@ -272,6 +301,7 @@ public function testGetCount() "value": "Self-Hosted API Management for Builders." }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 12, "type": 1, "name": "info_license_name", @@ -279,6 +309,7 @@ public function testGetCount() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 13, "type": 1, "name": "info_license_url", @@ -286,6 +317,7 @@ public function testGetCount() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 6, "type": 1, "name": "info_title", @@ -293,6 +325,7 @@ public function testGetCount() "value": "Fusio" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 8, "type": 1, "name": "info_tos", @@ -300,6 +333,7 @@ public function testGetCount() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 19, "type": 6, "name": "mail_points_body", @@ -307,6 +341,7 @@ public function testGetCount() "value": "Hello {name},\n\nyour account has reached the configured threshold of {points} points.\nIf your account reaches 0 points your are not longer able to invoke specific endpoints.\nTo prevent this please go to the developer portal to purchase new points:\n{apps_url}\/developer" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 18, "type": 1, "name": "mail_points_subject", @@ -314,6 +349,7 @@ public function testGetCount() "value": "Fusio points threshold reached" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 17, "type": 6, "name": "mail_pw_reset_body", @@ -321,6 +357,7 @@ public function testGetCount() "value": "Hello {name},\n\nyou have requested to reset your password.\nTo set a new password please visit the following link:\n{apps_url}\/developer\/password\/confirm\/{token}\n\nPlease ignore this email if you have not requested a password reset." }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 16, "type": 1, "name": "mail_pw_reset_subject", @@ -328,6 +365,7 @@ public function testGetCount() "value": "Fusio password reset" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 15, "type": 6, "name": "mail_register_body", @@ -335,6 +373,7 @@ public function testGetCount() "value": "Hello {name},\n\nyou have successful registered at Fusio.\nTo activate you account please visit the following link:\n{apps_url}\/developer\/register\/activate\/{token}" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 14, "type": 1, "name": "mail_register_subject", @@ -342,6 +381,7 @@ public function testGetCount() "value": "Fusio registration" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 32, "type": 1, "name": "marketplace_client_id", @@ -349,6 +389,7 @@ public function testGetCount() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 33, "type": 1, "name": "marketplace_client_secret", @@ -356,6 +397,7 @@ public function testGetCount() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 24, "type": 1, "name": "payment_currency", @@ -363,6 +405,7 @@ public function testGetCount() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 23, "type": 1, "name": "payment_stripe_portal_configuration", @@ -370,6 +413,7 @@ public function testGetCount() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 22, "type": 1, "name": "payment_stripe_secret", @@ -377,6 +421,7 @@ public function testGetCount() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 26, "type": 3, "name": "points_default", @@ -384,6 +429,7 @@ public function testGetCount() "value": 0 }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 27, "type": 3, "name": "points_threshold", @@ -391,6 +437,7 @@ public function testGetCount() "value": 0 }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 20, "type": 1, "name": "recaptcha_key", @@ -398,6 +445,7 @@ public function testGetCount() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 21, "type": 1, "name": "recaptcha_secret", @@ -405,6 +453,7 @@ public function testGetCount() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 25, "type": 1, "name": "role_default", @@ -412,6 +461,7 @@ public function testGetCount() "value": "Consumer" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 34, "type": 1, "name": "sdkgen_client_id", @@ -419,6 +469,7 @@ public function testGetCount() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 35, "type": 1, "name": "sdkgen_client_secret", @@ -426,6 +477,7 @@ public function testGetCount() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 29, "type": 1, "name": "system_dispatcher", @@ -433,6 +485,7 @@ public function testGetCount() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 28, "type": 1, "name": "system_mailer", @@ -440,6 +493,7 @@ public function testGetCount() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 36, "type": 1, "name": "typehub_client_id", @@ -447,6 +501,7 @@ public function testGetCount() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 37, "type": 1, "name": "typehub_client_secret", @@ -454,6 +509,15 @@ public function testGetCount() "value": "" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", + "description": "Name of the TypeHub document under which the specification gets published", + "id": 38, + "name": "typehub_document_name", + "type": 1, + "value": "" + }, + { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 31, "type": 2, "name": "user_approval", @@ -461,6 +525,7 @@ public function testGetCount() "value": true }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 30, "type": 3, "name": "user_pw_length", diff --git a/tests/Backend/Api/Config/EntityTest.php b/tests/Backend/Api/Config/EntityTest.php index a5a21e440..7217097f7 100644 --- a/tests/Backend/Api/Config/EntityTest.php +++ b/tests/Backend/Api/Config/EntityTest.php @@ -41,6 +41,7 @@ public function testGet() $actual = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 3, "type": 3, "name": "consumer_max_tokens", @@ -63,6 +64,7 @@ public function testGetByName() $actual = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Config", "id": 5, "type": 1, "name": "authorization_url", diff --git a/tests/Backend/Api/Connection/CollectionTest.php b/tests/Backend/Api/Connection/CollectionTest.php index 2296c2aaa..14957e7c1 100644 --- a/tests/Backend/Api/Connection/CollectionTest.php +++ b/tests/Backend/Api/Connection/CollectionTest.php @@ -44,47 +44,55 @@ public function testGet() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_ConnectionCollection", "totalResults": 8, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Connection", "id": 8, "status": 1, "name": "Agent", "class": "Fusio.Impl.Tests.Adapter.Test.AgentConnection" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Connection", "id": 7, "status": 1, "name": "StarwarsSDK", "class": "Fusio.Adapter.SdkFabric.Connection.Starwars" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Connection", "id": 6, "status": 1, "name": "FusioHttpClient", "class": "Fusio.Adapter.Http.Connection.Http" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Connection", "id": 5, "status": 1, "name": "LocalFilesystem", "class": "Fusio.Adapter.File.Connection.Filesystem" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Connection", "id": 4, "status": 1, "name": "Worker", "class": "Fusio.Adapter.Worker.Connection.Worker" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Connection", "id": 3, "status": 1, "name": "Paypal", "class": "Fusio.Impl.Tests.Adapter.Test.PaypalConnection" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Connection", "id": 2, "status": 1, "name": "Test", @@ -94,6 +102,7 @@ public function testGet() } }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Connection", "id": 1, "status": 1, "name": "System", @@ -117,17 +126,20 @@ public function testGetSearch() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_ConnectionCollection", "totalResults": 2, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Connection", "id": 5, "status": 1, "name": "LocalFilesystem", "class": "Fusio.Adapter.File.Connection.Filesystem" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Connection", "id": 1, "status": 1, "name": "System", @@ -151,11 +163,13 @@ public function testGetClass() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_ConnectionCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Connection", "id": 3, "status": 1, "name": "Paypal", @@ -179,17 +193,20 @@ public function testGetClasses() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_ConnectionCollection", "totalResults": 2, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Connection", "id": 3, "status": 1, "name": "Paypal", "class": "Fusio.Impl.Tests.Adapter.Test.PaypalConnection" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Connection", "id": 1, "status": 1, "name": "System", @@ -213,47 +230,55 @@ public function testGetCount() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_ConnectionCollection", "totalResults": 8, "startIndex": 0, "itemsPerPage": 80, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Connection", "id": 8, "status": 1, "name": "Agent", "class": "Fusio.Impl.Tests.Adapter.Test.AgentConnection" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Connection", "id": 7, "status": 1, "name": "StarwarsSDK", "class": "Fusio.Adapter.SdkFabric.Connection.Starwars" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Connection", "id": 6, "status": 1, "name": "FusioHttpClient", "class": "Fusio.Adapter.Http.Connection.Http" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Connection", "id": 5, "status": 1, "name": "LocalFilesystem", "class": "Fusio.Adapter.File.Connection.Filesystem" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Connection", "id": 4, "status": 1, "name": "Worker", "class": "Fusio.Adapter.Worker.Connection.Worker" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Connection", "id": 3, "status": 1, "name": "Paypal", "class": "Fusio.Impl.Tests.Adapter.Test.PaypalConnection" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Connection", "id": 2, "status": 1, "name": "Test", @@ -263,6 +288,7 @@ public function testGetCount() } }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Connection", "id": 1, "status": 1, "name": "System", diff --git a/tests/Backend/Api/Cronjob/CollectionTest.php b/tests/Backend/Api/Cronjob/CollectionTest.php index 739362ba1..c57ed8685 100644 --- a/tests/Backend/Api/Cronjob/CollectionTest.php +++ b/tests/Backend/Api/Cronjob/CollectionTest.php @@ -41,11 +41,13 @@ public function testGet() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_CronjobCollection", "totalResults": 2, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Cronjob", "id": 3, "status": 1, "name": "Second-Cron", @@ -58,6 +60,7 @@ public function testGet() } }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Cronjob", "id": 2, "status": 1, "name": "Test-Cron", @@ -87,11 +90,13 @@ public function testGetSearch() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_CronjobCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Cronjob", "id": 2, "status": 1, "name": "Test-Cron", @@ -121,11 +126,13 @@ public function testGetTaxonomy() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_CronjobCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Cronjob", "id": 3, "status": 1, "name": "Second-Cron", @@ -155,11 +162,13 @@ public function testGetCount() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_CronjobCollection", "totalResults": 2, "startIndex": 0, "itemsPerPage": 80, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Cronjob", "id": 3, "status": 1, "name": "Second-Cron", @@ -172,6 +181,7 @@ public function testGetCount() } }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Cronjob", "id": 2, "status": 1, "name": "Test-Cron", diff --git a/tests/Backend/Api/Cronjob/EntityTest.php b/tests/Backend/Api/Cronjob/EntityTest.php index 1f5760e16..153119239 100644 --- a/tests/Backend/Api/Cronjob/EntityTest.php +++ b/tests/Backend/Api/Cronjob/EntityTest.php @@ -42,6 +42,7 @@ public function testGet() $body = (string) $response->getBody(); $expect = <<getBody(); $expect = <<getBody(); $expect = <<eventFooId}, "status": 1, "name": "foo-event", @@ -67,6 +69,7 @@ public function testGet() } }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Event", "id": {$this->eventSecondId}, "status": 1, "name": "second-event", @@ -93,11 +96,13 @@ public function testGetSearch() $body = (string) $response->getBody(); $expect = <<eventFooId}, "status": 1, "name": "foo-event", @@ -124,11 +129,13 @@ public function testGetTaxonomy() $body = (string) $response->getBody(); $expect = <<eventSecondId}, "status": 1, "name": "second-event", @@ -155,11 +162,13 @@ public function testGetCount() $body = (string) $response->getBody(); $expect = <<eventFooId}, "status": 1, "name": "foo-event", @@ -169,6 +178,7 @@ public function testGetCount() } }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Event", "id": {$this->eventSecondId}, "status": 1, "name": "second-event", diff --git a/tests/Backend/Api/Event/EntityTest.php b/tests/Backend/Api/Event/EntityTest.php index fdb94edf8..da4b6513c 100644 --- a/tests/Backend/Api/Event/EntityTest.php +++ b/tests/Backend/Api/Event/EntityTest.php @@ -51,6 +51,7 @@ public function testGet() $body = (string) $response->getBody(); $expect = <<id}, "status": 1, "name": "foo-event", @@ -75,6 +76,7 @@ public function testGetByName() $body = (string) $response->getBody(); $expect = <<id}, "status": 1, "name": "foo-event", diff --git a/tests/Backend/Api/Firewall/CollectionTest.php b/tests/Backend/Api/Firewall/CollectionTest.php index c7bc9fa89..31478764c 100644 --- a/tests/Backend/Api/Firewall/CollectionTest.php +++ b/tests/Backend/Api/Firewall/CollectionTest.php @@ -41,11 +41,13 @@ public function testGet() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_FirewallCollection", "totalResults": 2, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Firewall", "id": 1, "status": 1, "name": "my_v4_rule", @@ -56,6 +58,7 @@ public function testGet() } }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Firewall", "id": 2, "status": 1, "name": "my_v6_rule", diff --git a/tests/Backend/Api/Firewall/EntityTest.php b/tests/Backend/Api/Firewall/EntityTest.php index 484d69195..9ecb168b9 100644 --- a/tests/Backend/Api/Firewall/EntityTest.php +++ b/tests/Backend/Api/Firewall/EntityTest.php @@ -51,6 +51,7 @@ public function testGet() $body = (string) $response->getBody(); $expect = <<getBody(); $expect = <<getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_FormCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Form", "id": 1, "status": 1, "name": "my_form", diff --git a/tests/Backend/Api/Form/EntityTest.php b/tests/Backend/Api/Form/EntityTest.php index f2d022330..5f44e750b 100644 --- a/tests/Backend/Api/Form/EntityTest.php +++ b/tests/Backend/Api/Form/EntityTest.php @@ -51,6 +51,7 @@ public function testGet() $body = (string) $response->getBody(); $expect = <<getBody(); $expect = <<getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_IdentityCollection", "totalResults": 4, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Identity", "id": 1, "roleId": 3, "appId": 2, @@ -57,6 +59,7 @@ public function testGet() "insertDate": "2023-07-22T13:56:00Z" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Identity", "id": 2, "roleId": 3, "appId": 2, @@ -67,6 +70,7 @@ public function testGet() "insertDate": "2023-07-22T13:56:00Z" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Identity", "id": 3, "roleId": 3, "appId": 2, @@ -77,6 +81,7 @@ public function testGet() "insertDate": "2023-07-22T13:56:00Z" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Identity", "id": 4, "roleId": 3, "appId": 2, diff --git a/tests/Backend/Api/Identity/EntityTest.php b/tests/Backend/Api/Identity/EntityTest.php index bc6462c61..7c91d09d3 100644 --- a/tests/Backend/Api/Identity/EntityTest.php +++ b/tests/Backend/Api/Identity/EntityTest.php @@ -52,6 +52,7 @@ public function testGet() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Identity", "id": 2, "roleId": 3, "appId": 2, @@ -88,6 +89,7 @@ public function testGetByName() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Identity", "id": 2, "roleId": 3, "appId": 2, diff --git a/tests/Backend/Api/Log/CollectionTest.php b/tests/Backend/Api/Log/CollectionTest.php index 6f0fbceef..855d59160 100644 --- a/tests/Backend/Api/Log/CollectionTest.php +++ b/tests/Backend/Api/Log/CollectionTest.php @@ -52,11 +52,13 @@ public function testGet() $expect = <<operationId}, @@ -67,6 +69,7 @@ public function testGet() "date": "2015-06-25T22:49:09Z" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Log", "id": 1, "appId": 3, "operationId": {$this->operationId}, @@ -95,11 +98,13 @@ public function testGetSearch() $expect = <<operationId}, @@ -110,6 +115,7 @@ public function testGetSearch() "date": "2015-06-25T22:49:09Z" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Log", "id": 1, "appId": 3, "operationId": {$this->operationId}, @@ -138,11 +144,13 @@ public function testGetCount() $expect = <<operationId}, @@ -153,6 +161,7 @@ public function testGetCount() "date": "2015-06-25T22:49:09Z" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Log", "id": 1, "appId": 3, "operationId": {$this->operationId}, diff --git a/tests/Backend/Api/Log/EntityTest.php b/tests/Backend/Api/Log/EntityTest.php index 30af5b2a2..81fb7095b 100644 --- a/tests/Backend/Api/Log/EntityTest.php +++ b/tests/Backend/Api/Log/EntityTest.php @@ -42,6 +42,7 @@ public function testGet() $expect = <<getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_OperationCollection", "totalResults": 15, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 285, "status": 1, "active": true, @@ -61,6 +63,7 @@ public function testGet() "action": "action:\/\/MIME-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 284, "status": 1, "active": true, @@ -73,6 +76,7 @@ public function testGet() "action": "action:\/\/MIME-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 283, "status": 1, "active": true, @@ -85,6 +89,7 @@ public function testGet() "action": "action:\/\/MIME-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 282, "status": 1, "active": true, @@ -97,6 +102,7 @@ public function testGet() "action": "action:\/\/MIME-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 281, "status": 1, "active": true, @@ -109,6 +115,7 @@ public function testGet() "action": "action:\/\/MIME-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 280, "status": 1, "active": true, @@ -121,6 +128,7 @@ public function testGet() "action": "action:\/\/MIME-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 279, "status": 1, "active": true, @@ -133,6 +141,7 @@ public function testGet() "action": "action:\/\/Inspect-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 278, "status": 1, "active": true, @@ -145,6 +154,7 @@ public function testGet() "action": "action:\/\/Inspect-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 277, "status": 1, "active": true, @@ -157,6 +167,7 @@ public function testGet() "action": "action:\/\/Inspect-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 276, "status": 1, "active": true, @@ -169,6 +180,7 @@ public function testGet() "action": "action:\/\/Inspect-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 275, "status": 1, "active": true, @@ -181,6 +193,7 @@ public function testGet() "action": "action:\/\/Inspect-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 274, "status": 1, "active": true, @@ -193,6 +206,7 @@ public function testGet() "action": "action:\/\/PHP-Local@913c5d62a340e5db90e2577f01caf9bd072e1bfa" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 273, "status": 1, "active": true, @@ -205,6 +219,7 @@ public function testGet() "action": "action:\/\/Sql-Insert" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 272, "status": 1, "active": true, @@ -217,6 +232,7 @@ public function testGet() "action": "action:\/\/Sql-Select-All" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 1, "status": 1, "active": true, @@ -246,11 +262,13 @@ public function testGetSearch() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_OperationCollection", "totalResults": 5, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 279, "status": 1, "active": true, @@ -263,6 +281,7 @@ public function testGetSearch() "action": "action:\/\/Inspect-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 278, "status": 1, "active": true, @@ -275,6 +294,7 @@ public function testGetSearch() "action": "action:\/\/Inspect-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 277, "status": 1, "active": true, @@ -287,6 +307,7 @@ public function testGetSearch() "action": "action:\/\/Inspect-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 276, "status": 1, "active": true, @@ -299,6 +320,7 @@ public function testGetSearch() "action": "action:\/\/Inspect-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 275, "status": 1, "active": true, @@ -328,11 +350,13 @@ public function testGetTaxonomy() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_OperationCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 272, "status": 1, "active": true, @@ -362,11 +386,13 @@ public function testGetCount() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_OperationCollection", "totalResults": 15, "startIndex": 0, "itemsPerPage": 80, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 285, "status": 1, "active": true, @@ -379,6 +405,7 @@ public function testGetCount() "action": "action:\/\/MIME-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 284, "status": 1, "active": true, @@ -391,6 +418,7 @@ public function testGetCount() "action": "action:\/\/MIME-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 283, "status": 1, "active": true, @@ -403,6 +431,7 @@ public function testGetCount() "action": "action:\/\/MIME-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 282, "status": 1, "active": true, @@ -415,6 +444,7 @@ public function testGetCount() "action": "action:\/\/MIME-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 281, "status": 1, "active": true, @@ -427,6 +457,7 @@ public function testGetCount() "action": "action:\/\/MIME-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 280, "status": 1, "active": true, @@ -439,6 +470,7 @@ public function testGetCount() "action": "action:\/\/MIME-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 279, "status": 1, "active": true, @@ -451,6 +483,7 @@ public function testGetCount() "action": "action:\/\/Inspect-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 278, "status": 1, "active": true, @@ -463,6 +496,7 @@ public function testGetCount() "action": "action:\/\/Inspect-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 277, "status": 1, "active": true, @@ -475,6 +509,7 @@ public function testGetCount() "action": "action:\/\/Inspect-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 276, "status": 1, "active": true, @@ -487,6 +522,7 @@ public function testGetCount() "action": "action:\/\/Inspect-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 275, "status": 1, "active": true, @@ -499,6 +535,7 @@ public function testGetCount() "action": "action:\/\/Inspect-Action" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 274, "status": 1, "active": true, @@ -511,6 +548,7 @@ public function testGetCount() "action": "action:\/\/PHP-Local@913c5d62a340e5db90e2577f01caf9bd072e1bfa" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 273, "status": 1, "active": true, @@ -523,6 +561,7 @@ public function testGetCount() "action": "action:\/\/Sql-Insert" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 272, "status": 1, "active": true, @@ -535,6 +574,7 @@ public function testGetCount() "action": "action:\/\/Sql-Select-All" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Operation", "id": 1, "status": 1, "active": true, diff --git a/tests/Backend/Api/Operation/EntityTest.php b/tests/Backend/Api/Operation/EntityTest.php index a27dc67c1..fa8618472 100644 --- a/tests/Backend/Api/Operation/EntityTest.php +++ b/tests/Backend/Api/Operation/EntityTest.php @@ -54,6 +54,7 @@ public function testGet() $body = (string) $response->getBody(); $expect = <<getBody(); $expect = <<getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_PlanCollection", "totalResults": 2, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Plan", "id": 1, "status": 1, "name": "Plan A", @@ -60,6 +62,7 @@ public function testGet() } }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Plan", "id": 2, "status": 1, "name": "Plan B", diff --git a/tests/Backend/Api/Plan/EntityTest.php b/tests/Backend/Api/Plan/EntityTest.php index 0dc7d21f0..01c0f9bab 100644 --- a/tests/Backend/Api/Plan/EntityTest.php +++ b/tests/Backend/Api/Plan/EntityTest.php @@ -42,6 +42,7 @@ public function testGet() $body = (string) $response->getBody(); $expect = <<getBody(); $expect = <<getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_RateCollection", "totalResults": 4, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Rate", "id": 4, "status": 1, "priority": 10, @@ -54,6 +56,7 @@ public function testGet() "timespan": "P1M" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Rate", "id": 3, "status": 1, "priority": 5, @@ -65,6 +68,7 @@ public function testGet() } }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Rate", "id": 2, "status": 1, "priority": 4, @@ -73,6 +77,7 @@ public function testGet() "timespan": "PT1H" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Rate", "id": 1, "status": 1, "priority": 0, @@ -98,11 +103,13 @@ public function testGetSearch() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_RateCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Rate", "id": 4, "status": 1, "priority": 10, @@ -128,11 +135,13 @@ public function testGetCount() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_RateCollection", "totalResults": 4, "startIndex": 0, "itemsPerPage": 80, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Rate", "id": 4, "status": 1, "priority": 10, @@ -141,6 +150,7 @@ public function testGetCount() "timespan": "P1M" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Rate", "id": 3, "status": 1, "priority": 5, @@ -152,6 +162,7 @@ public function testGetCount() } }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Rate", "id": 2, "status": 1, "priority": 4, @@ -160,6 +171,7 @@ public function testGetCount() "timespan": "PT1H" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Rate", "id": 1, "status": 1, "priority": 0, diff --git a/tests/Backend/Api/Rate/EntityTest.php b/tests/Backend/Api/Rate/EntityTest.php index 00d65c879..81353bfbb 100644 --- a/tests/Backend/Api/Rate/EntityTest.php +++ b/tests/Backend/Api/Rate/EntityTest.php @@ -53,6 +53,7 @@ public function testGet() $body = (string) $response->getBody(); $expect = <<getBody(); $expect = <<getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_RoleCollection", "totalResults": 3, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Role", "id": 1, "categoryId": 1, "status": 1, "name": "Administrator" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Role", "id": 2, "categoryId": 1, "status": 1, "name": "Backend" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Role", "id": 3, "categoryId": 1, "status": 1, @@ -81,11 +85,13 @@ public function testGetSearch() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_RoleCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Role", "id": 2, "categoryId": 1, "status": 1, @@ -109,23 +115,27 @@ public function testGetCount() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_RoleCollection", "totalResults": 3, "startIndex": 0, "itemsPerPage": 80, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Role", "id": 1, "categoryId": 1, "status": 1, "name": "Administrator" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Role", "id": 2, "categoryId": 1, "status": 1, "name": "Backend" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Role", "id": 3, "categoryId": 1, "status": 1, diff --git a/tests/Backend/Api/Role/EntityTest.php b/tests/Backend/Api/Role/EntityTest.php index e5918c721..0e444eb24 100644 --- a/tests/Backend/Api/Role/EntityTest.php +++ b/tests/Backend/Api/Role/EntityTest.php @@ -51,6 +51,7 @@ public function testGet() $body = (string) $response->getBody(); $expect = <<getBody(); $expect = <<getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_SchemaCollection", "totalResults": 4, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Schema", "id": 4, "status": 1, "name": "Entry-Schema" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Schema", "id": 3, "status": 1, "name": "Collection-Schema", @@ -63,11 +66,13 @@ public function testGet() } }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Schema", "id": 2, "status": 1, "name": "Message" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Schema", "id": 1, "status": 1, "name": "Passthru" @@ -90,11 +95,13 @@ public function testGetSearch() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_SchemaCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Schema", "id": 4, "status": 1, "name": "Entry-Schema" @@ -117,16 +124,19 @@ public function testGetCount() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_SchemaCollection", "totalResults": 4, "startIndex": 0, "itemsPerPage": 80, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Schema", "id": 4, "status": 1, "name": "Entry-Schema" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Schema", "id": 3, "status": 1, "name": "Collection-Schema", @@ -135,11 +145,13 @@ public function testGetCount() } }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Schema", "id": 2, "status": 1, "name": "Message" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Schema", "id": 1, "status": 1, "name": "Passthru" diff --git a/tests/Backend/Api/Schema/Commit/CollectionTest.php b/tests/Backend/Api/Schema/Commit/CollectionTest.php index c03ebf947..00fc0ed39 100644 --- a/tests/Backend/Api/Schema/Commit/CollectionTest.php +++ b/tests/Backend/Api/Schema/Commit/CollectionTest.php @@ -58,11 +58,13 @@ public function testGet() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_SchemaCommitCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_SchemaCommit", "id": 1, "user": { "id": 2, diff --git a/tests/Backend/Api/Schema/EntityTest.php b/tests/Backend/Api/Schema/EntityTest.php index c8340e966..3325a1ebd 100644 --- a/tests/Backend/Api/Schema/EntityTest.php +++ b/tests/Backend/Api/Schema/EntityTest.php @@ -42,6 +42,7 @@ public function testGet() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Schema", "id": 1, "status": 1, "name": "Passthru", @@ -66,6 +67,7 @@ public function testGetByName() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Schema", "id": 1, "status": 1, "name": "Passthru", diff --git a/tests/Backend/Api/Scope/CollectionTest.php b/tests/Backend/Api/Scope/CollectionTest.php index eaf762320..64279a924 100644 --- a/tests/Backend/Api/Scope/CollectionTest.php +++ b/tests/Backend/Api/Scope/CollectionTest.php @@ -42,21 +42,25 @@ public function testGet() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_ScopeCollection", "totalResults": 4, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Scope", "id": 61, "name": "plan_scope", "description": "Plan scope access" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Scope", "id": 60, "name": "bar", "description": "Bar access" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Scope", "id": 59, "name": "foo", "description": "Foo access", @@ -65,6 +69,7 @@ public function testGet() } }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Scope", "id": 5, "name": "default", "description": "" @@ -87,11 +92,13 @@ public function testGetSearch() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_ScopeCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Scope", "id": 59, "name": "foo", "description": "Foo access", @@ -117,21 +124,25 @@ public function testGetCount() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_ScopeCollection", "totalResults": 4, "startIndex": 0, "itemsPerPage": 80, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Scope", "id": 61, "name": "plan_scope", "description": "Plan scope access" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Scope", "id": 60, "name": "bar", "description": "Bar access" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Scope", "id": 59, "name": "foo", "description": "Foo access", @@ -140,6 +151,7 @@ public function testGetCount() } }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Scope", "id": 5, "name": "default", "description": "" diff --git a/tests/Backend/Api/Scope/EntityTest.php b/tests/Backend/Api/Scope/EntityTest.php index 66f2b8656..b198ee65b 100644 --- a/tests/Backend/Api/Scope/EntityTest.php +++ b/tests/Backend/Api/Scope/EntityTest.php @@ -52,6 +52,7 @@ public function testGet() $body = (string) $response->getBody(); $expect = <<getBody(); $expect = <<getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_TaxonomyCollection", "totalResults": 3, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Taxonomy", "id": 1, "status": 1, "name": "feature_a" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Taxonomy", "id": 2, "parentId": 1, "status": 1, "name": "feature_a_a" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Taxonomy", "id": 3, "status": 1, "name": "feature_b" @@ -79,11 +83,13 @@ public function testGetSearch() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_TaxonomyCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Taxonomy", "id": 2, "parentId": 1, "status": 1, @@ -107,22 +113,26 @@ public function testGetCount() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_TaxonomyCollection", "totalResults": 3, "startIndex": 0, "itemsPerPage": 80, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Taxonomy", "id": 1, "status": 1, "name": "feature_a" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Taxonomy", "id": 2, "parentId": 1, "status": 1, "name": "feature_a_a" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Taxonomy", "id": 3, "status": 1, "name": "feature_b" diff --git a/tests/Backend/Api/Taxonomy/EntityTest.php b/tests/Backend/Api/Taxonomy/EntityTest.php index adc65696e..c9d048acb 100644 --- a/tests/Backend/Api/Taxonomy/EntityTest.php +++ b/tests/Backend/Api/Taxonomy/EntityTest.php @@ -51,6 +51,7 @@ public function testGet() $body = (string) $response->getBody(); $expect = <<getBody(); $expect = <<<'JSON' { - "totalResults": 9, + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_TestCollection", + "totalResults": 10, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Test", "id": 10, "status": 4, "operationName": "mime.json", "message": "Expected status code 200 got 500" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Test", "id": 9, "status": 4, "operationName": "mime.form", "message": "Expected status code 200 got 500" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Test", "id": 2, "status": 4, "operationName": "inspect.delete", "message": "Missing parameter \"foo\" in path" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Test", "id": 4, "status": 4, "operationName": "inspect.patch", "message": "Missing parameter \"foo\" in path" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Test", "id": 6, "status": 4, "operationName": "inspect.put", "message": "Missing parameter \"foo\" in path" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Test", "id": 5, "status": 4, "operationName": "inspect.post", "message": "Missing parameter \"foo\" in path" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Test", "id": 3, "status": 4, "operationName": "inspect.get", "message": "Missing parameter \"foo\" in path" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Test", "id": 14, "status": 4, "operationName": "test.createBar", "message": "Expected status code 201 got 402" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Test", "id": 15, "status": 4, "operationName": "test.createFoo", "message": "Expected status code 201 got 402" + }, + { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Test", + "id": 7, + "message": "/ property \"@type\" is unknown", + "operationName": "meta.getAbout", + "status": 4 } ] } diff --git a/tests/Backend/Api/Test/EntityTest.php b/tests/Backend/Api/Test/EntityTest.php index 696d6446b..9d04b24c3 100644 --- a/tests/Backend/Api/Test/EntityTest.php +++ b/tests/Backend/Api/Test/EntityTest.php @@ -43,6 +43,7 @@ public function testGet() $body = (string) $response->getBody(); $expect = <<getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_TriggerCollection", "totalResults": 2, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Trigger", "id": 2, "status": 1, "name": "Second-Trigger", @@ -56,6 +58,7 @@ public function testGet() } }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Trigger", "id": 1, "status": 1, "name": "Test-Trigger", @@ -83,11 +86,13 @@ public function testGetSearch() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_TriggerCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Trigger", "id": 1, "status": 1, "name": "Test-Trigger", @@ -115,11 +120,13 @@ public function testGetTaxonomy() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_TriggerCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Trigger", "id": 2, "status": 1, "name": "Second-Trigger", @@ -147,11 +154,13 @@ public function testGetCount() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_TriggerCollection", "totalResults": 2, "startIndex": 0, "itemsPerPage": 80, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Trigger", "id": 2, "status": 1, "name": "Second-Trigger", @@ -162,6 +171,7 @@ public function testGetCount() } }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Trigger", "id": 1, "status": 1, "name": "Test-Trigger", diff --git a/tests/Backend/Api/Trigger/EntityTest.php b/tests/Backend/Api/Trigger/EntityTest.php index 9d4a84146..a9e44c9c3 100644 --- a/tests/Backend/Api/Trigger/EntityTest.php +++ b/tests/Backend/Api/Trigger/EntityTest.php @@ -42,6 +42,7 @@ public function testGet() $body = (string) $response->getBody(); $expect = <<getBody(); $expect = <<getBody(); $expect = <<eventId}, "userId": 2, @@ -63,6 +65,7 @@ public function testGet() "endpoint": "http:\/\/www.fusio-project.org\/ping" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Backend_Webhook", "id": 1, "eventId": {$this->eventId}, "userId": 1, diff --git a/tests/Backend/Api/Webhook/EntityTest.php b/tests/Backend/Api/Webhook/EntityTest.php index f7ce0fd96..c85cbafbc 100644 --- a/tests/Backend/Api/Webhook/EntityTest.php +++ b/tests/Backend/Api/Webhook/EntityTest.php @@ -54,6 +54,7 @@ public function testGet() $expect = <<eventId}, "userId": 1, diff --git a/tests/Consumer/Api/App/CollectionTest.php b/tests/Consumer/Api/App/CollectionTest.php index c15f7fc7b..dad3b65e4 100644 --- a/tests/Consumer/Api/App/CollectionTest.php +++ b/tests/Consumer/Api/App/CollectionTest.php @@ -45,11 +45,13 @@ public function testGet() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_AppCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_App", "id": 3, "userId": 2, "status": 1, @@ -95,11 +97,13 @@ public function testGetSearch() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_AppCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_App", "id": 3, "userId": 2, "status": 1, diff --git a/tests/Consumer/Api/App/EntityTest.php b/tests/Consumer/Api/App/EntityTest.php index e93fb28ab..968356aab 100644 --- a/tests/Consumer/Api/App/EntityTest.php +++ b/tests/Consumer/Api/App/EntityTest.php @@ -51,6 +51,7 @@ public function testGet() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_App", "id": 3, "userId": 2, "status": 1, diff --git a/tests/Consumer/Api/Event/CollectionTest.php b/tests/Consumer/Api/Event/CollectionTest.php index facd5f6d3..141843084 100644 --- a/tests/Consumer/Api/Event/CollectionTest.php +++ b/tests/Consumer/Api/Event/CollectionTest.php @@ -54,11 +54,13 @@ public function testGet() $expect = <<eventFooId}, "status": 1, "name": "foo-event", @@ -68,6 +70,7 @@ public function testGet() } }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Event", "id": {$this->eventSecondId}, "status": 1, "name": "second-event", @@ -95,11 +98,13 @@ public function testGetSearch() $expect = <<eventFooId}, "status": 1, "name": "foo-event", diff --git a/tests/Consumer/Api/Event/EntityTest.php b/tests/Consumer/Api/Event/EntityTest.php index 398e3994c..582411e69 100644 --- a/tests/Consumer/Api/Event/EntityTest.php +++ b/tests/Consumer/Api/Event/EntityTest.php @@ -52,6 +52,7 @@ public function testGet() $expect = <<eventId}, "status": 1, "name": "foo-event", @@ -77,6 +78,7 @@ public function testGetByName() $expect = <<eventId}, "status": 1, "name": "foo-event", diff --git a/tests/Consumer/Api/Form/CollectionTest.php b/tests/Consumer/Api/Form/CollectionTest.php index ddc05955f..950a33c93 100644 --- a/tests/Consumer/Api/Form/CollectionTest.php +++ b/tests/Consumer/Api/Form/CollectionTest.php @@ -42,11 +42,13 @@ public function testGet() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_FormCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Form", "id": 1, "status": 1, "name": "my_form", @@ -73,11 +75,13 @@ public function testGetSearch() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_FormCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Form", "id": 1, "status": 1, "name": "my_form", diff --git a/tests/Consumer/Api/Form/EntityTest.php b/tests/Consumer/Api/Form/EntityTest.php index 12ba4cd52..375f8f0a5 100644 --- a/tests/Consumer/Api/Form/EntityTest.php +++ b/tests/Consumer/Api/Form/EntityTest.php @@ -42,6 +42,7 @@ public function testGet() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Form", "id": 1, "status": 1, "name": "my_form", @@ -89,6 +90,7 @@ public function testGetByName() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Form", "id": 1, "status": 1, "name": "my_form", diff --git a/tests/Consumer/Api/Grant/CollectionTest.php b/tests/Consumer/Api/Grant/CollectionTest.php index f7d9d345b..d9f88d26e 100644 --- a/tests/Consumer/Api/Grant/CollectionTest.php +++ b/tests/Consumer/Api/Grant/CollectionTest.php @@ -42,11 +42,13 @@ public function testGet() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_GrantCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Grant", "id": 1, "allow": 1, "createDate": "2015-02-27T19:59:15Z", diff --git a/tests/Consumer/Api/Identity/CollectionTest.php b/tests/Consumer/Api/Identity/CollectionTest.php index 8f0f77036..1f3cee0d6 100644 --- a/tests/Consumer/Api/Identity/CollectionTest.php +++ b/tests/Consumer/Api/Identity/CollectionTest.php @@ -42,29 +42,34 @@ public function testGet() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_IdentityCollection", "totalResults": 4, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Identity", "id": 1, "name": "Facebook", "icon": "bi-facebook", "redirect": "http:\/\/127.0.0.1\/consumer\/identity\/1\/redirect" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Identity", "id": 2, "name": "GitHub", "icon": "bi-github", "redirect": "http:\/\/127.0.0.1\/consumer\/identity\/2\/redirect" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Identity", "id": 3, "name": "Google", "icon": "bi-google", "redirect": "http:\/\/127.0.0.1\/consumer\/identity\/3\/redirect" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Identity", "id": 4, "name": "OpenID", "icon": "bi-openid", @@ -89,6 +94,7 @@ public function testGetSpecificApp() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_IdentityCollection", "totalResults": 0, "startIndex": 0, "itemsPerPage": 16 diff --git a/tests/Consumer/Api/Log/CollectionTest.php b/tests/Consumer/Api/Log/CollectionTest.php index 0f074d7ab..3ff130197 100644 --- a/tests/Consumer/Api/Log/CollectionTest.php +++ b/tests/Consumer/Api/Log/CollectionTest.php @@ -44,11 +44,13 @@ public function testGet() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_LogCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Log", "id": 1, "appId": 3, "ip": "127.0.0.1", diff --git a/tests/Consumer/Api/Log/EntityTest.php b/tests/Consumer/Api/Log/EntityTest.php index 196a96b35..84404f3f9 100644 --- a/tests/Consumer/Api/Log/EntityTest.php +++ b/tests/Consumer/Api/Log/EntityTest.php @@ -44,6 +44,7 @@ public function testGet() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Log", "id": 1, "appId": 3, "ip": "127.0.0.1", diff --git a/tests/Consumer/Api/Page/CollectionTest.php b/tests/Consumer/Api/Page/CollectionTest.php index a2ab88243..7b0b22915 100644 --- a/tests/Consumer/Api/Page/CollectionTest.php +++ b/tests/Consumer/Api/Page/CollectionTest.php @@ -43,35 +43,41 @@ public function testGet() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_PageCollection", "totalResults": 5, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Page", "id": 3, "title": "API", "slug": "api", "date": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Page", "id": 4, "title": "Authorization", "slug": "authorization", "date": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Page", "id": 2, "title": "Getting started", "slug": "getting-started", "date": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Page", "id": 6, "title": "SDK", "slug": "sdk", "date": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Page", "id": 5, "title": "Support", "slug": "support", diff --git a/tests/Consumer/Api/Page/EntityTest.php b/tests/Consumer/Api/Page/EntityTest.php index 46a91790e..a8c4fe93d 100644 --- a/tests/Consumer/Api/Page/EntityTest.php +++ b/tests/Consumer/Api/Page/EntityTest.php @@ -43,6 +43,7 @@ public function testGet() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Page", "id": 1, "title": "Overview", "slug": "overview", @@ -67,6 +68,7 @@ public function testGetByName() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Page", "id": 1, "title": "Overview", "slug": "overview", diff --git a/tests/Consumer/Api/Plan/CollectionTest.php b/tests/Consumer/Api/Plan/CollectionTest.php index 013bf4fba..bb4b16cb7 100644 --- a/tests/Consumer/Api/Plan/CollectionTest.php +++ b/tests/Consumer/Api/Plan/CollectionTest.php @@ -42,11 +42,13 @@ public function testGet() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_PlanCollection", "totalResults": 2, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Plan", "id": 1, "name": "Plan A", "description": "", @@ -58,6 +60,7 @@ public function testGet() } }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Plan", "id": 2, "name": "Plan B", "description": "", diff --git a/tests/Consumer/Api/Plan/EntityTest.php b/tests/Consumer/Api/Plan/EntityTest.php index 72e126d70..83f512f4b 100644 --- a/tests/Consumer/Api/Plan/EntityTest.php +++ b/tests/Consumer/Api/Plan/EntityTest.php @@ -41,6 +41,7 @@ public function testGet() $body = (string) $response->getBody(); $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Plan", "id": 1, "name": "Plan A", "description": "", diff --git a/tests/Consumer/Api/Scope/CollectionTest.php b/tests/Consumer/Api/Scope/CollectionTest.php index 47da7a40d..96a15f111 100644 --- a/tests/Consumer/Api/Scope/CollectionTest.php +++ b/tests/Consumer/Api/Scope/CollectionTest.php @@ -54,16 +54,19 @@ public function testGet() $expect = <<scopeBarId}, "name": "bar", "description": "Bar access" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Scope", "id": {$this->scopeFooId}, "name": "foo", "description": "Foo access", diff --git a/tests/Consumer/Api/Token/CollectionTest.php b/tests/Consumer/Api/Token/CollectionTest.php index 53ccab01d..93dd705e3 100644 --- a/tests/Consumer/Api/Token/CollectionTest.php +++ b/tests/Consumer/Api/Token/CollectionTest.php @@ -45,11 +45,13 @@ public function testGet() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_TokenCollection", "totalResults": 4, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Token", "id": 7, "status": 1, "name": "Foo-App\/Expired", @@ -61,6 +63,7 @@ public function testGet() "date": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Token", "id": 5, "status": 1, "name": "Developer\/Consumer", @@ -72,6 +75,7 @@ public function testGet() "date": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Token", "id": 3, "status": 1, "name": "Foo-App\/Consumer", @@ -83,6 +87,7 @@ public function testGet() "date": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Token", "id": 2, "status": 1, "name": "Developer\/Consumer", @@ -114,11 +119,13 @@ public function testGetSearch() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_TokenCollection", "totalResults": 2, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Token", "id": 7, "status": 1, "name": "Foo-App\/Expired", @@ -130,6 +137,7 @@ public function testGetSearch() "date": "[datetime]" }, { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Token", "id": 3, "status": 1, "name": "Foo-App\/Consumer", diff --git a/tests/Consumer/Api/Token/EntityTest.php b/tests/Consumer/Api/Token/EntityTest.php index 8c163512f..8df45ac22 100644 --- a/tests/Consumer/Api/Token/EntityTest.php +++ b/tests/Consumer/Api/Token/EntityTest.php @@ -50,6 +50,7 @@ public function testGet() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Token", "id": 2, "status": 1, "name": "Developer\/Consumer", diff --git a/tests/Consumer/Api/Transaction/CollectionTest.php b/tests/Consumer/Api/Transaction/CollectionTest.php index 63f6f6b19..53b4fc4cc 100644 --- a/tests/Consumer/Api/Transaction/CollectionTest.php +++ b/tests/Consumer/Api/Transaction/CollectionTest.php @@ -44,11 +44,13 @@ public function testGet() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_TransactionCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Transaction", "id": 1, "userId": 2, "planId": 2, @@ -79,11 +81,13 @@ public function testGetSearch() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_TransactionCollection", "totalResults": 1, "startIndex": 0, "itemsPerPage": 16, "entry": [ { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Transaction", "id": 1, "userId": 2, "planId": 2, diff --git a/tests/Consumer/Api/Transaction/EntityTest.php b/tests/Consumer/Api/Transaction/EntityTest.php index 2aa7d7081..4850a0826 100644 --- a/tests/Consumer/Api/Transaction/EntityTest.php +++ b/tests/Consumer/Api/Transaction/EntityTest.php @@ -44,6 +44,7 @@ public function testGet() $expect = <<<'JSON' { + "@type": "https://typehub.cloud/s/fusio/sdk/7.0.7/Consumer_Transaction", "id": 1, "userId": 2, "planId": 2, diff --git a/tests/Consumer/Api/User/AccountTest.php b/tests/Consumer/Api/User/AccountTest.php index de495c7bc..b98554750 100644 --- a/tests/Consumer/Api/User/AccountTest.php +++ b/tests/Consumer/Api/User/AccountTest.php @@ -44,6 +44,7 @@ public function testGet() $expect = <<getBody(); $expect = <<getBody(); $expect = <<