Skip to content

Conversation

@0marperez
Copy link

Background

  • What do these changes do?
    Add a Smithy Kotlin quick start example.

  • Was a new example added? If so, what does it demonstrate?
    Yes, how to quickly get started with Smithy Kotlin client code generation.

Testing

  • How did you test these changes?
    Ran the quick start example server and client.

  • Was an integration test added for any new examples?
    No.

  • If a new example was added did you update the smithy-templates.json file?
    Yes.

Links

See: https://github.com/smithy-lang/smithy-kotlin


By submitting this pull request, I confirm that my contribution is made under the terms of the MIT-0 license.

@0marperez 0marperez marked this pull request as ready for review January 5, 2026 21:10
@0marperez 0marperez requested a review from a team as a code owner January 5, 2026 21:10
@0marperez 0marperez requested a review from yefrig January 5, 2026 21:10

plugins {
application
kotlin("jvm") version "2.2.0"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2.3.0 is the latest version, can we use that?

Comment on lines 21 to 23
val coroutinesCoreVersion: String by project
val smithyKotlinCodegenVersion: String by project
val smithyKotlinRuntimeVersion: String by project
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can / should we use a version catalog?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated this to use a version catalog

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need it for the Java Kotlin server to work. When I remove it I get:

Projection source failed: software.amazon.smithy.codegen.core.CodegenException: Header file /Users/aoperez/Documents/kotlinSdkWork/smithyExamples/smithy-examples/smithy-kotlin-examples/quickstart-kotlin/server/../license.txt does not exist.

@@ -0,0 +1,53 @@
description = "Cafe service client"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: CoffeeShop service client

Comment on lines 14 to 19
public class CafeService implements Runnable {
private static final Logger LOGGER = Logger.getLogger(CafeService.class.getName());

public static void main(String... args) throws InterruptedException, ExecutionException {
new CafeService().run();
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: The client is named CoffeeShopClient so for clarity this should be named CoffeeShopService (not Cafe). Applies in other files too.

@0marperez 0marperez requested review from ianbotsf and lauzadis January 6, 2026 22:23
Comment on lines +27 to +35
logger.info("Waiting for order to complete.")
delay(5.seconds)

logger.info("Checking order status")
val orderStatus = client.getOrder {
id = createOrderResponse.id
}.status

logger.info("Order status: $orderStatus")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can make this a little more comprehensive example by explicitly waiting until the order status is OrderStatus.COMPLETED

Comment on lines 1 to 6
[versions]
smithyVersion="1.63.0"
smithyJavaVersion="0.0.1"
smithyKotlinCodegenVersion="0.35.25"
smithyKotlinRuntimeVersion="1.5.25"
coroutinesCoreVersion="1.10.2"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: version catalogs typically use kebab-case instead of camelCase

@@ -0,0 +1,21 @@
description = "Smithy definition of a Cafe service."
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: This still says "Cafe" instead of "CoffeeShop"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants