java.lang.Object
org.wso2.carbon.mediation.commons.rest.api.swagger.APIGenerator

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

    Constructors
    Constructor
    Description
    APIGenerator(com.google.gson.JsonObject swaggerJson)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.synapse.api.API
    Generate API from provided swagger definition
    org.apache.synapse.api.API
    generateSynapseAPI(org.apache.synapse.api.API existingAPI)
    Generate API from provided swagger definition referring to the old API.
    org.apache.synapse.api.API
    generateUpdatedSynapseAPI(org.apache.synapse.api.API existingAPI)
    Function to generate updated API extracting the implementation from an existing API

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • APIGenerator

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

    • 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