Skip to content

Repository files navigation

GOintegro / HATEOAS (bundle)

Build StatusCode Climate

This is a Symfony 2 bundle for the GOintegro HATEOAS lib that uses a Doctrine 2 entity map and a RAML API definition to conjure a HATEOAS API, following the JSON-API specification.

You don't get scaffolds. You get a working API.

You get a working API with features sweeter than a Bobcat's self-esteem.

Try it out

Check out the example app project, so you can feel the magic in your finger tips without much ado.


Installation

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

$ composer require gointegro/hateoas-bundle

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.

Step 2: Enable the Bundle

Then, enable the bundle by adding the following line in the app/AppKernel.php file of your project:

<?php// app/AppKernel.phpclass AppKernel extends Kernel
{
publicfunctionregisterBundles()
{
$bundles = array(
newGoIntegro\Bundle\HateoasBundle\GoIntegroHateoasBundle(),
);
}
}
?>

Step 3: Add these parameters

# app/config/parameters.yml# HATEOAS APIapi.base_url: "http://api.gointegro.com"api.url_path: "/api/v2"api.resource_class_path: "Rest2/Resource"

Step 4: Add these routes

# app/config/routing.yml# Place it underneath it all - it contains a catch-all route.go_integro_hateoas:
resource: "@GoIntegroHateoasBundle/Resources/config/routing.yml"prefix: /api/v2

Usage

Check out the library docs for more info.

About

You already have a beautiful HATEOAS API. You just don't know it yet.

Resources

Stars

68 stars

Watchers

9 watching

Forks

Releases

Packages

Used by

Contributors

Languages