You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i.e. it is a primitive type and has no properties property
As far as I can see primitive types are allowed as definitions entries, however the code in GenerateModels.php::generate() creates a new class for each, and assumes that the properties property both exists and is an array, leading to an error when it tries to use it and it doesn't exist/is treated as null.
The code should check the type specified, and act accordingly.
Whether that means no class generated (and so the primitive type would be used elsewhere rather than a Model), or a wrapper Model that holds the primitive (and applies pattern/formats/other properties as per the spec) can be decided when implementing.
The text was updated successfully, but these errors were encountered:
i.e. it is a primitive type and has no
properties
propertyAs far as I can see primitive types are allowed as definitions entries, however the code in GenerateModels.php::generate() creates a new class for each, and assumes that the
properties
property both exists and is an array, leading to an error when it tries to use it and it doesn't exist/is treated as null.The code should check the type specified, and act accordingly.
Whether that means no class generated (and so the primitive type would be used elsewhere rather than a Model), or a wrapper Model that holds the primitive (and applies pattern/formats/other properties as per the spec) can be decided when implementing.
The text was updated successfully, but these errors were encountered: