…here - https://github.com/api-platform/core/issues/1482 - which uses a custom operation. This looks valid, though I'm not sure if there might be a better solution. My initial thought would be to create a totally custom API resource class with only one…
I have completed this courese. Thnks there for your good company.
Also plant to take other course in the series.
I am looking for some open source projects using api platform.
can anyone suggest ?
Hey Daniel W.!
Are you looking for this? https://symfonycasts.com/screencast/api-platform-security/query-extension
Let me know!
Cheers!
Nope =) The idea is not to hide the Uncaught exceptions messages, but to handle them. Maybe I should create an Exception Listener and then catch any Uncaught Exception here. Cause API platform does not catches an AccessDeniedException by default. Cheers!
Ah, good catch - you're totally right. Fixed! https://github.com/SymfonyCasts/api-platform/commit/3e214e50c5253805ed8cb122e4980a28729ad983
Thanks!
Sorry, but if I don't want just to hide the uncaught exceptions inside a logger?For example it could be thrown an AccessDeniedHttpException which would not be catched by API platform. What should I do in this situation?How I can handle it?
Hey @Xav!
Nice job solving the issue!
> It's quite simple but I still have a lot of trouble understanding what is - or not - a "best practice" with Api Platform.
API Platform talks a lot about REST best practices. And so often, there are…
…only Vue with vuex, vue-router and vuetify): https://github.com/api-platform/core/issues/477#issuecomment-588902325
It's quite simple but I still have a lot of trouble understanding what is - or not - a "best practice" with Api Platform.
FOSRestBundle seems to be…
…Swagger is a Js library) https://api-platform.com/docs/core/swagger/#overriding-the-ui-template
2) How do you get custom JS onto the page? By overriding/extending the template that renders Swagger: https://api-platform.com/docs/core/swagger/#overriding-the-ui-template…
…create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Reading C:\Users\ack\PhpstormProjects\API-Platform-Training/vendor/composer/installed.json
Loading plugin Symfony\Flex\Flex
Downloading https://repo.packagist.org/packages.json
Writing C:/Users/ack/AppData/Local…
…problem with a compiler pass is that they are *really* meant to modify *services* that API Platform created, but not its config directly. It's not working because API Platform has already used its configuration by this point - so you're modifying it too late.…
…with a group that matches the "groups" option of the normalizationContext on your entity (if you have one, which we do in our project).
Let me know if this helps! And, of course, check out our API Platform tutorials to learn a ton more ;).
Cheers!
…cleared the cache. Also when I create a new field in the entities the API platform doesn't show this field. But it's only my testing app. Now I build my first app with the API platform and I hope there it works fine. …
…API Platform handles the request as PUT request. The error message is "Update is not allowed for this operation.".
There is an issue (https://github.com/api-platform/api-platform/issues/343) but with no solution -- actually sending "Content-Type: application/ld+json" instead of…
…into an Exception due to Unique-Key on `user_id` from OneToOne) instead of updating the existing one.
I know why, because I have no `@id` in my `settings` (https://api-platform.com/docs/core/serialization/#denormalization), but I think I don't need one…
…100% agree - ApiPlatform does SO much for you, that thinking about implementing a rich API manually feels crazy :). Btw, we *are* currently releasing the next tutorial, which will start to cover a lot of custom stuff - https://symfonycasts.com/screencast/api-platform-extending
> Right…
…logic? Or should I ditch API platform and just write everything myself?
Your linked articles to me look more like solutions for one-off problems rather than entire API. Overall, as I understand from the docs, writing any custom logic is discouraged with API platform…
… So, this is something that we'll talk about in the next tutorial - https://symfonycasts.com/screencast/api-platform-extending - but it will be a few more days or even a week+ before it's out. So let me give you the preview:
A) validation…
…Yeah, we're going to release it shortly... it should definitely happen this year, most probably after API Platform v3 tutorial. My wild guess is that it may be start releasing next month, but that's a really rough estimation from me for now. Sorry…
…T.!
> I watched the first and half of the second courses. I am very excited about API Platform features.
Yaaay!
> But I am concerned about the ability to create custom endpoints.
This is one of the big topics that we haven't covered…
x
1000+