Class OpenAPIInputReader
- java.lang.Object
-
- com.devonfw.cobigen.openapiplugin.inputreader.OpenAPIInputReader
-
- All Implemented Interfaces:
com.devonfw.cobigen.api.extension.InputReader
public class OpenAPIInputReader extends java.lang.Object implements com.devonfw.cobigen.api.extension.InputReaderExtension 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 java.lang.StringVALID_EXTENSION_YAMLValid extensions for the input readerstatic java.lang.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 java.util.Map<java.lang.String,java.lang.Object>createModel(java.lang.Object input)java.util.List<java.lang.Object>getInputObjects(java.lang.Object input, java.nio.charset.Charset inputCharset)java.util.List<java.lang.Object>getInputObjectsRecursively(java.lang.Object input, java.nio.charset.Charset inputCharset)booleanisMostLikelyReadable(java.nio.file.Path path)booleanisValidInput(java.lang.Object input)java.lang.Objectread(java.nio.file.Path path, java.nio.charset.Charset inputCharset, java.lang.Object... additionalArguments)
-
-
-
Field Detail
-
VALID_EXTENSION_YAML
public static final java.lang.String VALID_EXTENSION_YAML
Valid extensions for the input reader- See Also:
- Constant Field Values
-
VALID_EXTENSION_YML
public static final java.lang.String VALID_EXTENSION_YML
Valid extensions for the input reader- See Also:
- Constant Field Values
-
-
Method Detail
-
isValidInput
public boolean isValidInput(java.lang.Object input)
- Specified by:
isValidInputin interfacecom.devonfw.cobigen.api.extension.InputReader
-
createModel
public java.util.Map<java.lang.String,java.lang.Object> createModel(java.lang.Object input)
- Specified by:
createModelin interfacecom.devonfw.cobigen.api.extension.InputReader
-
getInputObjects
public java.util.List<java.lang.Object> getInputObjects(java.lang.Object input, java.nio.charset.Charset inputCharset)- Specified by:
getInputObjectsin interfacecom.devonfw.cobigen.api.extension.InputReader
-
getInputObjectsRecursively
public java.util.List<java.lang.Object> getInputObjectsRecursively(java.lang.Object input, java.nio.charset.Charset inputCharset)- Specified by:
getInputObjectsRecursivelyin interfacecom.devonfw.cobigen.api.extension.InputReader
-
read
public java.lang.Object read(java.nio.file.Path path, java.nio.charset.Charset inputCharset, java.lang.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(java.nio.file.Path path)
- Specified by:
isMostLikelyReadablein interfacecom.devonfw.cobigen.api.extension.InputReader
-
-