Updating samples after #5232. (#5243)

* 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:
Paŭlo Ebermann
2017-03-29 19:28:53 +02:00
committed by wing328
parent 2830fb1794
commit db71d97370
108 changed files with 129 additions and 129 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -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());
}
}

View File

@@ -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());
}