(20260309) Added new 'mode' for formatting the muster roll.
This commit is contained in:
@@ -86,6 +86,7 @@ class CosecMusterRollReportRequestData(BaseModel):
|
|||||||
|
|
||||||
mode: Literal["array", "map"] = Field(
|
mode: Literal["array", "map"] = Field(
|
||||||
description = "The format in which the response is desired.",
|
description = "The format in which the response is desired.",
|
||||||
|
default = "array",
|
||||||
frozen = True,
|
frozen = True,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -118,11 +119,16 @@ class CosecMusterRollReportRequestData(BaseModel):
|
|||||||
)
|
)
|
||||||
return value
|
return value
|
||||||
|
|
||||||
@field_validator("groupIds", mode = "after")
|
@field_validator("groupIds", mode = "before")
|
||||||
def parse_group_ids(cls, value):
|
def parse_group_ids(cls, value):
|
||||||
if isinstance(value, str): value = value.split(",")
|
if isinstance(value, str): value = value.split(",")
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
@field_validator("mode", mode = "before")
|
||||||
|
def parse_mode(cls, value):
|
||||||
|
if isinstance(value, str): value = value.lower()
|
||||||
|
return value
|
||||||
|
|
||||||
|
|
||||||
# *****************************************************************************************************************
|
# *****************************************************************************************************************
|
||||||
# ***** ****
|
# ***** ****
|
||||||
|
|||||||
Reference in New Issue
Block a user