Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [api-platform.com]

This tag should be used for all questions related to API Platform, a framework to create API-first web projects. API Platform contains a set of tools to build with ease fully-featured hypermedia APIs (modern formats, docs, authorization, filtering, ordering, cache, testing...) and to scaffold clients apps. It is built on top of Symfony components (PHP) and React (JavaScript).

api-platform.com
1 vote
0 answers
14 views

Understanding uriTemplate and Variable IDs in Symfony API Platform

I'm currently working on a Symfony project using API Platform, and I'm running into some confusion regarding the uriTemplate system and how it handles variable IDs. I have an entity called Article, ...
GeppettoG's user avatar
1 vote
1 answer
44 views

API Platform not applying validation using groups on POST requests

I am facing an issue with API Platform (using Symfony 6.4) where validations specified using validation groups are not being applied automatically during POST operations. Despite properly configuring ...
GeppettoG's user avatar
0 votes
1 answer
24 views

Api Platform Voter subject is instance of the Voter class instead of the class it is supposed to be used for

first time using API Platform or at least its 4 years since I used it. I try to add a Voter to an ApiResource but unfortunately $subject is an intance of the Voter class itself. In both methods - ...
Kbi's user avatar
  • 384
-1 votes
0 answers
20 views

Database table prefix in api-platform

We are using a Doctrine NamingStrategy to prefix all our Database tables. So for example Entity Customer is related to table abc_customer. Obviously Api Platform doesn't know about this NamingStrategy ...
Chris's user avatar
  • 797
0 votes
1 answer
25 views

API Platform custom Controller serialization problem

I have a very simple custom API endpoint with an input and output DTO and a Symfony Controller, build like the examples in the documentation page: https://api-platform.com/docs/v2.3/core/dto/ #[...
nnikolay's user avatar
  • 1,723
0 votes
0 answers
19 views

Why even I send GET request, the /api returns "Request body is empty" error in Symfony API Platform fusion auth based authentication

I'm new in Symfony and php. I want to authenticate users based fusion auth. This is the action list: Users requests for /login endpoint with their username and password. The API sends request to /api/...
Onurkudrt's user avatar
0 votes
0 answers
32 views

Customizing Error Responses for Non-Existent Resource IDs in API Platform

I'm using API Platform in my Symfony application and encountering an issue with the automatic Get() route when searching for a resource that doesn't exist. Currently, API Platform returns a default ...
Develop'ER's user avatar
1 vote
0 answers
22 views

API Platform - saving OneToOne ids using denormalization

I am trying to use proper normalization and denormalization for the OneToOne relation so I can persist those column's IDs without using the Processor class. For some reason, company_id in CompanyLogo ...
Filip Stojanovic's user avatar
1 vote
1 answer
41 views

Issues Handling Plain Identifiers in API Platform/Symfony

I am struggling to use plain identifiers in API Platform. I have related entities and have followed the official documentation of API Platform, creating a Denormalizer, but I always get the error ...
Ape Algorithms's user avatar
0 votes
0 answers
21 views

Deploying Symfony Application with Platform.sh API returns 500 error on POST

I'm new in Symfony and I'm using Platform.sh for the first time. I want to serve an API built with API Platform. It has a lot entity as api resource and it's running with postgresql. I want to set ...
Onurkudrt's user avatar
0 votes
1 answer
31 views

Universal controller for soft delete in ApiPlatform

I use ApiPlatform and want to change the delete request behavior for my entities. In every entity, I have a status property - when a delete request is called, it should set status to 0 instead of ...
Stami's user avatar
  • 45
0 votes
1 answer
42 views

API Platform Documentation Issue: Incorrectly Treating Route Parameter as Required ID

I'm encountering an issue with API Platform where it seems to treat a route parameter as a required idBadge, even though it's not specified as such in my route configuration. Here's the setup: I have ...
Develop'ER's user avatar
0 votes
0 answers
15 views

Multiple identify validation parameters for lexik-jwt bundle?

What I'm trying to achieve is specifiying inside the .yaml path multple identity-parameters to validate users with the lexik-jwt bundle. Currently, only emails are working as an identifier. However, I ...
Proudyy's user avatar
  • 69
0 votes
1 answer
53 views

How to add controller endpoint in swagger in ApiPlatform (Symfony)?

I use ApiPlatform and want to have few endpoints in controllers. How can I make these endpoints visible for swagger and how can I give swagger docs informations (eg. description)? I tried to add #[...
Stami's user avatar
  • 45
-1 votes
1 answer
39 views

Postman Schema Import Validation errors

I am trying to import the generated OpenAPI json file of our API to use this in Postman. During the import postman is showing a lot of validation errors that prevent me from using it. https://i....
soverflowmicha's user avatar

15 30 50 per page
1
2 3 4 5
103