Skip to content

Commit 8b279bf

Browse files
authored
fix: Added missing getter/setter on java classes that have arrays as their only property. (#32)
* Removed some verbose debug logging. * Added missing getter/setter on java classes that have arrays as their only property.
1 parent d6f9b39 commit 8b279bf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

partials/java-class

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
{{ indent3 }}this.{{ name }} = {{ name }};
1818
{{ indent2 }}}
1919
{{ indent2 }}private {{ arrayType }} {{ name }};
20+
21+
{{ indent2 }}public {{ arrayType }} get{{ type }}() { return {{ name }}; }
22+
{{ indent2 }}public void set{{ type }}({{ arrayType }} {{ name }}) { this.{{ name }} = {{name}}; }
23+
2024
{{ javaClass(type, null, schema.items().properties(), schema.items().required(), indentLevel+1, true) }}
2125
{%- else -%} {# not an array at the top level. #}
2226
{%- set first = true -%}

0 commit comments

Comments
 (0)