4
4
5
5
namespace Knp \JsonSchema ;
6
6
7
+ use Knp \JsonSchema \Validator \Errors ;
8
+
7
9
/**
8
10
* @template T of mixed
9
11
*
@@ -116,7 +118,7 @@ public function jsonSerialize(): array
116
118
*
117
119
* @return array<string, mixed>
118
120
*/
119
- protected static function constant ($ value ): array
121
+ public static function constant ($ value ): array
120
122
{
121
123
return [
122
124
'const ' => $ value ,
@@ -126,7 +128,7 @@ protected static function constant($value): array
126
128
/**
127
129
* @return array<string, mixed>
128
130
*/
129
- protected static function null (): array
131
+ public static function null (): array
130
132
{
131
133
return [
132
134
'type ' => 'null ' ,
@@ -136,7 +138,7 @@ protected static function null(): array
136
138
/**
137
139
* @return array<string, mixed>
138
140
*/
139
- protected static function text (): array
141
+ public static function text (): array
140
142
{
141
143
return [
142
144
'type ' => 'string ' ,
@@ -147,7 +149,7 @@ protected static function text(): array
147
149
/**
148
150
* @return array<string, mixed>
149
151
*/
150
- protected static function boolean (): array
152
+ public static function boolean (): array
151
153
{
152
154
return [
153
155
'type ' => 'boolean ' ,
@@ -157,7 +159,7 @@ protected static function boolean(): array
157
159
/**
158
160
* @return array<string, mixed>
159
161
*/
160
- protected static function string (?string $ format = null ): array
162
+ public static function string (?string $ format = null ): array
161
163
{
162
164
$ result = [
163
165
...self ::text (),
@@ -174,7 +176,7 @@ protected static function string(?string $format = null): array
174
176
/**
175
177
* @return array<string, mixed>
176
178
*/
177
- protected static function integer (): array
179
+ public static function integer (): array
178
180
{
179
181
return [
180
182
'type ' => 'integer ' ,
@@ -184,7 +186,7 @@ protected static function integer(): array
184
186
/**
185
187
* @return array<string, mixed>
186
188
*/
187
- protected static function number (): array
189
+ public static function number (): array
188
190
{
189
191
return [
190
192
'type ' => 'number ' ,
@@ -194,7 +196,7 @@ protected static function number(): array
194
196
/**
195
197
* @return array<string, mixed>
196
198
*/
197
- protected static function date (): array
199
+ public static function date (): array
198
200
{
199
201
return [
200
202
'type ' => 'string ' ,
@@ -205,7 +207,7 @@ protected static function date(): array
205
207
/**
206
208
* @return array<string, mixed>
207
209
*/
208
- protected static function positiveInteger (): array
210
+ public static function positiveInteger (): array
209
211
{
210
212
return [
211
213
...self ::integer (),
@@ -218,7 +220,7 @@ protected static function positiveInteger(): array
218
220
*
219
221
* @return array{oneOf: array<array<string, mixed>>}
220
222
*/
221
- protected static function oneOf (...$ schemas ): array
223
+ public static function oneOf (...$ schemas ): array
222
224
{
223
225
return [
224
226
'oneOf ' => $ schemas ,
0 commit comments