-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Closed
Labels
AVSMgmtThis issue is related to a management-plane library.This issue is related to a management-plane library.needs-discussion
Description
When try to migrate azure-mgmt-avs from swagger to typespec, I find the following breakings for hierarchy model:
- Before
from azure.mgmt.avs.models import CloudLink
model = CloudLink(linked_cloud="hello")
model_dict = model.as_dict(keep_readonly=False)
print(model_dict) # output: {'linked_cloud': 'hello'}- After
from azure.mgmt.avs.models import CloudLink
model = CloudLink(linked_cloud="hello")
model_dict = model.as_dict(exclude_readonly=True)
print(model_dict) # output: {'properties': {'linkedCloud': 'hello'}}We can see there are 3 breakings:
keep_readonlyis renamed toexclude_readonlywith reverse meaning- key is changed from
snake_casetocamelCase - old
as_dicthide the hierarchy structure to follow model structure while newas_dictrespect the hierarchy structure to keep consistent with REST API layer.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
AVSMgmtThis issue is related to a management-plane library.This issue is related to a management-plane library.needs-discussion