Having a private API in
https://anypoint.mulesoft.com/apiplatform/---companyname---/#/portals/organizations/----organization-id----/apis/---api-number----/versions/---version-number--
it is not possible to pass any authentication / token informations as just
new InputStreamReader(ramlURL.openStream()))
is done in RamlJavaClientGenerator
not allowing any basic auth or token header.
Result is always:
[ERROR] Failed to execute goal org.mule.raml.codegen:raml-client-generator-maven-plugin:0.1.1:generate-client (default-cli) on project : Exception while generating client. Server returned HTTP response code: 401
(setting API to public is not an option as it is a private one ;-) )