f6d37e4667
Modular monolith moved entities out of src/Entity into src/Module/*/Domain/Entity without configuring api_platform.mapping.paths. Resources stayed discoverable via service autoconfiguration, but annotated filter services were registered only for classes found in resource_class_directories (the now-empty default src/Entity and src/ApiResource), so every #[ApiFilter] (SearchFilter, BooleanFilter, OrderFilter, DateFilter) was silently ignored across the whole API — collection filters never narrowed results (my-tasks showed all users' tasks, time entries leaked across users, directory would leak per-client data). Declare the seven module entity directories under mapping.paths so the annotated filter services are generated again.
27 lines
1.2 KiB
YAML
27 lines
1.2 KiB
YAML
api_platform:
|
|
title: Lesstime API
|
|
version: 1.0.0
|
|
# Modular monolith: entities (and their #[ApiFilter] attributes) live under
|
|
# src/Module/*/Domain/Entity, not the default src/Entity. Resources are still
|
|
# discovered via service autoconfiguration, but #[ApiFilter] services are only
|
|
# registered for classes found in these paths — without them, every filter is
|
|
# silently ignored. Decoupled ApiResource classes stay discovered via tags.
|
|
mapping:
|
|
paths:
|
|
- '%kernel.project_dir%/src/Module/Core/Domain/Entity'
|
|
- '%kernel.project_dir%/src/Module/TimeTracking/Domain/Entity'
|
|
- '%kernel.project_dir%/src/Module/ProjectManagement/Domain/Entity'
|
|
- '%kernel.project_dir%/src/Module/Absence/Domain/Entity'
|
|
- '%kernel.project_dir%/src/Module/Directory/Domain/Entity'
|
|
- '%kernel.project_dir%/src/Module/Mail/Domain/Entity'
|
|
- '%kernel.project_dir%/src/Module/Integration/Domain/Entity'
|
|
formats:
|
|
jsonld: ['application/ld+json']
|
|
json: ['application/json']
|
|
patch_formats:
|
|
json: ['application/merge-patch+json']
|
|
defaults:
|
|
stateless: true
|
|
cache_headers:
|
|
vary: ['Content-Type', 'Authorization', 'Origin']
|