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.
1 parent 0534bbb commit a713a22Copy full SHA for a713a22
src/JsonSchema/SchemaBuilder.php
@@ -311,8 +311,9 @@ private function copyTo(SchemaBuilder $schemaBuilder)
311
312
private function processOther()
313
{
314
- static $skip = null;
+ static $skip = null, $emptySchema = null;
315
if ($skip === null) {
316
+ $emptySchema = new Schema();
317
$names = Schema::names();
318
$skip = array(
319
$names->type => 1,
@@ -344,6 +345,10 @@ private function processOther()
344
345
continue;
346
}
347
348
+ if (!property_exists($emptySchema, $key) && $key !== 'const' && $key[0] !== '$') {
349
+ continue;
350
+ }
351
+
352
//$this->result->addSnippet('/* ' . print_r($value, 1) . '*/' . "\n");
353
//echo "{$this->varName}->{$key}\n";
354
if ($value instanceof ObjectItem) {
0 commit comments