1026 search results for API Platform

Hi @sidi! Excellent question! When make a request for the user data, to get the comments data, API Platform simply calls `$user->getComments()`, which returns all 50 results. To limit things, you can use this trick ...
weaverryan
weaverryan
Read Full Comment
Hey @isTom! Hmm. You *will* need to add some config for API Platform - but it's pretty basic - https://github.com/symfony/recipes/blob/master/api-platform/core/2.5/config/packages/api_platform.yaml - and it doesn't ...
weaverryan
weaverryan
Read Full Comment
Hey @Aaron! Ah, excellent idea! I also took a look at the deeper exceptions, and I can tell you that the access denied IS coming from API Platform. So, specifically, API Platform is looking at the "security" option of ...
weaverryan
weaverryan
Read Full Comment
Hi Daniel K.! Interesting. I don't know the answer to this, but I know where to look. API Platform (I'm guessing you know this part, but just in case - it's not something we talked about in the tutorial) automatically ...
weaverryan
weaverryan
Read Full Comment
Hi SymfonyCasts team, Thank you very much for the great work you do with these API Platform tutorials. As I'm not a frontend developer, I even don't want to install the frontend part of this tutorial. Is there a way ...
... lead developer of it is also the lead developer of API Platform (which uses it). I think both are solid choices, but I would go with the Symfony serializer at this point. I would also recommend looking into API Platform itself - we are definitely planning a tutorial on it at some point - it's amazing. Cheers!
weaverryan
weaverryan
Read Full Comment
Hey @Marcin! Interesting situation :). > 1) Can I do that in easy way (with all of automation which API Platform provides)? Yes-ish... ;) See below > 2) Should I do that like this? (I mean, is that good approach ...
weaverryan
weaverryan
Read Full Comment
... puts it on "data" key of $request->attributes - https://github.com/api-platform/core/blob/29cd84b6deed2f0473c631eb003bc870616ef5f8/src/EventListener/DeserializeListener.php#L104-L107 B) The DenyAccessListener ...
weaverryan
weaverryan
Read Full Comment
... password property)] So, I have two questions: 1) Can I do that in easy way (with all of automation which API Platform provides)? 2) Should I do that like this? (I mean, is that good approach). I think that is common ...
... there is probably not much difference :). In fact, the data persister system is called FROM a listener - WriteListener - https://github.com/api-platform/core/blob/2.6/src/EventListener/WriteListener.php - which listens on kernel.view :). Cheers!
weaverryan
weaverryan
Read Full Comment
... ``` { "title": "..." "owner": "/api/users/1" } ``` This is a key feature of API Platform: when it sees that the CheeseListing.owner property is a User object, and it knows that User object is an API Resource ...
weaverryan
weaverryan
Read Full Comment
User Test Plain Password

... hash the plainPassword property? Or, in simpler terms, how can we run code in API Platform after the data is deserialized but before it's saved to the database? The answer is: state processors. Let's dive into this powerful concept next.

4:21
Conditional Fields by User ApiProperty

... true. But then, securityPostDenormalize returned false. In that case, API Platform will revert the isPublished property back to its original value: it will change it from false back to true. Oh, and by the way ...

5:13
Relations Iris

When we tried to create a DragonTreasure with this owner, we set the field to the owner's database id. And we found out that API Platform did not like that. It said: "expected IRI". But what is an IRI? We mentioned this ...

3:40
Hey @sujal_k! This longer description of the whole process might help :) https://symfonycasts.com/screencast/api-platform-extending/collection-relation-setting#comment-32177 Cheers! ...
weaverryan
weaverryan
Read Full Comment
Hi |mention:3768| , Thanks for the answer. Still not sure how to configure API Platform to avoid this duplication? Here is my ApiResource enabled Symfony Entity class: ``` ...
Hey Gamusta, Here's the list of possible arguments for ApiProperty: https://github.com/api-platform/core/blob/main/src/Metadata/ApiProperty.php#L45 - there's `security`, but no `securityMessage`. Cheers! ...
Hello! Thanks, but It does not solve the problem. However I've set a solution, for anybody who need it https://github.com/api-platform/core/issues/4672#issuecomment-1557480806. ...
yes, i use api platform,i konw how sort by property,but if i want sort by custom condition,how to do that,thanks ...
Hey Richad-H! It's planned! Work hasn't started yet, but this is a high priority for me - time to update this for API Platform 3! Cheers! ...
weaverryan
weaverryan
Read Full Comment