77namespace Swaggest \JsonSchema \SwaggerSchema ;
88
99use Swaggest \JsonSchema \Constraint \Properties ;
10- use Swaggest \JsonSchema \Schema ;
10+ use Swaggest \JsonSchema \Schema as JsonBasicSchema ;
1111use Swaggest \JsonSchema \Structure \ClassStructure ;
1212
1313
@@ -79,26 +79,26 @@ class FormDataParameterSubSchema extends ClassStructure {
7979
8080 /**
8181 * @param Properties|static $properties
82- * @param Schema $ownerSchema
82+ * @param JsonBasicSchema $ownerSchema
8383 */
84- public static function setUpProperties ($ properties , Schema $ ownerSchema )
84+ public static function setUpProperties ($ properties , JsonBasicSchema $ ownerSchema )
8585 {
86- $ properties ->required = Schema ::boolean ();
86+ $ properties ->required = JsonBasicSchema ::boolean ();
8787 $ properties ->required ->description = 'Determines whether or not this parameter is required or optional. ' ;
8888 $ properties ->required ->default = false ;
89- $ properties ->in = Schema ::string ();
89+ $ properties ->in = JsonBasicSchema ::string ();
9090 $ properties ->in ->description = 'Determines the location of the parameter. ' ;
9191 $ properties ->in ->enum = array (
9292 0 => 'formData ' ,
9393 );
94- $ properties ->description = Schema ::string ();
94+ $ properties ->description = JsonBasicSchema ::string ();
9595 $ properties ->description ->description = 'A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. ' ;
96- $ properties ->name = Schema ::string ();
96+ $ properties ->name = JsonBasicSchema ::string ();
9797 $ properties ->name ->description = 'The name of the parameter. ' ;
98- $ properties ->allowEmptyValue = Schema ::boolean ();
98+ $ properties ->allowEmptyValue = JsonBasicSchema ::boolean ();
9999 $ properties ->allowEmptyValue ->description = 'allows sending a parameter by name only or with an empty value. ' ;
100100 $ properties ->allowEmptyValue ->default = false ;
101- $ properties ->type = Schema ::string ();
101+ $ properties ->type = JsonBasicSchema ::string ();
102102 $ properties ->type ->enum = array (
103103 0 => 'string ' ,
104104 1 => 'number ' ,
@@ -107,9 +107,9 @@ public static function setUpProperties($properties, Schema $ownerSchema)
107107 4 => 'array ' ,
108108 5 => 'file ' ,
109109 );
110- $ properties ->format = Schema ::string ();
110+ $ properties ->format = JsonBasicSchema ::string ();
111111 $ properties ->items = PrimitivesItems::schema ();
112- $ properties ->collectionFormat = Schema ::string ();
112+ $ properties ->collectionFormat = JsonBasicSchema ::string ();
113113 $ properties ->collectionFormat ->default = 'csv ' ;
114114 $ properties ->collectionFormat ->enum = array (
115115 0 => 'csv ' ,
@@ -118,40 +118,40 @@ public static function setUpProperties($properties, Schema $ownerSchema)
118118 3 => 'pipes ' ,
119119 4 => 'multi ' ,
120120 );
121- $ properties ->default = new Schema ();
122- $ properties ->maximum = Schema ::number ();
123- $ properties ->exclusiveMaximum = Schema ::boolean ();
121+ $ properties ->default = new JsonBasicSchema ();
122+ $ properties ->maximum = JsonBasicSchema ::number ();
123+ $ properties ->exclusiveMaximum = JsonBasicSchema ::boolean ();
124124 $ properties ->exclusiveMaximum ->default = false ;
125- $ properties ->minimum = Schema ::number ();
126- $ properties ->exclusiveMinimum = Schema ::boolean ();
125+ $ properties ->minimum = JsonBasicSchema ::number ();
126+ $ properties ->exclusiveMinimum = JsonBasicSchema ::boolean ();
127127 $ properties ->exclusiveMinimum ->default = false ;
128- $ properties ->maxLength = Schema ::integer ();
128+ $ properties ->maxLength = JsonBasicSchema ::integer ();
129129 $ properties ->maxLength ->minimum = 0 ;
130- $ properties ->minLength = new Schema ();
131- $ properties ->minLength ->allOf [0 ] = Schema ::integer ();
130+ $ properties ->minLength = new JsonBasicSchema ();
131+ $ properties ->minLength ->allOf [0 ] = JsonBasicSchema ::integer ();
132132 $ properties ->minLength ->allOf [0 ]->minimum = 0 ;
133- $ properties ->minLength ->allOf [1 ] = new Schema ();
133+ $ properties ->minLength ->allOf [1 ] = new JsonBasicSchema ();
134134 $ properties ->minLength ->allOf [1 ]->default = 0 ;
135- $ properties ->pattern = Schema ::string ();
135+ $ properties ->pattern = JsonBasicSchema ::string ();
136136 $ properties ->pattern ->format = 'regex ' ;
137- $ properties ->maxItems = Schema ::integer ();
137+ $ properties ->maxItems = JsonBasicSchema ::integer ();
138138 $ properties ->maxItems ->minimum = 0 ;
139- $ properties ->minItems = new Schema ();
140- $ properties ->minItems ->allOf [0 ] = Schema ::integer ();
139+ $ properties ->minItems = new JsonBasicSchema ();
140+ $ properties ->minItems ->allOf [0 ] = JsonBasicSchema ::integer ();
141141 $ properties ->minItems ->allOf [0 ]->minimum = 0 ;
142- $ properties ->minItems ->allOf [1 ] = new Schema ();
142+ $ properties ->minItems ->allOf [1 ] = new JsonBasicSchema ();
143143 $ properties ->minItems ->allOf [1 ]->default = 0 ;
144- $ properties ->uniqueItems = Schema ::boolean ();
144+ $ properties ->uniqueItems = JsonBasicSchema ::boolean ();
145145 $ properties ->uniqueItems ->default = false ;
146- $ properties ->enum = Schema ::arr ();
146+ $ properties ->enum = JsonBasicSchema ::arr ();
147147 $ properties ->enum ->minItems = 1 ;
148148 $ properties ->enum ->uniqueItems = true ;
149- $ properties ->multipleOf = Schema ::number ();
149+ $ properties ->multipleOf = JsonBasicSchema ::number ();
150150 $ properties ->multipleOf ->minimum = 0 ;
151151 $ properties ->multipleOf ->exclusiveMinimum = true ;
152- $ ownerSchema = new Schema ();
152+ $ ownerSchema = new JsonBasicSchema ();
153153 $ ownerSchema ->additionalProperties = false ;
154- $ ownerSchema ->patternProperties ['^x- ' ] = new Schema ();
154+ $ ownerSchema ->patternProperties ['^x- ' ] = new JsonBasicSchema ();
155155 $ ownerSchema ->patternProperties ['^x- ' ]->description = 'Any property starting with x- is valid. ' ;
156156 }
157157}
0 commit comments