Class APIGenerator


  • public class APIGenerator
    extends Object
    This class will generate synapse Rest API configuration skeleton from swagger definition
    • Constructor Detail

      • APIGenerator

        public APIGenerator​(com.google.gson.JsonObject swaggerJson)
    • Method Detail

      • generateSynapseAPI

        public org.apache.synapse.api.API generateSynapseAPI()
                                                      throws APIGenException
        Generate API from provided swagger definition
        Returns:
        Generated API
        Throws:
        APIGenException
      • generateSynapseAPI

        public org.apache.synapse.api.API generateSynapseAPI​(org.apache.synapse.api.API existingAPI)
                                                      throws APIGenException
        Generate API from provided swagger definition referring to the old API.
        Parameters:
        existingAPI - old API
        Returns:
        Generated API
        Throws:
        APIGenException
      • generateUpdatedSynapseAPI

        public org.apache.synapse.api.API generateUpdatedSynapseAPI​(org.apache.synapse.api.API existingAPI)
                                                             throws APIGenException
        Function to generate updated API extracting the implementation from an existing API
        Parameters:
        existingAPI - the existing API to extract resource implementations
        Returns:
        generated API
        Throws:
        APIGenException