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