-
Notifications
You must be signed in to change notification settings - Fork 426
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into issues/1054
- Loading branch information
Showing
23 changed files
with
173 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 9 additions & 7 deletions
16
src/main/resources/handlebars/kotlin-client/data_class.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,33 @@ | ||
/** | ||
* {{{description}}} | ||
{{#allVars}} | ||
{{#vars}} | ||
* @param {{name}} {{{description}}} | ||
{{/allVars}} | ||
{{/vars}} | ||
*/ | ||
{{#hasVars}}data {{/hasVars}}class {{classname}} ( | ||
|
||
{{#allVars}} | ||
{{#vars}} | ||
{{#required}} | ||
{{>data_class_req_var}}{{^@last}},{{/@last}} | ||
{{/required}} | ||
{{^required}} | ||
{{>data_class_opt_var}}{{^@last}},{{/@last}} | ||
{{/required}} | ||
{{/allVars}} | ||
{{/vars}} | ||
) { | ||
{{#allVars}} | ||
{{#vars}} | ||
{{#baseItems this}} | ||
{{#isEnum}} | ||
/** | ||
* {{{description}}} | ||
* Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^@last}},{{/@last}}{{/enumVars}}{{/allowableValues}} | ||
*/ | ||
enum class {{nameInCamelCase}}(val value: {{datatype}}{{#isNullable}}?{{/isNullable}}){ | ||
enum class {{{datatypeWithEnum}}}(val value: {{{datatype}}}{{#isNullable}}?{{/isNullable}}){ | ||
{{#allowableValues}}{{#enumVars}} | ||
{{&name}}({{#value}}{{{value}}}{{/value}}{{^value}}null{{/value}}){{^@last}},{{/@last}}{{#@last}};{{/@last}} | ||
{{/enumVars}}{{/allowableValues}} | ||
} | ||
{{/isEnum}} | ||
{{/allVars}} | ||
{{/baseItems}} | ||
{{/vars}} | ||
} |
2 changes: 1 addition & 1 deletion
2
src/main/resources/handlebars/kotlin-client/data_class_opt_var.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{{#description}} | ||
/* {{{description}}} */ | ||
{{/description}} | ||
val {{{name}}}: {{#is this 'enum'}}{{classname}}.{{nameInCamelCase}}{{/is}}{{#isNot this 'enum'}}{{{datatype}}}{{/isNot}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} | ||
val {{{name}}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} |
2 changes: 1 addition & 1 deletion
2
src/main/resources/handlebars/kotlin-client/data_class_req_var.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{{#description}} | ||
/* {{{description}}} */ | ||
{{/description}} | ||
val {{{name}}}: {{#is this 'enum'}}{{classname}}.{{nameInCamelCase}}{{/is}}{{#isNot this 'enum'}}{{{datatype}}}{{/isNot}} | ||
val {{{name}}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{/isEnum}} |
32 changes: 20 additions & 12 deletions
32
src/main/resources/handlebars/kotlin-server/data_class.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,33 @@ | ||
/** | ||
* {{{description}}} | ||
{{~#vars}} | ||
{{#vars}} | ||
* @param {{name}} {{{description}}} | ||
{{~/vars~}} | ||
{{/vars}} | ||
*/ | ||
data class {{classname}} ( | ||
{{~#requiredVars~}} | ||
{{>data_class_req_var}}{{^@last}},{{/@last}} | ||
{{~/requiredVars~}} | ||
{{#has this 'required'}}{{#has this 'optional'}},{{/has}}{{/has}} | ||
{{~#optionalVars}}{{>data_class_opt_var}}{{^@last}},{{/@last}}{{/optionalVars}} | ||
{{#hasVars}}data {{/hasVars}}class {{classname}} ( | ||
|
||
{{#vars}} | ||
{{#required}} | ||
{{>data_class_req_var}}{{^@last}},{{/@last}} | ||
{{/required}} | ||
{{^required}} | ||
{{>data_class_opt_var}}{{^@last}},{{/@last}} | ||
{{/required}} | ||
{{/vars}} | ||
) { | ||
{{#has this 'enums'}}{{#vars}}{{#is this 'enum'}} | ||
{{#vars}} | ||
{{#baseItems this}} | ||
{{#isEnum}} | ||
/** | ||
* {{{description}}} | ||
* Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^@last}},{{/@last}}{{/enumVars}}{{/allowableValues}} | ||
*/ | ||
enum class {{nameInCamelCase}}(val value: {{datatype}}){ | ||
enum class {{{datatypeWithEnum}}}(val value: {{{datatype}}}{{#isNullable}}?{{/isNullable}}){ | ||
{{#allowableValues}}{{#enumVars}} | ||
{{&name}}({{{value}}}){{^@last}},{{/@last}}{{#@last}};{{/@last}} | ||
{{&name}}({{#value}}{{{value}}}{{/value}}{{^value}}null{{/value}}){{^@last}},{{/@last}}{{#@last}};{{/@last}} | ||
{{/enumVars}}{{/allowableValues}} | ||
} | ||
{{/is}}{{/vars}}{{/has}} | ||
{{/isEnum}} | ||
{{/baseItems}} | ||
{{/vars}} | ||
} |
4 changes: 2 additions & 2 deletions
4
src/main/resources/handlebars/kotlin-server/data_class_opt_var.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{{#description}} | ||
/* {{{description}}} */ | ||
{{~/description}} | ||
val {{{name}}}: {{#is this 'enum'}}{{classname}}.{{nameInCamelCase}}{{/is}}{{#isNot this 'enum'}}{{{datatype}}}{{/isNot}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} | ||
{{/description}} | ||
val {{{name}}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} |
2 changes: 1 addition & 1 deletion
2
src/main/resources/handlebars/kotlin-server/data_class_req_var.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{{#description}} | ||
/* {{{description}}} */ | ||
{{/description}} | ||
val {{{name}}}: {{#is this 'enum'}}{{classname}}.{{nameInCamelCase}}{{/is}}{{#isNot this 'enum'}}{{{datatype}}}{{/isNot}} | ||
val {{{name}}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{/isEnum}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/main/resources/handlebars/kotlin-server/libraries/ktor/_principal.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.