Skip to content

Commit 0ee5694

Browse files
author
rienafairefr
committed
docs touchup
1 parent 4e9024c commit 0ee5694

File tree

4 files changed

+20
-7
lines changed

4 files changed

+20
-7
lines changed

modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public class Generate implements Runnable {
6666
private String templateDir;
6767

6868
@Option(name = {"-e", "--engine"}, title = "templating engine",
69-
description = "uses a given plugin for loading the templating engine")
69+
description = "templating engine, for now \"mustache\" and \"handlebars\" are supported")
7070
private String templatingEngine;
7171

7272
@Option(

modules/openapi-generator-core/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@
1111
<modelVersion>4.0.0</modelVersion>
1212

1313
<artifactId>openapi-generator-core</artifactId>
14+
<name>openapi-generator-core</name>
15+
<url>https://github.com/openapitools/openapi-generator</url>
1416
</project>

modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/TemplatingEngineAdapter.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
import java.io.IOException;
44
import java.util.Map;
55

6-
6+
/**
7+
* Each templating engine is called by an Adapter, selected at runtime
8+
*/
79
public interface TemplatingEngineAdapter{
810

911
/**
@@ -17,8 +19,11 @@ public interface TemplatingEngineAdapter{
1719
String doProcessTemplateToFile(TemplatingGenerator generator, Map<String, Object> bundle,
1820
String templateFile) throws IOException;
1921

20-
/*
21-
Used to determine whether a given supporting file is a template
22+
/**
23+
* During generation, if a supporting file has a file extension that is
24+
* inside that array, then it is considered a templated supporting file
25+
* and we use the templating engine adapter to generate it
26+
* @return string array of the valid file extensions for this templating engine
2227
*/
2328
String[] getFileExtensions();
2429
}
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
package org.openapitools.codegen.api;
22

3-
/*
4-
interface for getting the templates
3+
/**
4+
* interface to the full template content
5+
* implementers might take into account the -t cli option,
6+
* look in the resources for a language specific template, etc
57
*/
68
public interface TemplatingGenerator {
79

8-
// returns the template content by name
10+
/**
11+
* returns the template content by name
12+
* @param name the template name (e.g. model.mustache)
13+
* @return the contents of that template
14+
*/
915
String getFullTemplateContents(String name);
1016

1117
}

0 commit comments

Comments
 (0)