INNER CODE UNIT · Go

inputPropertyValue

dikhan/terraform-provider-openapi · openapi/common.go:161

	if inputPropertyValue == nil || remoteValue == nil { // treat remote as the final state if input value does not exists
		return remoteValue
	}
	if property.shouldIgnoreOrder() {
		newPropertyValue := []interface{}{}
		inputValueArray := inputPropertyValue.([]interface{})
		remoteValueArray := remoteValue.([]interface{})
		for _, inputItemValue := range inputValueArray {
			for _, remoteItemValue := range remoteValueArray {
				if property.equalItems(property.ArrayItemsType, inputItemValue, remoteItemValue) {
					newPropertyValue = append(newPropertyValue, inputItemValue)
					break
				}
			}
		}
		modifiedItems := []interface{}{}
		for _, remoteItemValue := range remoteValueArray {
			match := false

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…