diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ObjcClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ObjcClientCodegen.java index 56e61cf54e7..519693adcaa 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ObjcClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ObjcClientCodegen.java @@ -249,12 +249,12 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig { if (typeMapping.containsKey(swaggerType)) { type = typeMapping.get(swaggerType); if (languageSpecificPrimitives.contains(type) && !foundationClasses.contains(type)) { - return toModelName(type); + return toModelNameWithoutReservedWordCheck(type); } } else { type = swaggerType; } - return toModelName(type); + return toModelNameWithoutReservedWordCheck(type); } @Override @@ -314,6 +314,23 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig { @Override public String toModelName(String type) { + // model name cannot use reserved keyword + if (reservedWords.contains(type)) { + LOGGER.warn(type+ " (reserved word) cannot be used as model name. Renamed to " + ("object_" + type) + " before further processing"); + type = "object_" + type; // e.g. return => ObjectReturn (after camelize) + } + + return toModelNameWithoutReservedWordCheck(type); + } + + /* + * Convert input to proper model name according to ObjC style guide + * without checking for reserved words + * + * @param type Model anme + * @return model Name in ObjC style guide + */ + public String toModelNameWithoutReservedWordCheck(String type) { type = type.replaceAll("[^0-9a-zA-Z_]", "_"); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'. // language build-in classes @@ -425,7 +442,8 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig { // method name cannot use reserved keyword, e.g. return if (reservedWords.contains(operationId)) { - throw new RuntimeException(operationId + " (reserved word) cannot be used as method name"); + LOGGER.warn(operationId + " (reserved word) cannot be used as method name. Renamed to " + camelize(sanitizeName("call_" + operationId), true)); + operationId = "call_" + operationId; } return camelize(sanitizeName(operationId), true); diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PythonClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PythonClientCodegen.java index 40d8bca49dc..8b353a88d66 100755 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PythonClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PythonClientCodegen.java @@ -219,7 +219,8 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig // model name cannot use reserved keyword, e.g. return if (reservedWords.contains(name)) { - throw new RuntimeException(name + " (reserved word) cannot be used as a model name"); + LOGGER.warn(name + " (reserved word) cannot be used as model name. Renamed to " + camelize("object_" + name)); + name = "object_" + name; // e.g. return => ObjectReturn (after camelize) } // camelize the model name @@ -231,7 +232,8 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig public String toModelFilename(String name) { // model name cannot use reserved keyword, e.g. return if (reservedWords.contains(name)) { - throw new RuntimeException(name + " (reserved word) cannot be used as a model name"); + LOGGER.warn(name + " (reserved word) cannot be used as model filename. Renamed to " + underscore(dropDots("object_" + name))); + name = "object_" + name; // e.g. return => ObjectReturn (after camelize) } // underscore the model file name @@ -267,14 +269,15 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig @Override public String toOperationId(String operationId) { - // throw exception if method name is empty + // throw exception if method name is empty (should not occur as an auto-generated method name will be used) if (StringUtils.isEmpty(operationId)) { throw new RuntimeException("Empty method name (operationId) not allowed"); } // method name cannot use reserved keyword, e.g. return if (reservedWords.contains(operationId)) { - throw new RuntimeException(operationId + " (reserved word) cannot be used as method name"); + LOGGER.warn(operationId + " (reserved word) cannot be used as method name. Renamed to " + underscore(sanitizeName("call_" + operationId))); + operationId = "call_" + operationId; } return underscore(sanitizeName(operationId)); diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/python/PythonTest.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/python/PythonTest.java index d57b445b9c2..5478200ca9c 100644 --- a/modules/swagger-codegen/src/test/java/io/swagger/codegen/python/PythonTest.java +++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/python/PythonTest.java @@ -2,14 +2,28 @@ package io.swagger.codegen.python; import io.swagger.codegen.CodegenModel; import io.swagger.codegen.CodegenOperation; +import io.swagger.codegen.CodegenProperty; import io.swagger.codegen.DefaultCodegen; import io.swagger.codegen.languages.PythonClientCodegen; +import io.swagger.models.ArrayModel; +import io.swagger.models.Model; +import io.swagger.models.ModelImpl; import io.swagger.models.Operation; import io.swagger.models.Swagger; +import io.swagger.models.properties.ArrayProperty; +import io.swagger.models.properties.DateTimeProperty; +import io.swagger.models.properties.LongProperty; +import io.swagger.models.properties.MapProperty; +import io.swagger.models.properties.RefProperty; +import io.swagger.models.properties.StringProperty; import io.swagger.parser.SwaggerParser; import org.testng.Assert; import org.testng.annotations.Test; +import org.testng.annotations.ITestAnnotation; + +import com.google.common.collect.Sets; +import java.util.Map; @SuppressWarnings("static-method") public class PythonTest { @@ -35,4 +49,232 @@ public class PythonTest { Assert.assertEquals(codegenOperation.returnType, "V1beta3Binding"); Assert.assertEquals(codegenOperation.returnBaseType, "V1beta3Binding"); } + + @Test(description = "convert a simple java model") + public void simpleModelTest() { + final Model model = new ModelImpl() + .description("a sample model") + .property("id", new LongProperty()) + .property("name", new StringProperty()) + .property("createdAt", new DateTimeProperty()) + .required("id") + .required("name"); + final DefaultCodegen codegen = new PythonClientCodegen(); + final CodegenModel cm = codegen.fromModel("sample", model); + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "a sample model"); + Assert.assertEquals(cm.vars.size(), 3); + + final CodegenProperty property1 = cm.vars.get(0); + Assert.assertEquals(property1.baseName, "id"); + Assert.assertEquals(property1.datatype, "int"); + Assert.assertEquals(property1.name, "id"); + Assert.assertNull(property1.defaultValue); + Assert.assertEquals(property1.baseType, "int"); + Assert.assertTrue(property1.hasMore); + Assert.assertTrue(property1.required); + Assert.assertTrue(property1.isPrimitiveType); + Assert.assertTrue(property1.isNotContainer); + + final CodegenProperty property2 = cm.vars.get(1); + Assert.assertEquals(property2.baseName, "name"); + Assert.assertEquals(property2.datatype, "str"); + Assert.assertEquals(property2.name, "name"); + Assert.assertNull(property2.defaultValue); + Assert.assertEquals(property2.baseType, "str"); + Assert.assertTrue(property2.hasMore); + Assert.assertTrue(property2.required); + Assert.assertTrue(property2.isPrimitiveType); + Assert.assertTrue(property2.isNotContainer); + + final CodegenProperty property3 = cm.vars.get(2); + Assert.assertEquals(property3.baseName, "createdAt"); + Assert.assertEquals(property3.datatype, "datetime"); + Assert.assertEquals(property3.name, "created_at"); + Assert.assertNull(property3.defaultValue); + Assert.assertEquals(property3.baseType, "datetime"); + Assert.assertNull(property3.hasMore); + Assert.assertNull(property3.required); + Assert.assertTrue(property3.isNotContainer); + } + + @Test(description = "convert a model with list property") + public void listPropertyTest() { + final Model model = new ModelImpl() + .description("a sample model") + .property("id", new LongProperty()) + .property("urls", new ArrayProperty() + .items(new StringProperty())) + .required("id"); + final DefaultCodegen codegen = new PythonClientCodegen(); + final CodegenModel cm = codegen.fromModel("sample", model); + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "a sample model"); + Assert.assertEquals(cm.vars.size(), 2); + + final CodegenProperty property1 = cm.vars.get(0); + Assert.assertEquals(property1.baseName, "id"); + Assert.assertEquals(property1.datatype, "int"); + Assert.assertEquals(property1.name, "id"); + Assert.assertNull(property1.defaultValue); + Assert.assertEquals(property1.baseType, "int"); + Assert.assertTrue(property1.hasMore); + Assert.assertTrue(property1.required); + Assert.assertTrue(property1.isPrimitiveType); + Assert.assertTrue(property1.isNotContainer); + + final CodegenProperty property2 = cm.vars.get(1); + Assert.assertEquals(property2.baseName, "urls"); + Assert.assertEquals(property2.datatype, "list[str]"); + Assert.assertEquals(property2.name, "urls"); + Assert.assertNull(property2.defaultValue); + Assert.assertEquals(property2.baseType, "list"); + Assert.assertNull(property2.hasMore); + Assert.assertEquals(property2.containerType, "array"); + Assert.assertNull(property2.required); + Assert.assertTrue(property2.isPrimitiveType); + Assert.assertTrue(property2.isContainer); + } + + @Test(description = "convert a model with a map property") + public void mapPropertyTest() { + final Model model = new ModelImpl() + .description("a sample model") + .property("translations", new MapProperty() + .additionalProperties(new StringProperty())) + .required("id"); + final DefaultCodegen codegen = new PythonClientCodegen(); + final CodegenModel cm = codegen.fromModel("sample", model); + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "a sample model"); + Assert.assertEquals(cm.vars.size(), 1); + + final CodegenProperty property1 = cm.vars.get(0); + Assert.assertEquals(property1.baseName, "translations"); + Assert.assertEquals(property1.datatype, "dict(str, str)"); + Assert.assertEquals(property1.name, "translations"); + Assert.assertEquals(property1.baseType, "dict"); + Assert.assertEquals(property1.containerType, "map"); + Assert.assertNull(property1.required); + Assert.assertTrue(property1.isContainer); + Assert.assertTrue(property1.isPrimitiveType); + } + + @Test(description = "convert a model with complex property") + public void complexPropertyTest() { + final Model model = new ModelImpl() + .description("a sample model") + .property("children", new RefProperty("#/definitions/Children")); + final DefaultCodegen codegen = new PythonClientCodegen(); + final CodegenModel cm = codegen.fromModel("sample", model); + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "a sample model"); + Assert.assertEquals(cm.vars.size(), 1); + + final CodegenProperty property1 = cm.vars.get(0); + Assert.assertEquals(property1.baseName, "children"); + Assert.assertEquals(property1.datatype, "Children"); + Assert.assertEquals(property1.name, "children"); + Assert.assertEquals(property1.baseType, "Children"); + Assert.assertNull(property1.required); + Assert.assertTrue(property1.isNotContainer); + } + + @Test(description = "convert a model with complex list property") + public void complexListPropertyTest() { + final Model model = new ModelImpl() + .description("a sample model") + .property("children", new ArrayProperty() + .items(new RefProperty("#/definitions/Children"))); + final DefaultCodegen codegen = new PythonClientCodegen(); + final CodegenModel cm = codegen.fromModel("sample", model); + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "a sample model"); + Assert.assertEquals(cm.vars.size(), 1); + + final CodegenProperty property1 = cm.vars.get(0); + Assert.assertEquals(property1.baseName, "children"); + Assert.assertEquals(property1.complexType, "Children"); + Assert.assertEquals(property1.datatype, "list[Children]"); + Assert.assertEquals(property1.name, "children"); + Assert.assertEquals(property1.baseType, "list"); + Assert.assertEquals(property1.containerType, "array"); + Assert.assertNull(property1.required); + Assert.assertTrue(property1.isContainer); + } + + @Test(description = "convert a model with complex map property") + public void complexMapPropertyTest() { + final Model model = new ModelImpl() + .description("a sample model") + .property("children", new MapProperty() + .additionalProperties(new RefProperty("#/definitions/Children"))); + final DefaultCodegen codegen = new PythonClientCodegen(); + final CodegenModel cm = codegen.fromModel("sample", model); + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "a sample model"); + Assert.assertEquals(cm.vars.size(), 1); + Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("Children")).size(), 1); + + final CodegenProperty property1 = cm.vars.get(0); + Assert.assertEquals(property1.baseName, "children"); + Assert.assertEquals(property1.complexType, "Children"); + Assert.assertEquals(property1.datatype, "dict(str, Children)"); + Assert.assertEquals(property1.name, "children"); + Assert.assertEquals(property1.baseType, "dict"); + Assert.assertEquals(property1.containerType, "map"); + Assert.assertNull(property1.required); + Assert.assertTrue(property1.isContainer); + Assert.assertNull(property1.isNotContainer); + } + + + // should not start with 'null'. need help from the community to investigate further + @Test(enabled = false, description = "convert an array model") + public void arrayModelTest() { + final Model model = new ArrayModel() + .description("an array model") + .items(new RefProperty("#/definitions/Children")); + final DefaultCodegen codegen = new PythonClientCodegen(); + final CodegenModel cm = codegen.fromModel("sample", model); + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "an array model"); + Assert.assertEquals(cm.vars.size(), 0); + Assert.assertEquals(cm.parent, "null"); + Assert.assertEquals(cm.imports.size(), 1); + Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("Children")).size(), 1); + } + + // should not start with 'null'. need help from the community to investigate further + @Test(enabled = false, description = "convert an map model") + public void mapModelTest() { + final Model model = new ModelImpl() + .description("a map model") + .additionalProperties(new RefProperty("#/definitions/Children")); + final DefaultCodegen codegen = new PythonClientCodegen(); + final CodegenModel cm = codegen.fromModel("sample", model); + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "a map model"); + Assert.assertEquals(cm.vars.size(), 0); + Assert.assertEquals(cm.parent, "null"); + Assert.assertEquals(cm.imports.size(), 2); // TODO: need to verify + Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("Children")).size(), 1); + } + } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetApiTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetApiTests.cs index a7caec2f54c..7e3566eb04b 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetApiTests.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetApiTests.cs @@ -156,15 +156,15 @@ namespace IO.Swagger.Test } /// - /// Test GetPetByIdWithByteArray + /// Test PetPetIdtestingByteArraytrueGet /// [Test] - public void GetPetByIdWithByteArrayTest() + public void PetPetIdtestingByteArraytrueGetTest() { - // TODO: add unit test for the method 'GetPetByIdWithByteArray' + // TODO: add unit test for the method 'PetPetIdtestingByteArraytrueGet' long? petId = null; // TODO: replace null with proper value - var response = instance.GetPetByIdWithByteArray(petId); + var response = instance.PetPetIdtestingByteArraytrueGet(petId); Assert.IsInstanceOf (response, "response is byte[]"); } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs index 5ef6e286a8d..2b44e177625 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs @@ -212,7 +212,7 @@ namespace IO.Swagger.Api /// Thrown when fails to make API call /// ID of pet that needs to be fetched /// byte[] - byte[] GetPetByIdWithByteArray (long? petId); + byte[] PetPetIdtestingByteArraytrueGet (long? petId); /// /// Fake endpoint to test byte array return by 'Find pet by ID' @@ -223,7 +223,7 @@ namespace IO.Swagger.Api /// Thrown when fails to make API call /// ID of pet that needs to be fetched /// ApiResponse of byte[] - ApiResponse GetPetByIdWithByteArrayWithHttpInfo (long? petId); + ApiResponse PetPetIdtestingByteArraytrueGetWithHttpInfo (long? petId); /// /// Fake endpoint to test byte array in body parameter for adding a new pet to the store @@ -446,7 +446,7 @@ namespace IO.Swagger.Api /// Thrown when fails to make API call /// ID of pet that needs to be fetched /// Task of byte[] - System.Threading.Tasks.Task GetPetByIdWithByteArrayAsync (long? petId); + System.Threading.Tasks.Task PetPetIdtestingByteArraytrueGetAsync (long? petId); /// /// Fake endpoint to test byte array return by 'Find pet by ID' @@ -457,7 +457,7 @@ namespace IO.Swagger.Api /// Thrown when fails to make API call /// ID of pet that needs to be fetched /// Task of ApiResponse (byte[]) - System.Threading.Tasks.Task> GetPetByIdWithByteArrayAsyncWithHttpInfo (long? petId); + System.Threading.Tasks.Task> PetPetIdtestingByteArraytrueGetAsyncWithHttpInfo (long? petId); /// /// Fake endpoint to test byte array in body parameter for adding a new pet to the store @@ -1972,9 +1972,9 @@ namespace IO.Swagger.Api /// Thrown when fails to make API call /// ID of pet that needs to be fetched /// byte[] - public byte[] GetPetByIdWithByteArray (long? petId) + public byte[] PetPetIdtestingByteArraytrueGet (long? petId) { - ApiResponse response = GetPetByIdWithByteArrayWithHttpInfo(petId); + ApiResponse response = PetPetIdtestingByteArraytrueGetWithHttpInfo(petId); return response.Data; } @@ -1984,12 +1984,12 @@ namespace IO.Swagger.Api /// Thrown when fails to make API call /// ID of pet that needs to be fetched /// ApiResponse of byte[] - public ApiResponse< byte[] > GetPetByIdWithByteArrayWithHttpInfo (long? petId) + public ApiResponse< byte[] > PetPetIdtestingByteArraytrueGetWithHttpInfo (long? petId) { // verify the required parameter 'petId' is set if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->GetPetByIdWithByteArray"); + throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->PetPetIdtestingByteArraytrueGet"); var path_ = "/pet/{petId}?testing_byte_array=true"; @@ -2048,9 +2048,9 @@ namespace IO.Swagger.Api int statusCode = (int) response.StatusCode; if (statusCode >= 400) - throw new ApiException (statusCode, "Error calling GetPetByIdWithByteArray: " + response.Content, response.Content); + throw new ApiException (statusCode, "Error calling PetPetIdtestingByteArraytrueGet: " + response.Content, response.Content); else if (statusCode == 0) - throw new ApiException (statusCode, "Error calling GetPetByIdWithByteArray: " + response.ErrorMessage, response.ErrorMessage); + throw new ApiException (statusCode, "Error calling PetPetIdtestingByteArraytrueGet: " + response.ErrorMessage, response.ErrorMessage); return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), @@ -2065,9 +2065,9 @@ namespace IO.Swagger.Api /// Thrown when fails to make API call /// ID of pet that needs to be fetched /// Task of byte[] - public async System.Threading.Tasks.Task GetPetByIdWithByteArrayAsync (long? petId) + public async System.Threading.Tasks.Task PetPetIdtestingByteArraytrueGetAsync (long? petId) { - ApiResponse response = await GetPetByIdWithByteArrayAsyncWithHttpInfo(petId); + ApiResponse response = await PetPetIdtestingByteArraytrueGetAsyncWithHttpInfo(petId); return response.Data; } @@ -2078,10 +2078,10 @@ namespace IO.Swagger.Api /// Thrown when fails to make API call /// ID of pet that needs to be fetched /// Task of ApiResponse (byte[]) - public async System.Threading.Tasks.Task> GetPetByIdWithByteArrayAsyncWithHttpInfo (long? petId) + public async System.Threading.Tasks.Task> PetPetIdtestingByteArraytrueGetAsyncWithHttpInfo (long? petId) { // verify the required parameter 'petId' is set - if (petId == null) throw new ApiException(400, "Missing required parameter 'petId' when calling GetPetByIdWithByteArray"); + if (petId == null) throw new ApiException(400, "Missing required parameter 'petId' when calling PetPetIdtestingByteArraytrueGet"); var path_ = "/pet/{petId}?testing_byte_array=true"; @@ -2142,9 +2142,9 @@ namespace IO.Swagger.Api int statusCode = (int) response.StatusCode; if (statusCode >= 400) - throw new ApiException (statusCode, "Error calling GetPetByIdWithByteArray: " + response.Content, response.Content); + throw new ApiException (statusCode, "Error calling PetPetIdtestingByteArraytrueGet: " + response.Content, response.Content); else if (statusCode == 0) - throw new ApiException (statusCode, "Error calling GetPetByIdWithByteArray: " + response.ErrorMessage, response.ErrorMessage); + throw new ApiException (statusCode, "Error calling PetPetIdtestingByteArraytrueGet: " + response.ErrorMessage, response.ErrorMessage); return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), diff --git a/samples/client/petstore/objc/SwaggerClient/SWGApiClient.m b/samples/client/petstore/objc/SwaggerClient/SWGApiClient.m index 0b9d509809e..5792adaca2e 100644 --- a/samples/client/petstore/objc/SwaggerClient/SWGApiClient.m +++ b/samples/client/petstore/objc/SwaggerClient/SWGApiClient.m @@ -136,7 +136,8 @@ static void (^reachabilityChangeBlock)(int); NSMutableArray *lowerAccepts = [[NSMutableArray alloc] initWithCapacity:[accepts count]]; for (NSString *string in accepts) { NSString * lowerAccept = [string lowercaseString]; - if ([lowerAccept containsString:@"application/json"]) { + // use rangeOfString instead of containsString for iOS 7 support + if ([lowerAccept rangeOfString:@"application/json"].location != NSNotFound) { return @"application/json"; } [lowerAccepts addObject:lowerAccept]; diff --git a/samples/client/petstore/objc/SwaggerClient/SWGConfiguration.m b/samples/client/petstore/objc/SwaggerClient/SWGConfiguration.m index 16ce311c59e..abe60d76a38 100644 --- a/samples/client/petstore/objc/SwaggerClient/SWGConfiguration.m +++ b/samples/client/petstore/objc/SwaggerClient/SWGConfiguration.m @@ -107,6 +107,13 @@ - (NSDictionary *) authSettings { return @{ + @"test_api_key_header": + @{ + @"type": @"api_key", + @"in": @"header", + @"key": @"test_api_key_header", + @"value": [self getApiKeyWithPrefix:@"test_api_key_header"] + }, @"api_key": @{ @"type": @"api_key", @@ -114,6 +121,27 @@ @"key": @"api_key", @"value": [self getApiKeyWithPrefix:@"api_key"] }, + @"test_api_client_secret": + @{ + @"type": @"api_key", + @"in": @"header", + @"key": @"x-test_api_client_secret", + @"value": [self getApiKeyWithPrefix:@"x-test_api_client_secret"] + }, + @"test_api_client_id": + @{ + @"type": @"api_key", + @"in": @"header", + @"key": @"x-test_api_client_id", + @"value": [self getApiKeyWithPrefix:@"x-test_api_client_id"] + }, + @"test_api_key_query": + @{ + @"type": @"api_key", + @"in": @"query", + @"key": @"test_api_key_query", + @"value": [self getApiKeyWithPrefix:@"test_api_key_query"] + }, }; } diff --git a/samples/client/petstore/objc/SwaggerClient/SWGPetApi.h b/samples/client/petstore/objc/SwaggerClient/SWGPetApi.h index 505e54eefd6..3e3c99fb65b 100644 --- a/samples/client/petstore/objc/SwaggerClient/SWGPetApi.h +++ b/samples/client/petstore/objc/SwaggerClient/SWGPetApi.h @@ -142,7 +142,7 @@ /// /// /// @return NSString* --(NSNumber*) getPetByIdWithByteArrayWithPetId: (NSNumber*) petId +-(NSNumber*) petPetIdtestingByteArraytrueGetWithPetId: (NSNumber*) petId completionHandler: (void (^)(NSString* output, NSError* error)) handler; diff --git a/samples/client/petstore/objc/SwaggerClient/SWGPetApi.m b/samples/client/petstore/objc/SwaggerClient/SWGPetApi.m index c18b8a4a416..fc128051447 100644 --- a/samples/client/petstore/objc/SwaggerClient/SWGPetApi.m +++ b/samples/client/petstore/objc/SwaggerClient/SWGPetApi.m @@ -436,7 +436,7 @@ static SWGPetApi* singletonAPI = nil; NSString *requestContentType = [SWGApiClient selectHeaderContentType:@[]]; // Authentication setting - NSArray *authSettings = @[@"api_key"]; + NSArray *authSettings = @[@"api_key", @"petstore_auth"]; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; @@ -760,13 +760,13 @@ static SWGPetApi* singletonAPI = nil; /// /// @returns NSString* /// --(NSNumber*) getPetByIdWithByteArrayWithPetId: (NSNumber*) petId +-(NSNumber*) petPetIdtestingByteArraytrueGetWithPetId: (NSNumber*) petId completionHandler: (void (^)(NSString* output, NSError* error)) handler { // verify the required parameter 'petId' is set if (petId == nil) { - [NSException raise:@"Invalid parameter" format:@"Missing the required parameter `petId` when calling `getPetByIdWithByteArray`"]; + [NSException raise:@"Invalid parameter" format:@"Missing the required parameter `petId` when calling `petPetIdtestingByteArraytrueGet`"]; } @@ -808,7 +808,7 @@ static SWGPetApi* singletonAPI = nil; NSString *requestContentType = [SWGApiClient selectHeaderContentType:@[]]; // Authentication setting - NSArray *authSettings = @[@"api_key"]; + NSArray *authSettings = @[@"api_key", @"petstore_auth"]; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; diff --git a/samples/client/petstore/objc/SwaggerClient/SWGStoreApi.m b/samples/client/petstore/objc/SwaggerClient/SWGStoreApi.m index 8e97946295c..ba5bc29d23f 100644 --- a/samples/client/petstore/objc/SwaggerClient/SWGStoreApi.m +++ b/samples/client/petstore/objc/SwaggerClient/SWGStoreApi.m @@ -189,7 +189,7 @@ static SWGStoreApi* singletonAPI = nil; NSString *requestContentType = [SWGApiClient selectHeaderContentType:@[]]; // Authentication setting - NSArray *authSettings = @[]; + NSArray *authSettings = @[@"test_api_client_id", @"test_api_client_secret"]; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; @@ -272,7 +272,7 @@ static SWGStoreApi* singletonAPI = nil; NSString *requestContentType = [SWGApiClient selectHeaderContentType:@[]]; // Authentication setting - NSArray *authSettings = @[]; + NSArray *authSettings = @[@"test_api_key_header", @"test_api_key_query"]; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; diff --git a/samples/client/petstore/python/.coverage b/samples/client/petstore/python/.coverage index 4cd98e43d2c..54e43c2a8f1 100644 --- a/samples/client/petstore/python/.coverage +++ b/samples/client/petstore/python/.coverage @@ -1 +1 @@ -!coverage.py: This is a private format, don't read it directly!{"lines": {"/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/apis/pet_api.py": [512, 513, 514, 683, 516, 86, 18, 20, 22, 23, 26, 539, 28, 29, 542, 543, 32, 548, 37, 39, 40, 41, 42, 555, 556, 45, 558, 559, 560, 562, 564, 565, 566, 265, 568, 569, 571, 574, 575, 576, 580, 581, 70, 584, 73, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 598, 88, 90, 92, 93, 95, 96, 97, 100, 101, 102, 106, 107, 621, 622, 624, 625, 626, 79, 116, 117, 118, 631, 632, 121, 122, 635, 124, 638, 639, 641, 642, 643, 645, 647, 649, 650, 651, 652, 653, 654, 656, 145, 146, 659, 148, 661, 150, 665, 666, 155, 156, 538, 159, 160, 673, 162, 675, 164, 677, 166, 679, 168, 169, 171, 172, 173, 541, 176, 177, 178, 115, 182, 183, 186, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 200, 119, 120, 377, 221, 222, 549, 224, 225, 226, 231, 232, 431, 235, 236, 110, 238, 240, 552, 242, 244, 246, 247, 249, 762, 383, 252, 253, 254, 258, 259, 262, 264, 44, 266, 267, 268, 269, 270, 271, 272, 273, 274, 276, 46, 48, 297, 298, 300, 301, 302, 307, 308, 311, 312, 314, 316, 317, 318, 320, 322, 323, 325, 113, 328, 329, 330, 334, 335, 338, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 485, 352, 84, 114, 373, 374, 376, 660, 378, 149, 384, 387, 390, 391, 393, 394, 395, 397, 399, 401, 402, 404, 407, 408, 409, 413, 414, 69, 417, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 669, 72, 241, 671, 74, 672, 83, 454, 455, 457, 458, 459, 674, 112, 464, 465, 468, 471, 472, 676, 474, 475, 476, 478, 480, 80, 482, 483, 484, 678, 486, 487, 489, 492, 493, 494, 680, 498, 499, 502, 681, 504, 505, 506, 507, 508, 509, 510, 511], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/models/category.py": [128, 134, 72, 74, 109, 19, 21, 22, 104, 25, 29, 30, 96, 100, 114, 102, 39, 40, 41, 103, 44, 45, 46, 112, 49, 50, 83, 116, 94, 52, 122, 61, 85, 63], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/models/tag.py": [128, 132, 134, 72, 74, 109, 19, 21, 22, 104, 25, 29, 30, 96, 100, 114, 102, 39, 40, 41, 103, 44, 45, 46, 112, 49, 50, 83, 116, 94, 52, 122, 61, 85, 63], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/__init__.py": [1, 4, 5, 6, 7, 8, 11, 12, 13, 16, 18, 20], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/models/pet.py": [128, 130, 150, 172, 139, 141, 19, 215, 21, 22, 152, 25, 29, 30, 161, 163, 39, 40, 41, 42, 43, 44, 45, 174, 48, 49, 50, 51, 52, 53, 54, 183, 57, 58, 59, 60, 61, 62, 64, 194, 195, 200, 73, 202, 75, 206, 208, 209, 210, 211, 84, 213, 86, 185, 216, 218, 220, 222, 95, 97, 226, 228, 234, 108, 238, 240, 117, 119, 212, 106], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/configuration.py": [135, 136, 137, 138, 139, 142, 19, 149, 22, 23, 25, 26, 27, 29, 158, 31, 32, 34, 36, 37, 39, 40, 41, 170, 43, 172, 46, 47, 189, 179, 52, 54, 59, 61, 190, 63, 192, 224, 67, 69, 71, 200, 73, 204, 80, 81, 82, 84, 213, 86, 199, 88, 90, 219, 92, 221, 222, 223, 96, 225, 98, 100, 102, 230, 104, 167, 111, 76, 168, 157, 122, 123, 42, 21], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/models/order.py": [130, 172, 141, 173, 19, 21, 22, 152, 25, 29, 30, 52, 161, 163, 39, 40, 41, 42, 43, 44, 45, 174, 175, 48, 49, 50, 51, 180, 53, 54, 57, 58, 59, 60, 61, 62, 191, 64, 202, 75, 86, 176, 222, 97, 228, 178, 234, 108, 240, 119], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/api_client.py": [512, 520, 527, 528, 529, 19, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, 550, 40, 42, 44, 560, 49, 52, 568, 570, 571, 572, 573, 574, 575, 577, 68, 69, 74, 75, 76, 78, 79, 81, 82, 84, 86, 93, 98, 100, 104, 105, 106, 109, 110, 111, 113, 114, 117, 118, 119, 120, 121, 122, 125, 126, 127, 128, 131, 132, 133, 136, 139, 140, 143, 146, 147, 148, 149, 151, 154, 155, 157, 159, 160, 162, 539, 164, 173, 174, 176, 178, 193, 194, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 207, 214, 215, 216, 548, 218, 219, 221, 549, 233, 237, 238, 242, 244, 253, 254, 256, 257, 258, 259, 260, 262, 263, 264, 265, 269, 270, 271, 274, 276, 277, 278, 280, 281, 282, 283, 285, 288, 289, 290, 318, 319, 320, 321, 322, 324, 325, 326, 327, 328, 329, 330, 331, 332, 334, 335, 339, 340, 341, 342, 343, 347, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 371, 372, 373, 374, 381, 389, 391, 392, 394, 395, 396, 397, 399, 400, 401, 402, 403, 404, 406, 408, 415, 416, 418, 420, 421, 423, 425, 432, 433, 435, 437, 438, 440, 442, 450, 452, 455, 456, 457, 458, 460, 461, 469, 495, 504, 505, 510], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/apis/__init__.py": [1, 4, 5, 6], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/apis/store_api.py": [18, 276, 22, 23, 26, 28, 29, 197, 32, 37, 39, 40, 41, 44, 46, 48, 20, 68, 69, 71, 72, 79, 82, 83, 85, 87, 89, 91, 92, 94, 97, 98, 99, 103, 104, 107, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 121], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/models/user.py": [278, 70, 136, 202, 272, 81, 147, 213, 22, 25, 92, 29, 158, 224, 103, 169, 235, 284, 114, 19, 180, 30, 246, 266, 191, 125, 21], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/apis/user_api.py": [32, 355, 37, 39, 200, 124, 428, 589, 48, 18, 20, 22, 23, 276, 26, 507, 28, 29], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/models/__init__.py": [1, 4, 5, 6, 7, 8], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/rest.py": [20, 21, 23, 24, 25, 26, 27, 28, 31, 33, 35, 36, 40, 42, 48, 51, 53, 54, 55, 56, 57, 59, 63, 65, 72, 74, 82, 83, 88, 92, 95, 98, 101, 102, 103, 104, 105, 106, 109, 110, 121, 122, 124, 129, 130, 132, 135, 137, 138, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 152, 153, 154, 155, 156, 159, 160, 161, 166, 170, 171, 174, 176, 177, 179, 181, 182, 183, 184, 186, 191, 198, 199, 200, 201, 203, 204, 205, 206, 207, 208, 210, 211, 212, 213, 214, 215, 217, 225, 227, 228, 229, 230, 231, 232, 239, 243, 244, 245, 246, 248, 249, 251]}} \ No newline at end of file +!coverage.py: This is a private format, don't read it directly!{"lines": {"/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/rest.py": [20, 21, 23, 24, 25, 26, 27, 28, 31, 33, 35, 36, 40, 42, 48, 51, 53, 54, 55, 56, 57, 59, 63, 65, 72, 74, 82, 83, 88, 92, 95, 98, 101, 102, 103, 104, 105, 106, 109, 110, 121, 122, 124, 129, 130, 132, 135, 137, 138, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 152, 153, 154, 155, 156, 159, 160, 161, 166, 170, 171, 174, 176, 177, 179, 181, 182, 183, 184, 186, 191, 198, 199, 200, 201, 203, 204, 205, 206, 207, 208, 210, 211, 212, 213, 214, 215, 217, 225, 227, 228, 229, 230, 231, 232, 239, 243, 244, 245, 246, 248, 249, 251], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/configuration.py": [258, 19, 21, 22, 23, 25, 26, 27, 29, 31, 32, 34, 36, 37, 39, 40, 41, 42, 43, 46, 47, 52, 54, 59, 61, 63, 67, 69, 71, 73, 76, 80, 81, 82, 84, 86, 88, 90, 92, 96, 98, 100, 102, 104, 111, 122, 123, 135, 136, 137, 138, 139, 142, 149, 157, 158, 167, 168, 170, 172, 179, 189, 190, 192, 199, 200, 201, 204, 213, 219, 221, 222, 223, 224, 225, 228, 229, 230, 231, 232, 235, 236, 237, 238, 239, 242, 243, 244, 245, 246, 249, 250, 251, 252, 253], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/models/__init__.py": [1, 4, 5, 6, 7, 8], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/apis/pet_api.py": [512, 513, 514, 683, 516, 86, 18, 20, 22, 23, 26, 539, 28, 29, 542, 543, 32, 548, 37, 39, 40, 41, 42, 555, 556, 45, 558, 559, 560, 562, 564, 565, 566, 568, 569, 345, 571, 574, 575, 576, 580, 581, 70, 584, 73, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 598, 88, 90, 92, 93, 95, 96, 97, 330, 100, 101, 102, 106, 107, 621, 622, 624, 625, 626, 115, 116, 117, 118, 631, 632, 121, 122, 635, 124, 638, 639, 641, 642, 643, 645, 647, 649, 650, 651, 652, 653, 654, 656, 145, 146, 659, 148, 661, 150, 665, 666, 155, 156, 538, 159, 160, 673, 162, 675, 164, 677, 166, 679, 168, 169, 171, 172, 173, 541, 176, 177, 178, 182, 183, 186, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 200, 119, 120, 377, 221, 222, 549, 224, 225, 226, 231, 232, 431, 235, 236, 110, 238, 240, 552, 242, 244, 246, 247, 249, 762, 383, 252, 253, 254, 258, 259, 262, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 276, 46, 48, 112, 298, 300, 301, 302, 44, 307, 308, 311, 312, 314, 316, 317, 318, 320, 322, 323, 325, 113, 328, 329, 79, 334, 335, 338, 340, 341, 342, 343, 344, 241, 346, 347, 348, 349, 350, 485, 352, 84, 114, 373, 374, 376, 660, 378, 149, 384, 387, 390, 391, 393, 394, 395, 397, 399, 401, 402, 404, 407, 408, 409, 297, 413, 414, 69, 417, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 669, 72, 671, 74, 672, 83, 454, 455, 457, 458, 459, 674, 464, 465, 468, 471, 472, 676, 474, 475, 476, 478, 480, 80, 482, 483, 484, 678, 486, 487, 489, 492, 493, 494, 680, 498, 499, 502, 681, 504, 505, 506, 507, 508, 509, 510, 511], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/models/user.py": [278, 70, 136, 202, 272, 81, 147, 213, 22, 25, 92, 29, 158, 224, 290, 103, 169, 235, 284, 114, 19, 180, 30, 246, 191, 125, 21], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/api_client.py": [513, 521, 528, 529, 530, 19, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, 550, 551, 40, 42, 44, 49, 52, 569, 571, 572, 573, 574, 575, 576, 578, 68, 69, 74, 75, 76, 78, 79, 81, 82, 84, 86, 93, 98, 100, 104, 105, 106, 109, 110, 111, 113, 114, 117, 118, 119, 120, 121, 122, 125, 126, 127, 128, 131, 132, 133, 136, 139, 140, 143, 146, 147, 148, 149, 151, 154, 155, 157, 159, 160, 162, 164, 540, 173, 174, 176, 178, 193, 194, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 207, 214, 215, 216, 218, 219, 221, 549, 233, 237, 238, 242, 244, 253, 254, 256, 257, 258, 259, 260, 262, 263, 264, 265, 269, 270, 271, 274, 276, 277, 278, 280, 281, 282, 283, 285, 288, 289, 290, 561, 318, 319, 320, 321, 322, 324, 325, 326, 327, 328, 329, 330, 331, 332, 334, 335, 339, 340, 341, 342, 343, 347, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 371, 372, 373, 374, 381, 389, 391, 392, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 407, 409, 416, 417, 419, 421, 422, 424, 426, 433, 434, 436, 438, 439, 441, 443, 451, 453, 456, 457, 458, 459, 461, 462, 470, 496, 505, 506, 511], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/apis/store_api.py": [18, 276, 22, 23, 26, 28, 29, 197, 32, 37, 39, 40, 41, 44, 46, 48, 20, 68, 69, 71, 72, 79, 82, 83, 85, 87, 89, 91, 92, 94, 97, 98, 99, 103, 104, 107, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 121], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/apis/__init__.py": [1, 4, 5, 6], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/models/pet.py": [128, 130, 150, 172, 139, 141, 19, 215, 21, 22, 152, 25, 29, 30, 161, 163, 39, 40, 41, 42, 43, 44, 45, 174, 48, 49, 50, 51, 52, 53, 54, 183, 57, 58, 59, 60, 61, 62, 64, 194, 195, 200, 73, 202, 75, 206, 208, 209, 210, 211, 84, 213, 86, 185, 216, 217, 95, 224, 97, 226, 228, 232, 234, 108, 240, 244, 117, 246, 119, 212, 106], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/models/tag.py": [128, 134, 72, 74, 140, 109, 19, 21, 22, 25, 29, 30, 96, 100, 102, 39, 40, 41, 103, 44, 45, 46, 111, 49, 50, 83, 52, 94, 118, 120, 104, 122, 138, 61, 85, 63], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/__init__.py": [1, 4, 5, 6, 7, 8, 11, 12, 13, 16, 18, 20], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/apis/user_api.py": [32, 355, 37, 39, 200, 124, 428, 589, 48, 18, 20, 22, 23, 276, 26, 507, 28, 29], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/models/order.py": [130, 172, 141, 173, 19, 21, 22, 152, 25, 29, 30, 52, 161, 163, 39, 40, 41, 42, 43, 44, 45, 174, 175, 48, 49, 50, 51, 180, 53, 54, 57, 58, 59, 60, 61, 62, 191, 64, 202, 75, 86, 176, 97, 228, 178, 234, 108, 240, 246, 119], "/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/python/swagger_client/models/category.py": [128, 134, 72, 74, 140, 109, 19, 21, 22, 25, 29, 30, 96, 100, 102, 39, 40, 41, 103, 44, 45, 46, 111, 49, 50, 83, 52, 94, 118, 120, 104, 122, 61, 85, 63]}} \ No newline at end of file diff --git a/samples/client/petstore/python/dev-requirements.txt.log b/samples/client/petstore/python/dev-requirements.txt.log index 3418ab244d8..e3338d48f11 100644 --- a/samples/client/petstore/python/dev-requirements.txt.log +++ b/samples/client/petstore/python/dev-requirements.txt.log @@ -1,151 +1,3 @@ -Collecting nose (from -r dev-requirements.txt (line 1)) - Using cached nose-1.3.7-py2-none-any.whl -Collecting tox (from -r dev-requirements.txt (line 2)) - Using cached tox-2.1.1-py2.py3-none-any.whl -Collecting coverage (from -r dev-requirements.txt (line 3)) -Collecting randomize (from -r dev-requirements.txt (line 4)) - Using cached randomize-0.13-py2.py3-none-any.whl -Collecting virtualenv>=1.11.2 (from tox->-r dev-requirements.txt (line 2)) - Using cached virtualenv-13.1.2-py2.py3-none-any.whl -Collecting py>=1.4.17 (from tox->-r dev-requirements.txt (line 2)) - Using cached py-1.4.30-py2.py3-none-any.whl -Collecting pluggy<0.4.0,>=0.3.0 (from tox->-r dev-requirements.txt (line 2)) - Using cached pluggy-0.3.0-py2.py3-none-any.whl -Installing collected packages: nose, virtualenv, py, pluggy, tox, coverage, randomize -Successfully installed coverage-3.7.1 nose-1.3.7 pluggy-0.3.0 py-1.4.30 randomize-0.13 tox-2.1.1 virtualenv-13.1.2 -Requirement already satisfied (use --upgrade to upgrade): nose in ./.venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1)) -Requirement already satisfied (use --upgrade to upgrade): tox in ./.venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): coverage in ./.venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3)) -Requirement already satisfied (use --upgrade to upgrade): randomize in ./.venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4)) -Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./.venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./.venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./.venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1)) -Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3)) -Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4)) -Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1)) -Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3)) -Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4)) -Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1)) -Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3)) -Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4)) -Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1)) -Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3)) -Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4)) -Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1)) -Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3)) -Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4)) -Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1)) -Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3)) -Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4)) -Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1)) -Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3)) -Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4)) -Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Collecting nose (from -r dev-requirements.txt (line 1)) - Using cached nose-1.3.7-py2-none-any.whl -Collecting tox (from -r dev-requirements.txt (line 2)) - Using cached tox-2.2.1-py2.py3-none-any.whl -Collecting coverage (from -r dev-requirements.txt (line 3)) - Downloading coverage-4.0.3.tar.gz (354kB) -Collecting randomize (from -r dev-requirements.txt (line 4)) - Using cached randomize-0.13-py2.py3-none-any.whl -Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in /Library/Python/2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Collecting py>=1.4.17 (from tox->-r dev-requirements.txt (line 2)) - Downloading py-1.4.31-py2.py3-none-any.whl (81kB) -Collecting pluggy<0.4.0,>=0.3.0 (from tox->-r dev-requirements.txt (line 2)) - Using cached pluggy-0.3.1-py2.py3-none-any.whl -Installing collected packages: nose, py, pluggy, tox, coverage, randomize -Collecting nose (from -r dev-requirements.txt (line 1)) - Using cached nose-1.3.7-py2-none-any.whl -Collecting tox (from -r dev-requirements.txt (line 2)) - Using cached tox-2.2.1-py2.py3-none-any.whl -Collecting coverage (from -r dev-requirements.txt (line 3)) - Using cached coverage-4.0.3.tar.gz -Collecting randomize (from -r dev-requirements.txt (line 4)) - Using cached randomize-0.13-py2.py3-none-any.whl -Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in /Library/Python/2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Collecting py>=1.4.17 (from tox->-r dev-requirements.txt (line 2)) - Using cached py-1.4.31-py2.py3-none-any.whl -Collecting pluggy<0.4.0,>=0.3.0 (from tox->-r dev-requirements.txt (line 2)) - Using cached pluggy-0.3.1-py2.py3-none-any.whl -Installing collected packages: nose, py, pluggy, tox, coverage, randomize -Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1)) -Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3)) -Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4)) -Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1)) -Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3)) -Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4)) -Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1)) -Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3)) -Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4)) -Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1)) -Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3)) -Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4)) -Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): nose in /private/var/tmp/pr/Tengah/swagger-codegen/samples/client/petstore/python/venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1)) -Requirement already satisfied (use --upgrade to upgrade): tox in /private/var/tmp/pr/Tengah/swagger-codegen/samples/client/petstore/python/venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): coverage in /private/var/tmp/pr/Tengah/swagger-codegen/samples/client/petstore/python/venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3)) -Requirement already satisfied (use --upgrade to upgrade): randomize in /private/var/tmp/pr/Tengah/swagger-codegen/samples/client/petstore/python/venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4)) -Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in /private/var/tmp/pr/Tengah/swagger-codegen/samples/client/petstore/python/venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in /private/var/tmp/pr/Tengah/swagger-codegen/samples/client/petstore/python/venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in /private/var/tmp/pr/Tengah/swagger-codegen/samples/client/petstore/python/venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): nose in /private/var/tmp/pr/Tengah/swagger-codegen/samples/client/petstore/python/venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1)) -Requirement already satisfied (use --upgrade to upgrade): tox in /private/var/tmp/pr/Tengah/swagger-codegen/samples/client/petstore/python/venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): coverage in /private/var/tmp/pr/Tengah/swagger-codegen/samples/client/petstore/python/venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3)) -Requirement already satisfied (use --upgrade to upgrade): randomize in /private/var/tmp/pr/Tengah/swagger-codegen/samples/client/petstore/python/venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4)) -Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in /private/var/tmp/pr/Tengah/swagger-codegen/samples/client/petstore/python/venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in /private/var/tmp/pr/Tengah/swagger-codegen/samples/client/petstore/python/venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in /private/var/tmp/pr/Tengah/swagger-codegen/samples/client/petstore/python/venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): nose in /private/var/tmp/pr/Tengah/swagger-codegen/samples/client/petstore/python/venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1)) -Requirement already satisfied (use --upgrade to upgrade): tox in /private/var/tmp/pr/Tengah/swagger-codegen/samples/client/petstore/python/venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): coverage in /private/var/tmp/pr/Tengah/swagger-codegen/samples/client/petstore/python/venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3)) -Requirement already satisfied (use --upgrade to upgrade): randomize in /private/var/tmp/pr/Tengah/swagger-codegen/samples/client/petstore/python/venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4)) -Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in /private/var/tmp/pr/Tengah/swagger-codegen/samples/client/petstore/python/venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in /private/var/tmp/pr/Tengah/swagger-codegen/samples/client/petstore/python/venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) -Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in /private/var/tmp/pr/Tengah/swagger-codegen/samples/client/petstore/python/venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) Collecting nose (from -r dev-requirements.txt (line 1)) Using cached nose-1.3.7-py2-none-any.whl Collecting tox (from -r dev-requirements.txt (line 2)) @@ -154,10 +6,17 @@ Collecting coverage (from -r dev-requirements.txt (line 3)) Collecting randomize (from -r dev-requirements.txt (line 4)) Using cached randomize-0.13-py2.py3-none-any.whl Collecting virtualenv>=1.11.2 (from tox->-r dev-requirements.txt (line 2)) - Using cached virtualenv-13.1.2-py2.py3-none-any.whl + Downloading virtualenv-14.0.6-py2.py3-none-any.whl (1.8MB) Collecting py>=1.4.17 (from tox->-r dev-requirements.txt (line 2)) Using cached py-1.4.31-py2.py3-none-any.whl Collecting pluggy<0.4.0,>=0.3.0 (from tox->-r dev-requirements.txt (line 2)) Using cached pluggy-0.3.1-py2.py3-none-any.whl Installing collected packages: nose, virtualenv, py, pluggy, tox, coverage, randomize -Successfully installed coverage-4.0.3 nose-1.3.7 pluggy-0.3.1 py-1.4.31 randomize-0.13 tox-2.3.1 virtualenv-13.1.2 +Successfully installed coverage-4.0.3 nose-1.3.7 pluggy-0.3.1 py-1.4.31 randomize-0.13 tox-2.3.1 virtualenv-14.0.6 +Requirement already satisfied (use --upgrade to upgrade): nose in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 1)) +Requirement already satisfied (use --upgrade to upgrade): tox in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 2)) +Requirement already satisfied (use --upgrade to upgrade): coverage in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 3)) +Requirement already satisfied (use --upgrade to upgrade): randomize in ./venv/lib/python2.7/site-packages (from -r dev-requirements.txt (line 4)) +Requirement already satisfied (use --upgrade to upgrade): virtualenv>=1.11.2 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) +Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) +Requirement already satisfied (use --upgrade to upgrade): pluggy<0.4.0,>=0.3.0 in ./venv/lib/python2.7/site-packages (from tox->-r dev-requirements.txt (line 2)) diff --git a/samples/client/petstore/python/swagger_client/__init__.py b/samples/client/petstore/python/swagger_client/__init__.py index 6e7b59f36fd..f61c5d55262 100644 --- a/samples/client/petstore/python/swagger_client/__init__.py +++ b/samples/client/petstore/python/swagger_client/__init__.py @@ -9,8 +9,8 @@ from .models.order import Order # import apis into sdk package from .apis.user_api import UserApi -from .apis.store_api import StoreApi from .apis.pet_api import PetApi +from .apis.store_api import StoreApi # import ApiClient from .api_client import ApiClient diff --git a/samples/client/petstore/python/swagger_client/api_client.py b/samples/client/petstore/python/swagger_client/api_client.py index 2b74f7ec8e5..7e8c7a0e266 100644 --- a/samples/client/petstore/python/swagger_client/api_client.py +++ b/samples/client/petstore/python/swagger_client/api_client.py @@ -395,8 +395,8 @@ class ApiClient(object): for k, v in iteritems(files): if not v: continue - all_files = v if type(v) is list else [v] - for n in all_files: + file_names = v if type(v) is list else [v] + for n in file_names: with open(n, 'rb') as f: filename = os.path.basename(f.name) filedata = f.read() diff --git a/samples/client/petstore/python/swagger_client/apis/__init__.py b/samples/client/petstore/python/swagger_client/apis/__init__.py index c0e09458f95..592a56e282d 100644 --- a/samples/client/petstore/python/swagger_client/apis/__init__.py +++ b/samples/client/petstore/python/swagger_client/apis/__init__.py @@ -2,5 +2,5 @@ from __future__ import absolute_import # import apis into api package from .user_api import UserApi -from .store_api import StoreApi from .pet_api import PetApi +from .store_api import StoreApi diff --git a/samples/client/petstore/python/swagger_client/apis/pet_api.py b/samples/client/petstore/python/swagger_client/apis/pet_api.py index f5fc842a263..dacafe6e1ca 100644 --- a/samples/client/petstore/python/swagger_client/apis/pet_api.py +++ b/samples/client/petstore/python/swagger_client/apis/pet_api.py @@ -414,7 +414,7 @@ class PetApi(object): select_header_content_type([]) # Authentication setting - auth_settings = ['api_key'] + auth_settings = ['api_key', 'petstore_auth'] response = self.api_client.call_api(resource_path, method, path_params, @@ -680,7 +680,7 @@ class PetApi(object): callback=params.get('callback')) return response - def get_pet_by_id_with_byte_array(self, pet_id, **kwargs): + def pet_pet_idtesting_byte_arraytrue_get(self, pet_id, **kwargs): """ Fake endpoint to test byte array return by 'Find pet by ID' Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions @@ -691,7 +691,7 @@ class PetApi(object): >>> def callback_function(response): >>> pprint(response) >>> - >>> thread = api.get_pet_by_id_with_byte_array(pet_id, callback=callback_function) + >>> thread = api.pet_pet_idtesting_byte_arraytrue_get(pet_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) @@ -709,14 +709,14 @@ class PetApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_pet_by_id_with_byte_array" % key + " to method pet_pet_idtesting_byte_arraytrue_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'pet_id' is set if ('pet_id' not in params) or (params['pet_id'] is None): - raise ValueError("Missing the required parameter `pet_id` when calling `get_pet_by_id_with_byte_array`") + raise ValueError("Missing the required parameter `pet_id` when calling `pet_pet_idtesting_byte_arraytrue_get`") resource_path = '/pet/{petId}?testing_byte_array=true'.replace('{format}', 'json') method = 'GET' @@ -745,7 +745,7 @@ class PetApi(object): select_header_content_type([]) # Authentication setting - auth_settings = ['api_key'] + auth_settings = ['api_key', 'petstore_auth'] response = self.api_client.call_api(resource_path, method, path_params, diff --git a/samples/client/petstore/python/swagger_client/apis/store_api.py b/samples/client/petstore/python/swagger_client/apis/store_api.py index 961123bc8fa..dabaac93458 100644 --- a/samples/client/petstore/python/swagger_client/apis/store_api.py +++ b/samples/client/petstore/python/swagger_client/apis/store_api.py @@ -180,7 +180,7 @@ class StoreApi(object): select_header_content_type([]) # Authentication setting - auth_settings = [] + auth_settings = ['test_api_client_id', 'test_api_client_secret'] response = self.api_client.call_api(resource_path, method, path_params, @@ -259,7 +259,7 @@ class StoreApi(object): select_header_content_type([]) # Authentication setting - auth_settings = [] + auth_settings = ['test_api_key_header', 'test_api_key_query'] response = self.api_client.call_api(resource_path, method, path_params, diff --git a/samples/client/petstore/python/swagger_client/configuration.py b/samples/client/petstore/python/swagger_client/configuration.py index fe38630927e..1a25cff0c58 100644 --- a/samples/client/petstore/python/swagger_client/configuration.py +++ b/samples/client/petstore/python/swagger_client/configuration.py @@ -217,6 +217,13 @@ class Configuration(object): :return: The Auth Settings information dict. """ return { + 'test_api_key_header': + { + 'type': 'api_key', + 'in': 'header', + 'key': 'test_api_key_header', + 'value': self.get_api_key_with_prefix('test_api_key_header') + }, 'api_key': { 'type': 'api_key', @@ -224,6 +231,27 @@ class Configuration(object): 'key': 'api_key', 'value': self.get_api_key_with_prefix('api_key') }, + 'test_api_client_secret': + { + 'type': 'api_key', + 'in': 'header', + 'key': 'x-test_api_client_secret', + 'value': self.get_api_key_with_prefix('x-test_api_client_secret') + }, + 'test_api_client_id': + { + 'type': 'api_key', + 'in': 'header', + 'key': 'x-test_api_client_id', + 'value': self.get_api_key_with_prefix('x-test_api_client_id') + }, + 'test_api_key_query': + { + 'type': 'api_key', + 'in': 'query', + 'key': 'test_api_key_query', + 'value': self.get_api_key_with_prefix('test_api_key_query') + }, }