kotlin-server.libraries.ktor.Paths.kt.mustache Maven / Gradle / Ivy
{{>licenseInfo}}
package {{packageName}}
import io.ktor.resources.*
import kotlinx.serialization.*
import {{packageName}}.models.*
{{#imports}}import {{import}}
{{/imports}}
{{#apiInfo}}
object Paths {
{{#apis}}
{{#operations}}
{{#operation}}
/**{{#summary}}
* {{.}}{{/summary}}
* {{unescapedNotes}}
{{#allParams}}* @param {{paramName}} {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
{{/allParams}}*/
{{#hasParams}}
@Serializable @Resource("{{path}}") class {{operationId}}({{#allParams}}val {{paramName}}: {{{dataType}}}{{^required}}? = null{{/required}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}})
{{/hasParams}}
{{^hasParams}}
@Serializable @Resource("{{path}}") class {{operationId}}
{{/hasParams}}
{{/operation}}
{{/operations}}
{{/apis}}
}
{{/apiInfo}}