in provider-schema/result.go [185:205]
func GetPropertyDocContent(objectName string, property *schema.SchemaAttribute) string {
if property == nil {
return ""
}
propertyDescription := property.GetDescription()
// try to get direct properties of this property
directProperties, err := ListDirectProperties(objectName, property.AttributePath)
if err != nil || len(directProperties) == 0 {
return propertyDescription
}
// if there are direct properties, append them to the description
var directPropertiesDescriptions []string
for _, directProperty := range directProperties {
directPropertiesDescriptions = append(directPropertiesDescriptions, fmt.Sprintf(" - %s: %s", directProperty.Name, directProperty.GetDescription()))
}
return fmt.Sprintf("%s\n\n%s", propertyDescription, strings.Join(directPropertiesDescriptions, "\n"))
}