You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
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.
The text was updated successfully, but these errors were encountered:
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
docker compose exec pwa pnpm create @api-platform/client -g next
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 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.
The text was updated successfully, but these errors were encountered: