Loading codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt +4 −2 Original line number Diff line number Diff line Loading @@ -486,13 +486,15 @@ class ServerProtocolTestGenerator( ) { val (_, outputT) = operationInputOutputTypes[operationShape]!! val panicMessage = "request should have been rejected, but we accepted it; we parsed operation input `{:?}`" rust("// Use the `OperationRegistryBuilder`") rustBlock("") { with(testCase.request) { // TODO(https://github.com/awslabs/smithy/issues/1102): `uri` should probably not be an `Optional`. renderHttpRequest(uri.get(), method, headers, body.orNull(), queryParams, host.orNull()) } makeRequest(operationShape, this, writable("todo!() as $outputT")) makeRequest(operationShape, this, writable("""panic!("$panicMessage", &input) as $outputT""")) checkResponse(this, testCase.response) } Loading @@ -502,7 +504,7 @@ class ServerProtocolTestGenerator( // TODO(https://github.com/awslabs/smithy/issues/1102): `uri` should probably not be an `Optional`. renderHttpRequest(uri.get(), method, headers, body.orNull(), queryParams, host.orNull()) } makeRequest2(operationShape, operationSymbol, this, writable("todo!() as $outputT")) makeRequest2(operationShape, operationSymbol, this, writable("""panic!("$panicMessage", &input) as $outputT""")) checkResponse(this, testCase.response) } } Loading Loading
codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt +4 −2 Original line number Diff line number Diff line Loading @@ -486,13 +486,15 @@ class ServerProtocolTestGenerator( ) { val (_, outputT) = operationInputOutputTypes[operationShape]!! val panicMessage = "request should have been rejected, but we accepted it; we parsed operation input `{:?}`" rust("// Use the `OperationRegistryBuilder`") rustBlock("") { with(testCase.request) { // TODO(https://github.com/awslabs/smithy/issues/1102): `uri` should probably not be an `Optional`. renderHttpRequest(uri.get(), method, headers, body.orNull(), queryParams, host.orNull()) } makeRequest(operationShape, this, writable("todo!() as $outputT")) makeRequest(operationShape, this, writable("""panic!("$panicMessage", &input) as $outputT""")) checkResponse(this, testCase.response) } Loading @@ -502,7 +504,7 @@ class ServerProtocolTestGenerator( // TODO(https://github.com/awslabs/smithy/issues/1102): `uri` should probably not be an `Optional`. renderHttpRequest(uri.get(), method, headers, body.orNull(), queryParams, host.orNull()) } makeRequest2(operationShape, operationSymbol, this, writable("todo!() as $outputT")) makeRequest2(operationShape, operationSymbol, this, writable("""panic!("$panicMessage", &input) as $outputT""")) checkResponse(this, testCase.response) } } Loading