docs
docs copied to clipboard
Lack of documentation - configuration without annotation
There are too few documentation of how to configure entities without pollution of code with an annotation - just with a config files config/api_platform/resources.yaml
No references to the Symfony component that explains more details
Any help to improve this is very welcome (it's easy to guess the XML or YAML structure from the annotation)
Can't find how to use api/config/api_platform/resources.yaml. Just creating this file in config/api_platform and putting the content there doesn't work.
Mappings to config/packages/api_platform.yaml should be added.
https://api-platform.com/docs/core/getting-started/#product
# api/config/packages/api_platform.yaml
api_platform:
mapping:
paths:
- '%kernel.project_dir%/src/Entity' # default configuration for annotations
- '%kernel.project_dir%/config/api_platform' # yaml or xml directory configuration
It's a good idea to mention it in the provided examples.