Skip to content

Commit

Permalink
fixes for ftl init kotlin (#517)
Browse files Browse the repository at this point in the history
  • Loading branch information
worstell authored Oct 23, 2023
1 parent 2ff420a commit 821be2c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions kotlin-runtime/scaffolding/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<modelVersion>4.0.0</modelVersion>
<groupId>ftl</groupId>
<artifactId>ftl-module-{{ .Name | lower }}</artifactId>
<artifactId>ftl-module-{{ .Name | camel | lower }}</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
Expand Down Expand Up @@ -77,7 +77,7 @@
<version>1.6</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<groupId>xyz.block</groupId>
<artifactId>ftl-runtime</artifactId>
<version>${ftl.version}</version>
</dependency>
Expand Down Expand Up @@ -150,7 +150,7 @@
<argument>target/dependency/ftl-generator.jar</argument>
<argument>--endpoint=http://127.0.0.1:8892</argument>
<argument>--dest=${project.build.directory}</argument>
<argument>--module=echo</argument>
<argument>--module={{ .Name | camel | lower }}</argument>
<argument>--module-client-suffix=ModuleClient</argument>
</arguments>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ftl.{{ .Name | lower }}
package ftl.{{ .Name | camel | lower }}

import xyz.block.ftl.Context
import xyz.block.ftl.Ingress
Expand All @@ -10,8 +10,7 @@ data class {{ .Name | camel }}Response(val message: String)

class {{ .Name | camel }} {
@Verb
fun {{ .Name | lower }}(context: Context, req: {{ .Name | camel }}Request): {{ .Name | camel }}Response {
fun echo(context: Context, req: {{ .Name | camel }}Request): {{ .Name | camel }}Response {
return {{ .Name | camel }}Response(message = "Hello, ${req.name}!")
}
}

0 comments on commit 821be2c

Please sign in to comment.