java.lang.Object
org.eclipse.lemminx.customservice.synapse.api.generator.OpenAPIProcessor

public class OpenAPIProcessor extends Object
This class will generate the OAS 3.0 definition of the given synapse API.
  • Constructor Details

    • OpenAPIProcessor

      public OpenAPIProcessor(API api)
  • Method Details

    • getOpenAPISpecification

      public String getOpenAPISpecification(boolean isJSON, int port)
      Generate the OAS 3.0 definition for a given API.
      Parameters:
      isJSON - response data type JSON / YAML.
      Returns:
      OpenAPI definition as string.
    • getUpdatedSwaggerFromApi

      public String getUpdatedSwaggerFromApi(String existingSwagger, boolean isJSONIn, boolean isJSONOut, int port) throws APIGenException
      Update a given swagger definition of the Synapse API.
      Parameters:
      existingSwagger - swagger definition needs to be updated.
      isJSONIn - input swagger data type JSON / YAML.
      isJSONOut - output swagger data type JSON / YAML.
      Returns:
      updated swagger definition as string.
      Throws:
      APIGenException