Sanitised identifiers + all_of/any_of support
Sanitise identifiers, better all_of
/ any_of
support, and a large refactoring
- Sanitises / Elmifies JSON schema identifiers, such that the Elm code output is valid Elm
- Moves indentation- and naming-specific logic from
printer/util.ex
into a new
printer/utils
folder, - adjusts all printers to now use the
Naming.normalize_identifier()
function
before sending identifier names to Elm code templates, and - adds tests for the 'sanitise identifier' feature.
-
Fixes and refactors the
allOf
andanyOf
printers, such that they produce correct Elm code for decoding and encodingall_of
andany_of
JSON schema nodes. -
Adds contexts 'parser' and 'printer'
We isolate all parser related code in the parser
folder and expose the
parser.ex
module as the interface for that folder / context.
We repeat this exercise for the printer
folder / context.
Furthermore, we remove all the import statements and replace them with more
explicit aliases.
-
Splits the
JS2E.Printer.Util
module into a wholeprinter/utils
folder in order to increase cohesion, i.e. have one util module per relevant
area of printing. -
Fixes all dialyzer errors except for allOf/anyOf/oneOf printers
-
Improves documentation
- Updates 'allOf' and 'anyOf' type descriptions to reflect new Elm
decoders/encoders, - updates
README.md
to include a section onjs2e
error reporting, and - creates a
CONTRIBUTING.md
file, detailing what potential contributors should
know before filing issues/PRs.