diff --git a/composer.json b/composer.json index 6e0bde74089201affe0ad31fa9b59b5470ad3142..c30d603d50060fb562c96e0d6d5af517929073d2 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "php": ">=7.3", "ext-json": "*", "api-platform/core": "^2.6", - "dbp/relay-core-bundle": "^0.1.38", + "dbp/relay-core-bundle": "^0.1.48", "symfony/config": "^5.4", "symfony/framework-bundle": "^5.4", "symfony/security-bundle": "^5.4", diff --git a/composer.lock b/composer.lock index f6abe5df764b55e42d3a557f352f9b1124013f9a..abef98efc3dc454b0cd3327944a731e6d6388abe 100644 --- a/composer.lock +++ b/composer.lock @@ -4,28 +4,28 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "76db1d28fcb95ca8a0c51b6cf645aede", + "content-hash": "f2b6220bd46c3a92db57fed7c556fcf1", "packages": [ { "name": "api-platform/core", - "version": "v2.7.2", + "version": "v2.6.8", "source": { "type": "git", "url": "https://github.com/api-platform/core.git", - "reference": "80c3f3c38b9ac234bde0cbc2b77d6628326bdefc" + "reference": "ff3aab5b196709c721960c0bb4f1d52759af737d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/api-platform/core/zipball/80c3f3c38b9ac234bde0cbc2b77d6628326bdefc", - "reference": "80c3f3c38b9ac234bde0cbc2b77d6628326bdefc", + "url": "https://api.github.com/repos/api-platform/core/zipball/ff3aab5b196709c721960c0bb4f1d52759af737d", + "reference": "ff3aab5b196709c721960c0bb4f1d52759af737d", "shasum": "" }, "require": { "doctrine/inflector": "^1.0 || ^2.0", + "fig/link-util": "^1.0", "php": ">=7.1", "psr/cache": "^1.0 || ^2.0 || ^3.0", "psr/container": "^1.0 || ^2.0", - "symfony/deprecation-contracts": "^2.1 || ^3.0", "symfony/http-foundation": "^4.4 || ^5.1 || ^6.0", "symfony/http-kernel": "^4.4 || ^5.1 || ^6.0", "symfony/property-access": "^3.4.19 || ^4.4 || ^5.1 || ^6.0", @@ -38,8 +38,7 @@ "doctrine/common": "<2.7", "doctrine/dbal": "<2.10", "doctrine/mongodb-odm": "<2.2", - "doctrine/persistence": "<1.3", - "elasticsearch/elasticsearch": ">=8.0" + "doctrine/persistence": "<1.3" }, "require-dev": { "behat/behat": "^3.1", @@ -53,7 +52,7 @@ "doctrine/mongodb-odm": "^2.2", "doctrine/mongodb-odm-bundle": "^4.0", "doctrine/orm": "^2.6.4", - "elasticsearch/elasticsearch": "^7.11.0", + "elasticsearch/elasticsearch": "^6.0 || ^7.0", "friends-of-behat/mink-browserkit-driver": "^1.3.1", "friends-of-behat/mink-extension": "^2.2", "friends-of-behat/symfony-extension": "^2.1", @@ -62,7 +61,6 @@ "justinrainbow/json-schema": "^5.2.1", "phpdocumentor/reflection-docblock": "^3.0 || ^4.0 || ^5.1", "phpdocumentor/type-resolver": "^0.3 || ^0.4 || ^1.4", - "phpspec/prophecy": "^1.10", "phpstan/extension-installer": "^1.1", "phpstan/phpstan": "^1.1", "phpstan/phpstan-doctrine": "^1.0", @@ -89,8 +87,6 @@ "symfony/form": "^3.4 || ^4.4 || ^5.1 || ^6.0", "symfony/framework-bundle": "^4.4 || ^5.1 || ^6.0", "symfony/http-client": "^4.4 || ^5.1 || ^6.0", - "symfony/intl": "^4.4 || ^5.3 || ^6.0", - "symfony/maker-bundle": "^1.24", "symfony/mercure-bundle": "*", "symfony/messenger": "^4.4 || ^5.1 || ^6.0", "symfony/phpunit-bridge": "^5.4 || ^6.0", @@ -107,6 +103,7 @@ "suggest": { "doctrine/mongodb-odm-bundle": "To support MongoDB. Only versions 4.0 and later are supported.", "elasticsearch/elasticsearch": "To support Elasticsearch.", + "guzzlehttp/guzzle": "To use the HTTP cache invalidation system.", "ocramius/package-versions": "To display the API Platform's version in the debug bar.", "phpdocumentor/reflection-docblock": "To support extracting metadata from PHPDoc.", "psr/cache-implementation": "To use metadata caching.", @@ -114,8 +111,6 @@ "symfony/cache": "To have metadata caching when using Symfony integration.", "symfony/config": "To load XML configuration files.", "symfony/expression-language": "To use authorization features.", - "symfony/http-client": "To use the HTTP cache invalidation system.", - "symfony/messenger": "To support messenger integration.", "symfony/security": "To use authorization features.", "symfony/twig-bundle": "To use the Swagger UI integration.", "symfony/uid": "To support Symfony UUID/ULID identifiers.", @@ -125,18 +120,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.7.x-dev" + "dev-main": "2.6.x-dev" }, "symfony": { "require": "^3.4 || ^4.4 || ^5.1 || ^6.0" } }, "autoload": { - "files": [ - "src/deprecation.php" - ], "psr-4": { - "ApiPlatform\\": "src/" + "ApiPlatform\\Core\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -165,7 +157,7 @@ ], "support": { "issues": "https://github.com/api-platform/core/issues", - "source": "https://github.com/api-platform/core/tree/v2.7.2" + "source": "https://github.com/api-platform/core/tree/v2.6.8" }, "funding": [ { @@ -173,64 +165,58 @@ "type": "tidelift" } ], - "time": "2022-10-07T09:12:23+00:00" + "time": "2022-01-11T10:29:54+00:00" }, { "name": "dbp/relay-core-bundle", - "version": "v0.1.42", + "version": "v0.1.48", "source": { "type": "git", - "url": "https://gitlab.tugraz.at/dbp/relay/dbp-relay-core-bundle.git", - "reference": "6ae27634574cff5f08ef2ff6cbb3cf72c155cf20" - }, - "dist": { - "type": "zip", - "url": "https://gitlab.tugraz.at/api/v4/projects/dbp%2Frelay%2Fdbp-relay-core-bundle/repository/archive.zip?sha=6ae27634574cff5f08ef2ff6cbb3cf72c155cf20", - "reference": "6ae27634574cff5f08ef2ff6cbb3cf72c155cf20", - "shasum": "" + "url": "git@gitlab.tugraz.at:dbp/relay/dbp-relay-core-bundle.git", + "reference": "022cfbb04346c7dbc0b988c61246d9f3ffa53b33" }, "require": { - "api-platform/core": "^2.6.6", - "doctrine/annotations": "^1.0", - "dragonmantank/cron-expression": "^3.1", + "api-platform/core": "^2.6.8 <2.7.0", + "doctrine/annotations": "^1.13", + "dragonmantank/cron-expression": "^3.3", "ext-fileinfo": "*", "ext-json": "*", - "guzzlehttp/guzzle": "^7.0", + "guzzlehttp/guzzle": "^7.5", "kevinrob/guzzle-cache-middleware": "^4.0", - "league/uri": "^6.5", - "nelmio/cors-bundle": "^2.1.0", - "php": "^7.3 || ^8.0", + "nelmio/cors-bundle": "^2.2", + "php": ">=7.3", "phpdocumentor/reflection-docblock": "^3.0 || ^4.0 || ^5.0", - "symfony/asset": "^5.3", - "symfony/config": "^5.3", - "symfony/event-dispatcher": "^5.3", - "symfony/expression-language": "^5.3", + "symfony/asset": "^5.4", + "symfony/config": "^5.4", + "symfony/event-dispatcher": "^5.4", + "symfony/expression-language": "^5.4", "symfony/framework-bundle": "^5.4", "symfony/lock": "^5.4", - "symfony/messenger": "^5.3", - "symfony/mime": "^5.3", - "symfony/security-bundle": "^5.3", - "symfony/security-core": "^5.3", - "symfony/security-guard": "^5.3", - "symfony/twig-bundle": "^5.3", + "symfony/messenger": "^5.4", + "symfony/mime": "^5.4", + "symfony/process": "^5.4", + "symfony/security-bundle": "^5.4", + "symfony/security-core": "^5.4", + "symfony/security-guard": "^5.4", + "symfony/twig-bundle": "^5.4", "symfony/uid": "^5.4", - "symfony/validator": "^5.3", - "symfony/yaml": "^5.3" + "symfony/validator": "^5.4", + "symfony/yaml": "^5.4" }, "conflict": { "symfony/dependency-injection": "5.3.7" }, "require-dev": { - "brainmaestro/composer-git-hooks": "^2.8", - "friendsofphp/php-cs-fixer": "^3.0", - "phpstan/phpstan": "^1.0.0", - "phpstan/phpstan-phpunit": "^1.0.0", - "phpstan/phpstan-symfony": "^1.2", - "phpunit/phpunit": "^9", - "symfony/browser-kit": "^5.3", - "symfony/http-client": "^5.3", - "symfony/phpunit-bridge": "^5.3", - "vimeo/psalm": "^4.4" + "brainmaestro/composer-git-hooks": "^2.8.5", + "friendsofphp/php-cs-fixer": "^3.4", + "phpstan/phpstan": "^1.8.6", + "phpstan/phpstan-phpunit": "^1.1.1", + "phpstan/phpstan-symfony": "^1.2.13", + "phpunit/phpunit": "^9.5.25", + "symfony/browser-kit": "^5.4.11", + "symfony/http-client": "^5.4.13", + "symfony/phpunit-bridge": "^5.4.11", + "vimeo/psalm": "^4.27" }, "type": "symfony-bundle", "extra": { @@ -285,11 +271,7 @@ "AGPL-3.0-or-later" ], "description": "The core bundle of the Relay API gateway", - "support": { - "source": "https://gitlab.tugraz.at/dbp/relay/dbp-relay-core-bundle/-/tree/v0.1.42", - "issues": "https://gitlab.tugraz.at/dbp/relay/dbp-relay-core-bundle/-/issues" - }, - "time": "2022-09-14T12:25:56+02:00" + "time": "2022-10-27T08:18:30+00:00" }, { "name": "doctrine/annotations", @@ -592,6 +574,67 @@ ], "time": "2022-09-10T18:51:20+00:00" }, + { + "name": "fig/link-util", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/link-util.git", + "reference": "5d7b8d04ed3393b4b59968ca1e906fb7186d81e8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/link-util/zipball/5d7b8d04ed3393b4b59968ca1e906fb7186d81e8", + "reference": "5d7b8d04ed3393b4b59968ca1e906fb7186d81e8", + "shasum": "" + }, + "require": { + "php": ">=5.5.0", + "psr/link": "~1.0@dev" + }, + "provide": { + "psr/link-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.1", + "squizlabs/php_codesniffer": "^2.3.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Fig\\Link\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common utility implementations for HTTP links", + "keywords": [ + "http", + "http-link", + "link", + "psr", + "psr-13", + "rest" + ], + "support": { + "issues": "https://github.com/php-fig/link-util/issues", + "source": "https://github.com/php-fig/link-util/tree/1.1.2" + }, + "time": "2021-02-03T23:36:04+00:00" + }, { "name": "guzzlehttp/guzzle", "version": "7.5.0", @@ -806,16 +849,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.4.1", + "version": "2.4.3", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379" + "reference": "67c26b443f348a51926030c83481b85718457d3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/69568e4293f4fa993f3b0e51c9723e1e17c41379", - "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/67c26b443f348a51926030c83481b85718457d3d", + "reference": "67c26b443f348a51926030c83481b85718457d3d", "shasum": "" }, "require": { @@ -905,7 +948,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.4.1" + "source": "https://github.com/guzzle/psr7/tree/2.4.3" }, "funding": [ { @@ -921,7 +964,7 @@ "type": "tidelift" } ], - "time": "2022-08-28T14:45:39+00:00" + "time": "2022-10-26T14:07:24+00:00" }, { "name": "kevinrob/guzzle-cache-middleware", @@ -1007,173 +1050,6 @@ }, "time": "2022-03-15T21:47:10+00:00" }, - { - "name": "league/uri", - "version": "6.5.0", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/uri.git", - "reference": "c68ca445abb04817d740ddd6d0b3551826ef0c5a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/c68ca445abb04817d740ddd6d0b3551826ef0c5a", - "reference": "c68ca445abb04817d740ddd6d0b3551826ef0c5a", - "shasum": "" - }, - "require": { - "ext-json": "*", - "league/uri-interfaces": "^2.3", - "php": "^7.3 || ^8.0", - "psr/http-message": "^1.0" - }, - "conflict": { - "league/uri-schemes": "^1.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.19 || ^3.0", - "phpstan/phpstan": "^0.12.90", - "phpstan/phpstan-phpunit": "^0.12.22", - "phpstan/phpstan-strict-rules": "^0.12.11", - "phpunit/phpunit": "^8.0 || ^9.0", - "psr/http-factory": "^1.0" - }, - "suggest": { - "ext-fileinfo": "Needed to create Data URI from a filepath", - "ext-intl": "Needed to improve host validation", - "league/uri-components": "Needed to easily manipulate URI objects", - "psr/http-factory": "Needed to use the URI factory" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.x-dev" - } - }, - "autoload": { - "psr-4": { - "League\\Uri\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ignace Nyamagana Butera", - "email": "nyamsprod@gmail.com", - "homepage": "https://nyamsprod.com" - } - ], - "description": "URI manipulation library", - "homepage": "http://uri.thephpleague.com", - "keywords": [ - "data-uri", - "file-uri", - "ftp", - "hostname", - "http", - "https", - "middleware", - "parse_str", - "parse_url", - "psr-7", - "query-string", - "querystring", - "rfc3986", - "rfc3987", - "rfc6570", - "uri", - "uri-template", - "url", - "ws" - ], - "support": { - "docs": "https://uri.thephpleague.com", - "forum": "https://thephpleague.slack.com", - "issues": "https://github.com/thephpleague/uri/issues", - "source": "https://github.com/thephpleague/uri/tree/6.5.0" - }, - "funding": [ - { - "url": "https://github.com/sponsors/nyamsprod", - "type": "github" - } - ], - "time": "2021-08-27T09:54:07+00:00" - }, - { - "name": "league/uri-interfaces", - "version": "2.3.0", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/uri-interfaces.git", - "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/00e7e2943f76d8cb50c7dfdc2f6dee356e15e383", - "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383", - "shasum": "" - }, - "require": { - "ext-json": "*", - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.19", - "phpstan/phpstan": "^0.12.90", - "phpstan/phpstan-phpunit": "^0.12.19", - "phpstan/phpstan-strict-rules": "^0.12.9", - "phpunit/phpunit": "^8.5.15 || ^9.5" - }, - "suggest": { - "ext-intl": "to use the IDNA feature", - "symfony/intl": "to use the IDNA feature via Symfony Polyfill" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "League\\Uri\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ignace Nyamagana Butera", - "email": "nyamsprod@gmail.com", - "homepage": "https://nyamsprod.com" - } - ], - "description": "Common interface for URI representation", - "homepage": "http://github.com/thephpleague/uri-interfaces", - "keywords": [ - "rfc3986", - "rfc3987", - "uri", - "url" - ], - "support": { - "issues": "https://github.com/thephpleague/uri-interfaces/issues", - "source": "https://github.com/thephpleague/uri-interfaces/tree/2.3.0" - }, - "funding": [ - { - "url": "https://github.com/sponsors/nyamsprod", - "type": "github" - } - ], - "time": "2021-06-28T04:27:21+00:00" - }, { "name": "nelmio/cors-bundle", "version": "2.2.0", @@ -4381,6 +4257,68 @@ ], "time": "2022-05-24T11:49:31+00:00" }, + { + "name": "symfony/process", + "version": "v5.4.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/6e75fe6874cbc7e4773d049616ab450eff537bf1", + "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v5.4.11" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-06-27T16:58:25+00:00" + }, { "name": "symfony/property-access", "version": "v5.4.11", @@ -9854,68 +9792,6 @@ ], "time": "2022-10-07T08:01:20+00:00" }, - { - "name": "symfony/process", - "version": "v5.4.11", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/6e75fe6874cbc7e4773d049616ab450eff537bf1", - "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Executes commands in sub-processes", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/process/tree/v5.4.11" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-06-27T16:58:25+00:00" - }, { "name": "symfony/stopwatch", "version": "v5.4.13", @@ -10201,5 +10077,5 @@ "platform-overrides": { "php": "7.3" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.2.0" } diff --git a/src/DataProvider/CourseDataProvider.php b/src/DataProvider/CourseDataProvider.php new file mode 100644 index 0000000000000000000000000000000000000000..b15d5d9040d25a1a9956689ca1c6d178b81c5755 --- /dev/null +++ b/src/DataProvider/CourseDataProvider.php @@ -0,0 +1,47 @@ +<?php + +declare(strict_types=1); + +namespace Dbp\Relay\BaseCourseBundle\DataProvider; + +use Dbp\Relay\BaseCourseBundle\API\CourseProviderInterface; +use Dbp\Relay\BaseCourseBundle\Entity\Course; +use Dbp\Relay\CoreBundle\DataProvider\AbstractDataProvider; +use Symfony\Component\HttpFoundation\RequestStack; + +class CourseDataProvider extends AbstractDataProvider +{ + /** @var CourseProviderInterface */ + private $courseProvider; + + public function __construct(CourseProviderInterface $courseProvider, RequestStack $requestStack) + { + parent::__construct($requestStack); + + $this->courseProvider = $courseProvider; + } + + protected function getResourceClass(): string + { + return Course::class; + } + + protected function getItemById($id, array $options = []): object + { + return $this->courseProvider->getCourseById($id, $options); + } + + protected function getPage(int $currentPageNumber, int $maxNumItemsPerPage, array $filters = [], array $options = []): array + { + if ($search = ($filters['search'] ?? null)) { + $options['search'] = $search; + } + + // TODO: change getCourses to accept $currentPageNumber and $maxNumItemsPerPage as arguments and return page items as array + $options['page'] = $currentPageNumber; + $options['perPage'] = $maxNumItemsPerPage; + $options['partialPagination'] = true; + + return $this->courseProvider->getCourses($options)->getItems(); + } +} diff --git a/src/Entity/Course.php b/src/Entity/Course.php index 7d2a0c55b22d06d008c73fdcdc266f4bac08a655..c12ce988d15f0f851517cdf6c713b456aa8bdeab 100644 --- a/src/Entity/Course.php +++ b/src/Entity/Course.php @@ -19,10 +19,8 @@ use Dbp\Relay\CoreBundle\LocalData\LocalDataAwareTrait; * "tags" = {"BaseCourse"}, * "parameters" = { * {"name" = "search", "in" = "query", "description" = "Search filter (partial, case-insensitive text search on 'name' attribute)", "type" = "string", "required" = false}, - * {"name" = "lang", "in" = "query", "description" = "Language of result", "type" = "string", "enum" = {"de", "en"}, "example" = "de"}, - * {"name" = "queryLocal", "in" = "query", "description" = "Local query parameters to apply", "type" = "string"}, - * {"name" = "includeLocal", "in" = "query", "description" = "Local data attributes to include", "type" = "string", "example" = "BaseCourse.code,BaseCourse.numberOfCredits"}, - * {"name" = "partialPagination", "in" = "query", "description" = "Partial pagination", "type" = "bool", "example" = "false"} + * {"name" = "queryLocal", "in" = "query", "description" = "Local query parameters to apply", "type" = "string", "example" = "term:W"}, + * {"name" = "includeLocal", "in" = "query", "description" = "Local data attributes to include", "type" = "string", "example" = "code,numberOfCredits"} * } * } * } @@ -35,8 +33,7 @@ use Dbp\Relay\CoreBundle\LocalData\LocalDataAwareTrait; * "tags" = {"BaseCourse"}, * "parameters" = { * {"name" = "identifier", "in" = "path", "description" = "Resource identifier", "required" = true, "type" = "string", "example" = "257571"}, - * {"name" = "lang", "in" = "query", "description" = "Language of result", "type" = "string", "enum" = {"de", "en"}, "example" = "de"}, - * {"name" = "includeLocal", "in" = "query", "description" = "Local data attributes to include", "type" = "string", "example" = "BaseCourse.code,BaseCourse.numberOfCredits"} + * {"name" = "includeLocal", "in" = "query", "description" = "Local data attributes to include", "type" = "string", "example" = "code,numberOfCredits"} * } * } * } diff --git a/src/Resources/config/services.yaml b/src/Resources/config/services.yaml index a72592008bc461aceb2cb7180365ab7bf5b85f6d..a59530503f9dfe34ad0bbe2c07b53a1d6a8b8b49 100644 --- a/src/Resources/config/services.yaml +++ b/src/Resources/config/services.yaml @@ -1,11 +1,9 @@ services: - Dbp\Relay\BaseCourseBundle\Controller\: - resource: '../../Controller' + Dbp\Relay\BaseCourseBundle\Controller\GetAttendeesByCourse: autoconfigure: true autowire: true - Dbp\Relay\BaseCourseBundle\DataProvider\: - resource: '../../DataProvider' + Dbp\Relay\BaseCourseBundle\DataProvider\CourseDataProvider: autowire: true autoconfigure: true