Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb6787b0

Browse files
committed
WIP
1 parent5e19e2a commitb6787b0

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

‎provider/parameter.go

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -142,22 +142,25 @@ func parameterDataSource() *schema.Resource {
142142
// 'parameter.FormType' value to the new value. This is to handle default cases,
143143
// since the default logic is more advanced than the sdk provider schema
144144
// supports.
145-
_,newFT,err:=ValidateFormType(parameter.Type,len(parameter.Option),parameter.FormType)
146-
iferr==nil {
147-
// If there is an error, parameter.Valid will catch it.
148-
parameter.FormType=newFT
149-
150-
// Set the form_type back in case the value was changed.
151-
// Eg via a default. If a user does not specify, a default value
152-
// is used and saved.
153-
rd.Set("form_type",parameter.FormType)
154-
}
145+
//_, newFT, err := ValidateFormType(parameter.Type, len(parameter.Option), parameter.FormType)
146+
//if err == nil {
147+
//// If there is an error, parameter.Valid will catch it.
148+
//parameter.FormType = newFT
149+
//
150+
//// Set the form_type back in case the value was changed.
151+
//// Eg via a default. If a user does not specify, a default value
152+
//// is used and saved.
153+
//rd.Set("form_type", parameter.FormType)
154+
//}
155155

156156
diags:=parameter.Valid(value)
157157
ifdiags.HasError() {
158158
returndiags
159159
}
160160

161+
// Set the form_type as it could have changed in the validation.
162+
rd.Set("form_type",parameter.FormType)
163+
161164
returnnil
162165
},
163166
Schema:map[string]*schema.Schema{
@@ -396,6 +399,11 @@ func valueIsType(typ OptionType, value string) error {
396399
returnnil
397400
}
398401

402+
func (v*Parameter)RelaxedValidation(valuestring) diag.Diagnostics {
403+
404+
returnnil
405+
}
406+
399407
func (v*Parameter)Valid(valuestring) diag.Diagnostics {
400408
varerrerror
401409
varoptionTypeOptionType

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp