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

nodejs.service.mustache Maven / Gradle / Ivy

There is a newer version: 7.8.0
Show newest version
'use strict';

{{#operations}}
{{#operation}}

/**
 {{#summary}}
 * {{{summary}}}
 {{/summary}}
 {{#notes}}
 * {{{notes}}}
 {{/notes}}
 *
{{#allParams}}
 * {{paramName}} {{{dataType}}} {{{description}}}{{^required}} (optional){{/required}}
{{/allParams}}
{{^returnType}}
 * no response value expected for this operation
{{/returnType}}
{{#returnType}}
 * returns {{{returnType}}}
{{/returnType}}
 **/
exports.{{{operationId}}} = function({{#allParams}}{{paramName}}{{#hasMore}},{{/hasMore}}{{/allParams}}) {
  return new Promise(function(resolve, reject) {
  {{#returnType}}
    var examples = {};
    {{#examples}}
    examples['{{contentType}}'] = {{{example}}};
    {{/examples}}
    if (Object.keys(examples).length > 0) {
      resolve(examples[Object.keys(examples)[0]]);
    } else {
      resolve();
    }
    {{/returnType}}
    {{^returnType}}
    resolve();
    {{/returnType}}
  });
}

{{/operation}}
{{/operations}}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy