php-openapi / yii2-fractal
Json-api spec implementation with league/fractal, forked from Insolita (RIP)
Installs: 1 490
Dependents: 1
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 5
Open Issues: 0
Requires
- php: >=8
- ext-json: *
- league/fractal: ^0.20.0
- yiisoft/yii2: ~2.0.15
Requires (Dev)
- cebe/indent: *
- codeception/assert-throws: ^1.0
- codeception/codeception: 5.1.*
- codeception/module-asserts: ^3.0
- codeception/module-db: ^3.0
- codeception/module-phpbrowser: 3.0.*
- codeception/module-rest: ^3.0
- codeception/module-yii2: ^1.1
- codeception/verify: ^1.5
- friendsofphp/php-cs-fixer: ~2.16
- fzaninotto/faker: ^1.9@dev
This package is auto-updated.
Last update: 2024-12-18 13:46:11 UTC
README
The set of utils and actions for prepare Rest API accordingly JSON:API https://jsonapi.org/format/ With https://fractal.thephpleague.com
Installation
composer require php-openapi/yii2-fractal
Usage
-
Add class
insolita\fractal\JsonApiBootstrap
to the 'bootstrap' section of api application config (or update application config manually with same changes as inJsonApiBootstrap
class ) see tests/testapp/config/api.php. -
Create your controller classes by extending
JsonApiController
orJsonApiActiveController
which contains predefined CRUD actions. See examples at tests/testapp/controllers.
Contributing / Local Development / Testing
See CONTRIBUTING.md file
License
See LICENSE file