public final class SwaggerWsdlHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
convertYamlToJson(String yamlString)
Converts yaml string to json string
|
static String |
readSwaggerStreamToString(InputStream swaggerDefinitionStream)
Reads an InputStream to a string
https://stackoverflow.com/a/35446009
|
static String |
updateLocationEndpointInWsdl(InputStream wsdlStream,
URL managedEndpoint,
ApiVersionBean apiVersion,
IStorage storage)
Updates the location in wsdl with the host and path of the managed endpoint.
|
static String |
updateSwaggerDefinitionWithEndpoint(URL managedEndpoint,
String swaggerDefinition,
ApiVersionBean apiVersion,
IStorage storage)
Updates the swagger defintion file with the host and base path of the managed endpoint.
|
public static String readSwaggerStreamToString(InputStream swaggerDefinitionStream) throws IOException
swaggerDefinitionStream - IOExceptionpublic static String convertYamlToJson(String yamlString) throws IOException
yamlString - yaml stringIOExceptionpublic static String updateSwaggerDefinitionWithEndpoint(URL managedEndpoint, String swaggerDefinition, ApiVersionBean apiVersion, IStorage storage) throws IOException, StorageException
managedEndpoint - the managed endpointswaggerDefinition - the swagger definitionapiVersion - the api versionstorage - the storage implementationIOExceptionStorageExceptionpublic static String updateLocationEndpointInWsdl(InputStream wsdlStream, URL managedEndpoint, ApiVersionBean apiVersion, IStorage storage) throws StorageException
wsdlStream - the wsdl as streammanagedEndpoint - the managed endpointapiVersion - the api versionstorage - the storage implementationStorageExceptionCopyright © 2021 Apiman. All rights reserved.