Skip to content

Commit d33412d

Browse files
committed
Support 3.1 vocab for applying subschemas
1 parent 9ae960c commit d33412d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/spec/Schema.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,19 @@
4545
* @property Schema[]|Reference[] $oneOf
4646
* @property Schema[]|Reference[] $anyOf
4747
* @property Schema|Reference|null $not
48+
* @property Schema|Reference|null $if
49+
* @property Schema|Reference|null $then
50+
* @property Schema|Reference|null $else
51+
* @property Schema[]|Reference[]|null $dependentSchemas
52+
* @property Schema[]|Reference[]|null $prefixItems
4853
* @property Schema|Reference|null $items
54+
* @property Schema|Reference|null $contains
4955
* @property Schema[]|Reference[] $properties
56+
* @property Schema[]|Reference[] $patternProperties
5057
* @property Schema|Reference|bool $additionalProperties
58+
* @property Schema|Reference|null $propertyNames
59+
* @property Schema|Reference|null $unevaluatedItems
60+
* @property Schema|Reference|null $unevaluatedProperties
5161
* @property string $description
5262
* @property string $format
5363
* @property mixed $default
@@ -94,9 +104,19 @@ protected function attributes(): array
94104
'oneOf' => [Schema::class],
95105
'anyOf' => [Schema::class],
96106
'not' => Schema::class,
107+
'if' => Schema::class,
108+
'then' => Schema::class,
109+
'else' => Schema::class,
110+
'dependentSchemas' => [Type::STRING, Schema::class],
111+
'prefixItems' => [Schema::class],
97112
'items' => Schema::class,
113+
'contains' => Schema::class,
98114
'properties' => [Type::STRING, Schema::class],
115+
'patternProperties' => [Type::STRING, Schema::class],
99116
//'additionalProperties' => 'boolean' | ['string', Schema::class], handled in constructor
117+
'propertyNames' => Schema::class,
118+
'unevaluatedItems' => Schema::class,
119+
'unevaluatedProperties' => Schema::class,
100120
'description' => Type::STRING,
101121
'format' => Type::STRING,
102122
'default' => Type::ANY,

0 commit comments

Comments
 (0)