PathItem example

#[Package('core')] class OpenApiPathBuilder
{
    private const EXPERIMENTAL_ANNOTATION_NAME = 'experimental';

    /** * @return PathItem[] */
    public function getPathActions(EntityDefinition $definition, string $path): array
    {
        $paths = [];
        $paths[$path] = new PathItem([
            'path' => $path,
        ]);
        $paths[$path]->get = $this->getListingPath($definition$path);

        $paths[$path . '/{id}'] = new PathItem([
            'path' => $path . '/{id}',
        ]);
        $paths[$path . '/{id}']->get = $this->getDetailPath($definition);

        if (is_subclass_of($definition, SalesChannelDefinitionInterface::class)) {
            return $paths;
        }
Home | Imprint | This part of the site doesn't use cookies.