File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ private static function generateExampleData(mixed $exampleData, PropertyType $ty
61
61
{
62
62
if ($ type ->type === 'array ' ) {
63
63
if ($ type ->payload instanceof \ApiClients \Tools \OpenApiClientGenerator \Representation \Schema) {
64
- $ exampleData = ArrayMerger::doMerge ($ type ->payload ->example , $ exampleData ?? [], ArrayMerger::FLAG_OVERWRITE_NUMERIC_KEY );
64
+ $ exampleData = ArrayMerger::doMerge ($ type ->payload ->example , $ exampleData ?? [], ArrayMerger::FLAG_OVERWRITE_NUMERIC_KEY | ArrayMerger:: FLAG_ALLOW_SCALAR_TO_ARRAY_CONVERSION );
65
65
} else if ($ type ->payload instanceof PropertyType) {
66
66
$ exampleData = self ::generateExampleData ($ exampleData , $ type ->payload , $ propertyName );
67
67
}
@@ -70,7 +70,7 @@ private static function generateExampleData(mixed $exampleData, PropertyType $ty
70
70
71
71
72
72
if ($ type ->payload instanceof \ApiClients \Tools \OpenApiClientGenerator \Representation \Schema) {
73
- return ArrayMerger::doMerge ($ type ->payload ->example , is_array ($ exampleData ) ? $ exampleData : [], ArrayMerger::FLAG_OVERWRITE_NUMERIC_KEY );
73
+ return ArrayMerger::doMerge ($ type ->payload ->example , is_array ($ exampleData ) ? $ exampleData : [], ArrayMerger::FLAG_OVERWRITE_NUMERIC_KEY | ArrayMerger:: FLAG_ALLOW_SCALAR_TO_ARRAY_CONVERSION );
74
74
} else if ($ exampleData === null && $ type ->type === 'scalar ' ) {
75
75
if ($ type ->payload === 'int ' ) {
76
76
return 13 ;
You can’t perform that action at this time.
0 commit comments