Skip to content
Snippets Groups Projects
Person.php 1019 B
Newer Older
Reiter, Christoph's avatar
Reiter, Christoph committed
<?php

declare(strict_types=1);

namespace Dbp\Relay\BaseBundle\Entity;
Reiter, Christoph's avatar
Reiter, Christoph committed

use ApiPlatform\Core\Annotation\ApiResource;

/**
 * @ApiResource(
 *     collectionOperations={
 *         "get" = {
 *             "path" = "/people",
 *             "openapi_context" = {
 *                 "tags" = {"Base"},
Reiter, Christoph's avatar
Reiter, Christoph committed
 *                 "parameters" = {
 *                     {"name" = "search", "in" = "query", "description" = "Search for a person name", "type" = "string", "example" = "woody007"}
 *                 }
 *             }
 *         },
 *     },
 *     itemOperations={
 *         "get" = {
 *             "path" = "/people/{identifier}",
 *             "openapi_context" = {
 *                 "tags" = {"Base"},
Reiter, Christoph's avatar
Reiter, Christoph committed
 *             }
 *
 *         },
 *     },
 *     iri="http://schema.org/Person",
 *     description="A person of the LDAP system",
 *     normalizationContext={
 *         "groups" = {"BasePerson:output"},
Reiter, Christoph's avatar
Reiter, Christoph committed
 *         "jsonld_embed_context" = true,
 *     }
 * )
 */
class Person
{
    use PersonTrait;
}