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: 3.0.0-rc1
Show newest version
{{#models}}
{{#model}}
-module({{classname}}).

-export([encode/1]).

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy