Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes for ftl init kotlin #517

Merged
merged 1 commit into from
Oct 23, 2023
Merged

Conversation

worstell
Copy link
Contributor

No description provided.

@@ -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 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this should be called echo should it? And we probably don't want methods exposed via @Ingress by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah i thought this was called echo because the function echoes back the request - maybe we can call it "hello" or something, if the echo naming was a specific reference to the module before?
i'm also good with dynamically naming it after the module, but i thought this could be demonstrative that verb/module names are not necessarily connected

same thing with the ingress, i was thinking it would just surface the annotation syntax to include as much info in the example as possible - but maybe it would confuse people. what do you think about including as a commented out line with some additional comment text like "uncomment to expose this verb to external clients via HTTP"?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Good point re. echo, makes sense!

Regarding @Ingress, this code shouldn't be a vehicle for documentation/examples because at some point we'll have so many annotations/configuration that we can't possibly include them all in the scaffolded example. Instead, we'll have all of this information in the documentation and tutorials.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that makes sense - will remove!

@worstell worstell force-pushed the worstell/20231020-fix-init-kotlin branch from 508a60d to 0f694b5 Compare October 23, 2023 21:51
@worstell worstell merged commit 821be2c into main Oct 23, 2023
8 checks passed
@worstell worstell deleted the worstell/20231020-fix-init-kotlin branch October 23, 2023 21:54
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.

2 participants