You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is quite a good bundle and i've been trying to use it over the course of a few days but, find the documentation seriously lacking when it comes to packaging up resources. Would it be possible to please add some further documentation on actual use cases or even an example project to follow with a particular emphasis on packaging data for transmission.
Right now, I've figured out creating JsonResource then returning it in a DocumentResponse which works fine for simple things but, i'm not even sure that's correct. How do i actually add relationships, etc.? I see lots of models to base things from but, there is no clear path on actual usage.
Is there a simpler way of achieving the following from the requesthandler for example?
// Use serializer to create simple resource
$travelPointSerialized = $this->serializer->toArray($travelPoint,
SerializationContext::create()->setGroups(['Detail'])
);
$dataResource = new JsonResource(
'TravelPoints',
$travelPoint->getId(),
$travelPointSerialized
);
return new DocumentResponse($dataResource);
The text was updated successfully, but these errors were encountered:
excellent, thank you! I dont mean to sound demanding, once i get better
understanding of this bundle, i am happy to help with documentation effort.
if you could start with some very literal examples, the important stuff, I
can write around that for us
On Fri, 30 Aug 2019, 21:25 Alexander Bogomolov, ***@***.***> wrote:
We're working on it today ;)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4?email_source=notifications&email_token=ACRB4GOEFDFA5UBO7GVNQH3QHENWLA5CNFSM4ISLYDRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5RUVFA#issuecomment-526600852>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACRB4GI3ZHRQHUGATQUP2O3QHENWLANCNFSM4ISLYDRA>
.
It currently contains only a very simple use case with two resource types and only fetch (GET requests), but hopefully it will help you a little bit.
I don't close this ticket now, so we later will add more features to example implementation and improve the documentation here.
But unfortunately this will take a little longer, because I just did not manage to do it in time now.
Hello,
This is quite a good bundle and i've been trying to use it over the course of a few days but, find the documentation seriously lacking when it comes to packaging up resources. Would it be possible to please add some further documentation on actual use cases or even an example project to follow with a particular emphasis on packaging data for transmission.
Right now, I've figured out creating
JsonResource
then returning it in aDocumentResponse
which works fine for simple things but, i'm not even sure that's correct. How do i actually add relationships, etc.? I see lots of models to base things from but, there is no clear path on actual usage.Is there a simpler way of achieving the following from the requesthandler for example?
The text was updated successfully, but these errors were encountered: