Merge remote-tracking branch 'origin/master' into 2.4.0

This commit is contained in:
wing328
2018-01-13 15:54:41 +08:00
189 changed files with 1837 additions and 1265 deletions

View File

@@ -15,7 +15,6 @@ import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.client.HttpUrlConnectorProvider;
import org.glassfish.jersey.jackson.JacksonFeature;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.media.multipart.FormDataBodyPart;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.MultiPart;
@@ -25,6 +24,7 @@ import java.io.IOException;
import java.io.InputStream;
import org.apache.commons.io.FileUtils;
import org.glassfish.jersey.filter.LoggingFilter;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
@@ -761,10 +761,7 @@ public class ApiClient {
clientConfig.register(JacksonFeature.class);
clientConfig.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true);
if (debugging) {
clientConfig.register(new LoggingFeature(java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME), java.util.logging.Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY, 1024*50 /* Log payloads up to 50K */));
clientConfig.property(LoggingFeature.LOGGING_FEATURE_VERBOSITY, LoggingFeature.Verbosity.PAYLOAD_ANY);
// Set logger to ALL
java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME).setLevel(java.util.logging.Level.ALL);
clientConfig.register(new LoggingFilter(java.util.logging.Logger.getLogger(LoggingFilter.class.getName()), true));
}
performAdditionalClientConfiguration(clientConfig);
return ClientBuilder.newClient(clientConfig);

View File

@@ -8,29 +8,19 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.api;
import io.swagger.client.ApiException;
import io.swagger.client.model.Client;
import org.joda.time.LocalDate;
import org.joda.time.DateTime;
import java.math.BigDecimal;
import io.swagger.client.model.Client;
import org.threeten.bp.LocalDate;
import org.threeten.bp.OffsetDateTime;
import io.swagger.client.model.OuterComposite;
import org.junit.Test;
import org.junit.Ignore;
import java.util.ArrayList;
import java.util.HashMap;
@@ -40,15 +30,80 @@ import java.util.Map;
/**
* API tests for FakeApi
*/
@Ignore
public class FakeApiTest {
private final FakeApi api = new FakeApi();
/**
*
*
* Test serialization of outer boolean types
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void fakeOuterBooleanSerializeTest() throws ApiException {
Boolean body = null;
Boolean response = api.fakeOuterBooleanSerialize(body);
// TODO: test validations
}
/**
*
*
* Test serialization of object with outer number type
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void fakeOuterCompositeSerializeTest() throws ApiException {
OuterComposite body = null;
OuterComposite response = api.fakeOuterCompositeSerialize(body);
// TODO: test validations
}
/**
*
*
* Test serialization of outer number types
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void fakeOuterNumberSerializeTest() throws ApiException {
BigDecimal body = null;
BigDecimal response = api.fakeOuterNumberSerialize(body);
// TODO: test validations
}
/**
*
*
* Test serialization of outer string types
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void fakeOuterStringSerializeTest() throws ApiException {
String body = null;
String response = api.fakeOuterStringSerialize(body);
// TODO: test validations
}
/**
* To test \"client\" model
*
*
* To test \"client\" model
*
* @throws ApiException
* if the Api call fails
@@ -56,7 +111,7 @@ public class FakeApiTest {
@Test
public void testClientModelTest() throws ApiException {
Client body = null;
// Client response = api.testClientModel(body);
Client response = api.testClientModel(body);
// TODO: test validations
}
@@ -82,10 +137,10 @@ public class FakeApiTest {
String string = null;
byte[] binary = null;
LocalDate date = null;
DateTime dateTime = null;
OffsetDateTime dateTime = null;
String password = null;
String paramCallback = null;
// api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
// TODO: test validations
}
@@ -93,7 +148,7 @@ public class FakeApiTest {
/**
* To test enum parameters
*
*
* To test enum parameters
*
* @throws ApiException
* if the Api call fails
@@ -106,9 +161,42 @@ public class FakeApiTest {
String enumHeaderString = null;
List<String> enumQueryStringArray = null;
String enumQueryString = null;
BigDecimal enumQueryInteger = null;
Integer enumQueryInteger = null;
Double enumQueryDouble = null;
// api.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
api.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
// TODO: test validations
}
/**
* test inline additionalProperties
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testInlineAdditionalPropertiesTest() throws ApiException {
Object param = null;
api.testInlineAdditionalProperties(param);
// TODO: test validations
}
/**
* test json serialization of form data
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testJsonFormDataTest() throws ApiException {
String param = null;
String param2 = null;
api.testJsonFormData(param, param2);
// TODO: test validations
}

View File

@@ -8,28 +8,17 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.api;
import io.swagger.client.ApiException;
import io.swagger.client.model.Pet;
import java.io.File;
import io.swagger.client.model.ModelApiResponse;
import io.swagger.client.model.Pet;
import org.junit.Test;
import org.junit.Ignore;
import java.util.ArrayList;
import java.util.HashMap;
@@ -39,6 +28,7 @@ import java.util.Map;
/**
* API tests for PetApi
*/
@Ignore
public class PetApiTest {
private final PetApi api = new PetApi();
@@ -55,7 +45,7 @@ public class PetApiTest {
@Test
public void addPetTest() throws ApiException {
Pet body = null;
// api.addPet(body);
api.addPet(body);
// TODO: test validations
}
@@ -72,7 +62,7 @@ public class PetApiTest {
public void deletePetTest() throws ApiException {
Long petId = null;
String apiKey = null;
// api.deletePet(petId, apiKey);
api.deletePet(petId, apiKey);
// TODO: test validations
}
@@ -88,7 +78,7 @@ public class PetApiTest {
@Test
public void findPetsByStatusTest() throws ApiException {
List<String> status = null;
// List<Pet> response = api.findPetsByStatus(status);
List<Pet> response = api.findPetsByStatus(status);
// TODO: test validations
}
@@ -104,7 +94,7 @@ public class PetApiTest {
@Test
public void findPetsByTagsTest() throws ApiException {
List<String> tags = null;
// List<Pet> response = api.findPetsByTags(tags);
List<Pet> response = api.findPetsByTags(tags);
// TODO: test validations
}
@@ -120,7 +110,7 @@ public class PetApiTest {
@Test
public void getPetByIdTest() throws ApiException {
Long petId = null;
// Pet response = api.getPetById(petId);
Pet response = api.getPetById(petId);
// TODO: test validations
}
@@ -136,7 +126,7 @@ public class PetApiTest {
@Test
public void updatePetTest() throws ApiException {
Pet body = null;
// api.updatePet(body);
api.updatePet(body);
// TODO: test validations
}
@@ -154,7 +144,7 @@ public class PetApiTest {
Long petId = null;
String name = null;
String status = null;
// api.updatePetWithForm(petId, name, status);
api.updatePetWithForm(petId, name, status);
// TODO: test validations
}
@@ -172,7 +162,7 @@ public class PetApiTest {
Long petId = null;
String additionalMetadata = null;
File file = null;
// ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file);
ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file);
// TODO: test validations
}

View File

@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@@ -28,6 +16,7 @@ package io.swagger.client.api;
import io.swagger.client.ApiException;
import io.swagger.client.model.Order;
import org.junit.Test;
import org.junit.Ignore;
import java.util.ArrayList;
import java.util.HashMap;
@@ -37,6 +26,7 @@ import java.util.Map;
/**
* API tests for StoreApi
*/
@Ignore
public class StoreApiTest {
private final StoreApi api = new StoreApi();
@@ -53,7 +43,7 @@ public class StoreApiTest {
@Test
public void deleteOrderTest() throws ApiException {
String orderId = null;
// api.deleteOrder(orderId);
api.deleteOrder(orderId);
// TODO: test validations
}
@@ -68,7 +58,7 @@ public class StoreApiTest {
*/
@Test
public void getInventoryTest() throws ApiException {
// Map<String, Integer> response = api.getInventory();
Map<String, Integer> response = api.getInventory();
// TODO: test validations
}
@@ -84,7 +74,7 @@ public class StoreApiTest {
@Test
public void getOrderByIdTest() throws ApiException {
Long orderId = null;
// Order response = api.getOrderById(orderId);
Order response = api.getOrderById(orderId);
// TODO: test validations
}
@@ -100,7 +90,7 @@ public class StoreApiTest {
@Test
public void placeOrderTest() throws ApiException {
Order body = null;
// Order response = api.placeOrder(body);
Order response = api.placeOrder(body);
// TODO: test validations
}

View File

@@ -8,18 +8,6 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@@ -28,6 +16,7 @@ package io.swagger.client.api;
import io.swagger.client.ApiException;
import io.swagger.client.model.User;
import org.junit.Test;
import org.junit.Ignore;
import java.util.ArrayList;
import java.util.HashMap;
@@ -37,6 +26,7 @@ import java.util.Map;
/**
* API tests for UserApi
*/
@Ignore
public class UserApiTest {
private final UserApi api = new UserApi();
@@ -53,7 +43,7 @@ public class UserApiTest {
@Test
public void createUserTest() throws ApiException {
User body = null;
// api.createUser(body);
api.createUser(body);
// TODO: test validations
}
@@ -69,7 +59,7 @@ public class UserApiTest {
@Test
public void createUsersWithArrayInputTest() throws ApiException {
List<User> body = null;
// api.createUsersWithArrayInput(body);
api.createUsersWithArrayInput(body);
// TODO: test validations
}
@@ -85,7 +75,7 @@ public class UserApiTest {
@Test
public void createUsersWithListInputTest() throws ApiException {
List<User> body = null;
// api.createUsersWithListInput(body);
api.createUsersWithListInput(body);
// TODO: test validations
}
@@ -101,7 +91,7 @@ public class UserApiTest {
@Test
public void deleteUserTest() throws ApiException {
String username = null;
// api.deleteUser(username);
api.deleteUser(username);
// TODO: test validations
}
@@ -117,7 +107,7 @@ public class UserApiTest {
@Test
public void getUserByNameTest() throws ApiException {
String username = null;
// User response = api.getUserByName(username);
User response = api.getUserByName(username);
// TODO: test validations
}
@@ -134,7 +124,7 @@ public class UserApiTest {
public void loginUserTest() throws ApiException {
String username = null;
String password = null;
// String response = api.loginUser(username, password);
String response = api.loginUser(username, password);
// TODO: test validations
}
@@ -149,7 +139,7 @@ public class UserApiTest {
*/
@Test
public void logoutUserTest() throws ApiException {
// api.logoutUser();
api.logoutUser();
// TODO: test validations
}
@@ -166,7 +156,7 @@ public class UserApiTest {
public void updateUserTest() throws ApiException {
String username = null;
User body = null;
// api.updateUser(username, body);
api.updateUser(username, body);
// TODO: test validations
}