Skip to content

Support of HAL format #661

Open
Open
@konstlepa

Description

@konstlepa

Hi.

I'm trying to add support of HAL. I read #42 and #44. But I still have many questions. I've made a first attempt to adapt Restangular. Please, see the commit with my comments: https://github.com/KonstantinLepa/restangular/commit/5b71894aa149de807dbafd5afc5e9256e6e181e8. It doesn't work correctly now.

There are my problems:

  • Processing of _embedded property. It's optimization only. It can exist or not exist. It must be transparent to the client. How should I implement it?
  • Chaining of methods. For example, messages, from and unread for $scope.user.one('messages', 123).one('from', 123).getList('unread'); are relations. They are not parts of URL. What will happen if from relation doesn't exist in a data? I think one('from', 123) must return an empty restangular object. Or not?

Thanks

P.S. Also, HAL supports the CURIE syntax http://tools.ietf.org/html/draft-kelly-json-hal-06#section-8.2. But I didn't think about it.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions