Class GenericApiObjectDefinition
java.lang.Object
org.eclipse.lemminx.customservice.synapse.api.generator.GenericApiObjectDefinition
Generalized object structure for Swagger definitions of APIs. This structure contains set of Maps which compatible
with both JSON and YAML formats.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringconvertYamlToJson(String yaml) A util method to convert from YAML to JSON.getPathMap(API api) Provides structure for the "paths" element in swagger definition.
-
Constructor Details
-
GenericApiObjectDefinition
public GenericApiObjectDefinition()
-
-
Method Details
-
getPathMap
Provides structure for the "paths" element in swagger definition.- Returns:
- Map containing information for paths element
-
convertYamlToJson
public static String convertYamlToJson(String yaml) throws com.fasterxml.jackson.core.JsonProcessingException A util method to convert from YAML to JSON.- Parameters:
yaml- YAML input as string.- Returns:
- converted JSON as string.
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- error occurred while parsing the JSON.
-