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
Tags v0.1.4
No related merge requests found
Pipeline #58581 passed
......@@ -12,7 +12,7 @@ use Symfony\Component\Serializer\Annotation\Groups;
* @ApiResource(
* collectionOperations={
* "get" = {
* "path" = "/organizations",
* "path" = "/base/organizations",
* "openapi_context" = {
* "tags" = {"BaseOrganization"},
* "parameters" = {
......@@ -22,7 +22,7 @@ use Symfony\Component\Serializer\Annotation\Groups;
* },
* "get_orgs" = {
* "method" = "GET",
* "path" = "/people/{identifier}/organizations",
* "path" = "/base/people/{identifier}/organizations",
* "controller" = GetOrganizationsByPerson::class,
* "read" = false,
* "openapi_context" = {
......@@ -38,7 +38,7 @@ use Symfony\Component\Serializer\Annotation\Groups;
* },
* itemOperations={
* "get" = {
* "path" = "/organizations/{identifier}",
* "path" = "/base/organizations/{identifier}",
* "openapi_context" = {
* "tags" = {"BaseOrganization"},
* "parameters" = {
......@@ -49,6 +49,7 @@ use Symfony\Component\Serializer\Annotation\Groups;
* },
* },
* iri="http://schema.org/Organization",
* shortName="BaseOrganization",
* description="An organization",
* normalizationContext={
* "jsonld_embed_context" = true,
......
......@@ -14,9 +14,9 @@ class ExtTest extends ApiTestCase
$client = self::createClient();
$endpoints = [
// FIXME: '/people/foo/organizations',
'/organizations',
'/organizations/foo',
'/base/people/foo/organizations',
'/base/organizations',
'/base/organizations/foo',
];
foreach ($endpoints as $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