diff --git a/modules/swagger-codegen/src/main/resources/Java/api.mustache b/modules/swagger-codegen/src/main/resources/Java/api.mustache index 5bf40a593f0..6903f4dec7c 100644 --- a/modules/swagger-codegen/src/main/resources/Java/api.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/api.mustache @@ -62,7 +62,7 @@ public class {{classname}} { } {{/required}}{{/allParams}} // create path and map variables - String {{localVariablePrefix}}localVarPath = "{{{path}}}".replaceAll("\\{format\\}","json"){{#pathParams}} + String {{localVariablePrefix}}localVarPath = "{{{path}}}"{{#pathParams}} .replaceAll("\\{" + "{{baseName}}" + "\\}", {{localVariablePrefix}}apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}}; // query params diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/api.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/api.mustache index 531e56e6d4c..63df83ee24b 100644 --- a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/api.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/api.mustache @@ -59,7 +59,7 @@ public class {{classname}} { } {{/required}}{{/allParams}} // create path and map variables - String {{localVariablePrefix}}localVarPath = "{{{path}}}".replaceAll("\\{format\\}","json"){{#pathParams}} + String {{localVariablePrefix}}localVarPath = "{{{path}}}"{{#pathParams}} .replaceAll("\\{" + "{{baseName}}" + "\\}", {{localVariablePrefix}}apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}}; // query params diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/api.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/api.mustache index 0cd19c24efa..a6f66172c01 100644 --- a/modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/api.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/api.mustache @@ -68,8 +68,8 @@ public class {{classname}} { Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; // create path and map variables - String {{localVariablePrefix}}localVarPath = "{{{path}}}".replaceAll("\\{format\\}","json"){{#pathParams}} - .replaceAll("\\{" + "{{baseName}}" + "\\}", {{localVariablePrefix}}apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}}; + String {{localVariablePrefix}}localVarPath = "{{{path}}}"{{#pathParams}} + .replaceAll("\\{" + "{{baseName}}" + "\\}", {{localVariablePrefix}}apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}}; {{javaUtilPrefix}}List {{localVariablePrefix}}localVarQueryParams = new {{javaUtilPrefix}}ArrayList();{{#queryParams}} if ({{paramName}} != null) diff --git a/modules/swagger-codegen/src/main/resources/android/libraries/volley/api.mustache b/modules/swagger-codegen/src/main/resources/android/libraries/volley/api.mustache index 288408ab26c..cbcbc96e3b1 100644 --- a/modules/swagger-codegen/src/main/resources/android/libraries/volley/api.mustache +++ b/modules/swagger-codegen/src/main/resources/android/libraries/volley/api.mustache @@ -66,7 +66,7 @@ public class {{classname}} { {{/allParams}} // create path and map variables - String path = "{{path}}".replaceAll("\\{format\\}","json"){{#pathParams}}.replaceAll("\\{" + "{{baseName}}" + "\\}", apiInvoker.escapeString({{{paramName}}}.toString())){{/pathParams}}; + String path = "{{path}}"{{#pathParams}}.replaceAll("\\{" + "{{baseName}}" + "\\}", apiInvoker.escapeString({{{paramName}}}.toString())){{/pathParams}}; // query params List queryParams = new ArrayList(); diff --git a/modules/swagger-codegen/src/main/resources/objc/api-body.mustache b/modules/swagger-codegen/src/main/resources/objc/api-body.mustache index 80a047b80b2..6f5ce7267fa 100644 --- a/modules/swagger-codegen/src/main/resources/objc/api-body.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/api-body.mustache @@ -79,9 +79,6 @@ NSInteger k{{classname}}MissingParamErrorCode = 234513; {{/allParams}} NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"{{path}}"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; {{#pathParams}} if ({{paramName}} != nil) { diff --git a/modules/swagger-codegen/src/main/resources/perl/api.mustache b/modules/swagger-codegen/src/main/resources/perl/api.mustache index b7f2dd039ca..d7b17fb9d8a 100644 --- a/modules/swagger-codegen/src/main/resources/perl/api.mustache +++ b/modules/swagger-codegen/src/main/resources/perl/api.mustache @@ -79,7 +79,6 @@ sub {{operationId}} { {{/allParams}} # parse inputs my $_resource_path = '{{path}}'; - $_resource_path =~ s/{format}/json/; # default format to json my $_method = '{{httpMethod}}'; my $query_params = {}; diff --git a/modules/swagger-codegen/src/main/resources/php/api.mustache b/modules/swagger-codegen/src/main/resources/php/api.mustache index bfbb6fca373..2c0e2acb7f0 100644 --- a/modules/swagger-codegen/src/main/resources/php/api.mustache +++ b/modules/swagger-codegen/src/main/resources/php/api.mustache @@ -211,9 +211,6 @@ use \{{invokerPackage}}\ObjectSerializer; ); } {{/pathParams}} - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - {{#formParams}} // form params if (${{paramName}} !== null) { diff --git a/modules/swagger-codegen/src/main/resources/python/api.mustache b/modules/swagger-codegen/src/main/resources/python/api.mustache index 0088f2bcec7..a8a0563b295 100644 --- a/modules/swagger-codegen/src/main/resources/python/api.mustache +++ b/modules/swagger-codegen/src/main/resources/python/api.mustache @@ -161,7 +161,6 @@ class {{classname}}(object): {{/allParams}} collection_formats = {} - resource_path = '{{path}}'.replace('{format}', 'json') path_params = {} {{#pathParams}} if '{{paramName}}' in params: @@ -211,7 +210,7 @@ class {{classname}}(object): # Authentication setting auth_settings = [{{#authMethods}}'{{name}}'{{#hasMore}}, {{/hasMore}}{{/authMethods}}] - return self.api_client.call_api(resource_path, '{{httpMethod}}', + return self.api_client.call_api('{{path}}', '{{httpMethod}}', path_params, query_params, header_params, diff --git a/modules/swagger-codegen/src/main/resources/ruby/api.mustache b/modules/swagger-codegen/src/main/resources/ruby/api.mustache index faf2562fde9..fc9d2905635 100644 --- a/modules/swagger-codegen/src/main/resources/ruby/api.mustache +++ b/modules/swagger-codegen/src/main/resources/ruby/api.mustache @@ -108,7 +108,7 @@ module {{moduleName}} {{/hasValidation}} {{/allParams}} # resource path - local_var_path = "{{{path}}}".sub('{format}','json'){{#pathParams}}.sub('{' + '{{baseName}}' + '}', {{paramName}}.to_s){{/pathParams}} + local_var_path = "{{{path}}}"{{#pathParams}}.sub('{' + '{{baseName}}' + '}', {{paramName}}.to_s){{/pathParams}} # query parameters query_params = {} diff --git a/samples/client/petstore/android/httpclient/docs/PetApi.md b/samples/client/petstore/android/httpclient/docs/PetApi.md index e7b393c8ea7..ff596b3d918 100644 --- a/samples/client/petstore/android/httpclient/docs/PetApi.md +++ b/samples/client/petstore/android/httpclient/docs/PetApi.md @@ -222,7 +222,7 @@ Name | Type | Description | Notes ### Authorization -[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth) +[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key) ### HTTP request headers diff --git a/samples/client/petstore/android/httpclient/pom.xml b/samples/client/petstore/android/httpclient/pom.xml index a9bff313266..5ba936a5701 100644 --- a/samples/client/petstore/android/httpclient/pom.xml +++ b/samples/client/petstore/android/httpclient/pom.xml @@ -145,7 +145,7 @@ - 1.5.9 + 1.5.12 2.3.1 4.8.1 1.0.0 diff --git a/samples/client/petstore/android/volley/docs/PetApi.md b/samples/client/petstore/android/volley/docs/PetApi.md index e7b393c8ea7..ff596b3d918 100644 --- a/samples/client/petstore/android/volley/docs/PetApi.md +++ b/samples/client/petstore/android/volley/docs/PetApi.md @@ -222,7 +222,7 @@ Name | Type | Description | Notes ### Authorization -[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth) +[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key) ### HTTP request headers diff --git a/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/PetApi.java index 644a15c5da3..557c97a958f 100644 --- a/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/PetApi.java @@ -66,7 +66,7 @@ public void addPet (Pet body) throws TimeoutException, ExecutionException, Inter Object postBody = body; // create path and map variables - String path = "/pet".replaceAll("\\{format\\}","json"); + String path = "/pet"; // query params List queryParams = new ArrayList(); @@ -188,7 +188,7 @@ public void deletePet (Long petId, String apiKey) throws TimeoutException, Execu } // create path and map variables - String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString())); + String path = "/pet/{petId}".replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString())); // query params List queryParams = new ArrayList(); @@ -310,7 +310,7 @@ public List findPetsByStatus (List status) throws TimeoutException, Object postBody = null; // create path and map variables - String path = "/pet/findByStatus".replaceAll("\\{format\\}","json"); + String path = "/pet/findByStatus"; // query params List queryParams = new ArrayList(); @@ -430,7 +430,7 @@ public List findPetsByTags (List tags) throws TimeoutException, Exe Object postBody = null; // create path and map variables - String path = "/pet/findByTags".replaceAll("\\{format\\}","json"); + String path = "/pet/findByTags"; // query params List queryParams = new ArrayList(); @@ -555,7 +555,7 @@ public Pet getPetById (Long petId) throws TimeoutException, ExecutionException, } // create path and map variables - String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString())); + String path = "/pet/{petId}".replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString())); // query params List queryParams = new ArrayList(); @@ -576,7 +576,7 @@ public Pet getPetById (Long petId) throws TimeoutException, ExecutionException, // normal form params } - String[] authNames = new String[] { "api_key", "petstore_auth" }; + String[] authNames = new String[] { "petstore_auth", "api_key" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames); @@ -646,7 +646,7 @@ public void getPetById (Long petId, final Response.Listener responseListene // normal form params } - String[] authNames = new String[] { "api_key", "petstore_auth" }; + String[] authNames = new String[] { "petstore_auth", "api_key" }; try { apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -679,7 +679,7 @@ public void updatePet (Pet body) throws TimeoutException, ExecutionException, In Object postBody = body; // create path and map variables - String path = "/pet".replaceAll("\\{format\\}","json"); + String path = "/pet"; // query params List queryParams = new ArrayList(); @@ -802,7 +802,7 @@ public void updatePetWithForm (String petId, String name, String status) throws } // create path and map variables - String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString())); + String path = "/pet/{petId}".replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString())); // query params List queryParams = new ArrayList(); @@ -948,7 +948,7 @@ public void uploadFile (Long petId, String additionalMetadata, File file) throws } // create path and map variables - String path = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString())); + String path = "/pet/{petId}/uploadImage".replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString())); // query params List queryParams = new ArrayList(); diff --git a/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/StoreApi.java index 1aac5e84fa5..16cd37138fe 100644 --- a/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/StoreApi.java @@ -71,7 +71,7 @@ public void deleteOrder (String orderId) throws TimeoutException, ExecutionExcep } // create path and map variables - String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString())); + String path = "/store/order/{orderId}".replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString())); // query params List queryParams = new ArrayList(); @@ -190,7 +190,7 @@ public Map getInventory () throws TimeoutException, ExecutionEx Object postBody = null; // create path and map variables - String path = "/store/inventory".replaceAll("\\{format\\}","json"); + String path = "/store/inventory"; // query params List queryParams = new ArrayList(); @@ -313,7 +313,7 @@ public Order getOrderById (String orderId) throws TimeoutException, ExecutionExc } // create path and map variables - String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString())); + String path = "/store/order/{orderId}".replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString())); // query params List queryParams = new ArrayList(); @@ -437,7 +437,7 @@ public Order placeOrder (Order body) throws TimeoutException, ExecutionException Object postBody = body; // create path and map variables - String path = "/store/order".replaceAll("\\{format\\}","json"); + String path = "/store/order"; // query params List queryParams = new ArrayList(); diff --git a/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/UserApi.java index 0857956f749..83bdcbd8305 100644 --- a/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/UserApi.java @@ -66,7 +66,7 @@ public void createUser (User body) throws TimeoutException, ExecutionException, Object postBody = body; // create path and map variables - String path = "/user".replaceAll("\\{format\\}","json"); + String path = "/user"; // query params List queryParams = new ArrayList(); @@ -180,7 +180,7 @@ public void createUsersWithArrayInput (List body) throws TimeoutException, Object postBody = body; // create path and map variables - String path = "/user/createWithArray".replaceAll("\\{format\\}","json"); + String path = "/user/createWithArray"; // query params List queryParams = new ArrayList(); @@ -294,7 +294,7 @@ public void createUsersWithListInput (List body) throws TimeoutException, Object postBody = body; // create path and map variables - String path = "/user/createWithList".replaceAll("\\{format\\}","json"); + String path = "/user/createWithList"; // query params List queryParams = new ArrayList(); @@ -413,7 +413,7 @@ public void deleteUser (String username) throws TimeoutException, ExecutionExcep } // create path and map variables - String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString())); + String path = "/user/{username}".replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString())); // query params List queryParams = new ArrayList(); @@ -538,7 +538,7 @@ public User getUserByName (String username) throws TimeoutException, ExecutionEx } // create path and map variables - String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString())); + String path = "/user/{username}".replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString())); // query params List queryParams = new ArrayList(); @@ -663,7 +663,7 @@ public String loginUser (String username, String password) throws TimeoutExcepti Object postBody = null; // create path and map variables - String path = "/user/login".replaceAll("\\{format\\}","json"); + String path = "/user/login"; // query params List queryParams = new ArrayList(); @@ -784,7 +784,7 @@ public void logoutUser () throws TimeoutException, ExecutionException, Interrupt Object postBody = null; // create path and map variables - String path = "/user/logout".replaceAll("\\{format\\}","json"); + String path = "/user/logout"; // query params List queryParams = new ArrayList(); @@ -904,7 +904,7 @@ public void updateUser (String username, User body) throws TimeoutException, Exe } // create path and map variables - String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString())); + String path = "/user/{username}".replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString())); // query params List queryParams = new ArrayList(); diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeApi.java index d917239a65e..db1a0e3c2ef 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeApi.java @@ -67,7 +67,7 @@ public Client testClientModel(Client body) throws ApiException { } // create path and map variables - String localVarPath = "/fake".replaceAll("\\{format\\}","json"); + String localVarPath = "/fake"; // query params List localVarQueryParams = new ArrayList(); @@ -135,7 +135,7 @@ public void testEndpointParameters(BigDecimal number, Double _double, String pat } // create path and map variables - String localVarPath = "/fake".replaceAll("\\{format\\}","json"); + String localVarPath = "/fake"; // query params List localVarQueryParams = new ArrayList(); @@ -205,7 +205,7 @@ public void testEnumParameters(List enumFormStringArray, String enumForm Object localVarPostBody = null; // create path and map variables - String localVarPath = "/fake".replaceAll("\\{format\\}","json"); + String localVarPath = "/fake"; // query params List localVarQueryParams = new ArrayList(); diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/PetApi.java index 2d67203c51e..63095c199cd 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/PetApi.java @@ -65,7 +65,7 @@ public void addPet(Pet body) throws ApiException { } // create path and map variables - String localVarPath = "/pet".replaceAll("\\{format\\}","json"); + String localVarPath = "/pet"; // query params List localVarQueryParams = new ArrayList(); @@ -106,7 +106,7 @@ public void deletePet(Long petId, String apiKey) throws ApiException { } // create path and map variables - String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json") + String localVarPath = "/pet/{petId}" .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params @@ -150,7 +150,7 @@ public List findPetsByStatus(List status) throws ApiException { } // create path and map variables - String localVarPath = "/pet/findByStatus".replaceAll("\\{format\\}","json"); + String localVarPath = "/pet/findByStatus"; // query params List localVarQueryParams = new ArrayList(); @@ -192,7 +192,7 @@ public List findPetsByTags(List tags) throws ApiException { } // create path and map variables - String localVarPath = "/pet/findByTags".replaceAll("\\{format\\}","json"); + String localVarPath = "/pet/findByTags"; // query params List localVarQueryParams = new ArrayList(); @@ -234,7 +234,7 @@ public Pet getPetById(Long petId) throws ApiException { } // create path and map variables - String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json") + String localVarPath = "/pet/{petId}" .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params @@ -275,7 +275,7 @@ public void updatePet(Pet body) throws ApiException { } // create path and map variables - String localVarPath = "/pet".replaceAll("\\{format\\}","json"); + String localVarPath = "/pet"; // query params List localVarQueryParams = new ArrayList(); @@ -317,7 +317,7 @@ public void updatePetWithForm(Long petId, String name, String status) throws Api } // create path and map variables - String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json") + String localVarPath = "/pet/{petId}" .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params @@ -365,7 +365,7 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File f } // create path and map variables - String localVarPath = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json") + String localVarPath = "/pet/{petId}/uploadImage" .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/StoreApi.java index 74bd29b88b0..48d7c58de7b 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/StoreApi.java @@ -63,7 +63,7 @@ public void deleteOrder(String orderId) throws ApiException { } // create path and map variables - String localVarPath = "/store/order/{orderId}".replaceAll("\\{format\\}","json") + String localVarPath = "/store/order/{orderId}" .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); // query params @@ -99,7 +99,7 @@ public Map getInventory() throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/store/inventory".replaceAll("\\{format\\}","json"); + String localVarPath = "/store/inventory"; // query params List localVarQueryParams = new ArrayList(); @@ -140,7 +140,7 @@ public Order getOrderById(Long orderId) throws ApiException { } // create path and map variables - String localVarPath = "/store/order/{orderId}".replaceAll("\\{format\\}","json") + String localVarPath = "/store/order/{orderId}" .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); // query params @@ -182,7 +182,7 @@ public Order placeOrder(Order body) throws ApiException { } // create path and map variables - String localVarPath = "/store/order".replaceAll("\\{format\\}","json"); + String localVarPath = "/store/order"; // query params List localVarQueryParams = new ArrayList(); diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/UserApi.java index b2e57a05aaa..ce5ebd56cf3 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/UserApi.java @@ -63,7 +63,7 @@ public void createUser(User body) throws ApiException { } // create path and map variables - String localVarPath = "/user".replaceAll("\\{format\\}","json"); + String localVarPath = "/user"; // query params List localVarQueryParams = new ArrayList(); @@ -103,7 +103,7 @@ public void createUsersWithArrayInput(List body) throws ApiException { } // create path and map variables - String localVarPath = "/user/createWithArray".replaceAll("\\{format\\}","json"); + String localVarPath = "/user/createWithArray"; // query params List localVarQueryParams = new ArrayList(); @@ -143,7 +143,7 @@ public void createUsersWithListInput(List body) throws ApiException { } // create path and map variables - String localVarPath = "/user/createWithList".replaceAll("\\{format\\}","json"); + String localVarPath = "/user/createWithList"; // query params List localVarQueryParams = new ArrayList(); @@ -183,7 +183,7 @@ public void deleteUser(String username) throws ApiException { } // create path and map variables - String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json") + String localVarPath = "/user/{username}" .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); // query params @@ -225,7 +225,7 @@ public User getUserByName(String username) throws ApiException { } // create path and map variables - String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json") + String localVarPath = "/user/{username}" .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); // query params @@ -273,7 +273,7 @@ public String loginUser(String username, String password) throws ApiException { } // create path and map variables - String localVarPath = "/user/login".replaceAll("\\{format\\}","json"); + String localVarPath = "/user/login"; // query params List localVarQueryParams = new ArrayList(); @@ -309,7 +309,7 @@ public void logoutUser() throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/user/logout".replaceAll("\\{format\\}","json"); + String localVarPath = "/user/logout"; // query params List localVarQueryParams = new ArrayList(); @@ -355,7 +355,7 @@ public void updateUser(String username, User body) throws ApiException { } // create path and map variables - String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json") + String localVarPath = "/user/{username}" .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); // query params diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/FakeApi.java index 7b33209b8cc..974daecfc97 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/FakeApi.java @@ -53,7 +53,7 @@ public Client testClientModel(Client body) throws ApiException { } // create path and map variables - String localVarPath = "/fake".replaceAll("\\{format\\}","json"); + String localVarPath = "/fake"; // query params List localVarQueryParams = new ArrayList(); @@ -121,7 +121,7 @@ public void testEndpointParameters(BigDecimal number, Double _double, String pat } // create path and map variables - String localVarPath = "/fake".replaceAll("\\{format\\}","json"); + String localVarPath = "/fake"; // query params List localVarQueryParams = new ArrayList(); @@ -191,7 +191,7 @@ public void testEnumParameters(List enumFormStringArray, String enumForm Object localVarPostBody = null; // create path and map variables - String localVarPath = "/fake".replaceAll("\\{format\\}","json"); + String localVarPath = "/fake"; // query params List localVarQueryParams = new ArrayList(); diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/PetApi.java index e816fce5bad..c8f8b730ca5 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/PetApi.java @@ -51,7 +51,7 @@ public void addPet(Pet body) throws ApiException { } // create path and map variables - String localVarPath = "/pet".replaceAll("\\{format\\}","json"); + String localVarPath = "/pet"; // query params List localVarQueryParams = new ArrayList(); @@ -92,7 +92,7 @@ public void deletePet(Long petId, String apiKey) throws ApiException { } // create path and map variables - String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json") + String localVarPath = "/pet/{petId}" .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params @@ -136,7 +136,7 @@ public List findPetsByStatus(List status) throws ApiException { } // create path and map variables - String localVarPath = "/pet/findByStatus".replaceAll("\\{format\\}","json"); + String localVarPath = "/pet/findByStatus"; // query params List localVarQueryParams = new ArrayList(); @@ -178,7 +178,7 @@ public List findPetsByTags(List tags) throws ApiException { } // create path and map variables - String localVarPath = "/pet/findByTags".replaceAll("\\{format\\}","json"); + String localVarPath = "/pet/findByTags"; // query params List localVarQueryParams = new ArrayList(); @@ -220,7 +220,7 @@ public Pet getPetById(Long petId) throws ApiException { } // create path and map variables - String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json") + String localVarPath = "/pet/{petId}" .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params @@ -261,7 +261,7 @@ public void updatePet(Pet body) throws ApiException { } // create path and map variables - String localVarPath = "/pet".replaceAll("\\{format\\}","json"); + String localVarPath = "/pet"; // query params List localVarQueryParams = new ArrayList(); @@ -303,7 +303,7 @@ public void updatePetWithForm(Long petId, String name, String status) throws Api } // create path and map variables - String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json") + String localVarPath = "/pet/{petId}" .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params @@ -351,7 +351,7 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File f } // create path and map variables - String localVarPath = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json") + String localVarPath = "/pet/{petId}/uploadImage" .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/StoreApi.java index 41bd6751871..d0a1e843743 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/StoreApi.java @@ -49,7 +49,7 @@ public void deleteOrder(String orderId) throws ApiException { } // create path and map variables - String localVarPath = "/store/order/{orderId}".replaceAll("\\{format\\}","json") + String localVarPath = "/store/order/{orderId}" .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); // query params @@ -85,7 +85,7 @@ public Map getInventory() throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/store/inventory".replaceAll("\\{format\\}","json"); + String localVarPath = "/store/inventory"; // query params List localVarQueryParams = new ArrayList(); @@ -126,7 +126,7 @@ public Order getOrderById(Long orderId) throws ApiException { } // create path and map variables - String localVarPath = "/store/order/{orderId}".replaceAll("\\{format\\}","json") + String localVarPath = "/store/order/{orderId}" .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); // query params @@ -168,7 +168,7 @@ public Order placeOrder(Order body) throws ApiException { } // create path and map variables - String localVarPath = "/store/order".replaceAll("\\{format\\}","json"); + String localVarPath = "/store/order"; // query params List localVarQueryParams = new ArrayList(); diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/UserApi.java index 7602f4e2ba9..a7dced63d85 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/UserApi.java @@ -49,7 +49,7 @@ public void createUser(User body) throws ApiException { } // create path and map variables - String localVarPath = "/user".replaceAll("\\{format\\}","json"); + String localVarPath = "/user"; // query params List localVarQueryParams = new ArrayList(); @@ -89,7 +89,7 @@ public void createUsersWithArrayInput(List body) throws ApiException { } // create path and map variables - String localVarPath = "/user/createWithArray".replaceAll("\\{format\\}","json"); + String localVarPath = "/user/createWithArray"; // query params List localVarQueryParams = new ArrayList(); @@ -129,7 +129,7 @@ public void createUsersWithListInput(List body) throws ApiException { } // create path and map variables - String localVarPath = "/user/createWithList".replaceAll("\\{format\\}","json"); + String localVarPath = "/user/createWithList"; // query params List localVarQueryParams = new ArrayList(); @@ -169,7 +169,7 @@ public void deleteUser(String username) throws ApiException { } // create path and map variables - String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json") + String localVarPath = "/user/{username}" .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); // query params @@ -211,7 +211,7 @@ public User getUserByName(String username) throws ApiException { } // create path and map variables - String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json") + String localVarPath = "/user/{username}" .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); // query params @@ -259,7 +259,7 @@ public String loginUser(String username, String password) throws ApiException { } // create path and map variables - String localVarPath = "/user/login".replaceAll("\\{format\\}","json"); + String localVarPath = "/user/login"; // query params List localVarQueryParams = new ArrayList(); @@ -295,7 +295,7 @@ public void logoutUser() throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/user/logout".replaceAll("\\{format\\}","json"); + String localVarPath = "/user/logout"; // query params List localVarQueryParams = new ArrayList(); @@ -341,7 +341,7 @@ public void updateUser(String username, User body) throws ApiException { } // create path and map variables - String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json") + String localVarPath = "/user/{username}" .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); // query params diff --git a/samples/client/petstore/java/jersey2/git_push.sh b/samples/client/petstore/java/jersey2/git_push.sh index 6ca091b49d9..ed374619b13 100644 --- a/samples/client/petstore/java/jersey2/git_push.sh +++ b/samples/client/petstore/java/jersey2/git_push.sh @@ -8,17 +8,17 @@ git_repo_id=$2 release_note=$3 if [ "$git_user_id" = "" ]; then - git_user_id="" + git_user_id="GIT_USER_ID" echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi if [ "$git_repo_id" = "" ]; then - git_repo_id="" + git_repo_id="GIT_REPO_ID" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi if [ "$release_note" = "" ]; then - release_note="" + release_note="Minor update" echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/FakeApi.java index 1bc9d46a7b6..a8c2ebfa2b7 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/FakeApi.java @@ -53,7 +53,7 @@ public Client testClientModel(Client body) throws ApiException { } // create path and map variables - String localVarPath = "/fake".replaceAll("\\{format\\}","json"); + String localVarPath = "/fake"; // query params List localVarQueryParams = new ArrayList(); @@ -121,7 +121,7 @@ public void testEndpointParameters(BigDecimal number, Double _double, String pat } // create path and map variables - String localVarPath = "/fake".replaceAll("\\{format\\}","json"); + String localVarPath = "/fake"; // query params List localVarQueryParams = new ArrayList(); @@ -191,7 +191,7 @@ public void testEnumParameters(List enumFormStringArray, String enumForm Object localVarPostBody = null; // create path and map variables - String localVarPath = "/fake".replaceAll("\\{format\\}","json"); + String localVarPath = "/fake"; // query params List localVarQueryParams = new ArrayList(); diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/PetApi.java index e816fce5bad..c8f8b730ca5 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/PetApi.java @@ -51,7 +51,7 @@ public void addPet(Pet body) throws ApiException { } // create path and map variables - String localVarPath = "/pet".replaceAll("\\{format\\}","json"); + String localVarPath = "/pet"; // query params List localVarQueryParams = new ArrayList(); @@ -92,7 +92,7 @@ public void deletePet(Long petId, String apiKey) throws ApiException { } // create path and map variables - String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json") + String localVarPath = "/pet/{petId}" .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params @@ -136,7 +136,7 @@ public List findPetsByStatus(List status) throws ApiException { } // create path and map variables - String localVarPath = "/pet/findByStatus".replaceAll("\\{format\\}","json"); + String localVarPath = "/pet/findByStatus"; // query params List localVarQueryParams = new ArrayList(); @@ -178,7 +178,7 @@ public List findPetsByTags(List tags) throws ApiException { } // create path and map variables - String localVarPath = "/pet/findByTags".replaceAll("\\{format\\}","json"); + String localVarPath = "/pet/findByTags"; // query params List localVarQueryParams = new ArrayList(); @@ -220,7 +220,7 @@ public Pet getPetById(Long petId) throws ApiException { } // create path and map variables - String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json") + String localVarPath = "/pet/{petId}" .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params @@ -261,7 +261,7 @@ public void updatePet(Pet body) throws ApiException { } // create path and map variables - String localVarPath = "/pet".replaceAll("\\{format\\}","json"); + String localVarPath = "/pet"; // query params List localVarQueryParams = new ArrayList(); @@ -303,7 +303,7 @@ public void updatePetWithForm(Long petId, String name, String status) throws Api } // create path and map variables - String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json") + String localVarPath = "/pet/{petId}" .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params @@ -351,7 +351,7 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File f } // create path and map variables - String localVarPath = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json") + String localVarPath = "/pet/{petId}/uploadImage" .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/StoreApi.java index 41bd6751871..d0a1e843743 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/StoreApi.java @@ -49,7 +49,7 @@ public void deleteOrder(String orderId) throws ApiException { } // create path and map variables - String localVarPath = "/store/order/{orderId}".replaceAll("\\{format\\}","json") + String localVarPath = "/store/order/{orderId}" .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); // query params @@ -85,7 +85,7 @@ public Map getInventory() throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/store/inventory".replaceAll("\\{format\\}","json"); + String localVarPath = "/store/inventory"; // query params List localVarQueryParams = new ArrayList(); @@ -126,7 +126,7 @@ public Order getOrderById(Long orderId) throws ApiException { } // create path and map variables - String localVarPath = "/store/order/{orderId}".replaceAll("\\{format\\}","json") + String localVarPath = "/store/order/{orderId}" .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); // query params @@ -168,7 +168,7 @@ public Order placeOrder(Order body) throws ApiException { } // create path and map variables - String localVarPath = "/store/order".replaceAll("\\{format\\}","json"); + String localVarPath = "/store/order"; // query params List localVarQueryParams = new ArrayList(); diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/UserApi.java index 7602f4e2ba9..a7dced63d85 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/UserApi.java @@ -49,7 +49,7 @@ public void createUser(User body) throws ApiException { } // create path and map variables - String localVarPath = "/user".replaceAll("\\{format\\}","json"); + String localVarPath = "/user"; // query params List localVarQueryParams = new ArrayList(); @@ -89,7 +89,7 @@ public void createUsersWithArrayInput(List body) throws ApiException { } // create path and map variables - String localVarPath = "/user/createWithArray".replaceAll("\\{format\\}","json"); + String localVarPath = "/user/createWithArray"; // query params List localVarQueryParams = new ArrayList(); @@ -129,7 +129,7 @@ public void createUsersWithListInput(List body) throws ApiException { } // create path and map variables - String localVarPath = "/user/createWithList".replaceAll("\\{format\\}","json"); + String localVarPath = "/user/createWithList"; // query params List localVarQueryParams = new ArrayList(); @@ -169,7 +169,7 @@ public void deleteUser(String username) throws ApiException { } // create path and map variables - String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json") + String localVarPath = "/user/{username}" .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); // query params @@ -211,7 +211,7 @@ public User getUserByName(String username) throws ApiException { } // create path and map variables - String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json") + String localVarPath = "/user/{username}" .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); // query params @@ -259,7 +259,7 @@ public String loginUser(String username, String password) throws ApiException { } // create path and map variables - String localVarPath = "/user/login".replaceAll("\\{format\\}","json"); + String localVarPath = "/user/login"; // query params List localVarQueryParams = new ArrayList(); @@ -295,7 +295,7 @@ public void logoutUser() throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/user/logout".replaceAll("\\{format\\}","json"); + String localVarPath = "/user/logout"; // query params List localVarQueryParams = new ArrayList(); @@ -341,7 +341,7 @@ public void updateUser(String username, User body) throws ApiException { } // create path and map variables - String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json") + String localVarPath = "/user/{username}" .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); // query params diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/FakeApi.java index d11b40fa058..8cebf9d6d31 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/FakeApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/FakeApi.java @@ -62,7 +62,7 @@ private com.squareup.okhttp.Call testClientModelCall(Client body, final Progress Object localVarPostBody = body; // create path and map variables - String localVarPath = "/fake".replaceAll("\\{format\\}","json"); + String localVarPath = "/fake"; List localVarQueryParams = new ArrayList(); @@ -180,7 +180,7 @@ private com.squareup.okhttp.Call testEndpointParametersCall(BigDecimal number, D Object localVarPostBody = null; // create path and map variables - String localVarPath = "/fake".replaceAll("\\{format\\}","json"); + String localVarPath = "/fake"; List localVarQueryParams = new ArrayList(); @@ -376,7 +376,7 @@ private com.squareup.okhttp.Call testEnumParametersCall(List enumFormStr Object localVarPostBody = null; // create path and map variables - String localVarPath = "/fake".replaceAll("\\{format\\}","json"); + String localVarPath = "/fake"; List localVarQueryParams = new ArrayList(); if (enumQueryStringArray != null) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/PetApi.java index b7119add7d1..c428968e398 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/PetApi.java @@ -61,7 +61,7 @@ private com.squareup.okhttp.Call addPetCall(Pet body, final ProgressResponseBody Object localVarPostBody = body; // create path and map variables - String localVarPath = "/pet".replaceAll("\\{format\\}","json"); + String localVarPath = "/pet"; List localVarQueryParams = new ArrayList(); @@ -175,8 +175,8 @@ private com.squareup.okhttp.Call deletePetCall(Long petId, String apiKey, final Object localVarPostBody = null; // create path and map variables - String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + String localVarPath = "/pet/{petId}" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); List localVarQueryParams = new ArrayList(); @@ -295,7 +295,7 @@ private com.squareup.okhttp.Call findPetsByStatusCall(List status, final Object localVarPostBody = null; // create path and map variables - String localVarPath = "/pet/findByStatus".replaceAll("\\{format\\}","json"); + String localVarPath = "/pet/findByStatus"; List localVarQueryParams = new ArrayList(); if (status != null) @@ -415,7 +415,7 @@ private com.squareup.okhttp.Call findPetsByTagsCall(List tags, final Pro Object localVarPostBody = null; // create path and map variables - String localVarPath = "/pet/findByTags".replaceAll("\\{format\\}","json"); + String localVarPath = "/pet/findByTags"; List localVarQueryParams = new ArrayList(); if (tags != null) @@ -535,8 +535,8 @@ private com.squareup.okhttp.Call getPetByIdCall(Long petId, final ProgressRespon Object localVarPostBody = null; // create path and map variables - String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + String localVarPath = "/pet/{petId}" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); List localVarQueryParams = new ArrayList(); @@ -654,7 +654,7 @@ private com.squareup.okhttp.Call updatePetCall(Pet body, final ProgressResponseB Object localVarPostBody = body; // create path and map variables - String localVarPath = "/pet".replaceAll("\\{format\\}","json"); + String localVarPath = "/pet"; List localVarQueryParams = new ArrayList(); @@ -768,8 +768,8 @@ private com.squareup.okhttp.Call updatePetWithFormCall(Long petId, String name, Object localVarPostBody = null; // create path and map variables - String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + String localVarPath = "/pet/{petId}" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); List localVarQueryParams = new ArrayList(); @@ -893,8 +893,8 @@ private com.squareup.okhttp.Call uploadFileCall(Long petId, String additionalMet Object localVarPostBody = null; // create path and map variables - String localVarPath = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + String localVarPath = "/pet/{petId}/uploadImage" + .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); List localVarQueryParams = new ArrayList(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/StoreApi.java index 199f2c7b109..f6027e22803 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/StoreApi.java @@ -59,8 +59,8 @@ private com.squareup.okhttp.Call deleteOrderCall(String orderId, final ProgressR Object localVarPostBody = null; // create path and map variables - String localVarPath = "/store/order/{orderId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); + String localVarPath = "/store/order/{orderId}" + .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); List localVarQueryParams = new ArrayList(); @@ -174,7 +174,7 @@ private com.squareup.okhttp.Call getInventoryCall(final ProgressResponseBody.Pro Object localVarPostBody = null; // create path and map variables - String localVarPath = "/store/inventory".replaceAll("\\{format\\}","json"); + String localVarPath = "/store/inventory"; List localVarQueryParams = new ArrayList(); @@ -284,8 +284,8 @@ private com.squareup.okhttp.Call getOrderByIdCall(Long orderId, final ProgressRe Object localVarPostBody = null; // create path and map variables - String localVarPath = "/store/order/{orderId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); + String localVarPath = "/store/order/{orderId}" + .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); List localVarQueryParams = new ArrayList(); @@ -403,7 +403,7 @@ private com.squareup.okhttp.Call placeOrderCall(Order body, final ProgressRespon Object localVarPostBody = body; // create path and map variables - String localVarPath = "/store/order".replaceAll("\\{format\\}","json"); + String localVarPath = "/store/order"; List localVarQueryParams = new ArrayList(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/UserApi.java index ea719996a6b..1b2c0130d88 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/UserApi.java @@ -59,7 +59,7 @@ private com.squareup.okhttp.Call createUserCall(User body, final ProgressRespons Object localVarPostBody = body; // create path and map variables - String localVarPath = "/user".replaceAll("\\{format\\}","json"); + String localVarPath = "/user"; List localVarQueryParams = new ArrayList(); @@ -173,7 +173,7 @@ private com.squareup.okhttp.Call createUsersWithArrayInputCall(List body, Object localVarPostBody = body; // create path and map variables - String localVarPath = "/user/createWithArray".replaceAll("\\{format\\}","json"); + String localVarPath = "/user/createWithArray"; List localVarQueryParams = new ArrayList(); @@ -287,7 +287,7 @@ private com.squareup.okhttp.Call createUsersWithListInputCall(List body, f Object localVarPostBody = body; // create path and map variables - String localVarPath = "/user/createWithList".replaceAll("\\{format\\}","json"); + String localVarPath = "/user/createWithList"; List localVarQueryParams = new ArrayList(); @@ -401,8 +401,8 @@ private com.squareup.okhttp.Call deleteUserCall(String username, final ProgressR Object localVarPostBody = null; // create path and map variables - String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); + String localVarPath = "/user/{username}" + .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); List localVarQueryParams = new ArrayList(); @@ -516,8 +516,8 @@ private com.squareup.okhttp.Call getUserByNameCall(String username, final Progre Object localVarPostBody = null; // create path and map variables - String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); + String localVarPath = "/user/{username}" + .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); List localVarQueryParams = new ArrayList(); @@ -635,7 +635,7 @@ private com.squareup.okhttp.Call loginUserCall(String username, String password, Object localVarPostBody = null; // create path and map variables - String localVarPath = "/user/login".replaceAll("\\{format\\}","json"); + String localVarPath = "/user/login"; List localVarQueryParams = new ArrayList(); if (username != null) @@ -765,7 +765,7 @@ private com.squareup.okhttp.Call logoutUserCall(final ProgressResponseBody.Progr Object localVarPostBody = null; // create path and map variables - String localVarPath = "/user/logout".replaceAll("\\{format\\}","json"); + String localVarPath = "/user/logout"; List localVarQueryParams = new ArrayList(); @@ -871,8 +871,8 @@ private com.squareup.okhttp.Call updateUserCall(String username, User body, fina Object localVarPostBody = body; // create path and map variables - String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); + String localVarPath = "/user/{username}" + .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); List localVarQueryParams = new ArrayList(); diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/api/FakeApi.java index 3dec8d367e7..c28161906f4 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/api/FakeApi.java @@ -3,6 +3,7 @@ import io.swagger.client.CollectionFormats.*; + import retrofit2.Call; import retrofit2.http.*; diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/api/PetApi.java index ec44297e20e..7b32044e838 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/api/PetApi.java @@ -3,6 +3,7 @@ import io.swagger.client.CollectionFormats.*; + import retrofit2.Call; import retrofit2.http.*; diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/api/StoreApi.java index d2e38f90cbf..2ffc90a478b 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/api/StoreApi.java @@ -3,6 +3,7 @@ import io.swagger.client.CollectionFormats.*; + import retrofit2.Call; import retrofit2.http.*; diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/api/UserApi.java index 7034b3ab5b9..19fc25ccd23 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/api/UserApi.java @@ -3,6 +3,7 @@ import io.swagger.client.CollectionFormats.*; + import retrofit2.Call; import retrofit2.http.*; diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/FormatTest.java index d060850d48a..8beb242e21d 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/FormatTest.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/FormatTest.java @@ -79,9 +79,7 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer **/ - @Min(10) - @Max(100) - @ApiModelProperty(example = "null", value = "") + @Min(10) @Max(100) @ApiModelProperty(example = "null", value = "") public Integer getInteger() { return integer; } @@ -101,9 +99,7 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 **/ - @Min(20) - @Max(200) - @ApiModelProperty(example = "null", value = "") + @Min(20) @Max(200) @ApiModelProperty(example = "null", value = "") public Integer getInt32() { return int32; } @@ -142,9 +138,7 @@ public FormatTest number(BigDecimal number) { * @return number **/ @NotNull - @DecimalMin("32.1") - @DecimalMax("543.2") - @ApiModelProperty(example = "null", required = true, value = "") + @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(example = "null", required = true, value = "") public BigDecimal getNumber() { return number; } @@ -164,9 +158,7 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float **/ - @DecimalMin("54.3") - @DecimalMax("987.6") - @ApiModelProperty(example = "null", value = "") + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(example = "null", value = "") public Float getFloat() { return _float; } @@ -186,9 +178,7 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double **/ - @DecimalMin("67.8") - @DecimalMax("123.4") - @ApiModelProperty(example = "null", value = "") + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(example = "null", value = "") public Double getDouble() { return _double; } @@ -206,8 +196,7 @@ public FormatTest string(String string) { * Get string * @return string **/ - @Pattern(regexp="/[a-z]/i") - @ApiModelProperty(example = "null", value = "") + @Pattern(regexp="/[a-z]/i") @ApiModelProperty(example = "null", value = "") public String getString() { return string; } @@ -318,8 +307,7 @@ public FormatTest password(String password) { * @return password **/ @NotNull - @Size(min=10,max=64) - @ApiModelProperty(example = "null", required = true, value = "") + @Size(min=10,max=64) @ApiModelProperty(example = "null", required = true, value = "") public String getPassword() { return password; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/ApiClient.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/ApiClient.java index 99586dcab59..bd9a00b5014 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/ApiClient.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/ApiClient.java @@ -16,6 +16,7 @@ import retrofit2.Converter; import retrofit2.Retrofit; + import retrofit2.converter.gson.GsonConverterFactory; import retrofit2.converter.scalars.ScalarsConverterFactory; @@ -129,6 +130,7 @@ public void createDefaultAdapter() { .Builder() .baseUrl(baseUrl) + .addConverterFactory(ScalarsConverterFactory.create()) .addConverterFactory(GsonCustomConverterFactory.create(gson)); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/FakeApi.java index 94820a21964..ef1ffe54aab 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/FakeApi.java @@ -3,6 +3,7 @@ import io.swagger.client.CollectionFormats.*; + import retrofit2.Call; import retrofit2.http.*; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/PetApi.java index 0860d5354ed..df1999db5c0 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/PetApi.java @@ -3,6 +3,7 @@ import io.swagger.client.CollectionFormats.*; + import retrofit2.Call; import retrofit2.http.*; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/StoreApi.java index f2d3a26d0ed..224d4f02500 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/StoreApi.java @@ -3,6 +3,7 @@ import io.swagger.client.CollectionFormats.*; + import retrofit2.Call; import retrofit2.http.*; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/UserApi.java index 87a4921c70e..2a189ac4e60 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/UserApi.java @@ -3,6 +3,7 @@ import io.swagger.client.CollectionFormats.*; + import retrofit2.Call; import retrofit2.http.*; diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/ApiClient.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/ApiClient.java index e3436cf56d0..1526ca00e37 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/ApiClient.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/ApiClient.java @@ -16,6 +16,7 @@ import retrofit2.Converter; import retrofit2.Retrofit; import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory; + import retrofit2.converter.gson.GsonConverterFactory; import retrofit2.converter.scalars.ScalarsConverterFactory; @@ -129,6 +130,7 @@ public void createDefaultAdapter() { .Builder() .baseUrl(baseUrl) .addCallAdapterFactory(RxJavaCallAdapterFactory.create()) + .addConverterFactory(ScalarsConverterFactory.create()) .addConverterFactory(GsonCustomConverterFactory.create(gson)); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/FakeApi.java index 41b5a883596..53949384763 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/FakeApi.java @@ -4,6 +4,7 @@ import rx.Observable; + import retrofit2.http.*; import okhttp3.RequestBody; diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/PetApi.java index 7d036572540..3fa5d01ee65 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/PetApi.java @@ -4,6 +4,7 @@ import rx.Observable; + import retrofit2.http.*; import okhttp3.RequestBody; diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/StoreApi.java index 847c2721144..5c87a20f433 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/StoreApi.java @@ -4,6 +4,7 @@ import rx.Observable; + import retrofit2.http.*; import okhttp3.RequestBody; diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/UserApi.java index af1bb5f0ffd..79428c2ad04 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/UserApi.java @@ -4,6 +4,7 @@ import rx.Observable; + import retrofit2.http.*; import okhttp3.RequestBody; diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m index c0ca97c3480..36a2a6d700a 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m @@ -60,9 +60,6 @@ -(NSURLSessionTask*) addPetWithBody: (SWGPet*) body completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; @@ -132,9 +129,6 @@ -(NSURLSessionTask*) deletePetWithPetId: (NSNumber*) petId NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet/{petId}"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; if (petId != nil) { pathParams[@"petId"] = petId; @@ -195,9 +189,6 @@ -(NSURLSessionTask*) findPetsByStatusWithStatus: (NSArray*) status completionHandler: (void (^)(NSArray* output, NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet/findByStatus"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; @@ -256,9 +247,6 @@ -(NSURLSessionTask*) findPetsByTagsWithTags: (NSArray*) tags completionHandler: (void (^)(NSArray* output, NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet/findByTags"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; @@ -328,9 +316,6 @@ -(NSURLSessionTask*) getPetByIdWithPetId: (NSNumber*) petId NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet/{petId}"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; if (petId != nil) { pathParams[@"petId"] = petId; @@ -388,9 +373,6 @@ -(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; @@ -463,9 +445,6 @@ -(NSURLSessionTask*) updatePetWithFormWithPetId: (NSString*) petId NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet/{petId}"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; if (petId != nil) { pathParams[@"petId"] = petId; @@ -546,9 +525,6 @@ -(NSURLSessionTask*) uploadFileWithPetId: (NSNumber*) petId NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet/{petId}/uploadImage"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; if (petId != nil) { pathParams[@"petId"] = petId; diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m index 2a17173f83a..ebf27ab982a 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m @@ -71,9 +71,6 @@ -(NSURLSessionTask*) deleteOrderWithOrderId: (NSString*) orderId NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/store/order/{orderId}"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; if (orderId != nil) { pathParams[@"orderId"] = orderId; @@ -129,9 +126,6 @@ -(NSURLSessionTask*) getInventoryWithCompletionHandler: (void (^)(NSDictionary* output, NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/store/inventory"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; @@ -197,9 +191,6 @@ -(NSURLSessionTask*) getOrderByIdWithOrderId: (NSString*) orderId NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/store/order/{orderId}"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; if (orderId != nil) { pathParams[@"orderId"] = orderId; @@ -257,9 +248,6 @@ -(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/store/order"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.m b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.m index e1acf3af007..2a1c4ecda81 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.m @@ -60,9 +60,6 @@ -(NSURLSessionTask*) createUserWithBody: (SWGUser*) body completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; @@ -118,9 +115,6 @@ -(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray*) body completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithArray"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; @@ -176,9 +170,6 @@ -(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray*) body completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithList"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; @@ -245,9 +236,6 @@ -(NSURLSessionTask*) deleteUserWithUsername: (NSString*) username NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/{username}"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; if (username != nil) { pathParams[@"username"] = username; @@ -316,9 +304,6 @@ -(NSURLSessionTask*) getUserByNameWithUsername: (NSString*) username NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/{username}"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; if (username != nil) { pathParams[@"username"] = username; @@ -379,9 +364,6 @@ -(NSURLSessionTask*) loginUserWithUsername: (NSString*) username completionHandler: (void (^)(NSString* output, NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/login"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; @@ -440,9 +422,6 @@ -(NSURLSessionTask*) logoutUserWithCompletionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/logout"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; @@ -511,9 +490,6 @@ -(NSURLSessionTask*) updateUserWithUsername: (NSString*) username NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/{username}"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; if (username != nil) { pathParams[@"username"] = username; diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/FakeApi.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/FakeApi.pm index ebb8bb5b86e..961e102e081 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/FakeApi.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/FakeApi.pm @@ -83,7 +83,6 @@ sub test_client_model { # parse inputs my $_resource_path = '/fake'; - $_resource_path =~ s/{format}/json/; # default format to json my $_method = 'PATCH'; my $query_params = {}; @@ -242,7 +241,6 @@ sub test_endpoint_parameters { # parse inputs my $_resource_path = '/fake'; - $_resource_path =~ s/{format}/json/; # default format to json my $_method = 'POST'; my $query_params = {}; @@ -406,7 +404,6 @@ sub test_enum_parameters { # parse inputs my $_resource_path = '/fake'; - $_resource_path =~ s/{format}/json/; # default format to json my $_method = 'GET'; my $query_params = {}; diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/PetApi.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/PetApi.pm index ac715bb60bf..c658538dac6 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/PetApi.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/PetApi.pm @@ -83,7 +83,6 @@ sub add_pet { # parse inputs my $_resource_path = '/pet'; - $_resource_path =~ s/{format}/json/; # default format to json my $_method = 'POST'; my $query_params = {}; @@ -151,7 +150,6 @@ sub delete_pet { # parse inputs my $_resource_path = '/pet/{petId}'; - $_resource_path =~ s/{format}/json/; # default format to json my $_method = 'DELETE'; my $query_params = {}; @@ -220,7 +218,6 @@ sub find_pets_by_status { # parse inputs my $_resource_path = '/pet/findByStatus'; - $_resource_path =~ s/{format}/json/; # default format to json my $_method = 'GET'; my $query_params = {}; @@ -286,7 +283,6 @@ sub find_pets_by_tags { # parse inputs my $_resource_path = '/pet/findByTags'; - $_resource_path =~ s/{format}/json/; # default format to json my $_method = 'GET'; my $query_params = {}; @@ -352,7 +348,6 @@ sub get_pet_by_id { # parse inputs my $_resource_path = '/pet/{petId}'; - $_resource_path =~ s/{format}/json/; # default format to json my $_method = 'GET'; my $query_params = {}; @@ -420,7 +415,6 @@ sub update_pet { # parse inputs my $_resource_path = '/pet'; - $_resource_path =~ s/{format}/json/; # default format to json my $_method = 'PUT'; my $query_params = {}; @@ -494,7 +488,6 @@ sub update_pet_with_form { # parse inputs my $_resource_path = '/pet/{petId}'; - $_resource_path =~ s/{format}/json/; # default format to json my $_method = 'POST'; my $query_params = {}; @@ -580,7 +573,6 @@ sub upload_file { # parse inputs my $_resource_path = '/pet/{petId}/uploadImage'; - $_resource_path =~ s/{format}/json/; # default format to json my $_method = 'POST'; my $query_params = {}; diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/StoreApi.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/StoreApi.pm index ee508043e54..87589c7a7ec 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/StoreApi.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/StoreApi.pm @@ -83,7 +83,6 @@ sub delete_order { # parse inputs my $_resource_path = '/store/order/{orderId}'; - $_resource_path =~ s/{format}/json/; # default format to json my $_method = 'DELETE'; my $query_params = {}; @@ -136,7 +135,6 @@ sub get_inventory { # parse inputs my $_resource_path = '/store/inventory'; - $_resource_path =~ s/{format}/json/; # default format to json my $_method = 'GET'; my $query_params = {}; @@ -197,7 +195,6 @@ sub get_order_by_id { # parse inputs my $_resource_path = '/store/order/{orderId}'; - $_resource_path =~ s/{format}/json/; # default format to json my $_method = 'GET'; my $query_params = {}; @@ -265,7 +262,6 @@ sub place_order { # parse inputs my $_resource_path = '/store/order'; - $_resource_path =~ s/{format}/json/; # default format to json my $_method = 'POST'; my $query_params = {}; diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/UserApi.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/UserApi.pm index 13f2e705272..c0312e5d231 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/UserApi.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/UserApi.pm @@ -83,7 +83,6 @@ sub create_user { # parse inputs my $_resource_path = '/user'; - $_resource_path =~ s/{format}/json/; # default format to json my $_method = 'POST'; my $query_params = {}; @@ -145,7 +144,6 @@ sub create_users_with_array_input { # parse inputs my $_resource_path = '/user/createWithArray'; - $_resource_path =~ s/{format}/json/; # default format to json my $_method = 'POST'; my $query_params = {}; @@ -207,7 +205,6 @@ sub create_users_with_list_input { # parse inputs my $_resource_path = '/user/createWithList'; - $_resource_path =~ s/{format}/json/; # default format to json my $_method = 'POST'; my $query_params = {}; @@ -269,7 +266,6 @@ sub delete_user { # parse inputs my $_resource_path = '/user/{username}'; - $_resource_path =~ s/{format}/json/; # default format to json my $_method = 'DELETE'; my $query_params = {}; @@ -333,7 +329,6 @@ sub get_user_by_name { # parse inputs my $_resource_path = '/user/{username}'; - $_resource_path =~ s/{format}/json/; # default format to json my $_method = 'GET'; my $query_params = {}; @@ -412,7 +407,6 @@ sub login_user { # parse inputs my $_resource_path = '/user/login'; - $_resource_path =~ s/{format}/json/; # default format to json my $_method = 'GET'; my $query_params = {}; @@ -472,7 +466,6 @@ sub logout_user { # parse inputs my $_resource_path = '/user/logout'; - $_resource_path =~ s/{format}/json/; # default format to json my $_method = 'GET'; my $query_params = {}; @@ -540,7 +533,6 @@ sub update_user { # parse inputs my $_resource_path = '/user/{username}'; - $_resource_path =~ s/{format}/json/; # default format to json my $_method = 'PUT'; my $query_params = {}; diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php index 54522e7a792..7024bdb6820 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php @@ -129,9 +129,6 @@ public function testClientModelWithHttpInfo($body) } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - // body params $_tempBody = null; if (isset($body)) { @@ -296,9 +293,6 @@ public function testEndpointParametersWithHttpInfo($number, $double, $pattern_wi } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/xml; charset=utf-8', 'application/json; charset=utf-8']); - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - // form params if ($integer !== null) { $formParams['integer'] = $this->apiClient->getSerializer()->toFormValue($integer); @@ -465,9 +459,6 @@ public function testEnumParametersWithHttpInfo($enum_form_string_array = null, $ if ($enum_header_string !== null) { $headerParams['enum_header_string'] = $this->apiClient->getSerializer()->toHeaderValue($enum_header_string); } - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - // form params if ($enum_form_string_array !== null) { $formParams['enum_form_string_array'] = $this->apiClient->getSerializer()->toFormValue($enum_form_string_array); diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php index cb902068dd4..2a83fec174f 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php @@ -129,9 +129,6 @@ public function addPetWithHttpInfo($body) } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/xml']); - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - // body params $_tempBody = null; if (isset($body)) { @@ -225,9 +222,6 @@ public function deletePetWithHttpInfo($pet_id, $api_key = null) $resourcePath ); } - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - // for model (json/xml) if (isset($_tempBody)) { @@ -309,9 +303,6 @@ public function findPetsByStatusWithHttpInfo($status) if ($status !== null) { $queryParams['status'] = $this->apiClient->getSerializer()->toQueryValue($status); } - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - // for model (json/xml) if (isset($_tempBody)) { @@ -397,9 +388,6 @@ public function findPetsByTagsWithHttpInfo($tags) if ($tags !== null) { $queryParams['tags'] = $this->apiClient->getSerializer()->toQueryValue($tags); } - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - // for model (json/xml) if (isset($_tempBody)) { @@ -486,9 +474,6 @@ public function getPetByIdWithHttpInfo($pet_id) $resourcePath ); } - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - // for model (json/xml) if (isset($_tempBody)) { @@ -568,9 +553,6 @@ public function updatePetWithHttpInfo($body) } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/xml']); - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - // body params $_tempBody = null; if (isset($body)) { @@ -662,9 +644,6 @@ public function updatePetWithFormWithHttpInfo($pet_id, $name = null, $status = n $resourcePath ); } - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - // form params if ($name !== null) { $formParams['name'] = $this->apiClient->getSerializer()->toFormValue($name); @@ -759,9 +738,6 @@ public function uploadFileWithHttpInfo($pet_id, $additional_metadata = null, $fi $resourcePath ); } - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - // form params if ($additional_metadata !== null) { $formParams['additionalMetadata'] = $this->apiClient->getSerializer()->toFormValue($additional_metadata); diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php index 655fb65737a..e3d7e466722 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php @@ -137,9 +137,6 @@ public function deleteOrderWithHttpInfo($order_id) $resourcePath ); } - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - // for model (json/xml) if (isset($_tempBody)) { @@ -204,9 +201,6 @@ public function getInventoryWithHttpInfo() } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]); - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - // for model (json/xml) if (isset($_tempBody)) { @@ -301,9 +295,6 @@ public function getOrderByIdWithHttpInfo($order_id) $resourcePath ); } - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - // for model (json/xml) if (isset($_tempBody)) { @@ -378,9 +369,6 @@ public function placeOrderWithHttpInfo($body) } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]); - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - // body params $_tempBody = null; if (isset($body)) { diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php index 31580e1b3c1..8d893d055ec 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php @@ -129,9 +129,6 @@ public function createUserWithHttpInfo($body) } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]); - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - // body params $_tempBody = null; if (isset($body)) { @@ -207,9 +204,6 @@ public function createUsersWithArrayInputWithHttpInfo($body) } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]); - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - // body params $_tempBody = null; if (isset($body)) { @@ -285,9 +279,6 @@ public function createUsersWithListInputWithHttpInfo($body) } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]); - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - // body params $_tempBody = null; if (isset($body)) { @@ -371,9 +362,6 @@ public function deleteUserWithHttpInfo($username) $resourcePath ); } - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - // for model (json/xml) if (isset($_tempBody)) { @@ -452,9 +440,6 @@ public function getUserByNameWithHttpInfo($username) $resourcePath ); } - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - // for model (json/xml) if (isset($_tempBody)) { @@ -543,9 +528,6 @@ public function loginUserWithHttpInfo($username, $password) if ($password !== null) { $queryParams['password'] = $this->apiClient->getSerializer()->toQueryValue($password); } - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - // for model (json/xml) if (isset($_tempBody)) { @@ -614,9 +596,6 @@ public function logoutUserWithHttpInfo() } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]); - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - // for model (json/xml) if (isset($_tempBody)) { @@ -701,9 +680,6 @@ public function updateUserWithHttpInfo($username, $body) $resourcePath ); } - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - // body params $_tempBody = null; if (isset($body)) { diff --git a/samples/client/petstore/python/petstore_api/apis/fake_api.py b/samples/client/petstore/python/petstore_api/apis/fake_api.py index 95fc5c69362..c4563b41c75 100644 --- a/samples/client/petstore/python/petstore_api/apis/fake_api.py +++ b/samples/client/petstore/python/petstore_api/apis/fake_api.py @@ -108,7 +108,6 @@ def test_client_model_with_http_info(self, body, **kwargs): collection_formats = {} - resource_path = '/fake'.replace('{format}', 'json') path_params = {} query_params = {} @@ -132,7 +131,7 @@ def test_client_model_with_http_info(self, body, **kwargs): # Authentication setting auth_settings = [] - return self.api_client.call_api(resource_path, 'PATCH', + return self.api_client.call_api('/fake', 'PATCH', path_params, query_params, header_params, @@ -276,7 +275,6 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou collection_formats = {} - resource_path = '/fake'.replace('{format}', 'json') path_params = {} query_params = {} @@ -326,7 +324,7 @@ def test_endpoint_parameters_with_http_info(self, number, double, pattern_withou # Authentication setting auth_settings = ['http_basic_test'] - return self.api_client.call_api(resource_path, 'POST', + return self.api_client.call_api('/fake', 'POST', path_params, query_params, header_params, @@ -420,7 +418,6 @@ def test_enum_parameters_with_http_info(self, **kwargs): collection_formats = {} - resource_path = '/fake'.replace('{format}', 'json') path_params = {} query_params = {} @@ -461,7 +458,7 @@ def test_enum_parameters_with_http_info(self, **kwargs): # Authentication setting auth_settings = [] - return self.api_client.call_api(resource_path, 'GET', + return self.api_client.call_api('/fake', 'GET', path_params, query_params, header_params, diff --git a/samples/client/petstore/python/petstore_api/apis/pet_api.py b/samples/client/petstore/python/petstore_api/apis/pet_api.py index d3d5e96025a..4cca462f7db 100644 --- a/samples/client/petstore/python/petstore_api/apis/pet_api.py +++ b/samples/client/petstore/python/petstore_api/apis/pet_api.py @@ -108,7 +108,6 @@ def add_pet_with_http_info(self, body, **kwargs): collection_formats = {} - resource_path = '/pet'.replace('{format}', 'json') path_params = {} query_params = {} @@ -132,7 +131,7 @@ def add_pet_with_http_info(self, body, **kwargs): # Authentication setting auth_settings = ['petstore_auth'] - return self.api_client.call_api(resource_path, 'POST', + return self.api_client.call_api('/pet', 'POST', path_params, query_params, header_params, @@ -217,7 +216,6 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): collection_formats = {} - resource_path = '/pet/{petId}'.replace('{format}', 'json') path_params = {} if 'pet_id' in params: path_params['petId'] = params['pet_id'] @@ -239,7 +237,7 @@ def delete_pet_with_http_info(self, pet_id, **kwargs): # Authentication setting auth_settings = ['petstore_auth'] - return self.api_client.call_api(resource_path, 'DELETE', + return self.api_client.call_api('/pet/{petId}', 'DELETE', path_params, query_params, header_params, @@ -322,7 +320,6 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): collection_formats = {} - resource_path = '/pet/findByStatus'.replace('{format}', 'json') path_params = {} query_params = {} @@ -343,7 +340,7 @@ def find_pets_by_status_with_http_info(self, status, **kwargs): # Authentication setting auth_settings = ['petstore_auth'] - return self.api_client.call_api(resource_path, 'GET', + return self.api_client.call_api('/pet/findByStatus', 'GET', path_params, query_params, header_params, @@ -426,7 +423,6 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): collection_formats = {} - resource_path = '/pet/findByTags'.replace('{format}', 'json') path_params = {} query_params = {} @@ -447,7 +443,7 @@ def find_pets_by_tags_with_http_info(self, tags, **kwargs): # Authentication setting auth_settings = ['petstore_auth'] - return self.api_client.call_api(resource_path, 'GET', + return self.api_client.call_api('/pet/findByTags', 'GET', path_params, query_params, header_params, @@ -530,7 +526,6 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): collection_formats = {} - resource_path = '/pet/{petId}'.replace('{format}', 'json') path_params = {} if 'pet_id' in params: path_params['petId'] = params['pet_id'] @@ -550,7 +545,7 @@ def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # Authentication setting auth_settings = ['api_key'] - return self.api_client.call_api(resource_path, 'GET', + return self.api_client.call_api('/pet/{petId}', 'GET', path_params, query_params, header_params, @@ -633,7 +628,6 @@ def update_pet_with_http_info(self, body, **kwargs): collection_formats = {} - resource_path = '/pet'.replace('{format}', 'json') path_params = {} query_params = {} @@ -657,7 +651,7 @@ def update_pet_with_http_info(self, body, **kwargs): # Authentication setting auth_settings = ['petstore_auth'] - return self.api_client.call_api(resource_path, 'PUT', + return self.api_client.call_api('/pet', 'PUT', path_params, query_params, header_params, @@ -744,7 +738,6 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): collection_formats = {} - resource_path = '/pet/{petId}'.replace('{format}', 'json') path_params = {} if 'pet_id' in params: path_params['petId'] = params['pet_id'] @@ -772,7 +765,7 @@ def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # Authentication setting auth_settings = ['petstore_auth'] - return self.api_client.call_api(resource_path, 'POST', + return self.api_client.call_api('/pet/{petId}', 'POST', path_params, query_params, header_params, @@ -859,7 +852,6 @@ def upload_file_with_http_info(self, pet_id, **kwargs): collection_formats = {} - resource_path = '/pet/{petId}/uploadImage'.replace('{format}', 'json') path_params = {} if 'pet_id' in params: path_params['petId'] = params['pet_id'] @@ -887,7 +879,7 @@ def upload_file_with_http_info(self, pet_id, **kwargs): # Authentication setting auth_settings = ['petstore_auth'] - return self.api_client.call_api(resource_path, 'POST', + return self.api_client.call_api('/pet/{petId}/uploadImage', 'POST', path_params, query_params, header_params, diff --git a/samples/client/petstore/python/petstore_api/apis/store_api.py b/samples/client/petstore/python/petstore_api/apis/store_api.py index 7bfe115b10e..c3f1b7f77bd 100644 --- a/samples/client/petstore/python/petstore_api/apis/store_api.py +++ b/samples/client/petstore/python/petstore_api/apis/store_api.py @@ -108,7 +108,6 @@ def delete_order_with_http_info(self, order_id, **kwargs): collection_formats = {} - resource_path = '/store/order/{orderId}'.replace('{format}', 'json') path_params = {} if 'order_id' in params: path_params['orderId'] = params['order_id'] @@ -128,7 +127,7 @@ def delete_order_with_http_info(self, order_id, **kwargs): # Authentication setting auth_settings = [] - return self.api_client.call_api(resource_path, 'DELETE', + return self.api_client.call_api('/store/order/{orderId}', 'DELETE', path_params, query_params, header_params, @@ -205,7 +204,6 @@ def get_inventory_with_http_info(self, **kwargs): collection_formats = {} - resource_path = '/store/inventory'.replace('{format}', 'json') path_params = {} query_params = {} @@ -223,7 +221,7 @@ def get_inventory_with_http_info(self, **kwargs): # Authentication setting auth_settings = ['api_key'] - return self.api_client.call_api(resource_path, 'GET', + return self.api_client.call_api('/store/inventory', 'GET', path_params, query_params, header_params, @@ -310,7 +308,6 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): collection_formats = {} - resource_path = '/store/order/{orderId}'.replace('{format}', 'json') path_params = {} if 'order_id' in params: path_params['orderId'] = params['order_id'] @@ -330,7 +327,7 @@ def get_order_by_id_with_http_info(self, order_id, **kwargs): # Authentication setting auth_settings = [] - return self.api_client.call_api(resource_path, 'GET', + return self.api_client.call_api('/store/order/{orderId}', 'GET', path_params, query_params, header_params, @@ -413,7 +410,6 @@ def place_order_with_http_info(self, body, **kwargs): collection_formats = {} - resource_path = '/store/order'.replace('{format}', 'json') path_params = {} query_params = {} @@ -433,7 +429,7 @@ def place_order_with_http_info(self, body, **kwargs): # Authentication setting auth_settings = [] - return self.api_client.call_api(resource_path, 'POST', + return self.api_client.call_api('/store/order', 'POST', path_params, query_params, header_params, diff --git a/samples/client/petstore/python/petstore_api/apis/user_api.py b/samples/client/petstore/python/petstore_api/apis/user_api.py index 6b620aa63af..5fe1fb6f2a4 100644 --- a/samples/client/petstore/python/petstore_api/apis/user_api.py +++ b/samples/client/petstore/python/petstore_api/apis/user_api.py @@ -108,7 +108,6 @@ def create_user_with_http_info(self, body, **kwargs): collection_formats = {} - resource_path = '/user'.replace('{format}', 'json') path_params = {} query_params = {} @@ -128,7 +127,7 @@ def create_user_with_http_info(self, body, **kwargs): # Authentication setting auth_settings = [] - return self.api_client.call_api(resource_path, 'POST', + return self.api_client.call_api('/user', 'POST', path_params, query_params, header_params, @@ -211,7 +210,6 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): collection_formats = {} - resource_path = '/user/createWithArray'.replace('{format}', 'json') path_params = {} query_params = {} @@ -231,7 +229,7 @@ def create_users_with_array_input_with_http_info(self, body, **kwargs): # Authentication setting auth_settings = [] - return self.api_client.call_api(resource_path, 'POST', + return self.api_client.call_api('/user/createWithArray', 'POST', path_params, query_params, header_params, @@ -314,7 +312,6 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): collection_formats = {} - resource_path = '/user/createWithList'.replace('{format}', 'json') path_params = {} query_params = {} @@ -334,7 +331,7 @@ def create_users_with_list_input_with_http_info(self, body, **kwargs): # Authentication setting auth_settings = [] - return self.api_client.call_api(resource_path, 'POST', + return self.api_client.call_api('/user/createWithList', 'POST', path_params, query_params, header_params, @@ -417,7 +414,6 @@ def delete_user_with_http_info(self, username, **kwargs): collection_formats = {} - resource_path = '/user/{username}'.replace('{format}', 'json') path_params = {} if 'username' in params: path_params['username'] = params['username'] @@ -437,7 +433,7 @@ def delete_user_with_http_info(self, username, **kwargs): # Authentication setting auth_settings = [] - return self.api_client.call_api(resource_path, 'DELETE', + return self.api_client.call_api('/user/{username}', 'DELETE', path_params, query_params, header_params, @@ -520,7 +516,6 @@ def get_user_by_name_with_http_info(self, username, **kwargs): collection_formats = {} - resource_path = '/user/{username}'.replace('{format}', 'json') path_params = {} if 'username' in params: path_params['username'] = params['username'] @@ -540,7 +535,7 @@ def get_user_by_name_with_http_info(self, username, **kwargs): # Authentication setting auth_settings = [] - return self.api_client.call_api(resource_path, 'GET', + return self.api_client.call_api('/user/{username}', 'GET', path_params, query_params, header_params, @@ -628,7 +623,6 @@ def login_user_with_http_info(self, username, password, **kwargs): collection_formats = {} - resource_path = '/user/login'.replace('{format}', 'json') path_params = {} query_params = {} @@ -650,7 +644,7 @@ def login_user_with_http_info(self, username, password, **kwargs): # Authentication setting auth_settings = [] - return self.api_client.call_api(resource_path, 'GET', + return self.api_client.call_api('/user/login', 'GET', path_params, query_params, header_params, @@ -727,7 +721,6 @@ def logout_user_with_http_info(self, **kwargs): collection_formats = {} - resource_path = '/user/logout'.replace('{format}', 'json') path_params = {} query_params = {} @@ -745,7 +738,7 @@ def logout_user_with_http_info(self, **kwargs): # Authentication setting auth_settings = [] - return self.api_client.call_api(resource_path, 'GET', + return self.api_client.call_api('/user/logout', 'GET', path_params, query_params, header_params, @@ -833,7 +826,6 @@ def update_user_with_http_info(self, username, body, **kwargs): collection_formats = {} - resource_path = '/user/{username}'.replace('{format}', 'json') path_params = {} if 'username' in params: path_params['username'] = params['username'] @@ -855,7 +847,7 @@ def update_user_with_http_info(self, username, body, **kwargs): # Authentication setting auth_settings = [] - return self.api_client.call_api(resource_path, 'PUT', + return self.api_client.call_api('/user/{username}', 'PUT', path_params, query_params, header_params, diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb index 403705d2746..932201de831 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb @@ -41,7 +41,7 @@ def test_client_model_with_http_info(body, opts = {}) # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling FakeApi.test_client_model" if body.nil? # resource path - local_var_path = "/fake".sub('{format}','json') + local_var_path = "/fake" # query parameters query_params = {} @@ -178,7 +178,7 @@ def test_endpoint_parameters_with_http_info(number, double, pattern_without_deli end # resource path - local_var_path = "/fake".sub('{format}','json') + local_var_path = "/fake" # query parameters query_params = {} @@ -274,7 +274,7 @@ def test_enum_parameters_with_http_info(opts = {}) fail ArgumentError, 'invalid value for "enum_query_string", must be one of _abc, -efg, (xyz)' end # resource path - local_var_path = "/fake".sub('{format}','json') + local_var_path = "/fake" # query parameters query_params = {} diff --git a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb index f6ca76d10b0..39ea74058b3 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb @@ -41,7 +41,7 @@ def add_pet_with_http_info(body, opts = {}) # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling PetApi.add_pet" if body.nil? # resource path - local_var_path = "/pet".sub('{format}','json') + local_var_path = "/pet" # query parameters query_params = {} @@ -95,7 +95,7 @@ def delete_pet_with_http_info(pet_id, opts = {}) # verify the required parameter 'pet_id' is set fail ArgumentError, "Missing the required parameter 'pet_id' when calling PetApi.delete_pet" if pet_id.nil? # resource path - local_var_path = "/pet/{petId}".sub('{format}','json').sub('{' + 'petId' + '}', pet_id.to_s) + local_var_path = "/pet/{petId}".sub('{' + 'petId' + '}', pet_id.to_s) # query parameters query_params = {} @@ -146,7 +146,7 @@ def find_pets_by_status_with_http_info(status, opts = {}) # verify the required parameter 'status' is set fail ArgumentError, "Missing the required parameter 'status' when calling PetApi.find_pets_by_status" if status.nil? # resource path - local_var_path = "/pet/findByStatus".sub('{format}','json') + local_var_path = "/pet/findByStatus" # query parameters query_params = {} @@ -198,7 +198,7 @@ def find_pets_by_tags_with_http_info(tags, opts = {}) # verify the required parameter 'tags' is set fail ArgumentError, "Missing the required parameter 'tags' when calling PetApi.find_pets_by_tags" if tags.nil? # resource path - local_var_path = "/pet/findByTags".sub('{format}','json') + local_var_path = "/pet/findByTags" # query parameters query_params = {} @@ -250,7 +250,7 @@ def get_pet_by_id_with_http_info(pet_id, opts = {}) # verify the required parameter 'pet_id' is set fail ArgumentError, "Missing the required parameter 'pet_id' when calling PetApi.get_pet_by_id" if pet_id.nil? # resource path - local_var_path = "/pet/{petId}".sub('{format}','json').sub('{' + 'petId' + '}', pet_id.to_s) + local_var_path = "/pet/{petId}".sub('{' + 'petId' + '}', pet_id.to_s) # query parameters query_params = {} @@ -301,7 +301,7 @@ def update_pet_with_http_info(body, opts = {}) # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling PetApi.update_pet" if body.nil? # resource path - local_var_path = "/pet".sub('{format}','json') + local_var_path = "/pet" # query parameters query_params = {} @@ -357,7 +357,7 @@ def update_pet_with_form_with_http_info(pet_id, opts = {}) # verify the required parameter 'pet_id' is set fail ArgumentError, "Missing the required parameter 'pet_id' when calling PetApi.update_pet_with_form" if pet_id.nil? # resource path - local_var_path = "/pet/{petId}".sub('{format}','json').sub('{' + 'petId' + '}', pet_id.to_s) + local_var_path = "/pet/{petId}".sub('{' + 'petId' + '}', pet_id.to_s) # query parameters query_params = {} @@ -415,7 +415,7 @@ def upload_file_with_http_info(pet_id, opts = {}) # verify the required parameter 'pet_id' is set fail ArgumentError, "Missing the required parameter 'pet_id' when calling PetApi.upload_file" if pet_id.nil? # resource path - local_var_path = "/pet/{petId}/uploadImage".sub('{format}','json').sub('{' + 'petId' + '}', pet_id.to_s) + local_var_path = "/pet/{petId}/uploadImage".sub('{' + 'petId' + '}', pet_id.to_s) # query parameters query_params = {} diff --git a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb index 30e2a46dfac..6b8978f1b9e 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb @@ -41,7 +41,7 @@ def delete_order_with_http_info(order_id, opts = {}) # verify the required parameter 'order_id' is set fail ArgumentError, "Missing the required parameter 'order_id' when calling StoreApi.delete_order" if order_id.nil? # resource path - local_var_path = "/store/order/{orderId}".sub('{format}','json').sub('{' + 'orderId' + '}', order_id.to_s) + local_var_path = "/store/order/{orderId}".sub('{' + 'orderId' + '}', order_id.to_s) # query parameters query_params = {} @@ -87,7 +87,7 @@ def get_inventory_with_http_info(opts = {}) @api_client.config.logger.debug "Calling API: StoreApi.get_inventory ..." end # resource path - local_var_path = "/store/inventory".sub('{format}','json') + local_var_path = "/store/inventory" # query parameters query_params = {} @@ -146,7 +146,7 @@ def get_order_by_id_with_http_info(order_id, opts = {}) end # resource path - local_var_path = "/store/order/{orderId}".sub('{format}','json').sub('{' + 'orderId' + '}', order_id.to_s) + local_var_path = "/store/order/{orderId}".sub('{' + 'orderId' + '}', order_id.to_s) # query parameters query_params = {} @@ -197,7 +197,7 @@ def place_order_with_http_info(body, opts = {}) # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling StoreApi.place_order" if body.nil? # resource path - local_var_path = "/store/order".sub('{format}','json') + local_var_path = "/store/order" # query parameters query_params = {} diff --git a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb index 30766994678..3bb8b2130d7 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb @@ -41,7 +41,7 @@ def create_user_with_http_info(body, opts = {}) # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UserApi.create_user" if body.nil? # resource path - local_var_path = "/user".sub('{format}','json') + local_var_path = "/user" # query parameters query_params = {} @@ -91,7 +91,7 @@ def create_users_with_array_input_with_http_info(body, opts = {}) # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UserApi.create_users_with_array_input" if body.nil? # resource path - local_var_path = "/user/createWithArray".sub('{format}','json') + local_var_path = "/user/createWithArray" # query parameters query_params = {} @@ -141,7 +141,7 @@ def create_users_with_list_input_with_http_info(body, opts = {}) # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UserApi.create_users_with_list_input" if body.nil? # resource path - local_var_path = "/user/createWithList".sub('{format}','json') + local_var_path = "/user/createWithList" # query parameters query_params = {} @@ -191,7 +191,7 @@ def delete_user_with_http_info(username, opts = {}) # verify the required parameter 'username' is set fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.delete_user" if username.nil? # resource path - local_var_path = "/user/{username}".sub('{format}','json').sub('{' + 'username' + '}', username.to_s) + local_var_path = "/user/{username}".sub('{' + 'username' + '}', username.to_s) # query parameters query_params = {} @@ -241,7 +241,7 @@ def get_user_by_name_with_http_info(username, opts = {}) # verify the required parameter 'username' is set fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.get_user_by_name" if username.nil? # resource path - local_var_path = "/user/{username}".sub('{format}','json').sub('{' + 'username' + '}', username.to_s) + local_var_path = "/user/{username}".sub('{' + 'username' + '}', username.to_s) # query parameters query_params = {} @@ -296,7 +296,7 @@ def login_user_with_http_info(username, password, opts = {}) # verify the required parameter 'password' is set fail ArgumentError, "Missing the required parameter 'password' when calling UserApi.login_user" if password.nil? # resource path - local_var_path = "/user/login".sub('{format}','json') + local_var_path = "/user/login" # query parameters query_params = {} @@ -345,7 +345,7 @@ def logout_user_with_http_info(opts = {}) @api_client.config.logger.debug "Calling API: UserApi.logout_user ..." end # resource path - local_var_path = "/user/logout".sub('{format}','json') + local_var_path = "/user/logout" # query parameters query_params = {} @@ -399,7 +399,7 @@ def update_user_with_http_info(username, body, opts = {}) # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UserApi.update_user" if body.nil? # resource path - local_var_path = "/user/{username}".sub('{format}','json').sub('{' + 'username' + '}', username.to_s) + local_var_path = "/user/{username}".sub('{' + 'username' + '}', username.to_s) # query parameters query_params = {}