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.exinto a new
printer/utilsfolder, - 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
allOfandanyOfprinters, such that they produce correct Elm code for decoding and encodingall_ofandany_ofJSON 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.Utilmodule 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.mdto include a section onjs2eerror reporting, and - creates a
CONTRIBUTING.mdfile, detailing what potential contributors should
know before filing issues/PRs.