From 508a60d95c202f2bb5f7493eaa2f56a9c10f4771 Mon Sep 17 00:00:00 2001 From: Elizabeth Worstell Date: Fri, 20 Oct 2023 14:56:07 -0700 Subject: [PATCH] fixes for ftl init kotlin --- kotlin-runtime/scaffolding/pom.xml | 6 +++--- .../{{ .Name | camel }}.kt | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) rename kotlin-runtime/scaffolding/src/main/kotlin/ftl/{{{ .Name | lower }} => {{ .Name | camel | lower }}}/{{ .Name | camel }}.kt (67%) diff --git a/kotlin-runtime/scaffolding/pom.xml b/kotlin-runtime/scaffolding/pom.xml index 8d0711204c..d937ef1ec5 100644 --- a/kotlin-runtime/scaffolding/pom.xml +++ b/kotlin-runtime/scaffolding/pom.xml @@ -4,7 +4,7 @@ 4.0.0 ftl - ftl-module-{{ .Name | lower }} + ftl-module-{{ .Name | camel | lower }} 1.0-SNAPSHOT @@ -77,7 +77,7 @@ 1.6 - ${project.groupId} + xyz.block ftl-runtime ${ftl.version} @@ -150,7 +150,7 @@ target/dependency/ftl-generator.jar --endpoint=http://127.0.0.1:8892 --dest=${project.build.directory} - --module=echo + --module={{ .Name | camel | lower }} --module-client-suffix=ModuleClient diff --git a/kotlin-runtime/scaffolding/src/main/kotlin/ftl/{{ .Name | lower }}/{{ .Name | camel }}.kt b/kotlin-runtime/scaffolding/src/main/kotlin/ftl/{{ .Name | camel | lower }}/{{ .Name | camel }}.kt similarity index 67% rename from kotlin-runtime/scaffolding/src/main/kotlin/ftl/{{ .Name | lower }}/{{ .Name | camel }}.kt rename to kotlin-runtime/scaffolding/src/main/kotlin/ftl/{{ .Name | camel | lower }}/{{ .Name | camel }}.kt index 15604c4d50..26749ccf09 100644 --- a/kotlin-runtime/scaffolding/src/main/kotlin/ftl/{{ .Name | lower }}/{{ .Name | camel }}.kt +++ b/kotlin-runtime/scaffolding/src/main/kotlin/ftl/{{ .Name | camel | lower }}/{{ .Name | camel }}.kt @@ -1,4 +1,4 @@ -package ftl.{{ .Name | lower }} +package ftl.{{ .Name | camel | lower }} import xyz.block.ftl.Context import xyz.block.ftl.Ingress @@ -10,8 +10,8 @@ data class {{ .Name | camel }}Response(val message: String) class {{ .Name | camel }} { @Verb - fun {{ .Name | lower }}(context: Context, req: {{ .Name | camel }}Request): {{ .Name | camel }}Response { + @Ingress(Method.GET, "/echo") + fun echo(context: Context, req: {{ .Name | camel }}Request): {{ .Name | camel }}Response { return {{ .Name | camel }}Response(message = "Hello, ${req.name}!") } } -