79811095

Date: 2025-11-06 09:59:12
Score: 0.5
Natty:
Report link

I have a partial solution for those who might be interested, but it’s not complete. I can’t manage to convert my data into JSON-LD for my resource links.

I created a class that inherits from HttpOperation and is handled via POST.

        new SearchCollection(
            uriTemplate: '/chapters/search',
            name: 'chapter_search',
            provider: ChapterDataProvider::class,
            controller: ChapterDebugController::class,
            input: false,
            output: Chapter::class,
        ),

And next this controller

<?php

namespace App\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;

final class ChapterSearchController extends AbstractController
{
    public function __invoke()
    {
        return new JsonResponse(['called' => true]);
    }
}

But it doesn’t use my provider, and I can’t manage to format my data in JSON-LD.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: vincent clerc