From 3175924fc3777b2076a68c1076674d6ad8887e2b Mon Sep 17 00:00:00 2001 From: David Brochart Date: Wed, 11 Oct 2023 17:22:32 +0200 Subject: [PATCH] Set optional contents API model fields to None by default (#358) --- jupyverse_api/jupyverse_api/contents/models.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/jupyverse_api/jupyverse_api/contents/models.py b/jupyverse_api/jupyverse_api/contents/models.py index 063e20fc..ab4b3161 100644 --- a/jupyverse_api/jupyverse_api/contents/models.py +++ b/jupyverse_api/jupyverse_api/contents/models.py @@ -11,24 +11,24 @@ class Checkpoint(BaseModel): class Content(BaseModel): name: str path: str - last_modified: Optional[str] - created: Optional[str] - content: Optional[Union[List[Dict], str, Dict]] - format: Optional[str] - mimetype: Optional[str] - size: Optional[int] + last_modified: Optional[str] = None + created: Optional[str] = None + content: Optional[Union[List[Dict], str, Dict]] = None + format: Optional[str] = None + mimetype: Optional[str] = None + size: Optional[int] = None writable: bool type: str class CreateContent(BaseModel): - ext: Optional[str] + ext: Optional[str] = None path: str type: str class SaveContent(BaseModel): - content: Optional[Union[str, Dict]] + content: Optional[Union[str, Dict]] = None format: str path: str type: str