json-schema-to-elm
json-schema-to-elm copied to clipboard
Investigate supporting the 'default' keyword
Investigate whether it makes sense to support the 'default' keyword, see 7.3 in the validation spec.
First step in implementing the default
keyword is to go through the documentation of all the defined types in lib/types
and add proposals to the @moduledoc
on how default
should be handled in the translation from JSON schema -> Elixir types -> Elm code output.
While the spec states
It is RECOMMENDED that a default value be valid against the associated schema.
I'd expect the implementation to be a bit more pleasant (and the resulting Elm code) if we assume that the default value is valid against the schema.
Added parser support for default
keyword in json_schema
.