diff --git a/.github/workflows/samples-ruby-client-echo-api.yaml b/.github/workflows/samples-ruby-client-echo-api.yaml new file mode 100644 index 000000000000..0f07b1cae357 --- /dev/null +++ b/.github/workflows/samples-ruby-client-echo-api.yaml @@ -0,0 +1,43 @@ +name: Samples Ruby + +on: + push: + paths: + - 'samples/client/echo_api/ruby-httpx/**' + - 'samples/client/echo_api/ruby-faraday/**' + - 'samples/client/echo_api/ruby-typhoeus/**' + pull_request: + paths: + - 'samples/client/echo_api/ruby-httpx/**' + - 'samples/client/echo_api/ruby-faraday/**' + - 'samples/client/echo_api/ruby-typhoeus/**' + +jobs: + build: + name: Build Ruby + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sample: + - 'samples/client/echo_api/ruby-httpx/' + - 'samples/client/echo_api/ruby-faraday/' + - 'samples/client/echo_api/ruby-typhoeus/' + steps: + - uses: actions/checkout@v5 + - name: Setup node.js + uses: actions/setup-node@v5 + - name: Run echo server + run: | + git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server + (cd http-echo-server && npm install && npm start &) + - uses: actions/setup-ruby@v1 + with: + ruby-version: 3.2 + bundler-cache: true + - name: Install bundle + working-directory: ${{ matrix.sample }} + run: bundle install + - name: Run rspec + working-directory: ${{ matrix.sample }} + run: rspec diff --git a/.github/workflows/samples-ruby.yaml b/.github/workflows/samples-ruby.yaml index e2354bfbd42b..60debc9f4ed3 100644 --- a/.github/workflows/samples-ruby.yaml +++ b/.github/workflows/samples-ruby.yaml @@ -1,16 +1,18 @@ -name: Samples Ruby +name: Samples Ruby on: push: paths: - - 'samples/client/echo_api/ruby-httpx/**' - - 'samples/client/echo_api/ruby-faraday/**' - - 'samples/client/echo_api/ruby-typhoeus/**' + - samples/client/petstore/ruby/** + - samples/client/petstore/ruby-faraday/** + - samples/client/petstore/ruby-httpx/** + - samples/client/petstore/ruby-autoload/** pull_request: paths: - - 'samples/client/echo_api/ruby-httpx/**' - - 'samples/client/echo_api/ruby-faraday/**' - - 'samples/client/echo_api/ruby-typhoeus/**' + - samples/client/petstore/ruby/** + - samples/client/petstore/ruby-faraday/** + - samples/client/petstore/ruby-httpx/** + - samples/client/petstore/ruby-autoload/** jobs: build: @@ -20,21 +22,28 @@ jobs: fail-fast: false matrix: sample: - - 'samples/client/echo_api/ruby-httpx/' - - 'samples/client/echo_api/ruby-faraday/' - - 'samples/client/echo_api/ruby-typhoeus/' + - samples/client/petstore/ruby/ + #- samples/client/petstore/ruby-faraday/ + #- samples/client/petstore/ruby-httpx/ + #- samples/client/petstore/ruby-autoload/ + services: + petstore-api: + image: swaggerapi/petstore + ports: + - 80:8080 + env: + SWAGGER_HOST: http://petstore.swagger.io + SWAGGER_BASE_PATH: /v2 steps: - uses: actions/checkout@v5 - - name: Setup node.js - uses: actions/setup-node@v5 - - name: Run echo server - run: | - git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server - (cd http-echo-server && npm install && npm start &) - - uses: actions/setup-ruby@v1 + #- name: Add hosts to /etc/hosts + # run: | + # sudo echo "127.0.0.1 petstore.swagger.io" | sudo tee -a /etc/hosts + # cat /etc/hosts + - uses: ruby/setup-ruby@v1 with: - ruby-version: 3.0 - bundler-cache: true + ruby-version: '3.4' # Not needed with a .ruby-version, .tool-versions or mise.toml + bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: Install bundle working-directory: ${{ matrix.sample }} run: bundle install 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 064862059da5..701d7a23198c 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 587ccdfcb967..dec3a004736f 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 52f3f5a72e9b..4627e42c9bb0 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 86925bb7c887..dfedf5f7da56 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 1e05788c53ab..983cb80ce0f2 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 32d3ff8ebdd2..f0a91c304f3f 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 b28334ae2c58..80f2f04c7391 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 52c551498cf0..51a01becfb47 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 348f5f9c4295..b667eb5ef97c 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 945cd4367091..c82be03192ba 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 @@ class Configuration 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 @@ def auth_settings # 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 @@ def server_settings } } }, - { - 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 @@ def server_settings 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 @@ def operation_server_settings } ], "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 @@ def operation_server_settings } ], "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 @@ def operation_server_settings } ], "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 @@ def operation_server_settings } ], "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 587ccdfcb967..dec3a004736f 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 52f3f5a72e9b..4627e42c9bb0 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 86925bb7c887..dfedf5f7da56 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 1e05788c53ab..983cb80ce0f2 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 32d3ff8ebdd2..f0a91c304f3f 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 b28334ae2c58..80f2f04c7391 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 52c551498cf0..51a01becfb47 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 348f5f9c4295..b667eb5ef97c 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 caa1be28dee5..33aebf1b10bc 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 @@ class Configuration 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 @@ def auth_settings # 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 @@ def server_settings } } }, - { - 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 @@ def server_settings 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 @@ def operation_server_settings } ], "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 @@ def operation_server_settings } ], "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 @@ def operation_server_settings } ], "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 @@ def operation_server_settings } ], "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/.openapi-generator-ignore b/samples/client/petstore/ruby/.openapi-generator-ignore index 7484ee590a38..5a9f4cf07bc2 100644 --- a/samples/client/petstore/ruby/.openapi-generator-ignore +++ b/samples/client/petstore/ruby/.openapi-generator-ignore @@ -21,3 +21,7 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md +# +# +# +# diff --git a/samples/client/petstore/ruby/README.md b/samples/client/petstore/ruby/README.md index 587ccdfcb967..dec3a004736f 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 52f3f5a72e9b..4627e42c9bb0 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 86925bb7c887..dfedf5f7da56 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 1dff682f9a2d..7ccf5d813d7d 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 32d3ff8ebdd2..f0a91c304f3f 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 b28334ae2c58..80f2f04c7391 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 52c551498cf0..51a01becfb47 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 348f5f9c4295..b667eb5ef97c 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 0756a9271761..0ebc2c4089b3 100644 --- a/samples/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb @@ -157,8 +157,8 @@ class Configuration 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 @@ def auth_settings # 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 @@ def server_settings } } }, - { - 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 @@ def server_settings 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 @@ def operation_server_settings } ], "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 @@ def operation_server_settings } ], "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 @@ def operation_server_settings } ], "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 @@ def operation_server_settings } ], "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",