Create a new method to determinate if the object is mandatory or optional and return the type box definition with the custom implementation.
The validation is very concise, however a new method was created because it is considered a essential part on the process and it is valuable to have tests that assurance correct functionality of that section. Which is easier by having that code in a single method.
Some side changes were made in order to implement this as for example the rename of a variable, from a boolean 'isOptional' to a string 'mandatoryStatus'.
Create a new method to determinate if the object is mandatory or optional and return the type box definition with the custom implementation.
The validation is very concise, however a new method was created because it is considered a essential part on the process and it is valuable to have tests that assurance correct functionality of that section. Which is easier by having that code in a single method.
Some side changes were made in order to implement this as for example the rename of a variable, from a boolean 'isOptional' to a string 'mandatoryStatus'.
Issue Link: https://github.com/MLopezJ/LWM2M-JSONSchema/issues/13