All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scala-sttp.model.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
{{>licenseInfo}}
package {{package}}

{{#imports}}
import {{import}}
{{/imports}}

{{#models}}
{{#model}}
{{#description}}
{{#javadocRenderer}}
{{#title}}
{{{.}}}
{{/title}}
{{{description}}}
{{/javadocRenderer}}
{{/description}}
{{^isEnum}}
case class {{classname}}(
  {{#vars}}
  {{#description}}
  /* {{{.}}} */
  {{/description}}
  {{{name}}}: {{^required}}Option[{{/required}}{{^isEnum}}{{dataType}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}Enums.{{datatypeWithEnum}}{{/isArray}}{{#isArray}}Seq[{{classname}}Enums.{{datatypeWithEnum}}]{{/isArray}}{{/isEnum}}{{^required}}] = None{{/required}}{{^-last}},{{/-last}}
  {{/vars}}
)
{{/isEnum}}

{{#isEnum}}
object {{classname}} extends Enumeration {
    type {{classname}} = {{classname}}.Value
{{#allowableValues}}
    {{#values}}
    val {{#fnEnumEntry}}{{.}}{{/fnEnumEntry}} = Value("{{.}}")
    {{/values}}
{{/allowableValues}}
}
{{/isEnum}}
{{#hasEnums}}
object {{classname}}Enums {

  {{#vars}}
  {{#isEnum}}
  type {{datatypeWithEnum}} = {{datatypeWithEnum}}.Value
  {{/isEnum}}
  {{/vars}}
  {{#vars}}
  {{#isEnum}}
  object {{datatypeWithEnum}} extends Enumeration {
{{#_enum}}
    val {{#fnEnumEntry}}{{.}}{{/fnEnumEntry}} = Value("{{.}}")
{{/_enum}}
  }

  {{/isEnum}}
  {{/vars}}
}
{{/hasEnums}}
{{/model}}
{{/models}}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy