Reference
Extension points
The interfaces to plug your own types, error renderers, rendering stages and type naming.
| Interface | Registered by | For |
|---|---|---|
Ark4ne\ApiRevisions\Schema\Descriptor (extend it) | TypeRegistry::register('money', MoneySchema::class) | A value type of the application: normalize(), type() |
Ark4ne\JsonApi\Http\Errors\ErrorRenderer | errors.renderers, or binding ErrorRenderers | Rendering an exception: PRIORITY, supports(), render() |
Ark4ne\JsonApi\Rendering\Stage | rendering.stages | A step of the rendering of every resource object |
Ark4ne\JsonApi\Configuration\TypeNaming | type.naming | The type of a resource without toType() |
Reading the definitions
PostResource::definition() returns the compiled Ark4ne\JsonApi\Definition\ResourceDefinition: type, attributes
and meta as the shapes of ark4ne/laravel-api-revisions, relationships with their related classes, named links and
routes. It is the public contract read by tools such as the
OpenAPI generator. At a revision:
Definitions::for(PostResource::class, $revision).