Azure / autorest.az

Azure CLI Code Generator
MIT License
22 stars 20 forks source link

Bug for initializing JSON objects when children are empty #860

Closed hivyas closed 3 years ago

hivyas commented 3 years ago

We have some property objects that are being initialized even when their children are not being assigned on the command line. For example, when running az video-analyzer update --type "CustomerKey" --account-name hivyastest6151 we are just trying to update this property: image. However, the generated code also updates identity: image

Here is what our update command looks like: image I believe line 77 should only happen if video_analyzer_identity_type and user_assigned_identites are not None.

Similarly, in our create command: image\ Lines 46-49 should only happen if user_assigned_identity and key_identifier are not None.