We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7796f5a + 28d6113 commit 3c4e507Copy full SHA for 3c4e507
src/Services/OpenApi.php
@@ -879,11 +879,17 @@ private function buildRequestBodySchema(array $parameters): Schema
879
880
// CRITICAL: Pass items as ARRAY in constructor, NOT as Schema object
881
// The Schema constructor will automatically convert it to a Schema object
882
- $properties[$name] = new Schema([
+ $arraySchemaData = [
883
'type' => 'array',
884
'description' => $param['description'] ?? '',
885
'items' => $itemsSchemaData, // Pass as array, not Schema object
886
- ]);
+ ];
887
+
888
+ if (!empty($param['example'])) {
889
+ $arraySchemaData['example'] = $param['example'];
890
+ }
891
892
+ $properties[$name] = new Schema($arraySchemaData);
893
}
894
// Handle simple properties
895
else {
0 commit comments