File tree Expand file tree Collapse file tree 9 files changed +32
-23
lines changed
aws-sdk-codegen/src/main/kotlin/aws/sdk/kotlin/codegen
tests/codegen/smoke-tests Expand file tree Collapse file tree 9 files changed +32
-23
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,6 @@ local.properties
1717
1818# ignore generated files
1919services /* /generated-src
20- services /* /generated-src-jvm
2120services /* /build.gradle.kts
2221tests /codegen /smoke-tests /services /* /generated-src
23- tests /codegen /smoke-tests /services /* /generated-src-jvm
2422tests /codegen /smoke-tests /services /* /build.gradle.kts
Original file line number Diff line number Diff line change 44 */
55package aws.sdk.kotlin.codegen
66
7+ import aws.sdk.kotlin.codegen.model.traits.FailedResponseTrait
8+ import aws.sdk.kotlin.codegen.model.traits.SuccessResponseTrait
79import aws.sdk.kotlin.codegen.smoketests.smokeTestDenyList
810import software.amazon.smithy.kotlin.codegen.core.*
911import software.amazon.smithy.kotlin.codegen.integration.KotlinIntegration
1012import software.amazon.smithy.kotlin.codegen.model.expectShape
1113import software.amazon.smithy.kotlin.codegen.model.hasTrait
12- import software.amazon.smithy.kotlin.codegen.model.traits.FailedResponseTrait
13- import software.amazon.smithy.kotlin.codegen.model.traits.SuccessResponseTrait
1414import software.amazon.smithy.kotlin.codegen.rendering.GradleWriter
1515import software.amazon.smithy.kotlin.codegen.utils.topDownOperations
1616import software.amazon.smithy.model.shapes.ServiceShape
Original file line number Diff line number Diff line change 1+ package aws.sdk.kotlin.codegen.model.traits
2+
3+ import software.amazon.smithy.model.node.ObjectNode
4+ import software.amazon.smithy.model.shapes.ShapeId
5+ import software.amazon.smithy.model.traits.AnnotationTrait
6+
7+ /* *
8+ * Indicates the annotated service should always return a failed response.
9+ */
10+ class FailedResponseTrait (node : ObjectNode ) : AnnotationTrait(ID , node) {
11+ companion object {
12+ val ID : ShapeId = ShapeId .from(" smithy.kotlin.traits#failedResponseTrait" )
13+ }
14+ }
15+
16+ /* *
17+ * Indicates the annotated service should always return a success response.
18+ */
19+ class SuccessResponseTrait (node : ObjectNode ) : AnnotationTrait(ID , node) {
20+ companion object {
21+ val ID : ShapeId = ShapeId .from(" smithy.kotlin.traits#successResponseTrait" )
22+ }
23+ }
Original file line number Diff line number Diff line change 11package aws.sdk.kotlin.codegen.smoketests
22
3+ import aws.sdk.kotlin.codegen.model.traits.FailedResponseTrait
4+ import aws.sdk.kotlin.codegen.model.traits.SuccessResponseTrait
35import software.amazon.smithy.kotlin.codegen.KotlinSettings
46import software.amazon.smithy.kotlin.codegen.core.RuntimeTypes
57import software.amazon.smithy.kotlin.codegen.core.withBlock
@@ -8,8 +10,6 @@ import software.amazon.smithy.kotlin.codegen.integration.SectionWriter
810import software.amazon.smithy.kotlin.codegen.integration.SectionWriterBinding
911import software.amazon.smithy.kotlin.codegen.model.expectShape
1012import software.amazon.smithy.kotlin.codegen.model.hasTrait
11- import software.amazon.smithy.kotlin.codegen.model.traits.FailedResponseTrait
12- import software.amazon.smithy.kotlin.codegen.model.traits.SuccessResponseTrait
1313import software.amazon.smithy.kotlin.codegen.rendering.smoketests.SmokeTestHttpEngineOverride
1414import software.amazon.smithy.kotlin.codegen.utils.topDownOperations
1515import software.amazon.smithy.model.Model
Original file line number Diff line number Diff line change 11package aws.sdk.kotlin.codegen.smoketests
22
3+ import aws.sdk.kotlin.codegen.model.traits.FailedResponseTrait
4+ import aws.sdk.kotlin.codegen.model.traits.SuccessResponseTrait
35import software.amazon.smithy.kotlin.codegen.KotlinSettings
46import software.amazon.smithy.kotlin.codegen.core.RuntimeTypes
57import software.amazon.smithy.kotlin.codegen.integration.KotlinIntegration
68import software.amazon.smithy.kotlin.codegen.integration.SectionWriter
79import software.amazon.smithy.kotlin.codegen.integration.SectionWriterBinding
810import software.amazon.smithy.kotlin.codegen.model.expectShape
911import software.amazon.smithy.kotlin.codegen.model.hasTrait
10- import software.amazon.smithy.kotlin.codegen.model.traits.FailedResponseTrait
11- import software.amazon.smithy.kotlin.codegen.model.traits.SuccessResponseTrait
1212import software.amazon.smithy.kotlin.codegen.rendering.smoketests.SmokeTestHttpEngineOverride
1313import software.amazon.smithy.kotlin.codegen.utils.topDownOperations
1414import software.amazon.smithy.model.Model
Original file line number Diff line number Diff line change @@ -176,10 +176,6 @@ val stageSdks = tasks.register("stageSdks") {
176176 from(" $projectionOutputDir /src" )
177177 into(" ${it.destinationDir} /generated-src" )
178178 }
179- copy {
180- from(" $projectionOutputDir /jvm-src" )
181- into(" ${it.destinationDir} /generated-src-jvm" )
182- }
183179 copy {
184180 from(" $projectionOutputDir /build.gradle.kts" )
185181 into(it.destinationDir)
Original file line number Diff line number Diff line change @@ -50,10 +50,6 @@ subprojects {
5050 kotlin.srcDir(" generated-src/main/kotlin" )
5151 }
5252
53- getByName(" jvmTest" ) {
54- kotlin.srcDir(" generated-src-jvm/test/java" )
55- }
56-
5753 getByName(" commonTest" ) {
5854 kotlin.srcDir(" generated-src/test" )
5955
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ fun configureProjections() {
4747 imports = listOf (layout.projectDirectory.file(pathToSmithyModels + projection.modelFile).asFile.absolutePath)
4848 smithyKotlinPlugin {
4949 serviceShapeId = projection.serviceShapeId
50- packageName = " aws.sdk.kotlin.test.smoketests "
50+ packageName = " aws.sdk.kotlin.test"
5151 packageVersion = " 1.0"
5252 buildSettings {
5353 generateFullProject = false
@@ -81,10 +81,6 @@ fun configureTasks() {
8181 from(" $projectionPath /src" )
8282 into(" $destinationPath /generated-src" )
8383 }
84- copy {
85- from(" $projectionPath /jvm-src" )
86- into(" $destinationPath /generated-src-jvm" )
87- }
8884 copy {
8985 from(" $projectionPath /build.gradle.kts" )
9086 into(destinationPath)
Original file line number Diff line number Diff line change @@ -28,8 +28,8 @@ subprojects {
2828 kotlin.srcDir(" generated-src/main/kotlin" )
2929 }
3030
31- jvmTest {
32- kotlin.srcDir(" generated-src-jvm /test/java " )
31+ commonTest {
32+ kotlin.srcDir(" generated-src/test/kotlin " )
3333 }
3434 }
3535 }
You can’t perform that action at this time.
0 commit comments