This package is abandoned and no longer maintained. The author suggests using the apie/apie-lib package instead.

apie is a library to convert plain old php objects into a REST API with OpenAPI spec.

4.0.1 2020-09-22 12:27 UTC


CircleCI codecov Travis Scrutinizer Code Quality

library to convert simple POPO's (Plain Old PHP Objects), DTO (Data Transfer Objects) and Entities to a REST API with OpenAPI spec. It's still a work in progress, but there are tons of unit tests and a bridge to integrate the library in Laravel.

Since Apie version 3 it is also possible to add plugins to be modular.


  1. Installation
  2. How the mapping works
  3. PSR Controllers/routing
  4. Search filters
  5. Apie plugins
  6. Versioning
  7. Resource sub actions

Apie vs. Api Platform

This library is heavily inspired by the Symfony Api Platform, but there are some changes:

  • This library is framework agnostic and requires a wrapper library to make it work in a framework. Api Platform core is framework agnostic, but it is hard to setup outside the symfony framework.
  • In the Api Platform a resource provider or persister determines if it can persist or retrieve a specific resource with a supports() method. For Apie the resource class is explicitly linked to a service making it easier to select which HTTP methods are available.
  • API Platform has no default serialization group if no serialization group is selected.
  • So far APIE has less functionality for standards (JSON+LD, HAL) and no GraphQL support. Eventually we might add it.
  • APIE is better capable of having api resources without an id.