forked from loafle/openapi-generator-original
add fluent methods to add items to list and put items to maps
This commit is contained in:
@@ -32,6 +32,20 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
|
||||
this.{{name}} = {{name}};
|
||||
return this;
|
||||
}
|
||||
{{#isListContainer}}
|
||||
|
||||
public {{classname}} add{{nameInCamelCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) {
|
||||
this.{{name}}.add({{name}}Item);
|
||||
return this;
|
||||
}
|
||||
{{/isListContainer}}
|
||||
{{#isMapContainer}}
|
||||
|
||||
public {{classname}} put{{nameInCamelCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) {
|
||||
this.{{name}}.put(key, {{name}}Item);
|
||||
return this;
|
||||
}
|
||||
{{/isMapContainer}}
|
||||
|
||||
{{/isReadOnly}}
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user