API Platform version(s) affected: x.y.z
Description
When using the latest github template for api-platform (currently commit ) and running the command to generate a next compontent: docker compose exec pwa pnpm create @api-platform/client -g next the generated list component is not compatible (list for entity not showing/only blank page).
How to reproduce
- create a new api using template
- generate nextjs client:
docker compose exec pwa pnpm create @api-platform/client -g next
- visit https://localhost/greetings
Possible Solution
The generated PageList component has a check for !collection["hydra:member"] - but with default values of the template there is no 'hydra:' prefix for the members of the collection. It should check and use collection["member"] instead.
Additional Context
Generated components are compatible when enabling hydra prefix for serializer (api-platform/api-platform#2827) - but as suggested there it may be changed in the generator itself.
API Platform version(s) affected: x.y.z
Description
When using the latest github template for api-platform (currently commit ) and running the command to generate a next compontent:
docker compose exec pwa pnpm create @api-platform/client -g nextthe generated list component is not compatible (list for entity not showing/only blank page).How to reproduce
docker compose exec pwa pnpm create @api-platform/client -g nextPossible Solution
The generated PageList component has a check for
!collection["hydra:member"]- but with default values of the template there is no 'hydra:' prefix for the members of the collection. It should check and usecollection["member"]instead.Additional Context
Generated components are compatible when enabling hydra prefix for serializer (api-platform/api-platform#2827) - but as suggested there it may be changed in the generator itself.