Open lube opened 8 years ago
Try with:
comment_api:
resource: demo.comment
type: sylius.api
defaults:
_sylius:
serialization_groups: [foo]
didn't work :/
getting: { }
Try foo
-> Default
. If you are testing it on a index page, especially.
Also, just as a remainder, clear cache ;)
Im always clearing cache, good ol symfony.
You mean the name of the Serializtion group, instead of foo naming it Default?
Yes, IIRC there were some issues with managing an index data for other serialization groups than Default
. It had something to do with default serialization group in hateoas bundle, i suppose.
And, I know that clear:cache
advise was a little bit trivial, but we sometimes forgot even the simplest things.
Oh for sure, Symfony cache has bitten me before, no worries.
I'll try renaming the serialization group when I get back from work!
I cannot get serialization groups to work this is probably my fault, but maybe someone else is having the same issue and can find help here.
serialization file:
routing: