Skip to content

Commit

Permalink
docs touchup
Browse files Browse the repository at this point in the history
  • Loading branch information
rienafairefr committed Aug 22, 2018
1 parent 4e9024c commit 0ee5694
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public class Generate implements Runnable {
private String templateDir;

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

@Option(
Expand Down
2 changes: 2 additions & 0 deletions modules/openapi-generator-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>openapi-generator-core</artifactId>
<name>openapi-generator-core</name>
<url>https://github.com/openapitools/openapi-generator</url>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import java.io.IOException;
import java.util.Map;


/**
* Each templating engine is called by an Adapter, selected at runtime
*/
public interface TemplatingEngineAdapter{

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

/*
Used to determine whether a given supporting file is a template
/**
* During generation, if a supporting file has a file extension that is
* inside that array, then it is considered a templated supporting file
* and we use the templating engine adapter to generate it
* @return string array of the valid file extensions for this templating engine
*/
String[] getFileExtensions();
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
package org.openapitools.codegen.api;

/*
interface for getting the templates
/**
* interface to the full template content
* implementers might take into account the -t cli option,
* look in the resources for a language specific template, etc
*/
public interface TemplatingGenerator {

// returns the template content by name
/**
* returns the template content by name
* @param name the template name (e.g. model.mustache)
* @return the contents of that template
*/
String getFullTemplateContents(String name);

}

0 comments on commit 0ee5694

Please sign in to comment.