I am trying to generate documents for our crds with your great tool. All in all it works fine, but if our crd contains the AdditionalProperties: true
field, an error occurs and no documents are generated.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1195edc]
goroutine 1 [running]:
github.com/mesh-for-data/crdoc/pkg/builder.getTypeName(0xc0004f2200, 0xc00023de00, 0x0)
/home/wetzel/go/pkg/mod/github.com/mesh-for-data/[email protected]/pkg/builder/builder.go:223 +0xdc
github.com/mesh-for-data/crdoc/pkg/builder.(*ModelBuilder).addTypeModels(0xc000213d30, 0xc000497f40, 0xc0004f0090, 0xc0001cb9c8, 0x13, 0xc0004f2200, 0x0, 0x0, 0xc0004ee0e0, 0x10)
/home/wetzel/go/pkg/mod/github.com/mesh-for-data/[email protected]/pkg/builder/builder.go:140 +0x45
github.com/mesh-for-data/crdoc/pkg/builder.(*ModelBuilder).addTypeModels(0xc000213d30, 0xc000497f40, 0xc0004f0090, 0xc0004ee150, 0xc, 0xc0004f2000, 0x0, 0x0, 0x0, 0x0)
/home/wetzel/go/pkg/mod/github.com/mesh-for-data/[email protected]/pkg/builder/builder.go:156 +0x3ba
github.com/mesh-for-data/crdoc/pkg/builder.(*ModelBuilder).addTypeModels(0xc000213d30, 0xc000497f40, 0xc0004f0090, 0xc0004ee080, 0x7, 0xc00023d600, 0x1, 0x1, 0x1d0cea0, 0x0)
/home/wetzel/go/pkg/mod/github.com/mesh-for-data/[email protected]/pkg/builder/builder.go:156 +0x3ba
github.com/mesh-for-data/crdoc/pkg/builder.(*ModelBuilder).Add(0xc000213d30, 0xc0004982c0, 0xc0004ac970, 0x1)
/home/wetzel/go/pkg/mod/github.com/mesh-for-data/[email protected]/pkg/builder/builder.go:93 +0x2a6
main.RootCmd.func2(0xc000394c80, 0xc0003fa4e0, 0x0, 0x2, 0x0, 0x0)
/home/wetzel/go/pkg/mod/github.com/mesh-for-data/[email protected]/main.go:69 +0x274
github.com/spf13/cobra.(*Command).execute(0xc000394c80, 0xc000194160, 0x2, 0x2, 0xc000394c80, 0xc000194160)
/home/wetzel/go/pkg/mod/github.com/spf13/[email protected]/command.go:852 +0x472
github.com/spf13/cobra.(*Command).ExecuteC(0xc000394c80, 0xc000000180, 0xc000213f78, 0x408025)
/home/wetzel/go/pkg/mod/github.com/spf13/[email protected]/command.go:960 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
/home/wetzel/go/pkg/mod/github.com/spf13/[email protected]/command.go:897
main.main()
/home/wetzel/go/pkg/mod/github.com/mesh-for-data/[email protected]/main.go:103 +0x2b