Skip to content

Commit 9850e49

Browse files
authored
Merge pull request #1 from claricepoh/kotlin-issues-46
Fixed Ktor Path template to generate nullable value for optional para…
2 parents 4d45da2 + 8397e8d commit 9850e49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/resources/v2/kotlin-server/libraries/ktor/Paths.kt.mustache

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ object Paths {
3333
* {{#unescapedNotes}}{{.}}{{/unescapedNotes}}
3434
{{#allParams}}* @param {{paramName}} {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
3535
{{/allParams}}*/
36-
@Location("{{path}}") class {{operationId}}({{#allParams}}val {{paramName}}: {{{dataType}}}{{#has this 'more'}}, {{/has}}{{/allParams}})
36+
@Location("{{path}}") class {{operationId}}({{#allParams}}val {{paramName}}: {{{dataType}}}{{^required}}? = null{{/required}}{{#has this 'more'}}, {{/has}}{{/allParams}})
3737

3838
{{/bodyAllowed}}
3939
{{/operation}}

0 commit comments

Comments
 (0)