Skip to content

[keyvault] Output breaking change after bumping version #41261

@evelyn-ys

Description

@evelyn-ys
  • 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

expires: Optional[datetime.datetime] = rest_field(name="exp", format="unix-timestamp")

To Reproduce
Steps to reproduce the behavior:

  1. Use azure-keyvault-keys==4.9.0b3, call client.get_key().as_dict()
  2. Upgrade to azure-keyvault keys==4.11.0b1, call client.get_key().as_dict() again
  3. 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.

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.KeyVaultissue-addressedWorkflow: The Azure SDK team believes it to be addressed and ready to close.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions