|
1 | 1 | <?php |
2 | 2 | /** |
3 | 3 | * @file ATTENTION!!! The code below was carefully crafted by a mean machine. |
4 | | - * Please consider to NOT put any emotional human-generated modifications as AI will throw them away with no mercy. |
| 4 | + * Please consider to NOT put any emotional human-generated modifications as the splendid AI will throw them away with no mercy. |
5 | 5 | */ |
6 | 6 |
|
7 | 7 | namespace Swaggest\JsonSchema\SwaggerSchema; |
8 | 8 |
|
9 | 9 | use Swaggest\JsonSchema\Constraint\Properties; |
10 | | -use Swaggest\JsonSchema\Schema as JsonBasicSchema; |
| 10 | +use Swaggest\JsonSchema\Schema; |
11 | 11 | use Swaggest\JsonSchema\Structure\ClassStructure; |
12 | 12 |
|
13 | 13 |
|
@@ -39,29 +39,29 @@ class FileSchema extends ClassStructure { |
39 | 39 |
|
40 | 40 | /** |
41 | 41 | * @param Properties|static $properties |
42 | | - * @param JsonBasicSchema $ownerSchema |
| 42 | + * @param Schema $ownerSchema |
43 | 43 | */ |
44 | | - public static function setUpProperties($properties, JsonBasicSchema $ownerSchema) |
| 44 | + public static function setUpProperties($properties, Schema $ownerSchema) |
45 | 45 | { |
46 | | - $properties->format = JsonBasicSchema::string(); |
47 | | - $properties->title = JsonBasicSchema::string(); |
48 | | - $properties->description = JsonBasicSchema::string(); |
49 | | - $properties->default = new JsonBasicSchema(); |
50 | | - $properties->required = JsonBasicSchema::arr(); |
51 | | - $properties->required->items = JsonBasicSchema::string(); |
| 46 | + $properties->format = Schema::string(); |
| 47 | + $properties->title = Schema::string(); |
| 48 | + $properties->description = Schema::string(); |
| 49 | + $properties->default = new Schema(); |
| 50 | + $properties->required = Schema::arr(); |
| 51 | + $properties->required->items = Schema::string(); |
52 | 52 | $properties->required->minItems = 1; |
53 | 53 | $properties->required->uniqueItems = true; |
54 | | - $properties->type = JsonBasicSchema::string(); |
| 54 | + $properties->type = Schema::string(); |
55 | 55 | $properties->type->enum = array ( |
56 | 56 | 0 => 'file', |
57 | 57 | ); |
58 | | - $properties->readOnly = JsonBasicSchema::boolean(); |
| 58 | + $properties->readOnly = Schema::boolean(); |
59 | 59 | $properties->readOnly->default = false; |
60 | 60 | $properties->externalDocs = ExternalDocs::schema(); |
61 | | - $properties->example = new JsonBasicSchema(); |
| 61 | + $properties->example = new Schema(); |
62 | 62 | $ownerSchema->type = 'object'; |
63 | 63 | $ownerSchema->additionalProperties = false; |
64 | | - $ownerSchema->patternProperties['^x-'] = new JsonBasicSchema(); |
| 64 | + $ownerSchema->patternProperties['^x-'] = new Schema(); |
65 | 65 | $ownerSchema->patternProperties['^x-']->description = 'Any property starting with x- is valid.'; |
66 | 66 | $ownerSchema->description = 'A deterministic version of a JSON Schema object.'; |
67 | 67 | $ownerSchema->required = array ( |
|
0 commit comments