forked from loafle/openapi-generator-original
[Ruby] fix port in the Ruby client (#7464)
* fix port in ruby client * use serverPort instead * update samples, skip if port is 80
This commit is contained in:
parent
a29d9a9ff4
commit
985c4b36a7
@ -775,6 +775,9 @@ public class DefaultGenerator implements Generator {
|
||||
bundle.put("basePathWithoutHost", basePathWithoutHost);
|
||||
bundle.put("scheme", URLPathUtils.getScheme(url, config));
|
||||
bundle.put("host", url.getHost());
|
||||
if (url.getPort() != 80 ) {
|
||||
bundle.put("port", url.getPort());
|
||||
}
|
||||
bundle.put("contextPath", contextPath);
|
||||
bundle.put("apiInfo", apis);
|
||||
bundle.put("models", allModels);
|
||||
|
@ -90,7 +90,7 @@ module {{moduleName}}
|
||||
|
||||
def initialize
|
||||
@scheme = '{{scheme}}'
|
||||
@host = '{{host}}'
|
||||
@host = '{{host}}{{#port}}:{{{.}}}{{/port}}'
|
||||
@base_path = '{{contextPath}}'
|
||||
@api_key = {}
|
||||
@api_key_prefix = {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user