Version: 0.3.0
Description:
When an OpenAPI spec defines a relative server URL with a path (e.g. servers: [{url: "/api/v1"}]) and --base-url is set to the full host (e.g. https://example.com/api/v1), buildUrl() in request-builder.js uses new URL(path, baseUrl). Because spec paths begin with / (e.g. /initiatives), JavaScript's URL constructor treats them as absolute paths and discards the base URL's path, producing https://example.com/initiatives instead of https://example.com/api/v1/initiatives.
Fix:
In request-builder.js, replace:
jsconst url = new URL(path, baseUrl);
with:
jsconst url = new URL(baseUrl.replace(/\/$/, "") + path);
Version: 0.3.0
Description:
When an OpenAPI spec defines a relative server URL with a path (e.g. servers: [{url: "/api/v1"}]) and --base-url is set to the full host (e.g. https://example.com/api/v1), buildUrl() in request-builder.js uses new URL(path, baseUrl). Because spec paths begin with / (e.g. /initiatives), JavaScript's URL constructor treats them as absolute paths and discards the base URL's path, producing https://example.com/initiatives instead of https://example.com/api/v1/initiatives.
Fix:
In request-builder.js, replace:
jsconst url = new URL(path, baseUrl);with:
jsconst url = new URL(baseUrl.replace(/\/$/, "") + path);