Open lorenzofratus-syscons opened 1 week ago
Hi @lorenzofratus-syscons,
as you've already pointed out, we didn't implement this feature for the OpenAPI generator yet, as there was simply no demand for it. I've created a ticket in our backlog and raised this to our PO, but I can't give you a timeline yet.
I'm trying to generate a client for an API from SAP Business Accelerator Hub (link).
The production URL for said API is of type
https://api.{regionHost}/workcenter/v2
but I want to connect using an existing BTP destination with URLhttps://api.{regionHost}
(I plan to use multiple APIs and I don't want to manage many different destinations pointing at basically the same target).My idea was to set the
basePath
to/workcenter/v2
using theoptions-per-service.json
file since, as far as I know, is a thing for OData clients, while it is not mentioned in the documentation for OpenAPI clients.However, this didn't produce any change in the generated clients. I even tried changing the
basePath
in the root of the OpenAPI specification from/
to/workcenter/v2
but no difference.I would have expected the generator to prepend the base path to the actual paths defined in the specification.
I couldn't find any way to set a custom base path without having to manually edit the generated clients. In the meantime I will use a different destination for this, but I would appreciate any suggestion on how to improve the situation.
Thanks!