Bug Report Checklist
Description
In the case no port is defined in the server's URL, in the generated configuration.rb file the @host variable would feature :-1 as the port, which is of course invalid in a URL.
openapi-generator version
master @ cb1a620
OpenAPI declaration file content or url
openapi: 3.0.3
info:
title: test api
version: v1
servers:
- url: https://hello-{stage}.world.{tld}{basePath}
variables:
stage:
default: sandbox
tld:
default: net
basePath:
default: /v1
paths:
/test:
get:
description: this is a test
responses:
"200":
description: OK
content:
application/json:
schema:
type: string
Generation Details
openapi-generator generate -i port-openapi.yml -g ruby --library faraday -o ./port-client
Steps to reproduce
- run the above command with the above openapi.yaml file
cat port-client/lib/openapi_client/configuration.rb | grep -n hello-sandbox
- prints out:
137: @host = 'hello-sandbox.world.net:-1'
Related issues/PRs
@cliffano (2017/07) @zlx (2017/09) @autopp (2019/02) @wing328
Bug Report Checklist
Description
In the case no port is defined in the server's URL, in the generated
configuration.rbfile the@hostvariable would feature:-1as the port, which is of course invalid in a URL.openapi-generator version
master @ cb1a620
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
cat port-client/lib/openapi_client/configuration.rb | grep -n hello-sandbox137: @host = 'hello-sandbox.world.net:-1'Related issues/PRs
@cliffano (2017/07) @zlx (2017/09) @autopp (2019/02) @wing328