SwaggerGen/Swagger/Type/Property.php 1 location
|
@@ 66-72 (lines=7) @@
|
63 |
|
throw new \SwaggerGen\Exception("Not a property: '{$definition}'"); |
64 |
|
} |
65 |
|
$format = strtolower($match[1]); |
66 |
|
if (isset(self::$classTypes[$format])) { |
67 |
|
$type = self::$classTypes[$format]; |
68 |
|
$class = "SwaggerGen\\Swagger\\Type\\{$type}Type"; |
69 |
|
$this->Type = new $class($this, $definition); |
70 |
|
} else { |
71 |
|
throw new \SwaggerGen\Exception("Property format not recognized: '{$format}'"); |
72 |
|
} |
73 |
|
|
74 |
|
$this->description = $description; |
75 |
|
} |
SwaggerGen/Swagger/Parameter.php 1 location
|
@@ 99-105 (lines=7) @@
|
96 |
|
$match = array(); |
97 |
|
preg_match('/^([a-z]+)/i', $definition, $match); |
98 |
|
$format = strtolower($match[1]); |
99 |
|
if (isset(self::$classTypes[$format])) { |
100 |
|
$type = self::$classTypes[$format]; |
101 |
|
$class = "SwaggerGen\\Swagger\\Type\\{$type}Type"; |
102 |
|
$this->Type = new $class($this, $definition); |
103 |
|
} else { |
104 |
|
throw new \SwaggerGen\Exception("Type format not recognized: '{$format}'"); |
105 |
|
} |
106 |
|
} |
107 |
|
|
108 |
|
/** |
SwaggerGen/Swagger/Schema.php 1 location
|
@@ 66-72 (lines=7) @@
|
63 |
|
$match = array(); |
64 |
|
preg_match('/^([a-z]+)/i', $definition, $match); |
65 |
|
$format = strtolower($match[1]); |
66 |
|
if (isset(self::$classTypes[$format])) { |
67 |
|
$type = self::$classTypes[$format]; |
68 |
|
$class = "SwaggerGen\\Swagger\\Type\\{$type}Type"; |
69 |
|
$this->type = new $class($this, $definition); |
70 |
|
} else { |
71 |
|
$this->type = new Type\ReferenceObjectType($this, $definition); |
72 |
|
} |
73 |
|
|
74 |
|
$this->description = $description; |
75 |
|
} |