class ApiController extends AbstractController { #[Route('/api/users', methods: ['GET'])] #[OAGet( path: '/api/users', description: 'Получить список пользователей', responses: [ new OAResponse( response: 200, description: 'Список пользователей', content: new OAJsonContent( type: 'array', items: new OAItems(ref: '#/components/schemas/User') ) ) ] )] public function getUsers(): JsonResponse { return $this->json([ ['id' => 1, 'name' => 'John'], ['id' => 2, 'name' => 'Jane'], ]); } } Вот, кстати, причина, почему я предпочитаю документацию файлом писать, а не аннотациями. Роуты на 10 строк и огромная дока выше.