Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion functions/definition/models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ FbProjectValidateCreateOnlyInput:
type: object
fields:
customOptions:
# optional: true
optional: true
type:
type: list
elementType: FbObjCustomOption
Expand Down
2 changes: 1 addition & 1 deletion functions/definition/tutorial/validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ FbValidateTutorial:
type: list
elementType: FbScreen
customOptions:
# optional: true
optional: true
type:
type: list
elementType: FbObjCustomOption
Expand Down
8 changes: 6 additions & 2 deletions functions/generated/pyfirebase/pyfirebase_mapswipe/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def __setattr__(self, name: str, value: typing.Any) -> None:

class FbProjectValidateCreateOnlyInput(TypesyncModel):
"""Represents VALIDATE project fields that are valid while creating a project"""
customOptions: typing.List[FbObjCustomOption]
customOptions: typing.Union[TypesyncUndefined, typing.List[FbObjCustomOption]] = UNDEFINED
tileServer: FbObjRasterTileServer
inputType: FbEnumValidateInputType
filter: typing.Union[TypesyncUndefined, str] = UNDEFINED
Expand All @@ -336,6 +336,8 @@ class Config:
extra = 'forbid'

def __setattr__(self, name: str, value: typing.Any) -> None:
if name == "customOptions" and value is None:
raise ValueError("'customOptions' field cannot be set to None")
if name == "filter" and value is None:
raise ValueError("'filter' field cannot be set to None")
if name == "TMId" and value is None:
Expand Down Expand Up @@ -842,13 +844,15 @@ class FbValidateTutorial(TypesyncModel):
tileServer: FbObjRasterTileServer
zoomLevel: int
screens: typing.List[FbScreen]
customOptions: typing.List[FbObjCustomOption]
customOptions: typing.Union[TypesyncUndefined, typing.List[FbObjCustomOption]] = UNDEFINED

class Config:
use_enum_values = True
extra = 'forbid'

def __setattr__(self, name: str, value: typing.Any) -> None:
if name == "customOptions" and value is None:
raise ValueError("'customOptions' field cannot be set to None")
super().__setattr__(name, value)

class FbValidateTutorialTaskProperties(TypesyncModel):
Expand Down