-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Primitive types could be properly converted to their strict representations instead of being just strings.
I.e.: GET http://domain.local/some/path?active_and_upcoming=true&past=false&visible=true&offset=0&limit=10 will be mapped to the following structure:

Now in Normalizer you would expect to hydrate the object like this:
public function denormalize(ObjectWrapper $input, DenormalizationContext $context)
{
$filter = new SomeFilter();
$filter->setName($input->getString('name'));
$filter->setUpcoming($input->getRequiredBool('active_and_upcoming'));
$filter->setEnded($input->getRequiredBool('past'));
return $filter;
}But you will get an error:
{
"error": "invalid_parameters",
"error_description": "Expected boolean but got string for key \"active_and_upcoming\""
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels