private String render ( io . wcm . caravan . hal . docs . impl . model . Service service , Map < String , Object > model , Template template ) throws IOException { Map < String , Object > mergedModel = ImmutableMap . < String , Object > builder ( ) . putAll ( model ) . put ( "docsContext" , ImmutableMap . < String , Object > builder ( ) . put ( "baseUrl" , DocsPath . get ( service . getServiceId ( ) ) + "/" ) . put ( "resourcesPath" , HalDocsBundleTracker . DOCS_RESOURCES_URI_PREFIX ) . build ( ) ) . build ( ) ; return template . apply ( mergedModel ) ; }
Generate templated file with handlebars