Skip to content

Help with Lazy Loading #66

Answered by klamparski
sapfeer0k asked this question in Q&A
Aug 2, 2022 · 1 comments · 6 replies
Discussion options

You must be logged in to vote

@sapfeer0k You are right, unfortunately we are missing that part of documentation and I don't really know when we will be able to fill it.
However excluding properties from serialization process is pretty simple and you even already use it for your GET collection endpoint. You just need to configure serialization group for the endpoint and then assign this group to the property you want to include in response.

Endpoint declaration:

 *     itemOperations={
 *          "get"={
 *              "path"="/products/{id}",
 *              "normalizationContext"={
 *                  "groups"={"api_product_get_item"}
 *              },
 *          }
 *     },

Property declaration:

    /**
     * …

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@sapfeer0k
Comment options

@klamparski
Comment options

@sapfeer0k
Comment options

@klamparski
Comment options

Answer selected by kszymukowicz
@sapfeer0k
Comment options

@sapfeer0k
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants