swisnl/json-api-server

Inconsistent HTTP methods

Closed this issue · 1 comments

Routes define patch method

Route::patch('/{id}', Controller::class . '@update');

Tests tries to use put method, which is not defined

$response = $this->put($this->baseUrl.$$CAMEL_CASE_MODEL_NAME$->id, $$CAMEL_CASE_MODEL_NAME$->toArray());

Which is the correct one?

I've double-checked the specification, and I would prefer PATCH since that is the request the specification uses.