Class OpenAPIProcessor


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

      • OpenAPIProcessor

        public OpenAPIProcessor​(org.apache.synapse.api.API api,
                                ServerConfig serverConfiguration)
      • OpenAPIProcessor

        public OpenAPIProcessor​(org.apache.synapse.api.API api)
    • Method Detail

      • getOpenAPISpecification

        public String getOpenAPISpecification​(boolean isJSON)
                                       throws org.apache.axis2.AxisFault
        Generate the OAS 3.0 definition for a given API.
        Parameters:
        isJSON - response data type JSON / YAML.
        Returns:
        OpenAPI definition as string.
        Throws:
        org.apache.axis2.AxisFault - Error occurred while getting the host information.
      • getUpdatedSwaggerFromApi

        public String getUpdatedSwaggerFromApi​(String existingSwagger,
                                               boolean isJSONIn,
                                               boolean isJSONOut)
                                        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