fosrestbundle Questions

5

I'm using FOS Rest bundle and JMS Serializer to create a REST Api. The problem is I would like to keep the property names in the JSON response camel cased instead of using _. For example, I have a...
Tilsit asked 20/4, 2017 at 20:26

4

I'm currently using FOSRESTBundle with JMSSerialize to make a RESTFull API (of course). My project is an extranet for customers and administrators. In this way, I have to disable some field from ...
Matadi asked 11/3, 2015 at 14:51

5

Solved

I'm developing a REST api with Symfony2 + FOSRest bundle. I would like to know if there is any way for a call to the api in dev mode (app_dev.php) from the browser (corresponding to a Accept: text...
Bedwarmer asked 4/2, 2014 at 14:52

4

Solved

I have problem with returning views with FOSRestBundle working under Symfony 4.1 Project. This is code from my controller: class NewsController extends FOSRestController { public function getN...
Bierce asked 27/11, 2017 at 13:37

2

Solved

So i am building a symfony2 api using fosrestbundle fosuserbundle and LexikJWTAuthenticationBundle and when i want to acces to /api/users.json to post a new user i get a 401 error Bad Credentials. ...
Yellowweed asked 10/9, 2015 at 23:51

2

Solved

I read this article about overriding groups of child properties: use JMS\Serializer\SerializationContext; $context = SerializationContext::create()->setGroups(array( 'Default', // Serialize Jo...
Guthry asked 22/9, 2017 at 14:35

1

Solved

I have an issue when I'm using the serializer with FOSRestBundle in Symfony 4.1 I have the following error message : Could not normalize object of type App\Entity\Youp, no supporting normalizer...
Miyokomizar asked 17/10, 2018 at 18:41

2

I have a REST service where I want to update a file over PUT. When I use POST I used the following to get the uploaded file: /** * @var Request $request */ $request->files->get('file'); ...
Ashlar asked 24/6, 2014 at 11:19

4

Solved

I have configured FOSRestBundle as following: #FOSRestBundle fos_rest: param_fetcher_listener: true body_listener: true format_listener: rules: - { path: ^/, priorities: [ json, html ], fallb...
Prosser asked 8/5, 2015 at 1:3

1

Solved

I have a Symfony rest api build with fos restbundle and I'm deserializing a json PUT request in order to update a doctrine entity with a to-many relation. However, the to-many child objects which a...
Autolysis asked 30/3, 2018 at 11:29

3

Solved

I had a read through this : https://github.com/schmittjoh/serializer/issues/77 but did not find any way to serialize null values in JSON for FOS Rest bundle with JMS serializer (meaning just show t...
Coastline asked 28/5, 2013 at 6:11

2

In the code bellow I expect the $request->getContents() to get the body content of the HTTP request. When sending non multipart request this works as expected though when using multipart request...
Whilst asked 28/2, 2015 at 12:42

1

Solved

I'm on an api project using FOSRestBundle on Symfony 3.4 and have some error when I want to use my own error messages. It says me: Controller "fos_rest.exception.twig_controller" cannot be fetche...
Suburb asked 9/1, 2018 at 15:44

3

Solved

Problem fixed, check my answer. I'm building a registration endpoint on my Symfony2.7 rest api. I am using FosRestBundle and FosUserBundle Here is the user model : <?php namespace AppBundle\...
Rhondarhondda asked 9/9, 2015 at 21:21

2

Solved

Is there any way to set the circular reference limit in the serializer component of Symfony (not JMSSerializer) with any config or something like that? I have a REST Application with FOSRestBundle...

2

Solved

I am developing an application using Symfony2 with fos-restbundle. I would like to create some API routes and also some regular routes (exactly one for AngularJS front-end). This is my fos_rest con...
Thury asked 22/11, 2015 at 16:49

4

Solved

I get the exception: Unable to find template "" The other similar questions didn't help; and weirdly enough it was working fine and then suddenly started giving me this exception. composer: ...
Posh asked 2/8, 2013 at 7:7

2

I'm using FOSRestBundle with Symfony 2 to implement a REST API in JSON format. I want all API exceptions to be returned in a specific JSON format like this: { "success": false, "exception": { ...
Encephalon asked 11/6, 2015 at 11:55

3

Edit: See below for my own solution, which is, at the time of writing, functioning but imperfect. Would love some criticism and feedback, if I get something put together that I feel is really solid...
Sciurine asked 28/3, 2014 at 22:0

1

I'm trying to use FOSRestBundle's request body converter but my current implementation doesn't seem to work. I am using Symfony2, Propel, AngularJS (it sends data to server) What am i doing wron...
Achromaticity asked 2/2, 2014 at 15:2

2

Solved

I am trying to make a Rest web service using Symfony 3 and FOSRestBundle. I come from a Spring + Jackson background so i'm trying to make it so that you can pass objects to controllers as request b...
Cadmarr asked 29/9, 2016 at 19:16

2

We are using Symfony2 FOSRestBundle with JMSSerializerBundle for developing REST APIs to be consumed by mobile developers. The API response in JSON format returns 'null' as value of properties whe...
Semiyearly asked 23/7, 2015 at 7:15

1

I have entity: <?php namespace AppBundle\Entity; use Doctrine\ORM\Mapping as ORM; use JMS\Serializer\Annotation\Groups; //... /** * @ORM\Entity(repositoryClass="AppBundle\Repository\UserRe...
Winchell asked 16/2, 2016 at 15:51

3

Solved

I have three controller named BlogController, PostController, CommentController that CommentController is sub resource of PostController and PostController sub resource of BlogController. /** * @...
Natie asked 12/10, 2015 at 18:16

3

Solved

I'm using FosRestBundle and I'm declaring a controller with manually routes. namespace Cboujon\PropertyBundle\Controller; use FOS\RestBundle\Controller\Annotations\QueryParam; use FOS\RestBundle\...
Belfry asked 5/10, 2015 at 0:44

© 2022 - 2024 — McMap. All rights reserved.