forked from loafle/openapi-generator-original
use 127.0.0.1
This commit is contained in:
@@ -31,7 +31,7 @@ paths:
|
||||
$ref: '#/components/schemas/Foo'
|
||||
/pet:
|
||||
servers:
|
||||
- url: 'http://localhost/v2'
|
||||
- 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'
|
||||
@@ -189,7 +189,7 @@ paths:
|
||||
deprecated: true
|
||||
'/pet/{petId}':
|
||||
servers:
|
||||
- url: 'http://localhost/v2'
|
||||
- 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'
|
||||
@@ -1360,7 +1360,7 @@ paths:
|
||||
200:
|
||||
description: OK
|
||||
servers:
|
||||
- url: 'http://localhost/v2'
|
||||
- url: 'http://127.0.0.1/v2'
|
||||
- url: 'http://{server}.swagger.io:{port}/v2'
|
||||
description: petstore server
|
||||
variables:
|
||||
|
||||
@@ -139,12 +139,4 @@ lib/petstore/models/whale.rb
|
||||
lib/petstore/models/zebra.rb
|
||||
lib/petstore/version.rb
|
||||
petstore.gemspec
|
||||
spec/models/cow_spec.rb
|
||||
spec/models/mammal_anyof_spec.rb
|
||||
spec/models/mammal_spec.rb
|
||||
spec/models/mammal_without_discriminator_spec.rb
|
||||
spec/models/one_of_primitive_types_spec.rb
|
||||
spec/models/property_name_mapping_spec.rb
|
||||
spec/models/whale_spec.rb
|
||||
spec/models/zebra_spec.rb
|
||||
spec/spec_helper.rb
|
||||
|
||||
@@ -72,7 +72,7 @@ end
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *http://localhost/v2*
|
||||
All URIs are relative to *http://127.0.0.1/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Petstore::AnotherFakeApi
|
||||
|
||||
All URIs are relative to *http://localhost/v2*
|
||||
All URIs are relative to *http://127.0.0.1/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------ | ------------ | ----------- |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Petstore::DefaultApi
|
||||
|
||||
All URIs are relative to *http://localhost/v2*
|
||||
All URIs are relative to *http://127.0.0.1/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------ | ------------ | ----------- |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Petstore::FakeApi
|
||||
|
||||
All URIs are relative to *http://localhost/v2*
|
||||
All URIs are relative to *http://127.0.0.1/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------ | ------------ | ----------- |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Petstore::FakeClassnameTags123Api
|
||||
|
||||
All URIs are relative to *http://localhost/v2*
|
||||
All URIs are relative to *http://127.0.0.1/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------ | ------------ | ----------- |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Petstore::PetApi
|
||||
|
||||
All URIs are relative to *http://localhost/v2*
|
||||
All URIs are relative to *http://127.0.0.1/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------ | ------------ | ----------- |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Petstore::StoreApi
|
||||
|
||||
All URIs are relative to *http://localhost/v2*
|
||||
All URIs are relative to *http://127.0.0.1/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------ | ------------ | ----------- |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Petstore::UserApi
|
||||
|
||||
All URIs are relative to *http://localhost/v2*
|
||||
All URIs are relative to *http://127.0.0.1/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------ | ------------ | ----------- |
|
||||
|
||||
@@ -157,7 +157,7 @@ module Petstore
|
||||
|
||||
def initialize
|
||||
@scheme = 'http'
|
||||
@host = 'localhost'
|
||||
@host = '127.0.0.1'
|
||||
@base_path = '/v2'
|
||||
@server_index = nil
|
||||
@server_operation_index = {}
|
||||
@@ -291,7 +291,7 @@ module Petstore
|
||||
def server_settings
|
||||
[
|
||||
{
|
||||
url: "http://localhost/v2",
|
||||
url: "http://127.0.0.1/v2",
|
||||
description: "No description provided",
|
||||
},
|
||||
{
|
||||
@@ -356,7 +356,7 @@ module Petstore
|
||||
{
|
||||
"PetApi.add_pet": [
|
||||
{
|
||||
url: "http://localhost/v2",
|
||||
url: "http://127.0.0.1/v2",
|
||||
description: "No description provided",
|
||||
},
|
||||
{
|
||||
@@ -407,7 +407,7 @@ module Petstore
|
||||
],
|
||||
"PetApi.delete_pet": [
|
||||
{
|
||||
url: "http://localhost/v2",
|
||||
url: "http://127.0.0.1/v2",
|
||||
description: "No description provided",
|
||||
},
|
||||
{
|
||||
@@ -458,7 +458,7 @@ module Petstore
|
||||
],
|
||||
"PetApi.get_pet_by_id": [
|
||||
{
|
||||
url: "http://localhost/v2",
|
||||
url: "http://127.0.0.1/v2",
|
||||
description: "No description provided",
|
||||
},
|
||||
{
|
||||
@@ -509,7 +509,7 @@ module Petstore
|
||||
],
|
||||
"PetApi.update_pet": [
|
||||
{
|
||||
url: "http://localhost/v2",
|
||||
url: "http://127.0.0.1/v2",
|
||||
description: "No description provided",
|
||||
},
|
||||
{
|
||||
@@ -560,7 +560,7 @@ module Petstore
|
||||
],
|
||||
"PetApi.update_pet_with_form": [
|
||||
{
|
||||
url: "http://localhost/v2",
|
||||
url: "http://127.0.0.1/v2",
|
||||
description: "No description provided",
|
||||
},
|
||||
{
|
||||
|
||||
@@ -72,7 +72,7 @@ end
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *http://localhost/v2*
|
||||
All URIs are relative to *http://127.0.0.1/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Petstore::AnotherFakeApi
|
||||
|
||||
All URIs are relative to *http://localhost/v2*
|
||||
All URIs are relative to *http://127.0.0.1/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------ | ------------ | ----------- |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Petstore::DefaultApi
|
||||
|
||||
All URIs are relative to *http://localhost/v2*
|
||||
All URIs are relative to *http://127.0.0.1/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------ | ------------ | ----------- |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Petstore::FakeApi
|
||||
|
||||
All URIs are relative to *http://localhost/v2*
|
||||
All URIs are relative to *http://127.0.0.1/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------ | ------------ | ----------- |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Petstore::FakeClassnameTags123Api
|
||||
|
||||
All URIs are relative to *http://localhost/v2*
|
||||
All URIs are relative to *http://127.0.0.1/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------ | ------------ | ----------- |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Petstore::PetApi
|
||||
|
||||
All URIs are relative to *http://localhost/v2*
|
||||
All URIs are relative to *http://127.0.0.1/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------ | ------------ | ----------- |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Petstore::StoreApi
|
||||
|
||||
All URIs are relative to *http://localhost/v2*
|
||||
All URIs are relative to *http://127.0.0.1/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------ | ------------ | ----------- |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Petstore::UserApi
|
||||
|
||||
All URIs are relative to *http://localhost/v2*
|
||||
All URIs are relative to *http://127.0.0.1/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------ | ------------ | ----------- |
|
||||
|
||||
@@ -128,7 +128,7 @@ module Petstore
|
||||
|
||||
def initialize
|
||||
@scheme = 'http'
|
||||
@host = 'localhost'
|
||||
@host = '127.0.0.1'
|
||||
@base_path = '/v2'
|
||||
@server_index = nil
|
||||
@server_operation_index = {}
|
||||
@@ -255,7 +255,7 @@ module Petstore
|
||||
def server_settings
|
||||
[
|
||||
{
|
||||
url: "http://localhost/v2",
|
||||
url: "http://127.0.0.1/v2",
|
||||
description: "No description provided",
|
||||
},
|
||||
{
|
||||
@@ -320,7 +320,7 @@ module Petstore
|
||||
{
|
||||
"PetApi.add_pet": [
|
||||
{
|
||||
url: "http://localhost/v2",
|
||||
url: "http://127.0.0.1/v2",
|
||||
description: "No description provided",
|
||||
},
|
||||
{
|
||||
@@ -371,7 +371,7 @@ module Petstore
|
||||
],
|
||||
"PetApi.delete_pet": [
|
||||
{
|
||||
url: "http://localhost/v2",
|
||||
url: "http://127.0.0.1/v2",
|
||||
description: "No description provided",
|
||||
},
|
||||
{
|
||||
@@ -422,7 +422,7 @@ module Petstore
|
||||
],
|
||||
"PetApi.get_pet_by_id": [
|
||||
{
|
||||
url: "http://localhost/v2",
|
||||
url: "http://127.0.0.1/v2",
|
||||
description: "No description provided",
|
||||
},
|
||||
{
|
||||
@@ -473,7 +473,7 @@ module Petstore
|
||||
],
|
||||
"PetApi.update_pet": [
|
||||
{
|
||||
url: "http://localhost/v2",
|
||||
url: "http://127.0.0.1/v2",
|
||||
description: "No description provided",
|
||||
},
|
||||
{
|
||||
@@ -524,7 +524,7 @@ module Petstore
|
||||
],
|
||||
"PetApi.update_pet_with_form": [
|
||||
{
|
||||
url: "http://localhost/v2",
|
||||
url: "http://127.0.0.1/v2",
|
||||
description: "No description provided",
|
||||
},
|
||||
{
|
||||
|
||||
@@ -72,7 +72,7 @@ end
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *http://localhost/v2*
|
||||
All URIs are relative to *http://127.0.0.1/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Petstore::AnotherFakeApi
|
||||
|
||||
All URIs are relative to *http://localhost/v2*
|
||||
All URIs are relative to *http://127.0.0.1/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------ | ------------ | ----------- |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Petstore::DefaultApi
|
||||
|
||||
All URIs are relative to *http://localhost/v2*
|
||||
All URIs are relative to *http://127.0.0.1/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------ | ------------ | ----------- |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Petstore::FakeApi
|
||||
|
||||
All URIs are relative to *http://localhost/v2*
|
||||
All URIs are relative to *http://127.0.0.1/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------ | ------------ | ----------- |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Petstore::FakeClassnameTags123Api
|
||||
|
||||
All URIs are relative to *http://localhost/v2*
|
||||
All URIs are relative to *http://127.0.0.1/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------ | ------------ | ----------- |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Petstore::PetApi
|
||||
|
||||
All URIs are relative to *http://localhost/v2*
|
||||
All URIs are relative to *http://127.0.0.1/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------ | ------------ | ----------- |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Petstore::StoreApi
|
||||
|
||||
All URIs are relative to *http://localhost/v2*
|
||||
All URIs are relative to *http://127.0.0.1/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------ | ------------ | ----------- |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Petstore::UserApi
|
||||
|
||||
All URIs are relative to *http://localhost/v2*
|
||||
All URIs are relative to *http://127.0.0.1/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------ | ------------ | ----------- |
|
||||
|
||||
@@ -158,7 +158,7 @@ module Petstore
|
||||
|
||||
def initialize
|
||||
@scheme = 'http'
|
||||
@host = 'localhost'
|
||||
@host = '127.0.0.1'
|
||||
@base_path = '/v2'
|
||||
@server_index = nil
|
||||
@server_operation_index = {}
|
||||
@@ -287,7 +287,7 @@ module Petstore
|
||||
def server_settings
|
||||
[
|
||||
{
|
||||
url: "http://localhost/v2",
|
||||
url: "http://127.0.0.1/v2",
|
||||
description: "No description provided",
|
||||
},
|
||||
{
|
||||
@@ -352,7 +352,7 @@ module Petstore
|
||||
{
|
||||
"PetApi.add_pet": [
|
||||
{
|
||||
url: "http://localhost/v2",
|
||||
url: "http://127.0.0.1/v2",
|
||||
description: "No description provided",
|
||||
},
|
||||
{
|
||||
@@ -403,7 +403,7 @@ module Petstore
|
||||
],
|
||||
"PetApi.delete_pet": [
|
||||
{
|
||||
url: "http://localhost/v2",
|
||||
url: "http://127.0.0.1/v2",
|
||||
description: "No description provided",
|
||||
},
|
||||
{
|
||||
@@ -454,7 +454,7 @@ module Petstore
|
||||
],
|
||||
"PetApi.get_pet_by_id": [
|
||||
{
|
||||
url: "http://localhost/v2",
|
||||
url: "http://127.0.0.1/v2",
|
||||
description: "No description provided",
|
||||
},
|
||||
{
|
||||
@@ -505,7 +505,7 @@ module Petstore
|
||||
],
|
||||
"PetApi.update_pet": [
|
||||
{
|
||||
url: "http://localhost/v2",
|
||||
url: "http://127.0.0.1/v2",
|
||||
description: "No description provided",
|
||||
},
|
||||
{
|
||||
@@ -556,7 +556,7 @@ module Petstore
|
||||
],
|
||||
"PetApi.update_pet_with_form": [
|
||||
{
|
||||
url: "http://localhost/v2",
|
||||
url: "http://127.0.0.1/v2",
|
||||
description: "No description provided",
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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' => 10
|
||||
:'PetApi.add_pet' => 11
|
||||
}
|
||||
expect {
|
||||
config.base_url(:'PetApi.add_pet')
|
||||
}.to raise_error(ArgumentError, 'Invalid index 10 when selecting the server. Must not be nil and must be less than 4')
|
||||
}.to raise_error(ArgumentError, 'Invalid index 11 when selecting the server. Must not be nil and must be less than 4')
|
||||
end
|
||||
|
||||
it 'should remove trailing slashes' do
|
||||
|
||||
Reference in New Issue
Block a user