Skip to content
Snippets Groups Projects
Commit f8294d5f authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Add the base prefix to the json API

This adds the prefix to the URLs and the short name
parent e7b0caca
Branches
No related tags found
No related merge requests found
Pipeline #58581 passed
...@@ -12,7 +12,7 @@ use Symfony\Component\Serializer\Annotation\Groups; ...@@ -12,7 +12,7 @@ use Symfony\Component\Serializer\Annotation\Groups;
* @ApiResource( * @ApiResource(
* collectionOperations={ * collectionOperations={
* "get" = { * "get" = {
* "path" = "/organizations", * "path" = "/base/organizations",
* "openapi_context" = { * "openapi_context" = {
* "tags" = {"BaseOrganization"}, * "tags" = {"BaseOrganization"},
* "parameters" = { * "parameters" = {
...@@ -22,7 +22,7 @@ use Symfony\Component\Serializer\Annotation\Groups; ...@@ -22,7 +22,7 @@ use Symfony\Component\Serializer\Annotation\Groups;
* }, * },
* "get_orgs" = { * "get_orgs" = {
* "method" = "GET", * "method" = "GET",
* "path" = "/people/{identifier}/organizations", * "path" = "/base/people/{identifier}/organizations",
* "controller" = GetOrganizationsByPerson::class, * "controller" = GetOrganizationsByPerson::class,
* "read" = false, * "read" = false,
* "openapi_context" = { * "openapi_context" = {
...@@ -38,7 +38,7 @@ use Symfony\Component\Serializer\Annotation\Groups; ...@@ -38,7 +38,7 @@ use Symfony\Component\Serializer\Annotation\Groups;
* }, * },
* itemOperations={ * itemOperations={
* "get" = { * "get" = {
* "path" = "/organizations/{identifier}", * "path" = "/base/organizations/{identifier}",
* "openapi_context" = { * "openapi_context" = {
* "tags" = {"BaseOrganization"}, * "tags" = {"BaseOrganization"},
* "parameters" = { * "parameters" = {
...@@ -49,6 +49,7 @@ use Symfony\Component\Serializer\Annotation\Groups; ...@@ -49,6 +49,7 @@ use Symfony\Component\Serializer\Annotation\Groups;
* }, * },
* }, * },
* iri="http://schema.org/Organization", * iri="http://schema.org/Organization",
* shortName="BaseOrganization",
* description="An organization", * description="An organization",
* normalizationContext={ * normalizationContext={
* "jsonld_embed_context" = true, * "jsonld_embed_context" = true,
......
...@@ -14,9 +14,9 @@ class ExtTest extends ApiTestCase ...@@ -14,9 +14,9 @@ class ExtTest extends ApiTestCase
$client = self::createClient(); $client = self::createClient();
$endpoints = [ $endpoints = [
// FIXME: '/people/foo/organizations', '/base/people/foo/organizations',
'/organizations', '/base/organizations',
'/organizations/foo', '/base/organizations/foo',
]; ];
foreach ($endpoints as $path) { foreach ($endpoints as $path) {
$response = $client->request('GET', $path); $response = $client->request('GET', $path);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment