-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Kotlin Misk Add Extra Parameters #21271
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
Kotlin Misk Add Extra Parameters #21271
Conversation
import misk.web.interceptors.LogRequestResponse | ||
import misk.web.mediatype.MediaTypes | ||
import misk.web.mediatype.MediaTypes{{#actionImports}} | ||
{{{.}}}{{/actionImports}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import misk.web.mediatype.MediaTypes
{{#actionImports}}
{{{.}}}
{{/actionImports}}
please use the above to avoid blank lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, done
@ResponseContentType({{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}){{/hasProduces}} | ||
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0) | ||
@ResponseContentType({{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}){{/hasProduces}}{{#actionAnnotations}} | ||
{{{.}}}{{/actionAnnotations}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ResponseContentType({{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}){{/hasProduces}}
{{#actionAnnotations}}
{{{.}}}
{{/actionAnnotations}}
please put start and end tags in separate lines to avoid blank lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, done
bin/configs/kotlin-misk-config.yaml
Outdated
actionParentClass: "WebAction" | ||
actionRequestContentType: "@RequestContentType(" | ||
actionRequestContentTypePrefix: "MediaTypes." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having to add a .
to the string might not be obvious, maybe we can move it to the mustache template?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
bin/configs/kotlin-misk-config.yaml
Outdated
import misk.web.interceptors.LogRequestResponse | ||
actionParentClass: "WebAction" | ||
actionRequestContentType: "@RequestContentType(" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also having to add the (
to the string might lead to people just forgetting to add it. Can it be moved to the template too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@wing328 Ready to go, I improved the tests quite a bit! |
9fc17f8
to
ac7df6e
Compare
lgtm. thanks for the pr |
PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master
(upcoming7.x.0
minor release - breaking changes with fallbacks),8.0.x
(breaking changes without fallbacks)cc: @guiarn