Skip to content

JsonApiView is hard-coded: make it configurable #190

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);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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