Skip to content

Commit 9f6e5e9

Browse files
Fixed generating value assignment in toJson() for dynamic fields (#71)
1 parent c209d15 commit 9f6e5e9

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/it/k8s_null/test.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,3 +593,17 @@ components:
593593
items:
594594
type: number
595595
format: double
596+
PatchDocument:
597+
type: object
598+
properties:
599+
value:
600+
nullable: true
601+
path:
602+
type: string
603+
nullable: true
604+
op:
605+
type: string
606+
nullable: true
607+
from:
608+
type: string
609+
nullable: true

src/main/resources/dart2-v3template/class.mustache

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ class {{classname}}{{#parent}} extends {{parent}}{{/parent}} {
109109
{{#isPrimitiveType}}
110110
json[r'{{baseName}}'] = {{{name}}};
111111
{{/isPrimitiveType}}
112+
{{#isAnyType}}
113+
json[r'{{baseName}}'] = {{{name}}};
114+
{{/isAnyType}}
112115
{{/items}}
113116
{{^required}}
114117
} {{#generateNullValuesToJson}}else {

0 commit comments

Comments
 (0)