diff --git a/src/Swagger2/Schema/ByteSchema.php b/src/Swagger2/Schema/ByteSchema.php index 61de641..5710903 100644 --- a/src/Swagger2/Schema/ByteSchema.php +++ b/src/Swagger2/Schema/ByteSchema.php @@ -4,11 +4,12 @@ class ByteSchema extends StringSchema { /** + * @param string $format * @return $this */ - public static function create() + public static function create($format = "byte") { - return new self(); + return new self($format); } public function __construct() diff --git a/src/Swagger2/Schema/DateSchema.php b/src/Swagger2/Schema/DateSchema.php index a4e60fc..41185bf 100644 --- a/src/Swagger2/Schema/DateSchema.php +++ b/src/Swagger2/Schema/DateSchema.php @@ -4,11 +4,12 @@ class DateSchema extends StringSchema { /** + * @param string $format * @return $this */ - public static function create() + public static function create($format = "date") { - return new self(); + return new self($format); } public function __construct() diff --git a/src/Swagger2/Schema/DateTimeSchema.php b/src/Swagger2/Schema/DateTimeSchema.php index 704f8b8..3c7828f 100644 --- a/src/Swagger2/Schema/DateTimeSchema.php +++ b/src/Swagger2/Schema/DateTimeSchema.php @@ -4,11 +4,12 @@ class DateTimeSchema extends StringSchema { /** + * @param string $format * @return $this */ - public static function create() + public static function create($format = "date-time") { - return new self(); + return new self($format); } public function __construct() diff --git a/src/Swagger2/Schema/DoubleSchema.php b/src/Swagger2/Schema/DoubleSchema.php index 085fe5d..f12bbdb 100644 --- a/src/Swagger2/Schema/DoubleSchema.php +++ b/src/Swagger2/Schema/DoubleSchema.php @@ -4,11 +4,12 @@ class DoubleSchema extends NumberSchema { /** + * @param string $format * @return $this */ - public static function create() + public static function create($format = "double") { - return new self(); + return new self($format); } public function __construct() diff --git a/src/Swagger2/Schema/FloatSchema.php b/src/Swagger2/Schema/FloatSchema.php index 2bad05a..5ea23d8 100644 --- a/src/Swagger2/Schema/FloatSchema.php +++ b/src/Swagger2/Schema/FloatSchema.php @@ -4,11 +4,12 @@ class FloatSchema extends NumberSchema { /** + * @param string $format * @return $this */ - public static function create() + public static function create($format = "float") { - return new self(); + return new self($format); } public function __construct() diff --git a/src/Swagger2/Schema/LongSchema.php b/src/Swagger2/Schema/LongSchema.php index 356b6f3..0dd78e9 100644 --- a/src/Swagger2/Schema/LongSchema.php +++ b/src/Swagger2/Schema/LongSchema.php @@ -4,11 +4,12 @@ class LongSchema extends IntegerSchema { /** + * @param string $format * @return $this */ - public static function create() + public static function create($format = "int64") { - return new self(); + return new self($format); } public function __construct() diff --git a/src/Swagger2/Schema/StringSchema.php b/src/Swagger2/Schema/StringSchema.php index da85557..24e15a4 100644 --- a/src/Swagger2/Schema/StringSchema.php +++ b/src/Swagger2/Schema/StringSchema.php @@ -1,7 +1,6 @@