POST result isn't auto-wired to Output DTO #7640
-
|
Underneath my setup (in short, without use statements and getters and setters); symfony 8.0 (ObjectMapper 8.0) and ApiPlatform 4.2. Basically it's about this description: https://api-platform.com/docs/core/dto/#2-automated-mapped-inputs-and-outputs
Debugging shows me the code does understand there is an output dto. However the class property in the Operation is set to Adding Adding an Using a custom processor has no effect. The class is already defined in the Operation and results in the same 400-error. How to tell my application to use the output dto in combination with the route-entity? Before this symfony version and api platform version I used self-written processors, providers and mappers, also for the Get operations. With the latest version of the ObjectMapper and ApiPlatform I could already remove the mappers and providers for the get operations. I hope this is also possible for Post and Put operations. LATEST VERSION SEE: REPO Entity Route.php ApiResource Route.php Request DTO RouteRequestDto.php |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
So I finally found a solution! By re-implementing my standard-processor and add |
Beta Was this translation helpful? Give feedback.
So I finally found a solution! By re-implementing my standard-processor and add
map: falseto the operation. Now all operations work as expected. I updated my repo.