apie is a library to convert plain old php objects into a REST API with OpenAPI spec.
This package is auto-updated.
Last update: 2022-06-12 09:58:43 UTC
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.
- How the mapping works
- PSR Controllers/routing
- Search filters
- Apie plugins
- Resource sub actions
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.