File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
internal/provider/framework Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change 77 "context"
88
99 "github.com/hashicorp/terraform-plugin-framework/action"
10- aschema "github.com/hashicorp/terraform-plugin-framework/action/schema"
1110 "github.com/hashicorp/terraform-plugin-framework/datasource"
1211 "github.com/hashicorp/terraform-plugin-framework/diag"
1312 "github.com/hashicorp/terraform-plugin-framework/ephemeral"
@@ -441,14 +440,10 @@ func (w *wrappedAction) Schema(ctx context.Context, request action.SchemaRequest
441440
442441 // Validate the action's model against the schema.
443442 if v , ok := w .inner .(framework.ActionValidateModel ); ok {
444- if schema , ok := response .Schema .(aschema.UnlinkedSchema ); ok {
445- response .Diagnostics .Append (v .ValidateModel (ctx , & schema )... )
446- if response .Diagnostics .HasError () {
447- response .Diagnostics .AddError ("action model validation error" , w .spec .TypeName )
448- return
449- }
450- } else {
451- response .Diagnostics .AddError ("unsupported action schema type" , w .spec .TypeName )
443+ response .Diagnostics .Append (v .ValidateModel (ctx , & response .Schema )... )
444+ if response .Diagnostics .HasError () {
445+ response .Diagnostics .AddError ("action model validation error" , w .spec .TypeName )
446+ return
452447 }
453448 } else {
454449 response .Diagnostics .AddError ("missing framework.ActionValidateModel" , w .spec .TypeName )
You can’t perform that action at this time.
0 commit comments