Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class CreateAccessKeyResponse(BaseModel):

access_key: StrictStr = Field(description="Access key", alias="accessKey")
display_name: StrictStr = Field(description="Obfuscated access key", alias="displayName")
expires: StrictStr = Field(description="Expiration date. Null means never expires.")
expires: Optional[StrictStr] = Field(description="Expiration date. Null means never expires.")
key_id: StrictStr = Field(
description="Identifies the pair of access key and secret access key for deletion", alias="keyId"
)
Expand Down Expand Up @@ -73,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
# set to None if expires (nullable) is None
# and model_fields_set contains the field
if self.expires is None and "expires" in self.model_fields_set:
_dict["expires"] = None

return _dict

@classmethod
Expand Down