File tree 2 files changed +12
-3
lines changed
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -98504,6 +98504,7 @@ components:
98504
98504
allOf:
98505
98505
- $ref: '#/components/schemas/NestedIPAddress'
98506
98506
readOnly: true
98507
+ nullable: true
98507
98508
primary_ip4:
98508
98509
allOf:
98509
98510
- $ref: '#/components/schemas/NestedIPAddress'
@@ -99406,6 +99407,7 @@ components:
99406
99407
allOf:
99407
99408
- $ref: '#/components/schemas/NestedIPAddress'
99408
99409
readOnly: true
99410
+ nullable: true
99409
99411
primary_ip4:
99410
99412
allOf:
99411
99413
- $ref: '#/components/schemas/NestedIPAddress'
@@ -131389,6 +131391,7 @@ components:
131389
131391
allOf:
131390
131392
- $ref: '#/components/schemas/NestedIPAddress'
131391
131393
readOnly: true
131394
+ nullable: true
131392
131395
primary_ip4:
131393
131396
allOf:
131394
131397
- $ref: '#/components/schemas/NestedIPAddress'
Original file line number Diff line number Diff line change 19
19
if 'properties' in prop and 'value' in prop ['properties' ] and 'enum' in prop ['properties' ]['value' ] and None in prop ['properties' ]['value' ]['enum' ]:
20
20
prop ['properties' ]['value' ]['enum' ].remove (None )
21
21
22
- # Fix "parent_device" nullable type
23
- if 'parent_device' in schema ['properties' ]:
24
- schema ['properties' ]['parent_device' ]['nullable' ] = True
22
+ # Fix nullable types
23
+ nullable_types = [
24
+ 'parent_device' ,
25
+ 'primary_ip' ,
26
+ ]
27
+
28
+ for ntype in nullable_types :
29
+ if ntype in schema ['properties' ]:
30
+ schema ['properties' ][ntype ]['nullable' ] = True
25
31
26
32
# Save the spec file
27
33
with open (SPEC_PATH , 'w' ) as file :
You can’t perform that action at this time.
0 commit comments