Skip to content

Commit 3d25263

Browse files
committed
use localhost
1 parent 9a2d997 commit 3d25263

28 files changed

Lines changed: 106 additions & 44 deletions

modules/openapi-generator/src/test/resources/3_0/ruby/petstore-with-fake-endpoints-models-for-testing.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ paths:
3131
$ref: '#/components/schemas/Foo'
3232
/pet:
3333
servers:
34+
- url: 'http://127.0.0.1/v2'
3435
- url: 'http://petstore.swagger.io/v2'
3536
- url: 'http://path-server-test.petstore.local/v2'
3637
- url: 'http://{server}.swagger.io:{port}/v2'
@@ -188,6 +189,7 @@ paths:
188189
deprecated: true
189190
'/pet/{petId}':
190191
servers:
192+
- url: 'http://127.0.0.1/v2'
191193
- url: 'http://petstore.swagger.io/v2'
192194
- url: 'http://path-server-test.petstore.local/v2'
193195
- url: 'http://{server}.swagger.io:{port}/v2'
@@ -1358,6 +1360,8 @@ paths:
13581360
200:
13591361
description: OK
13601362
servers:
1363+
- url: https://127.0.0.1/v2
1364+
description: The local server without variables
13611365
- url: 'http://{server}.swagger.io:{port}/v2'
13621366
description: petstore server
13631367
variables:
@@ -1380,8 +1384,6 @@ servers:
13801384
- 'v1'
13811385
- 'v2'
13821386
default: 'v2'
1383-
- url: https://127.0.0.1/no_varaible
1384-
description: The local server without variables
13851387
- url: http://server.{version}.openapi-generator.tech
13861388
description: The openapi-generator test server
13871389
variables:

samples/client/petstore/ruby-faraday/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ end
7272

7373
## Documentation for API Endpoints
7474

75-
All URIs are relative to *http://petstore.swagger.io:80/v2*
75+
All URIs are relative to *https://127.0.0.1/v2*
7676

7777
Class | Method | HTTP request | Description
7878
------------ | ------------- | ------------- | -------------

samples/client/petstore/ruby-faraday/docs/AnotherFakeApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Petstore::AnotherFakeApi
22

3-
All URIs are relative to *http://petstore.swagger.io:80/v2*
3+
All URIs are relative to *https://127.0.0.1/v2*
44

55
| Method | HTTP request | Description |
66
| ------ | ------------ | ----------- |

samples/client/petstore/ruby-faraday/docs/DefaultApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Petstore::DefaultApi
22

3-
All URIs are relative to *http://petstore.swagger.io:80/v2*
3+
All URIs are relative to *https://127.0.0.1/v2*
44

55
| Method | HTTP request | Description |
66
| ------ | ------------ | ----------- |

samples/client/petstore/ruby-faraday/docs/FakeApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Petstore::FakeApi
22

3-
All URIs are relative to *http://petstore.swagger.io:80/v2*
3+
All URIs are relative to *https://127.0.0.1/v2*
44

55
| Method | HTTP request | Description |
66
| ------ | ------------ | ----------- |

samples/client/petstore/ruby-faraday/docs/FakeClassnameTags123Api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Petstore::FakeClassnameTags123Api
22

3-
All URIs are relative to *http://petstore.swagger.io:80/v2*
3+
All URIs are relative to *https://127.0.0.1/v2*
44

55
| Method | HTTP request | Description |
66
| ------ | ------------ | ----------- |

samples/client/petstore/ruby-faraday/docs/PetApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Petstore::PetApi
22

3-
All URIs are relative to *http://petstore.swagger.io:80/v2*
3+
All URIs are relative to *https://127.0.0.1/v2*
44

55
| Method | HTTP request | Description |
66
| ------ | ------------ | ----------- |

samples/client/petstore/ruby-faraday/docs/StoreApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Petstore::StoreApi
22

3-
All URIs are relative to *http://petstore.swagger.io:80/v2*
3+
All URIs are relative to *https://127.0.0.1/v2*
44

55
| Method | HTTP request | Description |
66
| ------ | ------------ | ----------- |

samples/client/petstore/ruby-faraday/docs/UserApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Petstore::UserApi
22

3-
All URIs are relative to *http://petstore.swagger.io:80/v2*
3+
All URIs are relative to *https://127.0.0.1/v2*
44

55
| Method | HTTP request | Description |
66
| ------ | ------------ | ----------- |

samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ class Configuration
156156
attr_accessor :force_ending_format
157157

158158
def initialize
159-
@scheme = 'http'
160-
@host = 'petstore.swagger.io'
159+
@scheme = 'https'
160+
@host = '127.0.0.1'
161161
@base_path = '/v2'
162162
@server_index = nil
163163
@server_operation_index = {}
@@ -290,6 +290,10 @@ def auth_settings
290290
# Returns an array of Server setting
291291
def server_settings
292292
[
293+
{
294+
url: "https://127.0.0.1/v2",
295+
description: "The local server without variables",
296+
},
293297
{
294298
url: "http://{server}.swagger.io:{port}/v2",
295299
description: "petstore server",
@@ -327,10 +331,6 @@ def server_settings
327331
}
328332
}
329333
},
330-
{
331-
url: "https://127.0.0.1/no_varaible",
332-
description: "The local server without variables",
333-
},
334334
{
335335
url: "http://server.{version}.openapi-generator.tech",
336336
description: "The openapi-generator test server",
@@ -351,6 +351,10 @@ def server_settings
351351
def operation_server_settings
352352
{
353353
"PetApi.add_pet": [
354+
{
355+
url: "http://127.0.0.1/v2",
356+
description: "No description provided",
357+
},
354358
{
355359
url: "http://petstore.swagger.io/v2",
356360
description: "No description provided",
@@ -398,6 +402,10 @@ def operation_server_settings
398402
}
399403
],
400404
"PetApi.delete_pet": [
405+
{
406+
url: "http://127.0.0.1/v2",
407+
description: "No description provided",
408+
},
401409
{
402410
url: "http://petstore.swagger.io/v2",
403411
description: "No description provided",
@@ -445,6 +453,10 @@ def operation_server_settings
445453
}
446454
],
447455
"PetApi.get_pet_by_id": [
456+
{
457+
url: "http://127.0.0.1/v2",
458+
description: "No description provided",
459+
},
448460
{
449461
url: "http://petstore.swagger.io/v2",
450462
description: "No description provided",
@@ -492,6 +504,10 @@ def operation_server_settings
492504
}
493505
],
494506
"PetApi.update_pet": [
507+
{
508+
url: "http://127.0.0.1/v2",
509+
description: "No description provided",
510+
},
495511
{
496512
url: "http://petstore.swagger.io/v2",
497513
description: "No description provided",
@@ -539,6 +555,10 @@ def operation_server_settings
539555
}
540556
],
541557
"PetApi.update_pet_with_form": [
558+
{
559+
url: "http://127.0.0.1/v2",
560+
description: "No description provided",
561+
},
542562
{
543563
url: "http://petstore.swagger.io/v2",
544564
description: "No description provided",

0 commit comments

Comments
 (0)