Skip to content

Commit

Permalink
Set optional contents API model fields to None by default (#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart authored Oct 11, 2023
1 parent 1167c29 commit 3175924
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions jupyverse_api/jupyverse_api/contents/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3175924

Please sign in to comment.