File tree Expand file tree Collapse file tree 4 files changed +13
-9
lines changed
codegen/smithy-aws-kotlin-codegen/src
main/kotlin/aws/sdk/kotlin/codegen/customization
test/kotlin/aws/sdk/kotlin/codegen/customization Expand file tree Collapse file tree 4 files changed +13
-9
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "id" : " 57c0a5a3-d499-4a0c-9930-54fd363a88b5" ,
3+ "type" : " misc" ,
4+ "description" : " Upgrade Smithy to 1.23.0, upgrade Smithy Gradle to 0.6.0"
5+ }
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ import software.amazon.smithy.kotlin.codegen.model.isNumberShape
1212import software.amazon.smithy.model.Model
1313import software.amazon.smithy.model.neighbor.Walker
1414import software.amazon.smithy.model.shapes.*
15- import software.amazon.smithy.model.traits.BoxTrait
1615import software.amazon.smithy.model.transform.ModelTransformer
1716import software.amazon.smithy.utils.ToSmithyBuilder
1817
@@ -85,7 +84,8 @@ class BoxServices : KotlinIntegration {
8584 get() = isBooleanShape || isNumberShape
8685
8786 private fun <T > box (shape : T ): Shape where T : Shape , T : ToSmithyBuilder<T> {
88- return (shape.toBuilder() as AbstractShapeBuilder <* , T >).addTrait(BoxTrait ()).build()
87+ return (shape.toBuilder() as AbstractShapeBuilder <* , T >)
88+ .addTrait(@Suppress(" DEPRECATION" ) software.amazon.smithy.model.traits.BoxTrait ()).build()
8989 }
9090
9191 private fun boxNumber (shape : NumberShape ): Shape = when (shape) {
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ import software.amazon.smithy.kotlin.codegen.test.newTestContext
1212import software.amazon.smithy.kotlin.codegen.test.prependNamespaceAndService
1313import software.amazon.smithy.kotlin.codegen.test.toSmithyModel
1414import software.amazon.smithy.model.shapes.StructureShape
15- import software.amazon.smithy.model.traits.BoxTrait
1615import kotlin.test.Test
1716import kotlin.test.assertFalse
1817import kotlin.test.assertTrue
@@ -51,10 +50,10 @@ class BoxServicesTest {
5150 struct.members().forEach {
5251 val target = transformed.expectShape(it.target)
5352 if (target.isBooleanShape || target.isNumberShape) {
54- assertTrue(it.hasTrait<BoxTrait >())
53+ assertTrue(it.hasTrait< @Suppress( " DEPRECATION " ) software.amazon.smithy.model.traits. BoxTrait > ())
5554 } else {
56- assertFalse(target.hasTrait<BoxTrait >())
57- assertFalse(it.hasTrait<BoxTrait >())
55+ assertFalse(target.hasTrait< @Suppress( " DEPRECATION " ) software.amazon.smithy.model.traits. BoxTrait > ())
56+ assertFalse(it.hasTrait< @Suppress( " DEPRECATION " ) software.amazon.smithy.model.traits. BoxTrait > ())
5857 }
5958 }
6059 }
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ org.gradle.jvmargs=-Xmx6g -XX:MaxMetaspaceSize=2G
99sdkVersion =0.17.5-SNAPSHOT
1010
1111# codegen
12- smithyVersion =1.22 .0
13- smithyGradleVersion =0.5.3
12+ smithyVersion =1.23 .0
13+ smithyGradleVersion =0.6.0
1414# smithy-kotlin codegen and runtime are versioned together
1515smithyKotlinVersion =0.12.4
1616
@@ -39,4 +39,4 @@ slf4jVersion=1.7.36
3939
4040# dokka config (values specified at build-time as needed)
4141smithyKotlinPackageListUrl =
42- smithyKotlinDocBaseUrl =https://docs.aws.amazon.com/sdk-for-kotlin/latest/reference/smithy-kotlin
42+ smithyKotlinDocBaseUrl =https://docs.aws.amazon.com/sdk-for-kotlin/latest/reference/smithy-kotlin
You can’t perform that action at this time.
0 commit comments