PHPackages                             fsc/hateoas-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. fsc/hateoas-bundle

ActiveSymfony-bundle[API Development](/categories/api)

fsc/hateoas-bundle
==================

0.3.x-dev(13y ago)96215.4k↑33.3%25[4 PRs](https://github.com/TheFootballSocialClub/FSCHateoasBundle/pulls)1MITPHPPHP &gt;=5.3.0

Since Nov 27Pushed 11y ago8 watchersCompare

[ Source](https://github.com/TheFootballSocialClub/FSCHateoasBundle)[ Packagist](https://packagist.org/packages/fsc/hateoas-bundle)[ RSS](/packages/fsc-hateoas-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (11)Versions (11)Used By (1)

FSCHateoasBundle
================

[](#fschateoasbundle)

[![Build Status](https://camo.githubusercontent.com/4204270c6835f33b7bb22a86a80842f2e161cf257e28a4cc7d647bcb5e5ef374/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f546865466f6f7462616c6c536f6369616c436c75622f465343486174656f617342756e646c652e706e67)](http://travis-ci.org/TheFootballSocialClub/FSCHateoasBundle)[![Latest Stable Version](https://camo.githubusercontent.com/71f0dd8707a67ff42d5ae7bb4d2fda83f19183f32827d60b5431398f567a53d4/68747470733a2f2f706f7365722e707567782e6f72672f6673632f686174656f61732d62756e646c652f762f737461626c652e706e67)](https://packagist.org/packages/fsc/hateoas-bundle)[![Total Downloads](https://camo.githubusercontent.com/08310e84522e59f4cf70fcc76d60284e8c76c9a721eabbd6b0d0e88bcfbe7f66/68747470733a2f2f706f7365722e707567782e6f72672f6673632f686174656f61732d62756e646c652f646f776e6c6f6164732e706e67)](https://packagist.org/packages/fsc/hateoas-bundle)

This bundle hooks into the JMSSerializerBundle serialization process, and provides HATEOAS features. Right now, only adding links is supported.

Even though there are some tests, be aware that this is a work in progress. For example, only yaml and annotation metadata configuration is supported.

Installation
------------

[](#installation)

composer.json

```
{
    "require": {
        "fsc/hateoas-bundle": "0.5.x-dev"
    },
    "minimum-stability": "dev"
}
```

Example application
-------------------

[](#example-application)

You can find a symfony 2.1 example application using this bundle at .

Adding links
------------

[](#adding-links)

With the following configuration and entity:

### Routing and serializer/hateoas metadata

[](#routing-and-serializerhateoas-metadata)

```
# routing.yml
api_user_get:
    pattern: /api/users/{id}

api_user_list:
    pattern: /api/users

user_profile:
    pattern: /profile/{user_id}
```

*Note that you can also configure serializer/hateoas metadatas using yaml to keep serialisation out of your model*

```
