ahmetb / gen-crd-api-reference-docs

API Reference Docs generator for Kubernetes CRDs (used by Knative, Kubeflow and others)
Apache License 2.0
307 stars 99 forks source link

Fix display of maps #66

Closed theunrepentantgeek closed 1 month ago

theunrepentantgeek commented 1 year ago

Fixes the display of maps where the key or value of the map is a type declared in the package being documented.

The function typeDisplayName() is modified to be mildly recursive, applying naming rules to the key and value types before constructing the final display name.

Similar recursive changes are applied for slices and pointers, to ensure correct display even in edge cases - such as []*Foo where Foo is a type declared in the current package.

Closes #64