diff --git a/pkg/codegen/docs/gen.go b/pkg/codegen/docs/gen.go index cb8a8864d..e1d8e9ae1 100644 --- a/pkg/codegen/docs/gen.go +++ b/pkg/codegen/docs/gen.go @@ -888,10 +888,10 @@ func (mod *modContext) genNestedTypes(member interface{}, resourceType bool) []d // the provided slice of properties in the schema. func (mod *modContext) getProperties(properties []*schema.Property, lang string, input, nested, isProvider bool, ) []property { - return mod.getPropertiesWithIdPrefixAndExclude(properties, lang, input, nested, isProvider, "", nil) + return mod.getPropertiesWithIDPrefixAndExclude(properties, lang, input, nested, isProvider, "", nil) } -func (mod *modContext) getPropertiesWithIdPrefixAndExclude(properties []*schema.Property, lang string, input, nested, +func (mod *modContext) getPropertiesWithIDPrefixAndExclude(properties []*schema.Property, lang string, input, nested, isProvider bool, idPrefix string, exclude func(name string) bool) []property { if len(properties) == 0 { return nil diff --git a/pkg/codegen/docs/gen_method.go b/pkg/codegen/docs/gen_method.go index 1830cf8bb..c08ca7f58 100644 --- a/pkg/codegen/docs/gen_method.go +++ b/pkg/codegen/docs/gen_method.go @@ -70,14 +70,14 @@ func (mod *modContext) genMethod(r *schema.Resource, m *schema.Method) methodDoc exclude := func(name string) bool { return name == "__self__" } - props := mod.getPropertiesWithIdPrefixAndExclude(f.Inputs.Properties, lang, true, false, false, + props := mod.getPropertiesWithIDPrefixAndExclude(f.Inputs.Properties, lang, true, false, false, fmt.Sprintf("%s_arg_", m.Name), exclude) if len(props) > 0 { inputProps[lang] = props } } if f.Outputs != nil { - outputProps[lang] = mod.getPropertiesWithIdPrefixAndExclude(f.Outputs.Properties, lang, false, false, false, + outputProps[lang] = mod.getPropertiesWithIDPrefixAndExclude(f.Outputs.Properties, lang, false, false, false, fmt.Sprintf("%s_result_", m.Name), nil) } }