From 117773f14c629d8d31053163aa33e55086c8a4f0 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 21 Sep 2025 17:29:03 +0800 Subject: [PATCH] update samples --- ...ith-fake-endpoints-models-for-testing.yaml | 5 +--- .../client/petstore/ruby-faraday/README.md | 2 +- .../ruby-faraday/docs/AnotherFakeApi.md | 2 +- .../petstore/ruby-faraday/docs/DefaultApi.md | 2 +- .../petstore/ruby-faraday/docs/FakeApi.md | 2 +- .../docs/FakeClassnameTags123Api.md | 2 +- .../petstore/ruby-faraday/docs/PetApi.md | 2 +- .../petstore/ruby-faraday/docs/StoreApi.md | 2 +- .../petstore/ruby-faraday/docs/UserApi.md | 2 +- .../lib/petstore/configuration.rb | 28 ++----------------- samples/client/petstore/ruby-httpx/README.md | 2 +- .../ruby-httpx/docs/AnotherFakeApi.md | 2 +- .../petstore/ruby-httpx/docs/DefaultApi.md | 2 +- .../petstore/ruby-httpx/docs/FakeApi.md | 2 +- .../docs/FakeClassnameTags123Api.md | 2 +- .../client/petstore/ruby-httpx/docs/PetApi.md | 2 +- .../petstore/ruby-httpx/docs/StoreApi.md | 2 +- .../petstore/ruby-httpx/docs/UserApi.md | 2 +- .../ruby-httpx/lib/petstore/configuration.rb | 28 ++----------------- samples/client/petstore/ruby/README.md | 2 +- .../petstore/ruby/docs/AnotherFakeApi.md | 2 +- .../client/petstore/ruby/docs/DefaultApi.md | 2 +- samples/client/petstore/ruby/docs/FakeApi.md | 2 +- .../ruby/docs/FakeClassnameTags123Api.md | 2 +- samples/client/petstore/ruby/docs/PetApi.md | 2 +- samples/client/petstore/ruby/docs/StoreApi.md | 2 +- samples/client/petstore/ruby/docs/UserApi.md | 2 +- .../ruby/lib/petstore/configuration.rb | 28 ++----------------- .../ruby/spec/custom/configuration_spec.rb | 16 +++++------ .../petstore/ruby/spec/custom/pet_spec.rb | 4 +-- 30 files changed, 41 insertions(+), 116 deletions(-) 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 4c6d21a48ea2..064862059da5 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,7 +31,6 @@ paths: $ref: '#/components/schemas/Foo' /pet: servers: - - url: 'http://domaincontrol.com/v2' - url: 'http://petstore.swagger.io/v2' - url: 'http://path-server-test.petstore.local/v2' - url: 'http://{server}.swagger.io:{port}/v2' @@ -189,7 +188,6 @@ paths: deprecated: true '/pet/{petId}': servers: - - url: 'http://domaincontrol.com/v2' - url: 'http://petstore.swagger.io/v2' - url: 'http://path-server-test.petstore.local/v2' - url: 'http://{server}.swagger.io:{port}/v2' @@ -1360,7 +1358,6 @@ paths: 200: description: OK servers: - - url: 'http://domaincontrol.com/v2' - url: 'http://{server}.swagger.io:{port}/v2' description: petstore server variables: @@ -1383,7 +1380,7 @@ servers: - 'v1' - 'v2' default: 'v2' - - url: https://domaincontrol.com/no_varaible + - 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 diff --git a/samples/client/petstore/ruby-faraday/README.md b/samples/client/petstore/ruby-faraday/README.md index 98b768a52374..587ccdfcb967 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://domaincontrol.com/v2* +All URIs are relative to *http://petstore.swagger.io:80/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 dc77856395a8..52f3f5a72e9b 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://domaincontrol.com/v2* +All URIs are relative to *http://petstore.swagger.io:80/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 5864fbcab348..86925bb7c887 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://domaincontrol.com/v2* +All URIs are relative to *http://petstore.swagger.io:80/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 04c18a8ff00e..1e05788c53ab 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://domaincontrol.com/v2* +All URIs are relative to *http://petstore.swagger.io:80/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 2384b3a2ebe0..32d3ff8ebdd2 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://domaincontrol.com/v2* +All URIs are relative to *http://petstore.swagger.io:80/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 a8b924efa123..b28334ae2c58 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://domaincontrol.com/v2* +All URIs are relative to *http://petstore.swagger.io:80/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 9925fd1571a8..52c551498cf0 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://domaincontrol.com/v2* +All URIs are relative to *http://petstore.swagger.io:80/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 2e6a658c42d7..348f5f9c4295 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://domaincontrol.com/v2* +All URIs are relative to *http://petstore.swagger.io:80/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 b2e5797adbf0..945cd4367091 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb @@ -157,7 +157,7 @@ module Petstore def initialize @scheme = 'http' - @host = 'domaincontrol.com' + @host = 'petstore.swagger.io' @base_path = '/v2' @server_index = nil @server_operation_index = {} @@ -290,10 +290,6 @@ module Petstore # Returns an array of Server setting def server_settings [ - { - url: "http://domaincontrol.com/v2", - description: "No description provided", - }, { url: "http://{server}.swagger.io:{port}/v2", description: "petstore server", @@ -332,7 +328,7 @@ module Petstore } }, { - url: "https://domaincontrol.com/no_varaible", + url: "https://127.0.0.1/no_varaible", description: "The local server without variables", }, { @@ -355,10 +351,6 @@ module Petstore def operation_server_settings { "PetApi.add_pet": [ - { - url: "http://domaincontrol.com/v2", - description: "No description provided", - }, { url: "http://petstore.swagger.io/v2", description: "No description provided", @@ -406,10 +398,6 @@ module Petstore } ], "PetApi.delete_pet": [ - { - url: "http://domaincontrol.com/v2", - description: "No description provided", - }, { url: "http://petstore.swagger.io/v2", description: "No description provided", @@ -457,10 +445,6 @@ module Petstore } ], "PetApi.get_pet_by_id": [ - { - url: "http://domaincontrol.com/v2", - description: "No description provided", - }, { url: "http://petstore.swagger.io/v2", description: "No description provided", @@ -508,10 +492,6 @@ module Petstore } ], "PetApi.update_pet": [ - { - url: "http://domaincontrol.com/v2", - description: "No description provided", - }, { url: "http://petstore.swagger.io/v2", description: "No description provided", @@ -559,10 +539,6 @@ module Petstore } ], "PetApi.update_pet_with_form": [ - { - url: "http://domaincontrol.com/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 98b768a52374..587ccdfcb967 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://domaincontrol.com/v2* +All URIs are relative to *http://petstore.swagger.io:80/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 dc77856395a8..52f3f5a72e9b 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://domaincontrol.com/v2* +All URIs are relative to *http://petstore.swagger.io:80/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 5864fbcab348..86925bb7c887 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://domaincontrol.com/v2* +All URIs are relative to *http://petstore.swagger.io:80/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 04c18a8ff00e..1e05788c53ab 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://domaincontrol.com/v2* +All URIs are relative to *http://petstore.swagger.io:80/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 2384b3a2ebe0..32d3ff8ebdd2 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://domaincontrol.com/v2* +All URIs are relative to *http://petstore.swagger.io:80/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 a8b924efa123..b28334ae2c58 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://domaincontrol.com/v2* +All URIs are relative to *http://petstore.swagger.io:80/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 9925fd1571a8..52c551498cf0 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://domaincontrol.com/v2* +All URIs are relative to *http://petstore.swagger.io:80/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 2e6a658c42d7..348f5f9c4295 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://domaincontrol.com/v2* +All URIs are relative to *http://petstore.swagger.io:80/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 11029ea807b4..caa1be28dee5 100644 --- a/samples/client/petstore/ruby-httpx/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby-httpx/lib/petstore/configuration.rb @@ -128,7 +128,7 @@ module Petstore def initialize @scheme = 'http' - @host = 'domaincontrol.com' + @host = 'petstore.swagger.io' @base_path = '/v2' @server_index = nil @server_operation_index = {} @@ -254,10 +254,6 @@ module Petstore # Returns an array of Server setting def server_settings [ - { - url: "http://domaincontrol.com/v2", - description: "No description provided", - }, { url: "http://{server}.swagger.io:{port}/v2", description: "petstore server", @@ -296,7 +292,7 @@ module Petstore } }, { - url: "https://domaincontrol.com/no_varaible", + url: "https://127.0.0.1/no_varaible", description: "The local server without variables", }, { @@ -319,10 +315,6 @@ module Petstore def operation_server_settings { "PetApi.add_pet": [ - { - url: "http://domaincontrol.com/v2", - description: "No description provided", - }, { url: "http://petstore.swagger.io/v2", description: "No description provided", @@ -370,10 +362,6 @@ module Petstore } ], "PetApi.delete_pet": [ - { - url: "http://domaincontrol.com/v2", - description: "No description provided", - }, { url: "http://petstore.swagger.io/v2", description: "No description provided", @@ -421,10 +409,6 @@ module Petstore } ], "PetApi.get_pet_by_id": [ - { - url: "http://domaincontrol.com/v2", - description: "No description provided", - }, { url: "http://petstore.swagger.io/v2", description: "No description provided", @@ -472,10 +456,6 @@ module Petstore } ], "PetApi.update_pet": [ - { - url: "http://domaincontrol.com/v2", - description: "No description provided", - }, { url: "http://petstore.swagger.io/v2", description: "No description provided", @@ -523,10 +503,6 @@ module Petstore } ], "PetApi.update_pet_with_form": [ - { - url: "http://domaincontrol.com/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 98b768a52374..587ccdfcb967 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://domaincontrol.com/v2* +All URIs are relative to *http://petstore.swagger.io:80/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 dc77856395a8..52f3f5a72e9b 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://domaincontrol.com/v2* +All URIs are relative to *http://petstore.swagger.io:80/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby/docs/DefaultApi.md b/samples/client/petstore/ruby/docs/DefaultApi.md index 5864fbcab348..86925bb7c887 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://domaincontrol.com/v2* +All URIs are relative to *http://petstore.swagger.io:80/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby/docs/FakeApi.md b/samples/client/petstore/ruby/docs/FakeApi.md index 22035c9977fc..1dff682f9a2d 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://domaincontrol.com/v2* +All URIs are relative to *http://petstore.swagger.io:80/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby/docs/FakeClassnameTags123Api.md b/samples/client/petstore/ruby/docs/FakeClassnameTags123Api.md index 2384b3a2ebe0..32d3ff8ebdd2 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://domaincontrol.com/v2* +All URIs are relative to *http://petstore.swagger.io:80/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby/docs/PetApi.md b/samples/client/petstore/ruby/docs/PetApi.md index a8b924efa123..b28334ae2c58 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://domaincontrol.com/v2* +All URIs are relative to *http://petstore.swagger.io:80/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby/docs/StoreApi.md b/samples/client/petstore/ruby/docs/StoreApi.md index 9925fd1571a8..52c551498cf0 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://domaincontrol.com/v2* +All URIs are relative to *http://petstore.swagger.io:80/v2* | Method | HTTP request | Description | | ------ | ------------ | ----------- | diff --git a/samples/client/petstore/ruby/docs/UserApi.md b/samples/client/petstore/ruby/docs/UserApi.md index 2e6a658c42d7..348f5f9c4295 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://domaincontrol.com/v2* +All URIs are relative to *http://petstore.swagger.io:80/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 91feec4d04a5..0756a9271761 100644 --- a/samples/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb @@ -158,7 +158,7 @@ module Petstore def initialize @scheme = 'http' - @host = 'domaincontrol.com' + @host = 'petstore.swagger.io' @base_path = '/v2' @server_index = nil @server_operation_index = {} @@ -286,10 +286,6 @@ module Petstore # Returns an array of Server setting def server_settings [ - { - url: "http://domaincontrol.com/v2", - description: "No description provided", - }, { url: "http://{server}.swagger.io:{port}/v2", description: "petstore server", @@ -328,7 +324,7 @@ module Petstore } }, { - url: "https://domaincontrol.com/no_varaible", + url: "https://127.0.0.1/no_varaible", description: "The local server without variables", }, { @@ -351,10 +347,6 @@ module Petstore def operation_server_settings { "PetApi.add_pet": [ - { - url: "http://domaincontrol.com/v2", - description: "No description provided", - }, { url: "http://petstore.swagger.io/v2", description: "No description provided", @@ -402,10 +394,6 @@ module Petstore } ], "PetApi.delete_pet": [ - { - url: "http://domaincontrol.com/v2", - description: "No description provided", - }, { url: "http://petstore.swagger.io/v2", description: "No description provided", @@ -453,10 +441,6 @@ module Petstore } ], "PetApi.get_pet_by_id": [ - { - url: "http://domaincontrol.com/v2", - description: "No description provided", - }, { url: "http://petstore.swagger.io/v2", description: "No description provided", @@ -504,10 +488,6 @@ module Petstore } ], "PetApi.update_pet": [ - { - url: "http://domaincontrol.com/v2", - description: "No description provided", - }, { url: "http://petstore.swagger.io/v2", description: "No description provided", @@ -555,10 +535,6 @@ module Petstore } ], "PetApi.update_pet_with_form": [ - { - url: "http://domaincontrol.com/v2", - description: "No description provided", - }, { url: "http://petstore.swagger.io/v2", description: "No description provided", diff --git a/samples/client/petstore/ruby/spec/custom/configuration_spec.rb b/samples/client/petstore/ruby/spec/custom/configuration_spec.rb index b1af32e8a8cc..36e3d851548f 100644 --- a/samples/client/petstore/ruby/spec/custom/configuration_spec.rb +++ b/samples/client/petstore/ruby/spec/custom/configuration_spec.rb @@ -27,31 +27,31 @@ describe Petstore::Configuration do describe '#base_url' do it 'should have the default value' do - expect(config.base_url).to eq("http://localhost/v2") + expect(config.base_url).to eq("http://petstore.swagger.io/v2") end it 'returns default value when invalid operation is passed' do - expect(config.base_url('invalid_operation')).to eq('http://localhost/v2') + expect(config.base_url('invalid_operation')).to eq('http://petstore.swagger.io/v2') end it 'returns proper URL default server_index' do - expect(config.base_url(:'PetApi.add_pet')).to eq('http://localhost/v2') + expect(config.base_url(:'PetApi.add_pet')).to eq('http://petstore.swagger.io/v2') end it 'returns proper URL when server_index is set' do - config.server_index = 2 + config.server_index = 1 expect(config.base_url(:'PetApi.add_pet')).to eq('http://path-server-test.petstore.local/v2') end it 'returns proper URL when server_operation_index is set' do config.server_operation_index = { - :'PetApi.add_pet' =>2 + :'PetApi.add_pet' => 1 } expect(config.base_url(:'PetApi.add_pet')).to eq('http://path-server-test.petstore.local/v2') end it 'returns proper URL from server_settings when server_index is set' do - config.server_index = 2 + config.server_index = 1 expect(config.base_url).to eq('https://localhost:8080/v2') end @@ -66,11 +66,11 @@ describe Petstore::Configuration do it 'throws argument error when attempting to use a server index that is out of bounds' do config.server_operation_index = { - :'PetApi.add_pet' => 11 + :'PetApi.add_pet' => 10 } expect { config.base_url(:'PetApi.add_pet') - }.to raise_error(ArgumentError, 'Invalid index 11 when selecting the server. Must not be nil and must be less than 4') + }.to raise_error(ArgumentError, 'Invalid index 10 when selecting the server. Must not be nil and must be less than 4') end it 'should remove trailing slashes' do diff --git a/samples/client/petstore/ruby/spec/custom/pet_spec.rb b/samples/client/petstore/ruby/spec/custom/pet_spec.rb index a816d78e4dd2..ae2285d74257 100644 --- a/samples/client/petstore/ruby/spec/custom/pet_spec.rb +++ b/samples/client/petstore/ruby/spec/custom/pet_spec.rb @@ -66,7 +66,7 @@ describe "Pet" do expect(index_backup).to eq({}) # test operation index 1 (invalid path) @pet_api.api_client.config.server_operation_index = { - :'PetApi.get_pet_by_id' => 2 + :'PetApi.get_pet_by_id' => 1 } expect(@pet_api.api_client.config.base_url(:'PetApi.get_pet_by_id')).to eq('http://path-server-test.petstore.local/v2') @@ -86,7 +86,7 @@ describe "Pet" do expect(index_backup).to eq({}) # test operation index 3 @pet_api.api_client.config.server_operation_index = { - :'PetApi.get_pet_by_id' => 4 + :'PetApi.get_pet_by_id' => 3 } expect(@pet_api.api_client.config.base_url(:'PetApi.get_pet_by_id')).to eq('http://path.v2.test.openapi-generator.tech/v2')