[BUG][typescript-fetch] Base Path can't be set to relative path
Created by: mosino
Bug Report Checklist
-
Have you provided a full/minimal spec to reproduce the issue? -
Have you validated the input using an OpenAPI validator (example)? -
Have you tested with the latest master to confirm the issue still exists? -
Have you searched for related issues/PRs? -
What's the actual output vs expected output? -
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
When the server url is set to a relative path, in the generated source files it will be prefixed with "https://localhost"
openapi-generator version
latest
OpenAPI declaration file content or url
"servers": [
{
"url": "/my-api"
}
]
Generation Details
openapi-generator-cli generate --skip-validate-spec --input-spec ./my-api.json --generator-name typescript-fetch --output gen/my-api --config my-api-config.json
my-api-config.json
{
"npmName": "my-api",
"npmVersion": "1.0.0",
"snapshot": false,
"supportsES6": false,
"modelPropertyNaming": "original"
}
Steps to reproduce
Run the above command on a yaml file with server url set to a relative path