StydeNet / enlighten

Enlighten your APIs with auto-generated documentation
MIT License
575 stars 32 forks source link

error when entering anything json #29

Closed MostafaRabia closed 4 years ago

MostafaRabia commented 4 years ago

Argument 2 passed to Styde\Enlighten\Models\ExampleRequest::replaceValues() must be of the type array, null given When entering my testIndex to show json returned, everything else works.

sileence commented 4 years ago

Thanks for reporting the problem. Please make sure the response key in config/enlighten.php has the following structure:

    'response' => [
        'headers' => [
            'hide' => [],
            'overwrite' => [],
        ],
        'body' => [
            'hide' => [],
            'overwrite' => [],
        ]
    ],

You should be missing the body key in response. This is due to a new feature as mentioned in CHANGELOG. I also documented this extra upgrade step.

Sorry about the inconvenience.

I will leave this issue open in case somebody else has the same problem when upgrading.

MostafaRabia commented 4 years ago

Thank you.