https://github.com/catlabinteractive/charon
Charon is a framework for building self documented RESTfull API's.
https://github.com/catlabinteractive/charon
api charon framework php7
Last synced: 12 months ago
JSON representation
Charon is a framework for building self documented RESTfull API's.
- Host: GitHub
- URL: https://github.com/catlabinteractive/charon
- Owner: CatLabInteractive
- License: mit
- Created: 2016-06-17T11:53:58.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-12-17T23:37:03.000Z (over 1 year ago)
- Last Synced: 2025-03-23T22:26:17.364Z (about 1 year ago)
- Topics: api, charon, framework, php7
- Language: PHP
- Size: 1.82 MB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Charon
[](https://travis-ci.org/CatLabInteractive/charon)
*Fractal on steroids.*
What?
=====
Charon is a PHP framework for building self documented RESTful API's.
Please visit [our website](https://charon.catlab.eu/) for more information.
Getting started
===============
While Charon can be used with any framework, I have created a laravel
skeleton project to get you started fast.
Installation
------------
`composer create-project catlabinteractive/laravel-charon api`
Configuration
-------------
Please follow the instructions on
https://github.com/CatLabInteractive/laravel-charon-template
Why?
====
When building a RESTful API there are a few things that keep coming back:
* Entity to resource transformation
* API description
* Resource field filtering
* Relationship and expanding these relationships
* Filtering
* Sorting
* Pagination
Charon tries to take some of this work away by providing a
framework that takes care of most of these features.
* Instead of transformers, write definitions
* Filter and sort based on these definitions
* Allow clients to choose fields that should be returned
* Expand relationships in a single request
* Handle all pagination in one single middleware
Documentation
=============
By default, Charon generates Swagger 2.0 documentation. Other
documentors can be implemented by implementing the interface.
Frameworks
==========
Charon works very well with Laravel, but the library is built
so that it can be incorporated in other frameworks.
An ORM is not required, but makes implementing certain functionality
(like pagination and filtering) a lot easier.
Context options
===============
For both fields and expand parameters: add a * to repeat the field (for
recursive models).