@@ -210,22 +210,22 @@ def to_dict(self) -> dict:
210
210
211
211
@dataclass
212
212
class Maintainer :
213
+ name : str
213
214
email : Optional [str ] = None
214
- name : Optional [str ] = None
215
215
url : Optional [str ] = None
216
216
217
217
@staticmethod
218
218
def from_dict (obj : Any ) -> "Maintainer" :
219
219
assert isinstance (obj , dict )
220
- email = from_union ([from_str , from_none ], obj .get ("email" ))
221
220
name = from_union ([from_str , from_none ], obj .get ("name" ))
221
+ email = from_union ([from_str , from_none ], obj .get ("email" ))
222
222
url = from_union ([from_str , from_none ], obj .get ("url" ))
223
- return Maintainer (email , name , url )
223
+ return Maintainer (name , email , url )
224
224
225
225
def to_dict (self ) -> dict :
226
226
result : dict = {}
227
- result ["email" ] = from_union ([from_str , from_none ], self .email )
228
227
result ["name" ] = from_union ([from_str , from_none ], self .name )
228
+ result ["email" ] = from_union ([from_str , from_none ], self .email )
229
229
result ["url" ] = from_union ([from_str , from_none ], self .url )
230
230
return clean (result )
231
231
@@ -340,6 +340,7 @@ class Bundle:
340
340
actions : Dict [str , Action ] = field (default_factory = dict )
341
341
credentials : Dict [str , Credential ] = field (default_factory = dict )
342
342
description : Optional [str ] = None
343
+ license : Optional [str ] = None
343
344
images : List [Image ] = field (default_factory = list )
344
345
keywords : List [str ] = field (default_factory = list )
345
346
maintainers : List [Maintainer ] = field (default_factory = list )
@@ -356,6 +357,7 @@ def from_dict(obj: Any) -> "Bundle":
356
357
obj .get ("credentials" ),
357
358
)
358
359
description = from_union ([from_str , from_none ], obj .get ("description" ))
360
+ license = from_union ([from_str , from_none ], obj .get ("license" ))
359
361
images = from_union (
360
362
[lambda x : from_list (Image .from_dict , x ), from_none ], obj .get ("images" )
361
363
)
@@ -384,6 +386,7 @@ def from_dict(obj: Any) -> "Bundle":
384
386
actions ,
385
387
credentials ,
386
388
description ,
389
+ license ,
387
390
images ,
388
391
keywords ,
389
392
maintainers ,
@@ -397,6 +400,7 @@ def to_dict(self) -> dict:
397
400
lambda x : to_class (Credential , x ), self .credentials
398
401
)
399
402
result ["description" ] = from_union ([from_str , from_none ], self .description )
403
+ result ["license" ] = from_union ([from_str , from_none ], self .license )
400
404
result ["images" ] = from_list (lambda x : to_class (Image , x ), self .images )
401
405
result ["invocationImages" ] = from_list (
402
406
lambda x : to_class (InvocationImage , x ), self .invocation_images
0 commit comments