Incorrect display of map types
theunrepentantgeek opened this issue · comments
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
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
extensions
[]VirtualMachineExtensionInstanceView_STATUS_ARM
I've traced the cause of this to the typeDisplayName()
function.