From 8de165d6b053e3ee2790b37a321ebf54136eee6b Mon Sep 17 00:00:00 2001 From: Antoine Lelaisant Date: Mon, 3 Oct 2022 13:43:09 +0200 Subject: [PATCH] fix: getSchema scope in CollectionSchema, EnumSchema and ObjectSchema --- src/CollectionSchema.php | 2 +- src/EnumSchema.php | 2 +- src/ObjectSchema.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CollectionSchema.php b/src/CollectionSchema.php index d73279f..596ede5 100644 --- a/src/CollectionSchema.php +++ b/src/CollectionSchema.php @@ -50,7 +50,7 @@ protected function getRange(): ?int return null; } - protected function getSchema(): array + public function getSchema(): array { $schema = [ 'type' => 'array', diff --git a/src/EnumSchema.php b/src/EnumSchema.php index 2db3285..abedb36 100644 --- a/src/EnumSchema.php +++ b/src/EnumSchema.php @@ -15,7 +15,7 @@ public function getExamples(): iterable return $this->getEnum(); } - protected function getSchema(): array + public function getSchema(): array { return [ 'enum' => [...$this->getEnum()], diff --git a/src/ObjectSchema.php b/src/ObjectSchema.php index 1d8849e..026bbdf 100644 --- a/src/ObjectSchema.php +++ b/src/ObjectSchema.php @@ -59,7 +59,7 @@ protected function addProperty(string $name, JsonSchema $schema, bool $required } } - protected function getSchema(): array + public function getSchema(): array { return [ 'type' => 'object',