diff --git a/modules/openapi-generator/src/test/resources/3_0/ruby/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/3_0/ruby/petstore-with-fake-endpoints-models-for-testing.yaml index 064862059da..701d7a23198 100644 --- a/modules/openapi-generator/src/test/resources/3_0/ruby/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/ruby/petstore-with-fake-endpoints-models-for-testing.yaml @@ -31,6 +31,7 @@ paths: $ref: '#/components/schemas/Foo' /pet: servers: + - url: 'http://127.0.0.1/v2' - url: 'http://petstore.swagger.io/v2' - url: 'http://path-server-test.petstore.local/v2' - url: 'http://{server}.swagger.io:{port}/v2' @@ -188,6 +189,7 @@ paths: deprecated: true '/pet/{petId}': servers: + - url: 'http://127.0.0.1/v2' - url: 'http://petstore.swagger.io/v2' - url: 'http://path-server-test.petstore.local/v2' - url: 'http://{server}.swagger.io:{port}/v2' @@ -1358,6 +1360,8 @@ paths: 200: description: OK servers: + - url: https://127.0.0.1/v2 + description: The local server without variables - url: 'http://{server}.swagger.io:{port}/v2' description: petstore server variables: @@ -1380,8 +1384,6 @@ servers: - 'v1' - 'v2' default: 'v2' - - url: https://127.0.0.1/no_varaible - description: The local server without variables - url: http://server.{version}.openapi-generator.tech description: The openapi-generator test server variables: diff --git a/samples/client/petstore/ruby-faraday/README.md b/samples/client/petstore/ruby-faraday/README.md index 587ccdfcb96..dec3a004736 100644 --- a/samples/client/petstore/ruby-faraday/README.md +++ b/samples/client/petstore/ruby-faraday/README.md @@ -72,7 +72,7 @@ end ## Documentation for API Endpoints -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *https://127.0.0.1/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/ruby-faraday/docs/AnotherFakeApi.md b/samples/client/petstore/ruby-faraday/docs/AnotherFakeApi.md index 52f3f5a72e9..4627e42c9bb 100644 --- a/samples/client/petstore/ruby-faraday/docs/AnotherFakeApi.md +++ b/samples/client/petstore/ruby-faraday/docs/AnotherFakeApi.md @@ -1,6 +1,6 @@ # Petstore::AnotherFakeApi -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *https://127.0.0.1/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby-faraday/docs/DefaultApi.md b/samples/client/petstore/ruby-faraday/docs/DefaultApi.md index 86925bb7c88..dfedf5f7da5 100644 --- a/samples/client/petstore/ruby-faraday/docs/DefaultApi.md +++ b/samples/client/petstore/ruby-faraday/docs/DefaultApi.md @@ -1,6 +1,6 @@ # Petstore::DefaultApi -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *https://127.0.0.1/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby-faraday/docs/FakeApi.md b/samples/client/petstore/ruby-faraday/docs/FakeApi.md index 1e05788c53a..983cb80ce0f 100644 --- a/samples/client/petstore/ruby-faraday/docs/FakeApi.md +++ b/samples/client/petstore/ruby-faraday/docs/FakeApi.md @@ -1,6 +1,6 @@ # Petstore::FakeApi -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *https://127.0.0.1/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby-faraday/docs/FakeClassnameTags123Api.md b/samples/client/petstore/ruby-faraday/docs/FakeClassnameTags123Api.md index 32d3ff8ebdd..f0a91c304f3 100644 --- a/samples/client/petstore/ruby-faraday/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/ruby-faraday/docs/FakeClassnameTags123Api.md @@ -1,6 +1,6 @@ # Petstore::FakeClassnameTags123Api -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *https://127.0.0.1/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby-faraday/docs/PetApi.md b/samples/client/petstore/ruby-faraday/docs/PetApi.md index b28334ae2c5..80f2f04c739 100644 --- a/samples/client/petstore/ruby-faraday/docs/PetApi.md +++ b/samples/client/petstore/ruby-faraday/docs/PetApi.md @@ -1,6 +1,6 @@ # Petstore::PetApi -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *https://127.0.0.1/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby-faraday/docs/StoreApi.md b/samples/client/petstore/ruby-faraday/docs/StoreApi.md index 52c551498cf..51a01becfb4 100644 --- a/samples/client/petstore/ruby-faraday/docs/StoreApi.md +++ b/samples/client/petstore/ruby-faraday/docs/StoreApi.md @@ -1,6 +1,6 @@ # Petstore::StoreApi -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *https://127.0.0.1/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby-faraday/docs/UserApi.md b/samples/client/petstore/ruby-faraday/docs/UserApi.md index 348f5f9c429..b667eb5ef97 100644 --- a/samples/client/petstore/ruby-faraday/docs/UserApi.md +++ b/samples/client/petstore/ruby-faraday/docs/UserApi.md @@ -1,6 +1,6 @@ # Petstore::UserApi -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *https://127.0.0.1/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb index 945cd436709..c82be03192b 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb @@ -156,8 +156,8 @@ module Petstore attr_accessor :force_ending_format def initialize - @scheme = 'http' - @host = 'petstore.swagger.io' + @scheme = 'https' + @host = '127.0.0.1' @base_path = '/v2' @server_index = nil @server_operation_index = {} @@ -290,6 +290,10 @@ module Petstore # Returns an array of Server setting def server_settings [ + { + url: "https://127.0.0.1/v2", + description: "The local server without variables", + }, { url: "http://{server}.swagger.io:{port}/v2", description: "petstore server", @@ -327,10 +331,6 @@ module Petstore } } }, - { - url: "https://127.0.0.1/no_varaible", - description: "The local server without variables", - }, { url: "http://server.{version}.openapi-generator.tech", description: "The openapi-generator test server", @@ -351,6 +351,10 @@ module Petstore def operation_server_settings { "PetApi.add_pet": [ + { + url: "http://127.0.0.1/v2", + description: "No description provided", + }, { url: "http://petstore.swagger.io/v2", description: "No description provided", @@ -398,6 +402,10 @@ module Petstore } ], "PetApi.delete_pet": [ + { + url: "http://127.0.0.1/v2", + description: "No description provided", + }, { url: "http://petstore.swagger.io/v2", description: "No description provided", @@ -445,6 +453,10 @@ module Petstore } ], "PetApi.get_pet_by_id": [ + { + url: "http://127.0.0.1/v2", + description: "No description provided", + }, { url: "http://petstore.swagger.io/v2", description: "No description provided", @@ -492,6 +504,10 @@ module Petstore } ], "PetApi.update_pet": [ + { + url: "http://127.0.0.1/v2", + description: "No description provided", + }, { url: "http://petstore.swagger.io/v2", description: "No description provided", @@ -539,6 +555,10 @@ module Petstore } ], "PetApi.update_pet_with_form": [ + { + url: "http://127.0.0.1/v2", + description: "No description provided", + }, { url: "http://petstore.swagger.io/v2", description: "No description provided", diff --git a/samples/client/petstore/ruby-httpx/README.md b/samples/client/petstore/ruby-httpx/README.md index 587ccdfcb96..dec3a004736 100644 --- a/samples/client/petstore/ruby-httpx/README.md +++ b/samples/client/petstore/ruby-httpx/README.md @@ -72,7 +72,7 @@ end ## Documentation for API Endpoints -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *https://127.0.0.1/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/ruby-httpx/docs/AnotherFakeApi.md b/samples/client/petstore/ruby-httpx/docs/AnotherFakeApi.md index 52f3f5a72e9..4627e42c9bb 100644 --- a/samples/client/petstore/ruby-httpx/docs/AnotherFakeApi.md +++ b/samples/client/petstore/ruby-httpx/docs/AnotherFakeApi.md @@ -1,6 +1,6 @@ # Petstore::AnotherFakeApi -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *https://127.0.0.1/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby-httpx/docs/DefaultApi.md b/samples/client/petstore/ruby-httpx/docs/DefaultApi.md index 86925bb7c88..dfedf5f7da5 100644 --- a/samples/client/petstore/ruby-httpx/docs/DefaultApi.md +++ b/samples/client/petstore/ruby-httpx/docs/DefaultApi.md @@ -1,6 +1,6 @@ # Petstore::DefaultApi -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *https://127.0.0.1/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby-httpx/docs/FakeApi.md b/samples/client/petstore/ruby-httpx/docs/FakeApi.md index 1e05788c53a..983cb80ce0f 100644 --- a/samples/client/petstore/ruby-httpx/docs/FakeApi.md +++ b/samples/client/petstore/ruby-httpx/docs/FakeApi.md @@ -1,6 +1,6 @@ # Petstore::FakeApi -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *https://127.0.0.1/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby-httpx/docs/FakeClassnameTags123Api.md b/samples/client/petstore/ruby-httpx/docs/FakeClassnameTags123Api.md index 32d3ff8ebdd..f0a91c304f3 100644 --- a/samples/client/petstore/ruby-httpx/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/ruby-httpx/docs/FakeClassnameTags123Api.md @@ -1,6 +1,6 @@ # Petstore::FakeClassnameTags123Api -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *https://127.0.0.1/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby-httpx/docs/PetApi.md b/samples/client/petstore/ruby-httpx/docs/PetApi.md index b28334ae2c5..80f2f04c739 100644 --- a/samples/client/petstore/ruby-httpx/docs/PetApi.md +++ b/samples/client/petstore/ruby-httpx/docs/PetApi.md @@ -1,6 +1,6 @@ # Petstore::PetApi -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *https://127.0.0.1/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby-httpx/docs/StoreApi.md b/samples/client/petstore/ruby-httpx/docs/StoreApi.md index 52c551498cf..51a01becfb4 100644 --- a/samples/client/petstore/ruby-httpx/docs/StoreApi.md +++ b/samples/client/petstore/ruby-httpx/docs/StoreApi.md @@ -1,6 +1,6 @@ # Petstore::StoreApi -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *https://127.0.0.1/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby-httpx/docs/UserApi.md b/samples/client/petstore/ruby-httpx/docs/UserApi.md index 348f5f9c429..b667eb5ef97 100644 --- a/samples/client/petstore/ruby-httpx/docs/UserApi.md +++ b/samples/client/petstore/ruby-httpx/docs/UserApi.md @@ -1,6 +1,6 @@ # Petstore::UserApi -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *https://127.0.0.1/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby-httpx/lib/petstore/configuration.rb b/samples/client/petstore/ruby-httpx/lib/petstore/configuration.rb index caa1be28dee..33aebf1b10b 100644 --- a/samples/client/petstore/ruby-httpx/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby-httpx/lib/petstore/configuration.rb @@ -127,8 +127,8 @@ module Petstore attr_accessor :force_ending_format def initialize - @scheme = 'http' - @host = 'petstore.swagger.io' + @scheme = 'https' + @host = '127.0.0.1' @base_path = '/v2' @server_index = nil @server_operation_index = {} @@ -254,6 +254,10 @@ module Petstore # Returns an array of Server setting def server_settings [ + { + url: "https://127.0.0.1/v2", + description: "The local server without variables", + }, { url: "http://{server}.swagger.io:{port}/v2", description: "petstore server", @@ -291,10 +295,6 @@ module Petstore } } }, - { - url: "https://127.0.0.1/no_varaible", - description: "The local server without variables", - }, { url: "http://server.{version}.openapi-generator.tech", description: "The openapi-generator test server", @@ -315,6 +315,10 @@ module Petstore def operation_server_settings { "PetApi.add_pet": [ + { + url: "http://127.0.0.1/v2", + description: "No description provided", + }, { url: "http://petstore.swagger.io/v2", description: "No description provided", @@ -362,6 +366,10 @@ module Petstore } ], "PetApi.delete_pet": [ + { + url: "http://127.0.0.1/v2", + description: "No description provided", + }, { url: "http://petstore.swagger.io/v2", description: "No description provided", @@ -409,6 +417,10 @@ module Petstore } ], "PetApi.get_pet_by_id": [ + { + url: "http://127.0.0.1/v2", + description: "No description provided", + }, { url: "http://petstore.swagger.io/v2", description: "No description provided", @@ -456,6 +468,10 @@ module Petstore } ], "PetApi.update_pet": [ + { + url: "http://127.0.0.1/v2", + description: "No description provided", + }, { url: "http://petstore.swagger.io/v2", description: "No description provided", @@ -503,6 +519,10 @@ module Petstore } ], "PetApi.update_pet_with_form": [ + { + url: "http://127.0.0.1/v2", + description: "No description provided", + }, { url: "http://petstore.swagger.io/v2", description: "No description provided", diff --git a/samples/client/petstore/ruby/README.md b/samples/client/petstore/ruby/README.md index 587ccdfcb96..dec3a004736 100644 --- a/samples/client/petstore/ruby/README.md +++ b/samples/client/petstore/ruby/README.md @@ -72,7 +72,7 @@ end ## Documentation for API Endpoints -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *https://127.0.0.1/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/ruby/docs/AnotherFakeApi.md b/samples/client/petstore/ruby/docs/AnotherFakeApi.md index 52f3f5a72e9..4627e42c9bb 100644 --- a/samples/client/petstore/ruby/docs/AnotherFakeApi.md +++ b/samples/client/petstore/ruby/docs/AnotherFakeApi.md @@ -1,6 +1,6 @@ # Petstore::AnotherFakeApi -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *https://127.0.0.1/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby/docs/DefaultApi.md b/samples/client/petstore/ruby/docs/DefaultApi.md index 86925bb7c88..dfedf5f7da5 100644 --- a/samples/client/petstore/ruby/docs/DefaultApi.md +++ b/samples/client/petstore/ruby/docs/DefaultApi.md @@ -1,6 +1,6 @@ # Petstore::DefaultApi -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *https://127.0.0.1/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby/docs/FakeApi.md b/samples/client/petstore/ruby/docs/FakeApi.md index 1dff682f9a2..7ccf5d813d7 100644 --- a/samples/client/petstore/ruby/docs/FakeApi.md +++ b/samples/client/petstore/ruby/docs/FakeApi.md @@ -1,6 +1,6 @@ # Petstore::FakeApi -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *https://127.0.0.1/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby/docs/FakeClassnameTags123Api.md b/samples/client/petstore/ruby/docs/FakeClassnameTags123Api.md index 32d3ff8ebdd..f0a91c304f3 100644 --- a/samples/client/petstore/ruby/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/ruby/docs/FakeClassnameTags123Api.md @@ -1,6 +1,6 @@ # Petstore::FakeClassnameTags123Api -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *https://127.0.0.1/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby/docs/PetApi.md b/samples/client/petstore/ruby/docs/PetApi.md index b28334ae2c5..80f2f04c739 100644 --- a/samples/client/petstore/ruby/docs/PetApi.md +++ b/samples/client/petstore/ruby/docs/PetApi.md @@ -1,6 +1,6 @@ # Petstore::PetApi -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *https://127.0.0.1/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby/docs/StoreApi.md b/samples/client/petstore/ruby/docs/StoreApi.md index 52c551498cf..51a01becfb4 100644 --- a/samples/client/petstore/ruby/docs/StoreApi.md +++ b/samples/client/petstore/ruby/docs/StoreApi.md @@ -1,6 +1,6 @@ # Petstore::StoreApi -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *https://127.0.0.1/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby/docs/UserApi.md b/samples/client/petstore/ruby/docs/UserApi.md index 348f5f9c429..b667eb5ef97 100644 --- a/samples/client/petstore/ruby/docs/UserApi.md +++ b/samples/client/petstore/ruby/docs/UserApi.md @@ -1,6 +1,6 @@ # Petstore::UserApi -All URIs are relative to *http://petstore.swagger.io:80/v2* +All URIs are relative to *https://127.0.0.1/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby/lib/petstore/configuration.rb b/samples/client/petstore/ruby/lib/petstore/configuration.rb index 0756a927176..0ebc2c4089b 100644 --- a/samples/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb @@ -157,8 +157,8 @@ module Petstore attr_accessor :force_ending_format def initialize - @scheme = 'http' - @host = 'petstore.swagger.io' + @scheme = 'https' + @host = '127.0.0.1' @base_path = '/v2' @server_index = nil @server_operation_index = {} @@ -286,6 +286,10 @@ module Petstore # Returns an array of Server setting def server_settings [ + { + url: "https://127.0.0.1/v2", + description: "The local server without variables", + }, { url: "http://{server}.swagger.io:{port}/v2", description: "petstore server", @@ -323,10 +327,6 @@ module Petstore } } }, - { - url: "https://127.0.0.1/no_varaible", - description: "The local server without variables", - }, { url: "http://server.{version}.openapi-generator.tech", description: "The openapi-generator test server", @@ -347,6 +347,10 @@ module Petstore def operation_server_settings { "PetApi.add_pet": [ + { + url: "http://127.0.0.1/v2", + description: "No description provided", + }, { url: "http://petstore.swagger.io/v2", description: "No description provided", @@ -394,6 +398,10 @@ module Petstore } ], "PetApi.delete_pet": [ + { + url: "http://127.0.0.1/v2", + description: "No description provided", + }, { url: "http://petstore.swagger.io/v2", description: "No description provided", @@ -441,6 +449,10 @@ module Petstore } ], "PetApi.get_pet_by_id": [ + { + url: "http://127.0.0.1/v2", + description: "No description provided", + }, { url: "http://petstore.swagger.io/v2", description: "No description provided", @@ -488,6 +500,10 @@ module Petstore } ], "PetApi.update_pet": [ + { + url: "http://127.0.0.1/v2", + description: "No description provided", + }, { url: "http://petstore.swagger.io/v2", description: "No description provided", @@ -535,6 +551,10 @@ module Petstore } ], "PetApi.update_pet_with_form": [ + { + url: "http://127.0.0.1/v2", + description: "No description provided", + }, { url: "http://petstore.swagger.io/v2", description: "No description provided",