eosnewmedia / json-api-server-bundle Goto Github PK
View Code? Open in Web Editor NEWThe symfony integration for enm/json-api-server.
Home Page: https://eosnewmedia.github.io/JSON-API-Server-Bundle/
License: MIT License
The symfony integration for enm/json-api-server.
Home Page: https://eosnewmedia.github.io/JSON-API-Server-Bundle/
License: MIT License
Request handlers with configured type and resource providers are always called before your generic handlers are called.
I don't see the implemented logic... The injected handler is the RequestHandlerChain, but at the execute function nothing handles the chain vs registry handler decision. Is this some future feature or just a bug?
Thanks for the bundle! It is a great tool to start with!
Hi there!
Symfony 5 is out for some time, can you add support for it?
Also, i think in library should not be commited composer.lock
...
Thanks!
Hello,
This is quite a good bundle and i've been trying to use it over the course of a few days but, find the documentation seriously lacking when it comes to packaging up resources. Would it be possible to please add some further documentation on actual use cases or even an example project to follow with a particular emphasis on packaging data for transmission.
Right now, I've figured out creating JsonResource
then returning it in a DocumentResponse
which works fine for simple things but, i'm not even sure that's correct. How do i actually add relationships, etc.? I see lots of models to base things from but, there is no clear path on actual usage.
Is there a simpler way of achieving the following from the requesthandler for example?
// Use serializer to create simple resource
$travelPointSerialized = $this->serializer->toArray($travelPoint,
SerializationContext::create()->setGroups(['Detail'])
);
$dataResource = new JsonResource(
'TravelPoints',
$travelPoint->getId(),
$travelPointSerialized
);
return new DocumentResponse($dataResource);
Hi,
I'm using symfony
4
.
I have done :
composer require enm/json-api-server-bundle
Enm\Bundle\JsonApi\Server\EnmJsonApiServerBundle::class => ['all' => true]
in config/bundles.php
json_api:
resource: "@EnmJsonApiServerBundle/Resources/config/routing.xml"
On requesting /products
(example) with
curl 127.0.0.1:8000/products -L -H 'Content-Type: application/vnd.api+json' -H 'Accept: application/vnd.api+json'
I have
Resource type \"products\" not found
What are resources ?
Regards,
PS : New to symfony
, so probably a noob question ๐
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.