1015 search results for API Platform

... data provider for this "Product" entity is executed. Suppose you want that to return a new "customResource" property that contains your CustomResource. If you add that property to Product, all API Platform will do is ...
weaverryan
weaverryan
Read Full Comment
... again get the same error (here is a screenshot) `composer show api-platform/core` says that I have version 2.4.6, so the 415 status code is expected. Since 2.4.6 you get a 415 instead of 406 when a faulty content type is ...
Tobias I.
Tobias I.
Read Full Comment
... resolved to PostController::unpublish where I will do all needed operations and output the same data as standard PATCH method. I saw on the page https://api-platform.com/docs/core/operations/ how to make custom operation for controller, but how to force api-platform to do docs, output etc. same as for PATCH?
Andrey S.
Andrey S.
Read Full Comment
... ``` ``` This is my twig template: ``` {% extends 'base.html.twig' %} {% block body %} {% endblock %} ``` My ReactAdmin: ``` import React from 'react'; import { HydraAdmin } from "@api-platform ...
... SymfonyCasts with about 3 microservices that expose an API and are consumed by SymfonyCasts.com and the other microservices. Buuut, all of this predates ApiPlatform (or at least, predates Api Platform v2), and so they ...
weaverryan
weaverryan
Read Full Comment
... But they are still really useful - especially the IRI links that api platform uses. Basically, I see links as a useful way to help pass more info to my javascript so that I don’t need to hardcode url patterns there. For ...
weaverryan
weaverryan
Read Full Comment
SameSite Cookies CSRF Attacks

Before we go further into API platform, we need to have a quick heart-to-heart about CSRF attacks. This is a complex topic... so I'll try to hit the highlights. If you're consuming your API from JavaScript, you have two ...

8:06
... .. but I might create services (that look similar to the entity manager, for example) to do the "querying" and "saving" across the API. B) API Platform generates an OpenAPI spec for your API. And... one of the "perks" of ...
weaverryan
weaverryan
Read Full Comment
Custom Resource GET Item

... you look at the top of the DailyStats class, we kind of added the get item operation... but we made it return a 404 response: We did that as a workaround so that API Platform could generate an IRI for DailyStats. Now I ...

5:50
JSON API Endpoint

... array, but it means that you could start passing objects to $this->json(). If you want to learn more - or want to build a super-rich API - check out our tutorial about API Platform: an amazing Symfony bundle for building ...

6:29
Validation Groups

... plainPassword field isn't persisted to the database, at the beginning of each request, after API Platform queries the database for the User, plainPassword will always be null. If an API client only sends the username field ...

5:44
Creating the User Entity

... check the SQL: CREATE TABLE user - looks good! Run it with: php bin/console doctrine:migration:migrate Perfect! We have a gorgeous new Doctrine entity... but as far as API Platform ...

5:07
oh heck yeah, thanks! Was having the same thing and it was stumping me. Since I was dealing with PATCH instead of PUT because of the recent api-platform changes I was looking into that direction. but setName() was ...
Joris-Mak
Joris-Mak
Read Full Comment
Hey @aratinau! To be honest, I don't have any idea! I just moved myself to this part of the project and even upgraded to the latest version of API Platform, just in case something changed. In my app, the inner state ...
weaverryan
weaverryan
Read Full Comment
Hey @Hugues! Hmm, interesting! Let's think about this. If you *don't* return something from your processor, then API Platform will ultimately serialize the `$data` argument that you passed in. In your case, unless ...
weaverryan
weaverryan
Read Full Comment
... especially in a fresh project. It makes me think (?) that maybe you're doing some subtle formatting wrong (e.g. on the attributes) and API Platform isn't seeing them? It's definitely a very odd thing, which often means it's ...
weaverryan
weaverryan
Read Full Comment
... is interesting... but at the same time, I'm getting a rough sense from the tech people I follow that REST if winning and GraphQL is starting to die a bit. Check out this recent tweet from API Platform lead dev Kévin ...
weaverryan
weaverryan
Read Full Comment
Actually, trying to separate reading and writing didn't work for me, because when I add `stateOptions: new Options(entityClass: SomeClass::class)`, api platform serialization listener sets force_resource_class ...
... return string.but i got error: > "hydra:description": "ApiPlatform\\Symfony\\EventListener\\WriteListener::getObjectClass(): Argument #1 ($object) must be of type object, string given, called in \/var\/www\/fast\/vendor\/api ...
... partial replace have now to be done with the PATCH method. You can change this behavior in the config file (api_platform.yaml) : change the `standard_put` to `false` ``` api_platform: title: Hello API Platform ...