Skip to content

Commit 370d212

Browse files
author
reggie_7
committed
Limit passed generator.data props
1 parent 52cba66 commit 370d212

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

lib/generator.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,14 @@ function genTypes(properties, generator) {
190190
if (Object.keys(props['properties']).length > 1 || props['x-form-multifield'] === "true" || props['x-form-multifield'] === true) {
191191
var collectionType = props['x-collection-type']
192192
if (collectionType) {
193+
var { data } = generator
194+
var { componentPath, package, classNameParent } = data
193195
gen(new Generator(generator.src, path.join(path.dirname(generator.dst), `${collectionType}Model.java`), {
194-
...generator.data,
196+
name: collectionType,
195197
modelName: collectionType,
198+
componentPath: `${componentPath}/${propName}`,
199+
package,
200+
classNameParent,
196201
definitions: {
197202
[collectionType]: props
198203
}

0 commit comments

Comments
 (0)