[codegen/python] - Exclude nested docs for k8s
@@ -404,6 +404,8 @@ func (mod *modContext) genResource(res *schema.Resource) (string, error) {
if prop.Comment != "" {
doc := prop.Comment
+ // Exclude nested docs in kubernetes provider
+ if mod.compatibility != kubernetes20 {
seenTypes := codegen.Set{}
nested := nestedStructure(prop.Type, seenTypes)
if len(nested) > 0 {
@@ -413,6 +415,7 @@ func (mod *modContext) genResource(res *schema.Resource) (string, error) {
mod.genNestedStructureBullets(b, nested, " ", false /*wrapInput*/)
doc = fmt.Sprintf("%s%s", doc, b.String())
}
+ }
printComment(w, doc, " ")
}
@@ -960,8 +963,11 @@ func (mod *modContext) genInitDocstring(w io.Writer, res *schema.Resource) {
mod.genPropDocstring(b, prop, true /*wrapInput*/)
}
+ // Exclude nested docs in kubernetes provider
+ if mod.compatibility != kubernetes20 {
// Nested structures are typed as `dict` so we include some extra documentation for these structures.
mod.genNestedStructuresDocstring(b, res.InputProperties, true /*wrapInput*/)
+ }
// printComment handles the prefix and triple quotes.
printComment(w, b.String(), " ")
