Update fake API to contain sample with binary body (#9610)

This commit is contained in:
Peter Leibiger
2021-05-29 04:26:01 +02:00
committed by GitHub
parent 1b6fd2dd7a
commit f7b93ebdf2
46 changed files with 1844 additions and 42 deletions

View File

@@ -228,6 +228,30 @@ class FakeController extends Controller
return response('How about implementing testGroupParameters as a delete method ?');
}
/**
* Operation testBodyWithBinary
*
* .
*
*
* @return Http response
*/
public function testBodyWithBinary()
{
$input = Request::all();
//path params validation
//not path params validation
if (!isset($input['body'])) {
throw new \InvalidArgumentException('Missing the required parameter $body when calling testBodyWithBinary');
}
$body = $input['body'];
return response('How about implementing testBodyWithBinary as a put method ?');
}
/**
* Operation testBodyWithFileSchema
*

View File

@@ -63,10 +63,17 @@ Route::get('/v2/fake', 'FakeController@testEnumParameters');
*/
Route::delete('/v2/fake', 'FakeController@testGroupParameters');
/**
* put testBodyWithBinary
* Summary:
* Notes: For this test, the body has to be a binary file.
*/
Route::put('/v2/fake/body-with-binary', 'FakeController@testBodyWithBinary');
/**
* put testBodyWithFileSchema
* Summary:
* Notes: For this test, the body for this request much reference a schema named `File`.
* Notes: For this test, the body for this request must reference a schema named `File`.
*/
Route::put('/v2/fake/body-with-file-schema', 'FakeController@testBodyWithFileSchema');