Skip to content

JsonApiView is hard-coded: make it configurable #190

@geoidesic

Description

@geoidesic

There may be instances where it is desirable to be able to configure a custom view. Currently this is only possible using an override of the render method in JsonApiListener. Would be better via config.

I.e. edit JsonApiListener

        // Use the Crud component's config instead of listener config
        $viewClass = $controller->Crud->getConfig('viewClass', 'CrudJsonApi.JsonApi');
        $controller->viewBuilder()->setClassName($viewClass);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions