mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-06-28 11:40:52 +00:00
* Updating samples after #5232. * Fix tests after #5232. * Fix Javascript client tests. * JaxRS server: set serverPort only when not given from outside. * Update JaxRS sample creator scripts to fix serverPort. * Preliminary test fix for JaxRS server generators. * Updating samples for JaxRS with Jersey1/2. * Updating JaxRS samples again.
This commit is contained in:
parent
2830fb1794
commit
db71d97370
@ -760,7 +760,7 @@ echo " $ops" | column -t -s ';'
|
||||
echo -e " -V,--version\t\t\t\tPrint API version"
|
||||
echo -e " --about\t\t\t\tPrint the information about service"
|
||||
echo -e " --host $(tput setaf 6)<url>$(tput sgr0)\t\t\t\tSpecify the host URL "
|
||||
echo -e " \t\t\t\t(e.g. 'https://petstore.swagger.io')"
|
||||
echo -e " \t\t\t\t(e.g. 'https://petstore.swagger.io:80')"
|
||||
|
||||
echo -e " --force\t\t\t\tForce command invocation in spite of missing"
|
||||
echo -e " \t\t\t\trequired parameters or wrong content type"
|
||||
|
@ -89,7 +89,7 @@ namespace Example
|
||||
<a name="documentation-for-api-endpoints"></a>
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# IO.Swagger.Api.FakeApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# IO.Swagger.Api.PetApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# IO.Swagger.Api.StoreApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# IO.Swagger.Api.UserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -48,17 +48,17 @@ namespace IO.Swagger.Client
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ApiClient" /> class
|
||||
/// with default configuration and base path (http://petstore.swagger.io/v2).
|
||||
/// with default configuration and base path (http://petstore.swagger.io:80/v2).
|
||||
/// </summary>
|
||||
public ApiClient()
|
||||
{
|
||||
Configuration = Configuration.Default;
|
||||
RestClient = new RestClient("http://petstore.swagger.io/v2");
|
||||
RestClient = new RestClient("http://petstore.swagger.io:80/v2");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ApiClient" /> class
|
||||
/// with default base path (http://petstore.swagger.io/v2).
|
||||
/// with default base path (http://petstore.swagger.io:80/v2).
|
||||
/// </summary>
|
||||
/// <param name="config">An instance of Configuration.</param>
|
||||
public ApiClient(Configuration config = null)
|
||||
@ -68,7 +68,7 @@ namespace IO.Swagger.Client
|
||||
else
|
||||
Configuration = config;
|
||||
|
||||
RestClient = new RestClient("http://petstore.swagger.io/v2");
|
||||
RestClient = new RestClient("http://petstore.swagger.io:80/v2");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -76,7 +76,7 @@ namespace IO.Swagger.Client
|
||||
/// with default configuration.
|
||||
/// </summary>
|
||||
/// <param name="basePath">The base path.</param>
|
||||
public ApiClient(String basePath = "http://petstore.swagger.io/v2")
|
||||
public ApiClient(String basePath = "http://petstore.swagger.io:80/v2")
|
||||
{
|
||||
if (String.IsNullOrEmpty(basePath))
|
||||
throw new ArgumentException("basePath cannot be empty");
|
||||
|
@ -89,7 +89,7 @@ namespace Example
|
||||
<a name="documentation-for-api-endpoints"></a>
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# IO.Swagger.Api.FakeApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# IO.Swagger.Api.PetApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# IO.Swagger.Api.StoreApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# IO.Swagger.Api.UserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -48,17 +48,17 @@ namespace IO.Swagger.Client
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ApiClient" /> class
|
||||
/// with default configuration and base path (http://petstore.swagger.io/v2).
|
||||
/// with default configuration and base path (http://petstore.swagger.io:80/v2).
|
||||
/// </summary>
|
||||
public ApiClient()
|
||||
{
|
||||
Configuration = Configuration.Default;
|
||||
RestClient = new RestClient("http://petstore.swagger.io/v2");
|
||||
RestClient = new RestClient("http://petstore.swagger.io:80/v2");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ApiClient" /> class
|
||||
/// with default base path (http://petstore.swagger.io/v2).
|
||||
/// with default base path (http://petstore.swagger.io:80/v2).
|
||||
/// </summary>
|
||||
/// <param name="config">An instance of Configuration.</param>
|
||||
public ApiClient(Configuration config = null)
|
||||
@ -68,7 +68,7 @@ namespace IO.Swagger.Client
|
||||
else
|
||||
Configuration = config;
|
||||
|
||||
RestClient = new RestClient("http://petstore.swagger.io/v2");
|
||||
RestClient = new RestClient("http://petstore.swagger.io:80/v2");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -76,7 +76,7 @@ namespace IO.Swagger.Client
|
||||
/// with default configuration.
|
||||
/// </summary>
|
||||
/// <param name="basePath">The base path.</param>
|
||||
public ApiClient(String basePath = "http://petstore.swagger.io/v2")
|
||||
public ApiClient(String basePath = "http://petstore.swagger.io:80/v2")
|
||||
{
|
||||
if (String.IsNullOrEmpty(basePath))
|
||||
throw new ArgumentException("basePath cannot be empty");
|
||||
|
@ -5,7 +5,7 @@ defmodule SwaggerPetstore.Api.Fake do
|
||||
|
||||
use Tesla
|
||||
|
||||
plug Tesla.Middleware.BaseUrl, "http://petstore.swagger.io/v2"
|
||||
plug Tesla.Middleware.BaseUrl, "http://petstore.swagger.io:80/v2"
|
||||
plug Tesla.Middleware.JSON
|
||||
|
||||
def test_client_model(body) do
|
||||
|
@ -5,7 +5,7 @@ defmodule SwaggerPetstore.Api.Pet do
|
||||
|
||||
use Tesla
|
||||
|
||||
plug Tesla.Middleware.BaseUrl, "http://petstore.swagger.io/v2"
|
||||
plug Tesla.Middleware.BaseUrl, "http://petstore.swagger.io:80/v2"
|
||||
plug Tesla.Middleware.JSON
|
||||
|
||||
def add_pet(body) do
|
||||
|
@ -5,7 +5,7 @@ defmodule SwaggerPetstore.Api.Store do
|
||||
|
||||
use Tesla
|
||||
|
||||
plug Tesla.Middleware.BaseUrl, "http://petstore.swagger.io/v2"
|
||||
plug Tesla.Middleware.BaseUrl, "http://petstore.swagger.io:80/v2"
|
||||
plug Tesla.Middleware.JSON
|
||||
|
||||
def delete_order(order_id) do
|
||||
|
@ -5,7 +5,7 @@ defmodule SwaggerPetstore.Api.User do
|
||||
|
||||
use Tesla
|
||||
|
||||
plug Tesla.Middleware.BaseUrl, "http://petstore.swagger.io/v2"
|
||||
plug Tesla.Middleware.BaseUrl, "http://petstore.swagger.io:80/v2"
|
||||
plug Tesla.Middleware.JSON
|
||||
|
||||
def create_user(body) do
|
||||
|
@ -17,7 +17,7 @@ Put the package under your project folder and add the following in import:
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
@ -38,7 +38,7 @@ type Configuration struct {
|
||||
|
||||
func NewConfiguration() *Configuration {
|
||||
cfg := &Configuration{
|
||||
BasePath: "http://petstore.swagger.io/v2",
|
||||
BasePath: "http://petstore.swagger.io:80/v2",
|
||||
DefaultHeader: make(map[string]string),
|
||||
APIKey: make(map[string]string),
|
||||
APIKeyPrefix: make(map[string]string),
|
||||
|
@ -1,6 +1,6 @@
|
||||
# \FakeApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# \PetApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# \StoreApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# \UserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -25,7 +25,7 @@ public class ApiClient {
|
||||
public interface Api {}
|
||||
|
||||
protected ObjectMapper objectMapper;
|
||||
private String basePath = "http://petstore.swagger.io/v2";
|
||||
private String basePath = "http://petstore.swagger.io:80/v2";
|
||||
private Map<String, RequestInterceptor> apiAuthorizations;
|
||||
private Feign.Builder feignBuilder;
|
||||
|
||||
|
@ -29,7 +29,7 @@ public class PetApiTest {
|
||||
@Test
|
||||
public void testApiClient() {
|
||||
// the default api client is used
|
||||
assertEquals("http://petstore.swagger.io/v2", apiClient.getBasePath());
|
||||
assertEquals("http://petstore.swagger.io:80/v2", apiClient.getBasePath());
|
||||
|
||||
ApiClient newClient = new ApiClient();
|
||||
newClient.setBasePath("http://example.com");
|
||||
|
@ -1,6 +1,6 @@
|
||||
# FakeApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# PetApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# StoreApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# UserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -56,7 +56,7 @@ import io.swagger.client.auth.OAuth;
|
||||
|
||||
public class ApiClient {
|
||||
private Map<String, String> defaultHeaderMap = new HashMap<String, String>();
|
||||
private String basePath = "http://petstore.swagger.io/v2";
|
||||
private String basePath = "http://petstore.swagger.io:80/v2";
|
||||
private boolean debugging = false;
|
||||
private int connectionTimeout = 0;
|
||||
|
||||
|
@ -9,7 +9,7 @@ public class ConfigurationTest {
|
||||
public void testDefaultApiClient() {
|
||||
ApiClient apiClient = Configuration.getDefaultApiClient();
|
||||
assertNotNull(apiClient);
|
||||
assertEquals("http://petstore.swagger.io/v2", apiClient.getBasePath());
|
||||
assertEquals("http://petstore.swagger.io:80/v2", apiClient.getBasePath());
|
||||
assertFalse(apiClient.isDebugging());
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ public class PetApiTest {
|
||||
// the default api client is used
|
||||
assertEquals(Configuration.getDefaultApiClient(), api.getApiClient());
|
||||
assertNotNull(api.getApiClient());
|
||||
assertEquals("http://petstore.swagger.io/v2", api.getApiClient().getBasePath());
|
||||
assertEquals("http://petstore.swagger.io:80/v2", api.getApiClient().getBasePath());
|
||||
assertFalse(api.getApiClient().isDebugging());
|
||||
|
||||
ApiClient oldClient = api.getApiClient();
|
||||
@ -57,7 +57,7 @@ public class PetApiTest {
|
||||
// set api client via setter method
|
||||
api.setApiClient(oldClient);
|
||||
assertNotNull(api.getApiClient());
|
||||
assertEquals("http://petstore.swagger.io/v2", api.getApiClient().getBasePath());
|
||||
assertEquals("http://petstore.swagger.io:80/v2", api.getApiClient().getBasePath());
|
||||
assertFalse(api.getApiClient().isDebugging());
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# FakeApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# PetApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# StoreApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# UserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -51,7 +51,7 @@ import io.swagger.client.auth.OAuth;
|
||||
|
||||
public class ApiClient {
|
||||
private Map<String, String> defaultHeaderMap = new HashMap<String, String>();
|
||||
private String basePath = "http://petstore.swagger.io/v2";
|
||||
private String basePath = "http://petstore.swagger.io:80/v2";
|
||||
private boolean debugging = false;
|
||||
private int connectionTimeout = 0;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# FakeApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# PetApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# StoreApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# UserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -51,7 +51,7 @@ import io.swagger.client.auth.OAuth;
|
||||
|
||||
public class ApiClient {
|
||||
private Map<String, String> defaultHeaderMap = new HashMap<String, String>();
|
||||
private String basePath = "http://petstore.swagger.io/v2";
|
||||
private String basePath = "http://petstore.swagger.io:80/v2";
|
||||
private boolean debugging = false;
|
||||
private int connectionTimeout = 0;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# FakeApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# PetApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# StoreApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# UserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -51,7 +51,7 @@ import io.swagger.client.auth.OAuth;
|
||||
|
||||
public class ApiClient {
|
||||
private Map<String, String> defaultHeaderMap = new HashMap<String, String>();
|
||||
private String basePath = "http://petstore.swagger.io/v2";
|
||||
private String basePath = "http://petstore.swagger.io:80/v2";
|
||||
private boolean debugging = false;
|
||||
private int connectionTimeout = 0;
|
||||
|
||||
|
@ -9,7 +9,7 @@ public class ConfigurationTest {
|
||||
public void testDefaultApiClient() {
|
||||
ApiClient apiClient = Configuration.getDefaultApiClient();
|
||||
assertNotNull(apiClient);
|
||||
assertEquals("http://petstore.swagger.io/v2", apiClient.getBasePath());
|
||||
assertEquals("http://petstore.swagger.io:80/v2", apiClient.getBasePath());
|
||||
assertFalse(apiClient.isDebugging());
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ public class PetApiTest {
|
||||
// the default api client is used
|
||||
assertEquals(Configuration.getDefaultApiClient(), api.getApiClient());
|
||||
assertNotNull(api.getApiClient());
|
||||
assertEquals("http://petstore.swagger.io/v2", api.getApiClient().getBasePath());
|
||||
assertEquals("http://petstore.swagger.io:80/v2", api.getApiClient().getBasePath());
|
||||
assertFalse(api.getApiClient().isDebugging());
|
||||
|
||||
ApiClient oldClient = api.getApiClient();
|
||||
@ -54,7 +54,7 @@ public class PetApiTest {
|
||||
// set api client via setter method
|
||||
api.setApiClient(oldClient);
|
||||
assertNotNull(api.getApiClient());
|
||||
assertEquals("http://petstore.swagger.io/v2", api.getApiClient().getBasePath());
|
||||
assertEquals("http://petstore.swagger.io:80/v2", api.getApiClient().getBasePath());
|
||||
assertFalse(api.getApiClient().isDebugging());
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# FakeApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# PetApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# StoreApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# UserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -112,7 +112,7 @@ public class ApiClient {
|
||||
*/
|
||||
public static final String LENIENT_DATETIME_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";
|
||||
|
||||
private String basePath = "http://petstore.swagger.io/v2";
|
||||
private String basePath = "http://petstore.swagger.io:80/v2";
|
||||
private boolean lenientOnJson = false;
|
||||
private boolean debugging = false;
|
||||
private Map<String, String> defaultHeaderMap = new HashMap<String, String>();
|
||||
@ -181,7 +181,7 @@ public class ApiClient {
|
||||
/**
|
||||
* Set base path
|
||||
*
|
||||
* @param basePath Base path of the URL (e.g http://petstore.swagger.io/v2
|
||||
* @param basePath Base path of the URL (e.g http://petstore.swagger.io:80/v2
|
||||
* @return An instance of OkHttpClient
|
||||
*/
|
||||
public ApiClient setBasePath(String basePath) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
# FakeApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# PetApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# StoreApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# UserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -112,7 +112,7 @@ public class ApiClient {
|
||||
*/
|
||||
public static final String LENIENT_DATETIME_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";
|
||||
|
||||
private String basePath = "http://petstore.swagger.io/v2";
|
||||
private String basePath = "http://petstore.swagger.io:80/v2";
|
||||
private boolean lenientOnJson = false;
|
||||
private boolean debugging = false;
|
||||
private Map<String, String> defaultHeaderMap = new HashMap<String, String>();
|
||||
@ -181,7 +181,7 @@ public class ApiClient {
|
||||
/**
|
||||
* Set base path
|
||||
*
|
||||
* @param basePath Base path of the URL (e.g http://petstore.swagger.io/v2
|
||||
* @param basePath Base path of the URL (e.g http://petstore.swagger.io:80/v2
|
||||
* @return An instance of OkHttpClient
|
||||
*/
|
||||
public ApiClient setBasePath(String basePath) {
|
||||
|
@ -9,7 +9,7 @@ public class ConfigurationTest {
|
||||
public void testDefaultApiClient() {
|
||||
ApiClient apiClient = Configuration.getDefaultApiClient();
|
||||
assertNotNull(apiClient);
|
||||
assertEquals("http://petstore.swagger.io/v2", apiClient.getBasePath());
|
||||
assertEquals("http://petstore.swagger.io:80/v2", apiClient.getBasePath());
|
||||
assertFalse(apiClient.isDebugging());
|
||||
}
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ public class PetApiTest {
|
||||
// the default api client is used
|
||||
assertEquals(Configuration.getDefaultApiClient(), api.getApiClient());
|
||||
assertNotNull(api.getApiClient());
|
||||
assertEquals("http://petstore.swagger.io/v2", api.getApiClient().getBasePath());
|
||||
assertEquals("http://petstore.swagger.io:80/v2", api.getApiClient().getBasePath());
|
||||
assertFalse(api.getApiClient().isDebugging());
|
||||
|
||||
ApiClient oldClient = api.getApiClient();
|
||||
@ -53,7 +53,7 @@ public class PetApiTest {
|
||||
// set api client via setter method
|
||||
api.setApiClient(oldClient);
|
||||
assertNotNull(api.getApiClient());
|
||||
assertEquals("http://petstore.swagger.io/v2", api.getApiClient().getBasePath());
|
||||
assertEquals("http://petstore.swagger.io:80/v2", api.getApiClient().getBasePath());
|
||||
assertFalse(api.getApiClient().isDebugging());
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ public class ApiClient {
|
||||
|
||||
adapterBuilder = new RestAdapter
|
||||
.Builder()
|
||||
.setEndpoint("http://petstore.swagger.io/v2")
|
||||
.setEndpoint("http://petstore.swagger.io:80/v2")
|
||||
.setClient(new OkClient(okClient))
|
||||
.setConverter(new GsonConverterWrapper(gson));
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ api.testClientModel(body).then(function(data) {
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# SwaggerPetstore.FakeApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# SwaggerPetstore.PetApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# SwaggerPetstore.StoreApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# SwaggerPetstore.UserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -44,9 +44,9 @@
|
||||
/**
|
||||
* The base URL against which to resolve every API call's (relative) path.
|
||||
* @type {String}
|
||||
* @default http://petstore.swagger.io/v2
|
||||
* @default http://petstore.swagger.io:80/v2
|
||||
*/
|
||||
this.basePath = 'http://petstore.swagger.io/v2'.replace(/\/+$/, '');
|
||||
this.basePath = 'http://petstore.swagger.io:80/v2'.replace(/\/+$/, '');
|
||||
|
||||
/**
|
||||
* The authentication methods to be included for all API calls.
|
||||
|
@ -70,7 +70,7 @@ api.testClientModel(body, callback);
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# SwaggerPetstore.FakeApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# SwaggerPetstore.PetApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# SwaggerPetstore.StoreApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# SwaggerPetstore.UserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -44,9 +44,9 @@
|
||||
/**
|
||||
* The base URL against which to resolve every API call's (relative) path.
|
||||
* @type {String}
|
||||
* @default http://petstore.swagger.io/v2
|
||||
* @default http://petstore.swagger.io:80/v2
|
||||
*/
|
||||
this.basePath = 'http://petstore.swagger.io/v2'.replace(/\/+$/, '');
|
||||
this.basePath = 'http://petstore.swagger.io:80/v2'.replace(/\/+$/, '');
|
||||
|
||||
/**
|
||||
* The authentication methods to be included for all API calls.
|
||||
|
@ -10,7 +10,7 @@ describe('ApiClient', function() {
|
||||
describe('defaults', function() {
|
||||
it('should have correct default values with the default API client', function() {
|
||||
expect(apiClient).to.be.ok();
|
||||
expect(apiClient.basePath).to.be('http://petstore.swagger.io/v2');
|
||||
expect(apiClient.basePath).to.be('http://petstore.swagger.io:80/v2');
|
||||
expect(apiClient.authentications).to.eql({
|
||||
petstore_auth: {type: 'oauth2'},
|
||||
http_basic_test: {type: 'basic'},
|
||||
@ -45,8 +45,8 @@ describe('ApiClient', function() {
|
||||
|
||||
it('should have correct default values with new API client and can customize it', function() {
|
||||
var newClient = new SwaggerPetstore.ApiClient;
|
||||
expect(newClient.basePath).to.be('http://petstore.swagger.io/v2');
|
||||
expect(newClient.buildUrl('/abc', {})).to.be('http://petstore.swagger.io/v2/abc');
|
||||
expect(newClient.basePath).to.be('http://petstore.swagger.io:80/v2');
|
||||
expect(newClient.buildUrl('/abc', {})).to.be('http://petstore.swagger.io:80/v2/abc');
|
||||
|
||||
newClient.basePath = 'http://example.com';
|
||||
expect(newClient.basePath).to.be('http://example.com');
|
||||
@ -102,16 +102,16 @@ describe('ApiClient', function() {
|
||||
describe('#buildUrl', function() {
|
||||
it('should work without path parameters in the path', function() {
|
||||
expect(apiClient.buildUrl('/abc', {})).to
|
||||
.be('http://petstore.swagger.io/v2/abc');
|
||||
.be('http://petstore.swagger.io:80/v2/abc');
|
||||
expect(apiClient.buildUrl('/abc/def?ok', {id: 123})).to
|
||||
.be('http://petstore.swagger.io/v2/abc/def?ok');
|
||||
.be('http://petstore.swagger.io:80/v2/abc/def?ok');
|
||||
});
|
||||
|
||||
it('should work with path parameters in the path', function() {
|
||||
expect(apiClient.buildUrl('/{id}', {id: 123})).to
|
||||
.be('http://petstore.swagger.io/v2/123');
|
||||
.be('http://petstore.swagger.io:80/v2/123');
|
||||
expect(apiClient.buildUrl('/abc/{id}/{name}?ok', {id: 456, name: 'a b'})).to.
|
||||
be('http://petstore.swagger.io/v2/abc/456/a%20b?ok');
|
||||
be('http://petstore.swagger.io:80/v2/abc/456/a%20b?ok');
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -333,7 +333,7 @@ if ($@) {
|
||||
|
||||
# DOCUMENTATION FOR API ENDPOINTS
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
@ -5,7 +5,7 @@
|
||||
use WWW::SwaggerClient::Object::FakeApi;
|
||||
```
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -5,7 +5,7 @@
|
||||
use WWW::SwaggerClient::Object::PetApi;
|
||||
```
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -5,7 +5,7 @@
|
||||
use WWW::SwaggerClient::Object::StoreApi;
|
||||
```
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -5,7 +5,7 @@
|
||||
use WWW::SwaggerClient::Object::UserApi;
|
||||
```
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -46,7 +46,7 @@ sub _new_instance
|
||||
my $class = shift;
|
||||
my (%args) = (
|
||||
'ua' => LWP::UserAgent->new,
|
||||
'base_url' => 'http://petstore.swagger.io/v2',
|
||||
'base_url' => 'http://petstore.swagger.io:80/v2',
|
||||
@_
|
||||
);
|
||||
|
||||
|
@ -71,7 +71,7 @@ try {
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Swagger\Client\FakeApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Swagger\Client\PetApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Swagger\Client\StoreApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Swagger\Client\UserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -88,7 +88,7 @@ class Configuration
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $host = 'http://petstore.swagger.io/v2';
|
||||
protected $host = 'http://petstore.swagger.io:80/v2';
|
||||
|
||||
/**
|
||||
* Timeout (second) of the HTTP request, by default set to 0, no timeout
|
||||
|
@ -65,7 +65,7 @@ except ApiException as e:
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# petstore_api.FakeApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# petstore_api.PetApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# petstore_api.StoreApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# petstore_api.UserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -45,7 +45,7 @@ class Configuration(object):
|
||||
Constructor
|
||||
"""
|
||||
# Default Base url
|
||||
self.host = "http://petstore.swagger.io/v2"
|
||||
self.host = "http://petstore.swagger.io:80/v2"
|
||||
# Default api client
|
||||
self.api_client = None
|
||||
# Temp file folder for downloading files
|
||||
|
@ -71,7 +71,7 @@ end
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Petstore::FakeApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Petstore::PetApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Petstore::StoreApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Petstore::UserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
|
@ -123,7 +123,7 @@ module Petstore
|
||||
|
||||
def initialize
|
||||
@scheme = 'http'
|
||||
@host = 'petstore.swagger.io'
|
||||
@host = 'petstore.swagger.io:80'
|
||||
@base_path = '/v2'
|
||||
@api_key = {}
|
||||
@api_key_prefix = {}
|
||||
|
@ -7,7 +7,7 @@
|
||||
import Foundation
|
||||
|
||||
open class PetstoreClientAPI {
|
||||
open static var basePath = "http://petstore.swagger.io/v2"
|
||||
open static var basePath = "http://petstore.swagger.io:80/v2"
|
||||
open static var credential: URLCredential?
|
||||
open static var customHeaders: [String:String] = [:]
|
||||
static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory()
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user