Class OpenApiGeneratorUtil


  • @Component
    public class OpenApiGeneratorUtil
    extends java.lang.Object
    The type Open api generator util.
    • Constructor Detail

      • OpenApiGeneratorUtil

        public OpenApiGeneratorUtil()
    • Method Detail

      • loadInitialYamlFiles

        @EventListener(org.springframework.boot.context.event.ApplicationReadyEvent.class)
        public void loadInitialYamlFiles()
                                  throws java.net.MalformedURLException,
                                         java.beans.IntrospectionException
        Load initial yaml files.
        Throws:
        java.net.MalformedURLException
        java.beans.IntrospectionException
      • getYaml

        public void getYaml​(java.io.File file)
        Gets yaml.
        Parameters:
        file - the file
      • removeRestApi

        public java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​VirtualServiceRequest>> removeRestApi​(boolean scriptEnabled,
                                                                                                                               java.lang.String yamlFile,
                                                                                                                               VirtualServiceRequest request,
                                                                                                                               java.lang.ClassLoader contextLoader)
                                                                                                                        throws java.lang.Exception
        Remove rest api map.
        Parameters:
        scriptEnabled - the script enabled
        yamlFile - the yaml file
        request - the request
        contextLoader - the context loader
        Returns:
        the map
        Throws:
        java.lang.ClassNotFoundException - the class not found exception
        java.lang.InstantiationException - the instantiation exception
        java.lang.IllegalAccessException - the illegal access exception
        java.io.IOException - the io exception
        java.beans.IntrospectionException - the introspection exception
        java.lang.Exception
      • generateRestApi

        public java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​VirtualServiceRequest>> generateRestApi​(boolean scriptEnabled,
                                                                                                                                 java.lang.String yamlFile,
                                                                                                                                 VirtualServiceRequest request,
                                                                                                                                 java.lang.ClassLoader contextLoader)
                                                                                                                          throws java.lang.ClassNotFoundException,
                                                                                                                                 java.lang.InstantiationException,
                                                                                                                                 java.lang.IllegalAccessException,
                                                                                                                                 com.fasterxml.jackson.core.JsonProcessingException
        Generate rest api map.
        Parameters:
        scriptEnabled - the script enabled
        yamlFile - the yaml file
        request - the request
        contextLoader - the context loader
        Returns:
        the map
        Throws:
        java.lang.ClassNotFoundException - the class not found exception
        java.lang.InstantiationException - the instantiation exception
        java.lang.IllegalAccessException - the illegal access exception
        com.fasterxml.jackson.core.JsonProcessingException - the json processing exception