Closed theunrepentantgeek closed 1 month ago
In the generated documentation for Azure Service Operator (ASO), we noticed that the display names of fields with a map type weren't being simplified the same way that other types are.
For example,
On VirtualMachineIdentity_ARM we see a map type with a relative path for the type of map values:
userAssignedIdentities map[string]./api/compute/v1api20220301.UserAssignedIdentityDetails_ARM
userAssignedIdentities
We expected this to display with just the name of the type, given it's in the current package:
userAssignedIdentities map[string]UserAssignedIdentityDetails_ARM
Slice properties already use this simplified form - several examples can be seen on VirtualMachineInstanceView_STATUS_ARM:
disks []DiskInstanceView_STATUS_ARM
disks
extensions []VirtualMachineExtensionInstanceView_STATUS_ARM
extensions
I've traced the cause of this to the typeDisplayName() function.
typeDisplayName()
In the generated documentation for Azure Service Operator (ASO), we noticed that the display names of fields with a map type weren't being simplified the same way that other types are.
For example,
On VirtualMachineIdentity_ARM we see a map type with a relative path for the type of map values:
userAssignedIdentities
map[string]./api/compute/v1api20220301.UserAssignedIdentityDetails_ARMWe expected this to display with just the name of the type, given it's in the current package:
userAssignedIdentities
map[string]UserAssignedIdentityDetails_ARMSlice properties already use this simplified form - several examples can be seen on VirtualMachineInstanceView_STATUS_ARM:
disks
[]DiskInstanceView_STATUS_ARMextensions
[]VirtualMachineExtensionInstanceView_STATUS_ARMI've traced the cause of this to the
typeDisplayName()
function.