@@ -5,15 +5,14 @@ import (
55 "errors"
66 "sort"
77
8- "github.com/hashicorp/terraform-plugin-framework/schema"
9-
8+ "github.com/hashicorp/terraform-plugin-framework/tfsdk"
109 "github.com/hashicorp/terraform-plugin-go/tfprotov6"
1110 "github.com/hashicorp/terraform-plugin-go/tftypes"
1211)
1312
14- // Schema returns the *tfprotov6.Schema equivalent of a schema .Schema. At least
13+ // Schema returns the *tfprotov6.Schema equivalent of a tfsdk .Schema. At least
1514// one attribute must be set in the schema, or an error will be returned.
16- func Schema (ctx context.Context , s schema .Schema ) (* tfprotov6.Schema , error ) {
15+ func Schema (ctx context.Context , s tfsdk .Schema ) (* tfprotov6.Schema , error ) {
1716 result := & tfprotov6.Schema {
1817 Version : s .Version ,
1918 }
@@ -55,9 +54,9 @@ func Schema(ctx context.Context, s schema.Schema) (*tfprotov6.Schema, error) {
5554}
5655
5756// Attribute returns the *tfprotov6.SchemaAttribute equivalent of a
58- // schema .Attribute. Errors will be tftypes.AttributePathErrors based on
57+ // tfsdk .Attribute. Errors will be tftypes.AttributePathErrors based on
5958// `path`. `name` is the name of the attribute.
60- func Attribute (ctx context.Context , name string , attr schema .Attribute , path * tftypes.AttributePath ) (* tfprotov6.SchemaAttribute , error ) {
59+ func Attribute (ctx context.Context , name string , attr tfsdk .Attribute , path * tftypes.AttributePath ) (* tfprotov6.SchemaAttribute , error ) {
6160 a := & tfprotov6.SchemaAttribute {
6261 Name : name ,
6362 Required : attr .Required ,
@@ -85,13 +84,13 @@ func Attribute(ctx context.Context, name string, attr schema.Attribute, path *tf
8584 }
8685 nm := attr .Attributes .GetNestingMode ()
8786 switch nm {
88- case schema .NestingModeSingle :
87+ case tfsdk .NestingModeSingle :
8988 object .Nesting = tfprotov6 .SchemaObjectNestingModeSingle
90- case schema .NestingModeList :
89+ case tfsdk .NestingModeList :
9190 object .Nesting = tfprotov6 .SchemaObjectNestingModeList
92- case schema .NestingModeSet :
91+ case tfsdk .NestingModeSet :
9392 object .Nesting = tfprotov6 .SchemaObjectNestingModeSet
94- case schema .NestingModeMap :
93+ case tfsdk .NestingModeMap :
9594 object .Nesting = tfprotov6 .SchemaObjectNestingModeMap
9695 default :
9796 return nil , path .NewErrorf ("unrecognized nesting mode %v" , nm )
0 commit comments