Giter Club home page Giter Club logo

hateoas's People

Contributors

acmenna avatar alejandrosanchezintegro avatar chebbix avatar cristiansoto avatar gonrial avatar jdruery avatar mdelrosso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

hateoas's Issues

Permission Constants differ from ACL defaults

I wonder if the permission constants in ParamEntityFinder, LinkedResourcesSerializer, and ResourceObjectSerializer could be changed to all upper case ('VIEW' instead of 'view'). This would make it compatible with the constants defined in BasicPermissionMap in the Symfony ACL system. That way, the ACL system (and the default permission map) could be used in combination with custom voters. In my use case, I'd like a few of the entity classes to be granted permission via the ACL, and others with custom voters. Thanks for considering this.

Fatal error

I installed the hateoas bundle for symfony2. I tried configuring myself, and then I tried the example bundle. In both cases, the following error is returned for any get request:

Catchable Fatal Error: Argument 4 passed to GoIntegro\Hateoas\JsonApi\Request\Parser::__construct() must be an instance of GoIntegro\Hateoas\JsonApi\Request\SortingParser, instance of GoIntegro\Hateoas\JsonApi\Request\PaginationParser given, called in G:\Content\Work\Website\wamp\www\sf2\app\cache\dev\appDevDebugProjectContainer.php on line 2082 and defined in G:\Content\Work\Website\wamp\www\sf2\vendor\gointegro\hateoas\GoIntegro\Hateoas\JsonApi\Request\Parser.php line 120 (500 Internal Server Error)

JSON API v1.0 not supported

This library says it supports the JSON API specs, but as it seems not the current standard v1.0, or am I missing something?

According to the standard the primary resource should be put under the "data" key, but this implementation puts it under a key named like the resource type (see https://github.com/GoIntegro/hateoas/blob/master/JsonApi/DocumentSerializer.php#L83).

Other specs like putting resource fields under a "attributes" key, or using the "included" key to put related resources, seem to be not supported as well. So in general the JSON format seems to differ from the spec v1.0 substantially!

Which version is it based on then? Does not seem to be mentioned, and when is v1.0 support to be expected, if at all?

Typo in documentation

Given the RAML example, the linked GET examples should be "GET /users/1/links/posts" (not "linked"). When I made that change everything works as described.

I've also noticed that the example bundle defines a resource type ("collection") but then it doesn't actually use it in main api.raml file. This makes me wonder if resource types are still a work in progress. When I attempted to use the "collection" resource type on a resource I keep getting the following error: "The resource type declaration is neither a string nor a map." I might be doing something wrong, but if it's the case that resource types are not yet supported then it would be helpful it could please be noted in the docs (just to save us from spending too much time on trying to make it work before it's ready).

I realize I've been putting in issues without helping out by contributing any pull requests. I don't feel that confident using git just yet (sorry), but hopefully in future I might learn enough to be able to help. Thanks again for a fantastic bundle, very appreciated.

Symfony 2.5 dependency.

Hello,

In the GoIntegro\Bundle\HateoasBundle\Entity\DefaultBuilder.php I noticed that you use Symfony\Component\Validator\Validator\ValidatorInterface this interface was introduced in Symfony 2.5, and not supported by Symfony 2.3.

Would it be possible to use the Symfony\Component\Validator\ValidatorInterface which is supported by Symfony 2.3?.

Until Symfony 2.7 is fully released in March 2015, Symfony 2.3 is the LTS version.

Kind regards,
Menzo.

How to handle dbOnly fields?

Hello,

Great bundle! I have some minor problems which I can't find in the documentation.

In my User entity I defined some manyToMany and oneToMany relationships.

When I fetch a user object, I can't find them in de response JSON. When I try to fetch the user/expertise resource I get a 404 response.

While debugging I notice the fields are stored in a array called: dbOnly.
Class: GoIntegro\Bundle\HateoasBundle\Metadata\Resource\ResourceRelationships.php

I'm guessing you don't fetch the fields by default to save resources etc.

How can I retrieve the relations?

Kind Regards,
Menzo.

Edit:
Forgot to mention; also tried accessing the relationship resources like this:
http://application.dev/api/v1/users/3/links/expertise

Gives the following response:
"The requested relationship is undefined or can only be accessed through its own URL, filtering by its relationship with the current resource."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.