Class OpenAPIInputReader
- java.lang.Object
-
- com.devonfw.cobigen.openapiplugin.inputreader.OpenAPIInputReader
-
- All Implemented Interfaces:
com.devonfw.cobigen.api.extension.InputReader
public class OpenAPIInputReader extends Object implements com.devonfw.cobigen.api.extension.InputReader
Extension for theInputReaderInterface of the CobiGen, to be able to read OpenApi3 definition files into FreeMarker models
-
-
Field Summary
Fields Modifier and Type Field Description static StringVALID_EXTENSION_YAMLValid extensions for the input readerstatic StringVALID_EXTENSION_YMLValid extensions for the input reader
-
Constructor Summary
Constructors Constructor Description OpenAPIInputReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>createModel(Object input)List<Object>getInputObjects(Object input, Charset inputCharset)List<Object>getInputObjectsRecursively(Object input, Charset inputCharset)Map<String,Object>getTemplateMethods(Object input)booleanisMostLikelyReadable(Path path)booleanisValidInput(Object input)Objectread(Path path, Charset inputCharset, Object... additionalArguments)
-
-
-
Field Detail
-
VALID_EXTENSION_YAML
public static final String VALID_EXTENSION_YAML
Valid extensions for the input reader- See Also:
- Constant Field Values
-
VALID_EXTENSION_YML
public static final String VALID_EXTENSION_YML
Valid extensions for the input reader- See Also:
- Constant Field Values
-
-
Method Detail
-
isValidInput
public boolean isValidInput(Object input)
- Specified by:
isValidInputin interfacecom.devonfw.cobigen.api.extension.InputReader
-
createModel
public Map<String,Object> createModel(Object input)
- Specified by:
createModelin interfacecom.devonfw.cobigen.api.extension.InputReader
-
getInputObjects
public List<Object> getInputObjects(Object input, Charset inputCharset)
- Specified by:
getInputObjectsin interfacecom.devonfw.cobigen.api.extension.InputReader
-
getTemplateMethods
public Map<String,Object> getTemplateMethods(Object input)
- Specified by:
getTemplateMethodsin interfacecom.devonfw.cobigen.api.extension.InputReader
-
getInputObjectsRecursively
public List<Object> getInputObjectsRecursively(Object input, Charset inputCharset)
- Specified by:
getInputObjectsRecursivelyin interfacecom.devonfw.cobigen.api.extension.InputReader
-
read
public Object read(Path path, Charset inputCharset, Object... additionalArguments) throws com.devonfw.cobigen.api.exception.InputReaderException
- Specified by:
readin interfacecom.devonfw.cobigen.api.extension.InputReader- Throws:
com.devonfw.cobigen.api.exception.InputReaderException
-
isMostLikelyReadable
public boolean isMostLikelyReadable(Path path)
- Specified by:
isMostLikelyReadablein interfacecom.devonfw.cobigen.api.extension.InputReader
-
-