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'm wondering if there would be any appetite for adding a recognised value as a marker to instantiate an empty instance of an object, if the object is marked with the default keyword?
This is a fairly contrived example but consider the folowing foo-bar schema snippet:
I'm wondering if there would be any appetite for adding a recognised value as a marker to instantiate an empty instance of an object, if the object is marked with the default keyword?
This is a fairly contrived example but consider the folowing foo-bar schema snippet:
When the
generate
target is run we end up with two pojos,Foo.java
andFooBar.java
, withFooBar.java
containing afoo
property as follows:-It would be good if, based on a known value being used as the default, e.g.
"default": "instance"
, the following code could be generated instead:I've used the word
instance
in the example but the actual value could be made configurable to fit with different organisational requirements.I'd be happy to provide a PR if it's something that would be accepted into the project.
The text was updated successfully, but these errors were encountered: