Class TemplateParser
- java.lang.Object
-
- org.camunda.bpm.engine.rest.openapi.generator.impl.TemplateParser
-
public class TemplateParser extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description TemplateParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static java.lang.String
createOutputFile(java.lang.String debugFile)
protected static java.util.Map<java.lang.String,java.lang.Object>
createTemplateData(java.lang.String sourceDirectory)
protected static java.lang.String
formatJsonString(java.lang.String jsonString)
static void
main(java.lang.String[] args)
protected static java.util.Map<java.lang.String,java.lang.String>
resolveModels(java.lang.String sourceDirectory)
protected static java.util.Map<java.lang.String,java.util.List<java.lang.String>>
resolvePaths(java.lang.String sourceDirectory)
protected static void
resolveVersions(java.util.Map<java.lang.String,java.lang.Object> templateData)
Resolve the Camunda Platform version and the respective documentation version used in the links.
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.io.IOException, freemarker.template.TemplateException
- Throws:
java.io.IOException
freemarker.template.TemplateException
-
createTemplateData
protected static java.util.Map<java.lang.String,java.lang.Object> createTemplateData(java.lang.String sourceDirectory) throws java.io.IOException
- Throws:
java.io.IOException
-
formatJsonString
protected static java.lang.String formatJsonString(java.lang.String jsonString)
-
createOutputFile
protected static java.lang.String createOutputFile(java.lang.String debugFile) throws java.io.IOException
- Throws:
java.io.IOException
-
resolveVersions
protected static void resolveVersions(java.util.Map<java.lang.String,java.lang.Object> templateData)
Resolve the Camunda Platform version and the respective documentation version used in the links.
-
resolveModels
protected static java.util.Map<java.lang.String,java.lang.String> resolveModels(java.lang.String sourceDirectory)
- Parameters:
sourceDirectory
- the template directory that stores the models- Returns:
- a map of model name and file path to it, the map is ordered lexicographically by the model names
-
resolvePaths
protected static java.util.Map<java.lang.String,java.util.List<java.lang.String>> resolvePaths(java.lang.String sourceDirectory)
- Parameters:
sourceDirectory
- the template directory that stores the endpoints- Returns:
- a map of endpoint path and HTTP methods pairs, the map is ordered lexicographically by the endpoint paths the list of methods is ordered as well
-
-