php-openapi / yii2-fractal
Json-api spec implementation with league/fractal, forked from Insolita (RIP)
Installs: 1 302
Dependents: 1
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 5
Open Issues: 0
Requires
- php: >=7.1.0
- ext-json: *
- league/fractal: ^0.19.2
- yiisoft/yii2: ~2.0.15
Requires (Dev)
- cebe/indent: *
- codeception/assert-throws: ^1.0
- codeception/codeception: ^4.1
- codeception/module-asserts: ^1.0.0
- codeception/module-db: ^1.0
- codeception/module-phpbrowser: ^1.0.0
- codeception/module-rest: <1.3.0
- codeception/module-yii2: ^1.1
- codeception/verify: ^1.5
- friendsofphp/php-cs-fixer: ~2.16
- fzaninotto/faker: ^1.9
This package is auto-updated.
Last update: 2024-11-13 13:10:26 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