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

erlang-client.model.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
{{#models}}
{{#model}}
-module({{classname}}).

-export([encode/1]).

-export_type([{{classname}}/0]).

-type {{classname}}() ::
    #{ {{#vars}}'{{name}}' {{#required}}:={{/required}}{{^required}}=>{{/required}} {{{dataType}}}{{^-last}},
       {{/-last}}{{/vars}}
     }.

encode(#{ {{#vars}}'{{name}}' := {{{nameInCamelCase}}}{{^-last}},
          {{/-last}}{{/vars}}
        }) ->
    #{ {{#vars}}'{{baseName}}' => {{{nameInCamelCase}}}{{^-last}},
       {{/-last}}{{/vars}}
     }.
{{/model}}
{{/models}}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy