Class OpenAPIInputReader

  • All Implemented Interfaces:
    com.devonfw.cobigen.api.extension.InputReader

    public class OpenAPIInputReader
    extends Object
    implements com.devonfw.cobigen.api.extension.InputReader
    Extension for the InputReader Interface of the CobiGen, to be able to read OpenApi3 definition files into FreeMarker models
    • 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
    • Constructor Detail

      • OpenAPIInputReader

        public OpenAPIInputReader()
    • Method Detail

      • isValidInput

        public boolean isValidInput​(Object input)
        Specified by:
        isValidInput in interface com.devonfw.cobigen.api.extension.InputReader
      • createModel

        public Map<String,​Object> createModel​(Object input)
        Specified by:
        createModel in interface com.devonfw.cobigen.api.extension.InputReader
      • getInputObjects

        public List<Object> getInputObjects​(Object input,
                                            Charset inputCharset)
        Specified by:
        getInputObjects in interface com.devonfw.cobigen.api.extension.InputReader
      • getTemplateMethods

        public Map<String,​Object> getTemplateMethods​(Object input)
        Specified by:
        getTemplateMethods in interface com.devonfw.cobigen.api.extension.InputReader
      • getInputObjectsRecursively

        public List<Object> getInputObjectsRecursively​(Object input,
                                                       Charset inputCharset)
        Specified by:
        getInputObjectsRecursively in interface com.devonfw.cobigen.api.extension.InputReader
      • read

        public Object read​(Path path,
                           Charset inputCharset,
                           Object... additionalArguments)
                    throws com.devonfw.cobigen.api.exception.InputReaderException
        Specified by:
        read in interface com.devonfw.cobigen.api.extension.InputReader
        Throws:
        com.devonfw.cobigen.api.exception.InputReaderException
      • isMostLikelyReadable

        public boolean isMostLikelyReadable​(Path path)
        Specified by:
        isMostLikelyReadable in interface com.devonfw.cobigen.api.extension.InputReader