Repository navigation
Commit f25a7ed
fix(state): map to the output class on mapped write operations
With the Object Mapper, `ObjectMapperOutputProcessor` mapped the persisted
entity to the resource class even when the operation declares an `output`:
the body had the resource shape while OpenAPI and Hydra documented the
output class.
The processor now maps to the output class, as the provider does on reads.
`Location` and `Content-Location` are about the resource the operation
acted on, they are computed from the entity mapped to the resource class.
Data that already is an instance of the output class is not mapped again.
Refs #8849
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 75e4769 commit f25a7ed
7 files changed
Lines changed: 303 additions & 1 deletion
File tree
- src/State
- Processor
- Tests/Processor
- Util
- tests
- Fixtures/TestBundle
- ApiResource