trivago / jade Goto Github PK
View Code? Open in Web Editor NEWA simple but yet powerful library to expose your entities through JSON API.
License: Other
A simple but yet powerful library to expose your entities through JSON API.
License: Other
I have been working with jade a lot during the past few months, and its a big part of some of my projects. It doesn't seem like the project is moving along, and I hate maintaining forks of libraries.
I would be interested and willing to take up maintenance of the project, either assisting the current team or full ownership, if that would be easier on your team.
Is Trivago still using Jade internally? If so, i can understand if you want to keep the project internally managed. Otherwise if not, I'm happy to take over responsibility for the project long term, so they its easier for contributing patches to the library and keeping it in sync with Symfony updates. I'm also happy to work with the Trivago team to help maintain and contribute to development, if there is still interest in being involved.
Thanks for the hard work getting this built out, and the assistance getting Symfony 4 support moved along!
When updating an entity's relationship OneToMany or ManyToMany (i.e. an array of objects) using the format described in the documentation it fails because it can not find relationships.<relationship_name>.data.id
, which is normal since data
is an array.
The current implementation for contains
and not contains
does not covers the case where a property is an array. It performs a simple LIKE '%{value}%'
, which does not actually checks if the element exists, just that this word is in the serialized string in the database.
Example
Database value: Apples,Apple Macbook,Apple iPad
Element searching for: Apple
Expected result: No element found.
Actual result: Matches the array.
I know there's no easy way to fix this and most likely it will be a BC, but I'm opening this issue as a reminder of a cool-to-have feature.
In the current implementation of ListenerManager
the return value of the methods from ResponseListener
interface are not used, therefore there's no way to include/exclude entities from the response. It can be seen here.
IMO onGetCollectionResponse
should be the only method whose return value should be used since I don't see any use case for using the return value of other methods.
Therefore ResponseListener
methods signature should like:
onGetEntityResponse($entity): void
onGetCollectionResponse(array $entities): array
onCreateResponse($entity): void
onUpdateResponse($entity): void
This issue can serve as a discussion about whether or not the return value of this methods should be used.
I'm facing with the fact that I need to grant access to a resource to more than one role. As I see in the documentation you can only pass an escalar value in roles
roles:
read: ROLE_USER
I tried to set a default read role for ADMIN and the in the resource add the role USER but it is not working.
Is there a way to set more than one role? Something like:
roles:
read: [ROLE_USER, ROLE_ANOTHER_USER]
create: ROLE_USER
Hi there!
I tried to add support for Symfony 4 requiring "symfony/symfony": "^3.0 | ^4.0"
, but this doesn't work if the Symfony 4 project is using Symfony Flex since this one conflicts with "symfony/symfony": "*"
.
This is because in Symfony Flex you are not supposed to require the whole framework, but individual components.
Maybe the requirement on symfony/symfony
can be changed in favor of symfony/framework-bundle
? Would that be enough?
Thanks!
I need to add a security layer when getting collections. I have an application to manage domestic accounting and I want to filter by logged user. For example, if you are logged into the application and you get all your expenses I want to know how to filter that.
I guess I need to check something in the onGetCollectionRequest() listener method, but I am not sure which is the best practice for this. Because I think if you are logged and you know another userId you can retrieve his data.
Thanks in advance!
I'm using Doctrine Embeddables in a project but they don't work as expected.
I tried to fetch a resource without adding the embeddables as relationships, but they just don't appear in the response - it works, just that the fields are not present, like if they were not included.
If I add the embbedables as relationships it fails because it tries to join with the non-existent table for the embbedable.
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.