Skip to content

Commit

Permalink
Merge pull request #680 from swagger-api/mustache_template_removing
Browse files Browse the repository at this point in the history
Mustache template removing
  • Loading branch information
HugoMario authored May 16, 2020
2 parents 1ada2a5 + 3bfa9e6 commit 4045ac7
Show file tree
Hide file tree
Showing 790 changed files with 3 additions and 51,101 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public void processOpts() {
supportingFiles.add(new SupportingFile("Filters" + File.separator + "BasePathFilter.mustache", packageFolder + File.separator + "Filters", "BasePathFilter.cs"));
supportingFiles.add(new SupportingFile("Filters" + File.separator + "GeneratePathParamsValidationFilter.mustache", packageFolder + File.separator + "Filters", "GeneratePathParamsValidationFilter.cs"));
supportingFiles.add(new SupportingFile("Startup.mustache", packageFolder, "Startup.cs"));
} else if (aspNetCoreVersion.equals("2.1")) {
} else if (aspNetCoreVersion.equals("2.1") || aspNetCoreVersion.equals("2.2")) {
apiTemplateFiles.put("2.1/controller.mustache", ".cs");
addInterfaceControllerTemplate();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,4 @@ protected String stripPackageName(String input) {
int lastIndexOfDot = input.lastIndexOf(".");
return input.substring(lastIndexOfDot + 1);
}

// todo: remove this once handlebar templates for this generator are implemented
@Override
protected void setTemplateEngine() {
templateEngine = new MustacheTemplateEngine(this);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class {{classname}}(
{{#headerParams}} }{{/headerParams}}
{{^queryParams.isEmpty}} }{{/queryParams.isEmpty}}
}
}{{^-last}} ~{{/-last}}
}{{^@last}} ~{{/@last}}
{{/operation}}
}

Expand All @@ -50,7 +50,7 @@ trait {{classname}}Service {
{{/responses}}
*/
def {{operationId}}({{#vendorExtensions.paramsWithSupportedType}}{{paramName}}: {{^required}}{{^isBodyParam}}Option[{{/isBodyParam}}{{/required}}{{dataType}}{{^required}}{{^isBodyParam}}]{{/isBodyParam}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/vendorExtensions.paramsWithSupportedType}}){{^vendorExtensions.complexReturnTypes.isEmpty}}
(implicit {{#vendorExtensions.complexReturnTypes}}toEntityMarshaller{{baseType}}{{containerType}}: ToEntityMarshaller[{{dataType}}]{{^-last}}, {{/-last}}{{/vendorExtensions.complexReturnTypes}}){{/vendorExtensions.complexReturnTypes.isEmpty}}: Route
(implicit {{#vendorExtensions.complexReturnTypes}}toEntityMarshaller{{baseType}}{{containerType}}: ToEntityMarshaller[{{dataType}}]{{^@last}}, {{/@last}}{{/vendorExtensions.complexReturnTypes}}){{/vendorExtensions.complexReturnTypes.isEmpty}}: Route

{{/operation}}
}
Expand Down
Loading

0 comments on commit 4045ac7

Please sign in to comment.