diff --git a/src/Illuminate/Contracts/JsonSchema/JsonSchema.php b/src/Illuminate/Contracts/JsonSchema/JsonSchema.php new file mode 100644 index 000000000000..9ef7fd4af9f0 --- /dev/null +++ b/src/Illuminate/Contracts/JsonSchema/JsonSchema.php @@ -0,0 +1,51 @@ +)|array $properties + * @return \Illuminate\JsonSchema\Types\ObjectType + */ + public function object(Closure|array $properties = []); + + /** + * Create a new array property instance. + * + * @return \Illuminate\JsonSchema\Types\ArrayType + */ + public function array(); + + /** + * Create a new string property instance. + * + * @return \Illuminate\JsonSchema\Types\String + */ + public function string(); + + /** + * Create a new integer property instance. + * + * @return \Illuminate\JsonSchema\Types\IntegerType + */ + public function integer(); + + /** + * Create a new number property instance. + * + * @return \Illuminate\JsonSchema\Types\NumberType + */ + public function number(); + + /** + * Create a new boolean property instance. + * + * @return \Illuminate\JsonSchema\Types\BooleanType + */ + public function boolean(); +} diff --git a/src/Illuminate/JsonSchema/JsonSchemaTypeFactory.php b/src/Illuminate/JsonSchema/JsonSchemaTypeFactory.php index 4621a0e80fd2..8729e3c31da0 100644 --- a/src/Illuminate/JsonSchema/JsonSchemaTypeFactory.php +++ b/src/Illuminate/JsonSchema/JsonSchemaTypeFactory.php @@ -3,8 +3,9 @@ namespace Illuminate\JsonSchema; use Closure; +use Illuminate\Contracts\JsonSchema\JsonSchema as JsonSchemaContract; -class JsonSchemaTypeFactory extends JsonSchema +class JsonSchemaTypeFactory extends JsonSchema implements JsonSchemaContract { /** * Create a new object schema instance.