dingo / api

A RESTful API package for the Laravel and Lumen frameworks.
BSD 3-Clause "New" or "Revised" License
9.32k stars 1.25k forks source link

Transformed Data In Dispatcher Response #1739

Open philipborbon opened 4 years ago

philipborbon commented 4 years ago
Q A
Bug? no
New Feature? yes
Framework Laravel
Framework version 7.x.y
Package version 3.x.y
PHP version 7.x.y

Actual Behaviour

Tried using app('api.dispatcher')->raw()->get('/data')

And getting response like this

{
            "exception": null,
            "headers": [],
            "original": [
                {
                    "id": 1,
                    "value_type_id": 1,
                    "sort": null,

Expected Behaviour

End point response in /data is using Transformer. Expecting to receive a transformed data.

Steps to Reproduce

1) Create endpoint with response using transformer 2) Call endpoint using dispatcher with raw