forked from loafle/openapi-generator-original
Update fake API to contain sample with binary body (#9610)
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user