Skip to content

Commit

Permalink
Support 3.1 vocab for applying subschemas
Browse files Browse the repository at this point in the history
  • Loading branch information
charjr committed Nov 8, 2024
1 parent 9ae960c commit dc630cb
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/spec/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,19 @@
* @property Schema[]|Reference[] $oneOf
* @property Schema[]|Reference[] $anyOf
* @property Schema|Reference|null $not
* @property Schema|Reference|null $if
* @property Schema|Reference|null $then
* @property Schema|Reference|null $else
* @property Schema[]|Reference[]|null $dependentSchemas
* @property Schema|Reference|null $prefixItems
* @property Schema|Reference|null $items
* @property Schema|Reference|null $contains
* @property Schema[]|Reference[] $properties
* @property Schema[]|Reference[] $patternProperties
* @property Schema|Reference|bool $additionalProperties
* @property Schema|Reference|null $propertyNames
* @property Schema|Reference|null $unevaluatedItems
* @property Schema|Reference|null $unevaluatedProperties
* @property string $description
* @property string $format
* @property mixed $default
Expand Down Expand Up @@ -94,9 +104,19 @@ protected function attributes(): array
'oneOf' => [Schema::class],
'anyOf' => [Schema::class],
'not' => Schema::class,
'if' => Schema::class,
'then' => Schema::class,
'else' => Schema::class,
'dependentSchemas' => [Type::STRING, Schema::class],
'prefixItems' => [Schema::class],
'items' => Schema::class,
'contains' => Schema::class,
'properties' => [Type::STRING, Schema::class],
'patternProperties' => [Type::STRING, Schema::class],
//'additionalProperties' => 'boolean' | ['string', Schema::class], handled in constructor
'propertyNames' => Schema::class,
'unevaluatedItems' => Schema::class,
'unevaluatedProperties' => Schema::class,
'description' => Type::STRING,
'format' => Type::STRING,
'default' => Type::ANY,
Expand Down

0 comments on commit dc630cb

Please sign in to comment.