mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-28 04:58:46 +02:00
poc form SDK (symfony 6)
This commit is contained in:
@@ -31,10 +31,10 @@ use Combodo\iTop\DI\Services\Orm;
|
||||
class ParamConverterTestController extends AbstractController
|
||||
{
|
||||
|
||||
#[Route('/param_converter_test/{id<\d+>}', name: 'param_converter_test', methods: ['GET'])]
|
||||
#[Route('/param_converter_test/Person/{id<\d+>}', name: 'param_converter_test', methods: ['GET'], priority: 1)]
|
||||
public function convert(Request $request,
|
||||
#[Orm(mapping: 'id')] Person $person,
|
||||
#[MapQueryParameter(filter: \FILTER_VALIDATE_INT)] int $age
|
||||
#[MapQueryParameter(filter: \FILTER_VALIDATE_INT)] int $age = 22
|
||||
) : Response
|
||||
{
|
||||
$response = new JsonResponse([
|
||||
|
||||
Reference in New Issue
Block a user