Class OpenAPIProcessor
- java.lang.Object
-
- org.wso2.carbon.mediation.commons.rest.api.swagger.OpenAPIProcessor
-
public class OpenAPIProcessor extends Object
This class will generate the OAS 3.0 definition of the given synapse API.
-
-
Constructor Summary
Constructors Constructor Description OpenAPIProcessor(org.apache.synapse.api.API api)
OpenAPIProcessor(org.apache.synapse.api.API api, ServerConfig serverConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getOpenAPISpecification(boolean isJSON)
Generate the OAS 3.0 definition for a given API.String
getUpdatedSwaggerFromApi(String existingSwagger, boolean isJSONIn, boolean isJSONOut)
Update a given swagger definition of the 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
-
-