-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
- Package Name: azure-keyvault-keys
- Package Version: 4.9.0b3 -> 4.11.0b1
- Operating System: Any
- Python Version: 3.12
Describe the bug
Azure CLI calls sdk model's as_dict() function to transform output.
In azure-keyvault-keys==4.9.0b3 (which is swagger generated), KeyAttributes.as_dict() returns {'expires': '2027-05-28T16:43:07+00:00', 'created': '2025-05-21T16:44:32+00:00', ......}
but after bumpping to azure-keyvault keys==4.11.0b1 (which is typespec generated):
KeyAttributes.as_dict() returns {'exp': 1811522587, 'created': 1747845872, ......}
The renameing and formatting seems to be totally ignored during dict transformation
Line 394 in 19bd600
| expires: Optional[datetime.datetime] = rest_field(name="exp", format="unix-timestamp") |
To Reproduce
Steps to reproduce the behavior:
- Use
azure-keyvault-keys==4.9.0b3, callclient.get_key().as_dict() - Upgrade to
azure-keyvault keys==4.11.0b1, callclient.get_key().as_dict()again - check the expiration and creation time in result
Expected behavior
A clear and concise description of what you expected to happen.
There should not be such breaking change after swagger to typespec migration
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.