@@ -12,23 +12,23 @@ class PackageAuthor(BaseModel):
1212 """Package author model."""
1313
1414 name : Annotated [Optional [str ], Field (description = "Author name" )]
15- email : Annotated [Optional [EmailStr ], Field (description = "Author email" )]
15+ email : Annotated [Optional [EmailStr ], Field (description = "Author email" )] = None
1616 url : Annotated [
1717 Optional [HttpUrlStr ], Field (description = "Author website or orcid page" )
18- ]
18+ ] = None
1919
2020
2121class PackageRepository (BaseModel ):
2222 """Package repository model."""
2323
24- type : Annotated [Optional [str ], Field (description = "Repository type" )]
24+ type : Annotated [Optional [str ], Field (description = "Repository type" )] = None
2525 url : Annotated [str , Field (description = "Repository url" )]
2626
2727
2828class PackageLicense (BaseModel ):
2929 """Package license model."""
3030
31- type : Annotated [Optional [str ], Field (description = "License type" )]
31+ type : Annotated [Optional [str ], Field (description = "License type" )] = None
3232 url : Annotated [str , Field (description = "License url" )]
3333
3434
@@ -44,10 +44,12 @@ class PackageJsonConfig(BaseModel):
4444
4545 name : Annotated [str , Field (description = "Package name" )]
4646 version : Annotated [str , Field (description = "Package version" )]
47- description : Annotated [Optional [str ], Field (description = "Package description" )]
47+ description : Annotated [
48+ Optional [str ], Field (description = "Package description" )
49+ ] = None
4850 author : Annotated [
4951 Optional [Union [str , PackageAuthor ]], Field (description = "Package author" )
50- ]
52+ ] = None
5153 maintainers : Annotated [
5254 Optional [List [Union [str , PackageAuthor ]]],
5355 Field (description = "Package maintainers" ),
@@ -58,10 +60,10 @@ class PackageJsonConfig(BaseModel):
5860 ] = None
5961 license : Annotated [
6062 Optional [Union [str , PackageLicense ]], Field (description = "Package license" )
61- ]
63+ ] = None
6264 repository : Annotated [
6365 Optional [Union [PackageRepository , str ]], Field (description = "Package repository" )
64- ]
66+ ] = None
6567 homepage : Annotated [
6668 Optional [HttpUrlStr ], Field (description = "Package homepage" )
6769 ] = None
0 commit comments