FOSRestBundle
FOSRestBundle copied to clipboard
Bug with camel_keys normalizer and forms
Hello, after having a lot of problems with my forms when using FOSRestBundle and JSON APIs I noticed that the documentation says:
If you use the camel_keys normalizer, you must be careful when choosing your form name
Does it mean that my form names cannot contains an underscore?
The input from one of my API using the StudentRegistrationType is something like this:
{
"student_registration": {
"username": "test",
"password": "test"
}
}
Unfortunately it doesn't work. If I add this method:
/**
* {@inheritdoc}
*/
public function getBlockPrefix()
{
return 'student';
}
And change the JSON:
{
"student_registration": {
"username": "test",
"password": "test"
}
}
It does work, is it normal?
Thanks!