JavaVertXWebServer.headerParams.mustache Maven / Gradle / Ivy
{{#isHeaderParam}}
{{^isArray}}
{{#isModel}}
{{{dataType}}} {{paramName}} = requestParameters.headerParameter("{{baseName}}") != null ? DatabindCodec.mapper().convertValue(requestParameters.headerParameter("{{baseName}}").get(), new TypeReference<{{{dataType}}}>(){}) : null;
{{/isModel}}
{{^isModel}}
{{{dataType}}} {{paramName}} = requestParameters.headerParameter("{{baseName}}") != null ? requestParameters.headerParameter("{{baseName}}").get{{dataType}}() : null;
{{/isModel}}
{{/isArray}}
{{#isArray}}
{{{dataType}}} {{paramName}} = requestParameters.headerParameter("{{baseName}}") != null ? DatabindCodec.mapper().convertValue(requestParameters.headerParameter("{{baseName}}").get(), new TypeReference<{{{dataType}}}>(){}) : null;
{{/isArray}}
{{/isHeaderParam}}