catlabinteractive / charon
Charon is a framework for building self documented RESTful API's.
Installs: 2 753
Dependents: 3
Suggesters: 0
Security: 0
Stars: 2
Watchers: 4
Forks: 1
Open Issues: 8
Requires
- php: >=7.1
- ext-mbstring: *
- catlabinteractive/requirements: ^1.0.7
Requires (Dev)
- catlabinteractive/cursor-pagination: ^1.0.8
- phpunit/phpunit: ^9.0
Suggests
- ezyang/htmlpurifier: ^4.14
- dev-master
- v1.5.12
- v1.5.11
- v1.5.10
- v1.5.9
- v1.5.8
- v1.5.7
- v1.5.6
- v1.5.4
- v1.5.3
- v1.5.2
- v1.5.1
- v1.5.0
- v1.4.23
- v1.4.22
- v1.4.19
- v1.4.18
- v1.4.17
- v1.4.16
- v1.4.15
- v1.4.14
- v1.4.13
- v1.4.11
- v1.4.9
- v1.4.7
- v1.4.6
- v1.4.5
- v1.4.4
- v1.4.3
- v1.4.2
- v1.4.1
- v1.4.0
- 1.3.x-dev
- v1.3.47
- v1.3.46
- v1.3.45
- v1.3.44
- v1.3.43
- v1.3.42
- v1.3.41
- v1.3.40
- v1.3.39
- v1.3.38
- v1.3.37
- v1.3.36
- v1.3.34
- v1.3.33
- v1.3.31
- v1.3.30
- v1.3.29
- v1.3.28
- v1.3.27
- v1.3.26
- v1.3.25
- v1.3.24
- v1.3.23
- v1.3.22
- v1.3.21
- v1.3.20
- v1.3.19
- v1.3.16
- v1.3.15
- v1.3.14
- v1.3.13
- v1.3.12
- v1.3.11
- v1.3.10
- v1.2.9
- v1.1.15
- 1.0.x-dev
- v1.0.21
- v0.1.66
- dev-dependabot/npm_and_yarn/docusaurus/webpack-5.76.1
- dev-dependabot/npm_and_yarn/docusaurus/sideway/formula-3.0.1
- dev-dependabot/npm_and_yarn/docusaurus/http-cache-semantics-4.1.1
- dev-dependabot/npm_and_yarn/docusaurus/ua-parser-js-0.7.33
- dev-dependabot/npm_and_yarn/docusaurus/json5-2.2.3
- dev-dependabot/npm_and_yarn/docusaurus/loader-utils-2.0.4
- dev-dependabot/npm_and_yarn/docusaurus/minimatch-and-recursive-readdir-and-serve-handler-3.1.2
- dev-dependabot/npm_and_yarn/docusaurus/terser-5.14.2
- dev-filters-refactor
- dev-rework-documentation
- dev-development
- dev-jsonapi-compatible
- dev-1.0-undefined-values
- dev-develop
This package is auto-updated.
Last update: 2024-11-06 22:20:29 UTC
README
Fractal on steroids.
What?
Charon is a PHP framework for building self documented RESTful API's.
Please visit our website 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).