Package io.virtualan.core.util
Class OpenApiGeneratorUtil
- java.lang.Object
-
- io.virtualan.core.util.OpenApiGeneratorUtil
-
@Component public class OpenApiGeneratorUtil extends java.lang.ObjectThe type Open api generator util.
-
-
Constructor Summary
Constructors Constructor Description OpenApiGeneratorUtil()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)Generate rest api map.voidgetYaml(java.io.File file)Gets yaml.voidloadInitialYamlFiles()Load initial yaml files.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)Remove rest api map.
-
-
-
Method Detail
-
loadInitialYamlFiles
@EventListener(org.springframework.boot.context.event.ApplicationReadyEvent.class) public void loadInitialYamlFiles() throws java.net.MalformedURLException, java.beans.IntrospectionExceptionLoad initial yaml files.- Throws:
java.net.MalformedURLExceptionjava.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 enabledyamlFile- the yaml filerequest- the requestcontextLoader- the context loader- Returns:
- the map
- Throws:
java.lang.ClassNotFoundException- the class not found exceptionjava.lang.InstantiationException- the instantiation exceptionjava.lang.IllegalAccessException- the illegal access exceptionjava.io.IOException- the io exceptionjava.beans.IntrospectionException- the introspection exceptionjava.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 enabledyamlFile- the yaml filerequest- the requestcontextLoader- the context loader- Returns:
- the map
- Throws:
java.lang.ClassNotFoundException- the class not found exceptionjava.lang.InstantiationException- the instantiation exceptionjava.lang.IllegalAccessException- the illegal access exceptioncom.fasterxml.jackson.core.JsonProcessingException- the json processing exception
-
-