FriendsOfCake/crud-json-api

Name: crud-json-api

Owner: Friends Of Cake

Description: CakePHP Crud Listener for building JSON API compliant APIs

Created: 2017-04-27 17:56:19.0

Updated: 2018-05-23 20:49:14.0

Pushed: 2018-05-24 15:41:41.0

Homepage:

Size: 4312

Language: PHP

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Build Status Coverage Status Total Downloads PHPStan Latest Stable Version Documentation Status

JSON API Crud Listener for CakePHP

Crud Listener for (rapidly) building CakePHP APIs following the JSON API specification.

Documentation

Documentation found here.

Installation
oser require friendsofcake/crud-json-api
Why use it?
Sample output

"data": {
  "type": "countries",
  "id": "2",
  "attributes": {
    "code": "BE",
    "name": "Belgium"
  },
  "relationships": {
    "currency": {
      "data": {
        "type": "currencies",
        "id": "1"
      },
      "links": {
        "self": "/currencies/1"
      }
    },
    "cultures": {
      "data": [
        {
          "type": "cultures",
          "id": "2"
        },
        {
          "type": "cultures",
          "id": "3"
        }
      ],
      "links": {
        "self": "/cultures?country_id=2"
      }
    }
  },
  "links": {
    "self": "/countries/2"
  }
},
"included": [
  {
    "type": "currencies",
    "id": "1",
    "attributes": {
      "code": "EUR",
      "name": "Euro"
    },
    "links": {
      "self": "/currencies/1"
    }
  },
  {
    "type": "cultures",
    "id": "2",
    "attributes": {
      "code": "nl-BE",
      "name": "Dutch (Belgium)"
    },
    "links": {
      "self": "/cultures/2"
    }
  },
  {
    "type": "cultures",
    "id": "3",
    "attributes": {
      "code": "fr-BE",
      "name": "French (Belgium)"
    },
    "links": {
      "self": "/cultures/3"
    }
  }
]

Contribute

Before submitting a PR make sure:


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.