elm.formParamEncoder.mustache Maven / Gradle / Ivy
{{^required}}Maybe.map ({{/required}}{{#required}}Just <| {{/required}}{{^isFile}}Http.stringPart {{/isFile}}{{#isFile}}Http.filePart {{/isFile}}"{{paramName}}"{{#isBoolean}}(\val -> if val then "true" else "false"){{/isBoolean}}{{#isDateTime}}Api.Time.dateTimeToString{{/isDateTime}}{{#isDate}}Api.Time.dateToString{{/isDate}}{{#isInteger}}String.fromInt{{/isInteger}}{{#isLong}}String.fromInt{{/isLong}}{{#isNumber}}String.fromFloat{{/isNumber}}{{#isFloat}}String.fromFloat{{/isFloat}}{{#isDouble}}String.fromFloat{{/isDouble}}{{#allowableValues}}Api.Data.stringFrom{{#datatypeWithEnum}}{{datatypeWithEnum}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{dataType}}{{/datatypeWithEnum}}{{/allowableValues}}{{#isUuid}}Uuid.toString{{/isUuid}}{{^required}}){{/required}} {{paramName}}