clamoriniere/crd-to-markdown

Does not handle inlined structs properly

Opened this issue · 0 comments

The code ignores fields that are have a json tag that contains "inline" but this is incorrect. Those fields should simply be added to the current struct. For example

type ClientConfiguration struct {
	metav1.TypeMeta `json:",inline"`
	SubConfig `json:",inline"`
        Foo string `json:"foo"`
}

Only the "foo" field will be included. All the fields of TypeMeta (apiVersion and Kind) and SubConfig are ignored since they are inlined. But they exist in the JSON.