mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-09 11:56:10 +00:00
use model class for request body with additionalProperties (#16613)
* try out simple fix * add test case * generate samples
This commit is contained in:
@@ -397,6 +397,30 @@ class FakeController extends Controller
|
||||
|
||||
return response('How about implementing testInlineAdditionalProperties as a post method ?');
|
||||
}
|
||||
/**
|
||||
* Operation testInlineFreeformAdditionalProperties
|
||||
*
|
||||
* test inline free-form additionalProperties.
|
||||
*
|
||||
*
|
||||
* @return Http response
|
||||
*/
|
||||
public function testInlineFreeformAdditionalProperties()
|
||||
{
|
||||
$input = Request::all();
|
||||
|
||||
//path params validation
|
||||
|
||||
|
||||
//not path params validation
|
||||
if (!isset($input['testInlineFreeformAdditionalPropertiesRequest'])) {
|
||||
throw new \InvalidArgumentException('Missing the required parameter $testInlineFreeformAdditionalPropertiesRequest when calling testInlineFreeformAdditionalProperties');
|
||||
}
|
||||
$testInlineFreeformAdditionalPropertiesRequest = $input['testInlineFreeformAdditionalPropertiesRequest'];
|
||||
|
||||
|
||||
return response('How about implementing testInlineFreeformAdditionalProperties as a post method ?');
|
||||
}
|
||||
/**
|
||||
* Operation testJsonFormData
|
||||
*
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* TestInlineFreeformAdditionalPropertiesRequest
|
||||
*/
|
||||
namespace app\Models;
|
||||
|
||||
/**
|
||||
* TestInlineFreeformAdditionalPropertiesRequest
|
||||
*/
|
||||
class TestInlineFreeformAdditionalPropertiesRequest {
|
||||
|
||||
/** @var string $someProperty */
|
||||
public $someProperty = "";
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user