-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to add additional data to the root of the response? #96
Comments
I think you could redefine JsonUnifyTransformer. What is your usecase for that? Unified data format is mean to be used just for |
I would like to send updated authentication token in all responses.... and I'd like to keep "data" node just for actual data... Can you point me how to "redefine JsonUnifyTransformer"? Kind Regards, M |
Extend JsonUnifyTransfomer and replace service in DIC services:
api.negotiation.transformer.json:
class: App\Api\Transformer\JsonUnifyTransformerTransformer
alteration: true |
You can add these informations to request and response through |
Many thanks. It works!!! |
I'm using decorator to add some additional data into all responses...
This returns all responses as following example:
My question is if is there any way, how can I move "somedata" node to same level as "status" and "data" nodes.
Cheers
The text was updated successfully, but these errors were encountered: