add test case for nullable parent property (#16552)

* add nullable case to spring test spec

* generate samples for changed spring input

* add nullable case to general test spec

* generate samples for changed general input

* generate samples again

* generates samples again

* re-build from new sources, generates samples again
This commit is contained in:
martin-mfg
2023-09-12 09:59:58 +02:00
committed by GitHub
parent 196c2b1642
commit d6695056fe
346 changed files with 20471 additions and 0 deletions

View File

@@ -426,6 +426,30 @@ class FakeController extends Controller
return response('How about implementing testJsonFormData as a get method ?');
}
/**
* Operation testNullable
*
* test nullable parent property.
*
*
* @return Http response
*/
public function testNullable()
{
$input = Request::all();
//path params validation
//not path params validation
if (!isset($input['childWithNullable'])) {
throw new \InvalidArgumentException('Missing the required parameter $childWithNullable when calling testNullable');
}
$childWithNullable = $input['childWithNullable'];
return response('How about implementing testNullable as a post method ?');
}
/**
* Operation fakeOuterBooleanSerialize
*

View File

@@ -0,0 +1,21 @@
<?php
/**
* ChildWithNullable
*/
namespace app\Models;
/**
* ChildWithNullable
*/
class ChildWithNullable {
/** @var string $type */
public $type = "";
/** @var string|null $nullableProperty */
public $nullableProperty = null;
/** @var string $otherProperty */
public $otherProperty = "";
}

View File

@@ -0,0 +1,18 @@
<?php
/**
* ParentWithNullable
*/
namespace app\Models;
/**
* ParentWithNullable
*/
class ParentWithNullable {
/** @var string $type */
public $type = "";
/** @var string|null $nullableProperty */
public $nullableProperty = null;
}