@@ -22,7 +22,7 @@ import (
22
22
"github.com/hashicorp/terraform-provider-aws/internal/errs"
23
23
"github.com/hashicorp/terraform-provider-aws/internal/errs/fwdiag"
24
24
fwtypes "github.com/hashicorp/terraform-provider-aws/internal/framework/types"
25
- smithyjson "github.com/hashicorp/terraform-provider-aws/internal/json "
25
+ tfsmithy "github.com/hashicorp/terraform-provider-aws/internal/smithy "
26
26
)
27
27
28
28
func TestFlatten (t * testing.T ) {
@@ -4357,9 +4357,9 @@ func TestFlattenInterfaceToStringTypable(t *testing.T) {
4357
4357
infoFlattening (reflect .TypeFor [* awsJSONStringer ](), reflect .TypeFor [* tfSingleStringField ]()),
4358
4358
infoConverting (reflect .TypeFor [awsJSONStringer ](), reflect .TypeFor [* tfSingleStringField ]()),
4359
4359
traceMatchedFields ("Field1" , reflect .TypeFor [awsJSONStringer ](), "Field1" , reflect .TypeFor [* tfSingleStringField ]()),
4360
- infoConvertingWithPath ("Field1" , reflect .TypeFor [smithyjson .JSONStringer ](), "Field1" , reflect .TypeFor [types.String ]()),
4360
+ infoConvertingWithPath ("Field1" , reflect .TypeFor [tfsmithy .JSONStringer ](), "Field1" , reflect .TypeFor [types.String ]()),
4361
4361
// infoSourceImplementsJSONStringer("Field1", reflect.TypeFor[testJSONDocument](), "Field1", reflect.TypeFor[types.String]()),
4362
- infoSourceImplementsJSONStringer ("Field1" , reflect .TypeFor [smithyjson .JSONStringer ](), "Field1" , reflect .TypeFor [types.String ]()), // TODO: fix source type
4362
+ infoSourceImplementsJSONStringer ("Field1" , reflect .TypeFor [tfsmithy .JSONStringer ](), "Field1" , reflect .TypeFor [types.String ]()), // TODO: fix source type
4363
4363
},
4364
4364
},
4365
4365
"null json interface Source string Target" : {
@@ -4374,10 +4374,10 @@ func TestFlattenInterfaceToStringTypable(t *testing.T) {
4374
4374
infoFlattening (reflect .TypeFor [* awsJSONStringer ](), reflect .TypeFor [* tfSingleStringField ]()),
4375
4375
infoConverting (reflect .TypeFor [awsJSONStringer ](), reflect .TypeFor [* tfSingleStringField ]()),
4376
4376
traceMatchedFields ("Field1" , reflect .TypeFor [awsJSONStringer ](), "Field1" , reflect .TypeFor [* tfSingleStringField ]()),
4377
- infoConvertingWithPath ("Field1" , reflect .TypeFor [smithyjson .JSONStringer ](), "Field1" , reflect .TypeFor [types.String ]()),
4377
+ infoConvertingWithPath ("Field1" , reflect .TypeFor [tfsmithy .JSONStringer ](), "Field1" , reflect .TypeFor [types.String ]()),
4378
4378
// infoSourceImplementsJSONStringer("Field1", reflect.TypeFor[testJSONDocument](), "Field1", reflect.TypeFor[types.String]()),
4379
- infoSourceImplementsJSONStringer ("Field1" , reflect .TypeFor [smithyjson .JSONStringer ](), "Field1" , reflect .TypeFor [types.String ]()), // TODO: fix source type
4380
- traceFlatteningNullValue ("Field1" , reflect .TypeFor [smithyjson .JSONStringer ](), "Field1" , reflect .TypeFor [types.String ]()),
4379
+ infoSourceImplementsJSONStringer ("Field1" , reflect .TypeFor [tfsmithy .JSONStringer ](), "Field1" , reflect .TypeFor [types.String ]()), // TODO: fix source type
4380
+ traceFlatteningNullValue ("Field1" , reflect .TypeFor [tfsmithy .JSONStringer ](), "Field1" , reflect .TypeFor [types.String ]()),
4381
4381
},
4382
4382
},
4383
4383
@@ -4393,15 +4393,15 @@ func TestFlattenInterfaceToStringTypable(t *testing.T) {
4393
4393
},
4394
4394
Target : & tfJSONStringer {},
4395
4395
WantTarget : & tfJSONStringer {
4396
- Field1 : fwtypes .SmithyJSONValue (`{"test":"a"}` , newTestJSONDocument ),
4396
+ Field1 : fwtypes .NewSmithyJSONValue (`{"test":"a"}` , newTestJSONDocument ),
4397
4397
},
4398
4398
expectedLogLines : []map [string ]any {
4399
4399
infoFlattening (reflect .TypeFor [* awsJSONStringer ](), reflect .TypeFor [* tfJSONStringer ]()),
4400
4400
infoConverting (reflect .TypeFor [awsJSONStringer ](), reflect .TypeFor [* tfJSONStringer ]()),
4401
4401
traceMatchedFields ("Field1" , reflect .TypeFor [awsJSONStringer ](), "Field1" , reflect .TypeFor [* tfJSONStringer ]()),
4402
- infoConvertingWithPath ("Field1" , reflect .TypeFor [smithyjson .JSONStringer ](), "Field1" , reflect .TypeFor [fwtypes.SmithyJSON [smithyjson .JSONStringer ]]()),
4402
+ infoConvertingWithPath ("Field1" , reflect .TypeFor [tfsmithy .JSONStringer ](), "Field1" , reflect .TypeFor [fwtypes.SmithyJSON [tfsmithy .JSONStringer ]]()),
4403
4403
// infoSourceImplementsJSONStringer("Field1", reflect.TypeFor[testJSONDocument](), "Field1", reflect.TypeFor[fwtypes.SmithyJSON[smithyjson.JSONStringer]]()),
4404
- infoSourceImplementsJSONStringer ("Field1" , reflect .TypeFor [smithyjson .JSONStringer ](), "Field1" , reflect .TypeFor [fwtypes.SmithyJSON [smithyjson .JSONStringer ]]()), // TODO: fix source type
4404
+ infoSourceImplementsJSONStringer ("Field1" , reflect .TypeFor [tfsmithy .JSONStringer ](), "Field1" , reflect .TypeFor [fwtypes.SmithyJSON [tfsmithy .JSONStringer ]]()), // TODO: fix source type
4405
4405
},
4406
4406
},
4407
4407
"null json interface Source JSONValue Target" : {
@@ -4410,16 +4410,16 @@ func TestFlattenInterfaceToStringTypable(t *testing.T) {
4410
4410
},
4411
4411
Target : & tfJSONStringer {},
4412
4412
WantTarget : & tfJSONStringer {
4413
- Field1 : fwtypes .SmithyJSONNull [smithyjson .JSONStringer ](),
4413
+ Field1 : fwtypes .NewSmithyJSONNull [tfsmithy .JSONStringer ](),
4414
4414
},
4415
4415
expectedLogLines : []map [string ]any {
4416
4416
infoFlattening (reflect .TypeFor [* awsJSONStringer ](), reflect .TypeFor [* tfJSONStringer ]()),
4417
4417
infoConverting (reflect .TypeFor [awsJSONStringer ](), reflect .TypeFor [* tfJSONStringer ]()),
4418
4418
traceMatchedFields ("Field1" , reflect .TypeFor [awsJSONStringer ](), "Field1" , reflect .TypeFor [* tfJSONStringer ]()),
4419
- infoConvertingWithPath ("Field1" , reflect .TypeFor [smithyjson .JSONStringer ](), "Field1" , reflect .TypeFor [fwtypes.SmithyJSON [smithyjson .JSONStringer ]]()),
4419
+ infoConvertingWithPath ("Field1" , reflect .TypeFor [tfsmithy .JSONStringer ](), "Field1" , reflect .TypeFor [fwtypes.SmithyJSON [tfsmithy .JSONStringer ]]()),
4420
4420
// infoSourceImplementsJSONStringer("Field1", reflect.TypeFor[testJSONDocument](), "Field1", reflect.TypeFor[fwtypes.SmithyJSON[smithyjson.JSONStringer]]()),
4421
- infoSourceImplementsJSONStringer ("Field1" , reflect .TypeFor [smithyjson .JSONStringer ](), "Field1" , reflect .TypeFor [fwtypes.SmithyJSON [smithyjson .JSONStringer ]]()), // TODO: fix source type
4422
- traceFlatteningNullValue ("Field1" , reflect .TypeFor [smithyjson .JSONStringer ](), "Field1" , reflect .TypeFor [fwtypes.SmithyJSON [smithyjson .JSONStringer ]]()),
4421
+ infoSourceImplementsJSONStringer ("Field1" , reflect .TypeFor [tfsmithy .JSONStringer ](), "Field1" , reflect .TypeFor [fwtypes.SmithyJSON [tfsmithy .JSONStringer ]]()), // TODO: fix source type
4422
+ traceFlatteningNullValue ("Field1" , reflect .TypeFor [tfsmithy .JSONStringer ](), "Field1" , reflect .TypeFor [fwtypes.SmithyJSON [tfsmithy .JSONStringer ]]()),
4423
4423
},
4424
4424
},
4425
4425
@@ -4435,10 +4435,10 @@ func TestFlattenInterfaceToStringTypable(t *testing.T) {
4435
4435
infoFlattening (reflect .TypeFor [* awsJSONStringer ](), reflect .TypeFor [* tfSingleStringField ]()),
4436
4436
infoConverting (reflect .TypeFor [awsJSONStringer ](), reflect .TypeFor [* tfSingleStringField ]()),
4437
4437
traceMatchedFields ("Field1" , reflect .TypeFor [awsJSONStringer ](), "Field1" , reflect .TypeFor [* tfSingleStringField ]()),
4438
- infoConvertingWithPath ("Field1" , reflect .TypeFor [smithyjson .JSONStringer ](), "Field1" , reflect .TypeFor [types.String ]()),
4438
+ infoConvertingWithPath ("Field1" , reflect .TypeFor [tfsmithy .JSONStringer ](), "Field1" , reflect .TypeFor [types.String ]()),
4439
4439
// infoSourceImplementsJSONStringer("Field1", reflect.TypeFor[testJSONDocument](), "Field1", reflect.TypeFor[types.String]()),
4440
- infoSourceImplementsJSONStringer ("Field1" , reflect .TypeFor [smithyjson .JSONStringer ](), "Field1" , reflect .TypeFor [types.String ]()), // TODO: fix source type
4441
- errorMarshallingJSONDocument ("Field1" , reflect .TypeFor [smithyjson .JSONStringer ](), "Field1" , reflect .TypeFor [types.String ](), errMarshallSmithyDocument ),
4440
+ infoSourceImplementsJSONStringer ("Field1" , reflect .TypeFor [tfsmithy .JSONStringer ](), "Field1" , reflect .TypeFor [types.String ]()), // TODO: fix source type
4441
+ errorMarshallingJSONDocument ("Field1" , reflect .TypeFor [tfsmithy .JSONStringer ](), "Field1" , reflect .TypeFor [types.String ](), errMarshallSmithyDocument ),
4442
4442
},
4443
4443
},
4444
4444
0 commit comments