Generate random values based on JSON Schema.
Experimental module.
Random value generator.
buildSchema |> withProperties [ ( "foo", buildSchema |> withType "integer" ) ] |> toSchema |> Result.withDefault blankSchema |> value defaultSettings |> (\a -> Random.step a (Random.initialSeed 2)) |> (\( v, _ ) -> Expect.equal v (Encode.object [ ( "foo", Encode.int 688281600 ) ]) )
See tests for more examples.
Random value generator at path.
Customize generator behaviour using following parameters:
Defaults for GeneratorSettings
Random value generator.
See tests for more examples.