use localhost

This commit is contained in:
William Cheng 2025-09-27 16:33:24 +08:00
parent 9a2d997398
commit 3d25263e32
28 changed files with 106 additions and 44 deletions

View File

@ -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:

View File

@ -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
------------ | ------------- | ------------- | -------------

View File

@ -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 |
| ------ | ------------ | ----------- |

View File

@ -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 |
| ------ | ------------ | ----------- |

View File

@ -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 |
| ------ | ------------ | ----------- |

View File

@ -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 |
| ------ | ------------ | ----------- |

View File

@ -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 |
| ------ | ------------ | ----------- |

View File

@ -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 |
| ------ | ------------ | ----------- |

View File

@ -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 |
| ------ | ------------ | ----------- |

View File

@ -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",

View File

@ -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
------------ | ------------- | ------------- | -------------

View File

@ -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 |
| ------ | ------------ | ----------- |

View File

@ -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 |
| ------ | ------------ | ----------- |

View File

@ -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 |
| ------ | ------------ | ----------- |

View File

@ -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 |
| ------ | ------------ | ----------- |

View File

@ -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 |
| ------ | ------------ | ----------- |

View File

@ -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 |
| ------ | ------------ | ----------- |

View File

@ -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 |
| ------ | ------------ | ----------- |

View File

@ -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",

View File

@ -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
------------ | ------------- | ------------- | -------------

View File

@ -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 |
| ------ | ------------ | ----------- |

View File

@ -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 |
| ------ | ------------ | ----------- |

View File

@ -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 |
| ------ | ------------ | ----------- |

View File

@ -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 |
| ------ | ------------ | ----------- |

View File

@ -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 |
| ------ | ------------ | ----------- |

View File

@ -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 |
| ------ | ------------ | ----------- |

View File

@ -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 |
| ------ | ------------ | ----------- |

View File

@ -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",