From ce41a343d8327e6af2c24310e33454174c8d19a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pa=C5=ADlo=20Ebermann?= Date: Sun, 2 Apr 2017 11:01:15 +0200 Subject: [PATCH 1/3] Updating all samples (except feign) (#5281) --- samples/client/petstore/bash/_petstore-cli | 4 +-- samples/client/petstore/bash/petstore-cli | 28 +++++++++---------- .../bash/petstore-cli.bash-completion | 4 +-- .../csharp/SwaggerClient.v5/README.md | 4 +-- .../csharp/SwaggerClient.v5/docs/StoreApi.md | 4 +-- .../src/IO.Swagger/Api/StoreApi.cs | 8 +++--- .../petstore/csharp/SwaggerClient/README.md | 4 +-- .../csharp/SwaggerClient/docs/StoreApi.md | 4 +-- .../src/IO.Swagger/Api/StoreApi.cs | 16 +++++------ .../README.md | 4 +-- .../docs/StoreApi.md | 4 +-- .../src/IO.Swagger/Api/StoreApi.cs | 16 +++++------ .../client/petstore/go/go-petstore/README.md | 4 +-- .../petstore/go/go-petstore/docs/StoreApi.md | 4 +-- .../petstore/go/go-petstore/store_api.go | 8 +++--- .../petstore/java/jersey1/docs/StoreApi.md | 4 +-- .../java/io/swagger/client/api/StoreApi.java | 8 +++--- .../java/jersey2-java8/docs/StoreApi.md | 4 +-- .../java/io/swagger/client/api/StoreApi.java | 8 +++--- .../docs/StoreApi.md | 4 +-- .../java/io/swagger/client/ApiClient.java | 5 ++-- .../java/io/swagger/client/api/StoreApi.java | 8 +++--- .../java/okhttp-gson/docs/StoreApi.md | 4 +-- .../java/io/swagger/client/api/StoreApi.java | 8 +++--- .../java/io/swagger/client/api/StoreApi.java | 16 +++++------ .../java/retrofit2-play24/docs/StoreApi.md | 4 +-- .../java/io/swagger/client/api/StoreApi.java | 8 +++--- .../petstore/java/retrofit2/docs/StoreApi.md | 4 +-- .../java/io/swagger/client/api/StoreApi.java | 8 +++--- .../java/retrofit2rx/docs/StoreApi.md | 4 +-- .../java/io/swagger/client/api/StoreApi.java | 8 +++--- .../java/retrofit2rx2/docs/StoreApi.md | 4 +-- .../java/io/swagger/client/api/StoreApi.java | 8 +++--- .../petstore/javascript-promise/README.md | 4 +-- .../javascript-promise/docs/StoreApi.md | 4 +-- .../javascript-promise/src/api/StoreApi.js | 8 +++--- samples/client/petstore/javascript/README.md | 4 +-- .../petstore/javascript/docs/StoreApi.md | 4 +-- .../petstore/javascript/src/api/StoreApi.js | 8 +++--- samples/client/petstore/perl/README.md | 4 +-- samples/client/petstore/perl/docs/StoreApi.md | 4 +-- .../perl/lib/WWW/SwaggerClient/StoreApi.pm | 8 +++--- .../petstore/php/SwaggerClient-php/README.md | 4 +-- .../SwaggerClient-php/docs/Api/StoreApi.md | 4 +-- .../SwaggerClient-php/lib/Api/StoreApi.php | 12 ++++---- samples/client/petstore/python/README.md | 4 +-- .../client/petstore/python/docs/StoreApi.md | 4 +-- .../python/petstore_api/apis/store_api.py | 8 +++--- samples/client/petstore/ruby/README.md | 4 +-- samples/client/petstore/ruby/docs/StoreApi.md | 4 +-- .../ruby/lib/petstore/api/store_api.rb | 4 +-- .../Classes/Swaggers/APIs/StoreAPI.swift | 8 +++--- .../Classes/Swaggers/APIs/StoreAPI.swift | 8 +++--- .../Classes/Swaggers/APIs/StoreAPI.swift | 8 +++--- .../petstore/typescript-node/default/api.ts | 4 +-- .../petstore/typescript-node/npm/api.ts | 4 +-- .../src/main/swagger/swagger.yaml | 6 ++-- .../src/gen/java/io/swagger/api/StoreApi.java | 8 +++--- .../src/gen/java/io/swagger/api/StoreApi.java | 8 +++--- .../src/gen/java/io/swagger/api/StoreApi.java | 8 +++--- .../server/petstore/jaxrs-spec/swagger.json | 6 ++-- .../petstore/lumen/lib/app/Http/routes.php | 4 +-- .../api/swagger.yaml | 2 +- .../server/petstore/nodejs/api/swagger.yaml | 2 +- .../main/java/io/swagger/api/StoreApi.java | 8 +++--- .../io/swagger/api/StoreApiController.java | 4 +-- .../main/java/io/swagger/api/StoreApi.java | 8 +++--- .../io/swagger/api/StoreApiController.java | 4 +-- .../main/java/io/swagger/api/StoreApi.java | 8 +++--- .../io/swagger/api/StoreApiController.java | 4 +-- .../main/java/io/swagger/api/StoreApi.java | 8 +++--- .../io/swagger/api/StoreApiController.java | 4 +-- 72 files changed, 227 insertions(+), 226 deletions(-) diff --git a/samples/client/petstore/bash/_petstore-cli b/samples/client/petstore/bash/_petstore-cli index 829e500ba2..8552bad11c 100644 --- a/samples/client/petstore/bash/_petstore-cli +++ b/samples/client/petstore/bash/_petstore-cli @@ -406,7 +406,7 @@ case $state in deleteOrder) local -a _op_arguments _op_arguments=( - "orderId=:[PATH] ID of the order that needs to be deleted" + "order_id=:[PATH] ID of the order that needs to be deleted" ) _describe -t actions 'operations' _op_arguments -S '' && ret=0 ;; @@ -419,7 +419,7 @@ case $state in getOrderById) local -a _op_arguments _op_arguments=( - "orderId=:[PATH] ID of pet that needs to be fetched" + "order_id=:[PATH] ID of pet that needs to be fetched" ) _describe -t actions 'operations' _op_arguments -S '' && ret=0 ;; diff --git a/samples/client/petstore/bash/petstore-cli b/samples/client/petstore/bash/petstore-cli index 8490704434..ad3c33d353 100755 --- a/samples/client/petstore/bash/petstore-cli +++ b/samples/client/petstore/bash/petstore-cli @@ -102,8 +102,8 @@ operation_parameters_minimum_occurences["updatePetWithForm:::status"]=0 operation_parameters_minimum_occurences["uploadFile:::petId"]=1 operation_parameters_minimum_occurences["uploadFile:::additionalMetadata"]=0 operation_parameters_minimum_occurences["uploadFile:::file"]=0 -operation_parameters_minimum_occurences["deleteOrder:::orderId"]=1 -operation_parameters_minimum_occurences["getOrderById:::orderId"]=1 +operation_parameters_minimum_occurences["deleteOrder:::order_id"]=1 +operation_parameters_minimum_occurences["getOrderById:::order_id"]=1 operation_parameters_minimum_occurences["placeOrder:::body"]=1 operation_parameters_minimum_occurences["createUser:::body"]=1 operation_parameters_minimum_occurences["createUsersWithArrayInput:::body"]=1 @@ -158,8 +158,8 @@ operation_parameters_maximum_occurences["updatePetWithForm:::status"]=0 operation_parameters_maximum_occurences["uploadFile:::petId"]=0 operation_parameters_maximum_occurences["uploadFile:::additionalMetadata"]=0 operation_parameters_maximum_occurences["uploadFile:::file"]=0 -operation_parameters_maximum_occurences["deleteOrder:::orderId"]=0 -operation_parameters_maximum_occurences["getOrderById:::orderId"]=0 +operation_parameters_maximum_occurences["deleteOrder:::order_id"]=0 +operation_parameters_maximum_occurences["getOrderById:::order_id"]=0 operation_parameters_maximum_occurences["placeOrder:::body"]=0 operation_parameters_maximum_occurences["createUser:::body"]=0 operation_parameters_maximum_occurences["createUsersWithArrayInput:::body"]=0 @@ -211,8 +211,8 @@ operation_parameters_collection_type["updatePetWithForm:::status"]="" operation_parameters_collection_type["uploadFile:::petId"]="" operation_parameters_collection_type["uploadFile:::additionalMetadata"]="" operation_parameters_collection_type["uploadFile:::file"]="" -operation_parameters_collection_type["deleteOrder:::orderId"]="" -operation_parameters_collection_type["getOrderById:::orderId"]="" +operation_parameters_collection_type["deleteOrder:::order_id"]="" +operation_parameters_collection_type["getOrderById:::order_id"]="" operation_parameters_collection_type["placeOrder:::body"]="" operation_parameters_collection_type["createUser:::body"]="" operation_parameters_collection_type["createUsersWithArrayInput:::body"]= @@ -1390,7 +1390,7 @@ print_deleteOrder_help() { echo -e "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" | fold -sw 80 echo -e "" echo -e "$(tput bold)$(tput setaf 7)Parameters$(tput sgr0)" - echo -e " * $(tput setaf 2)orderId$(tput sgr0) $(tput setaf 4)[String]$(tput sgr0) $(tput setaf 1)(required)$(tput sgr0)$(tput sgr0) - ID of the order that needs to be deleted $(tput setaf 3)Specify as: orderId=value$(tput sgr0)" | fold -sw 80 | sed '2,$s/^/ /' + echo -e " * $(tput setaf 2)order_id$(tput sgr0) $(tput setaf 4)[String]$(tput sgr0) $(tput setaf 1)(required)$(tput sgr0)$(tput sgr0) - ID of the order that needs to be deleted $(tput setaf 3)Specify as: order_id=value$(tput sgr0)" | fold -sw 80 | sed '2,$s/^/ /' echo "" echo -e "$(tput bold)$(tput setaf 7)Responses$(tput sgr0)" case 400 in @@ -1480,7 +1480,7 @@ print_getOrderById_help() { echo -e "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions" | fold -sw 80 echo -e "" echo -e "$(tput bold)$(tput setaf 7)Parameters$(tput sgr0)" - echo -e " * $(tput setaf 2)orderId$(tput sgr0) $(tput setaf 4)[Integer]$(tput sgr0) $(tput setaf 1)(required)$(tput sgr0)$(tput sgr0) - ID of pet that needs to be fetched $(tput setaf 3)Specify as: orderId=value$(tput sgr0)" | fold -sw 80 | sed '2,$s/^/ /' + echo -e " * $(tput setaf 2)order_id$(tput sgr0) $(tput setaf 4)[Integer]$(tput sgr0) $(tput setaf 1)(required)$(tput sgr0)$(tput sgr0) - ID of pet that needs to be fetched $(tput setaf 3)Specify as: order_id=value$(tput sgr0)" | fold -sw 80 | sed '2,$s/^/ /' echo "" echo -e "$(tput bold)$(tput setaf 7)Responses$(tput sgr0)" case 200 in @@ -2469,14 +2469,14 @@ call_uploadFile() { # ############################################################################## call_deleteOrder() { - local path_parameter_names=(orderId) + local path_parameter_names=(order_id) local query_parameter_names=() if [[ $force = false ]]; then - validate_request_parameters "/v2/store/order/{orderId}" path_parameter_names query_parameter_names + validate_request_parameters "/v2/store/order/{order_id}" path_parameter_names query_parameter_names fi - local path=$(build_request_path "/v2/store/order/{orderId}" path_parameter_names query_parameter_names) + local path=$(build_request_path "/v2/store/order/{order_id}" path_parameter_names query_parameter_names) local method="DELETE" local headers_curl=$(header_arguments_to_curl) if [[ -n $header_accept ]]; then @@ -2531,14 +2531,14 @@ call_getInventory() { # ############################################################################## call_getOrderById() { - local path_parameter_names=(orderId) + local path_parameter_names=(order_id) local query_parameter_names=() if [[ $force = false ]]; then - validate_request_parameters "/v2/store/order/{orderId}" path_parameter_names query_parameter_names + validate_request_parameters "/v2/store/order/{order_id}" path_parameter_names query_parameter_names fi - local path=$(build_request_path "/v2/store/order/{orderId}" path_parameter_names query_parameter_names) + local path=$(build_request_path "/v2/store/order/{order_id}" path_parameter_names query_parameter_names) local method="GET" local headers_curl=$(header_arguments_to_curl) if [[ -n $header_accept ]]; then diff --git a/samples/client/petstore/bash/petstore-cli.bash-completion b/samples/client/petstore/bash/petstore-cli.bash-completion index 6b05bd0a97..249f1a102c 100644 --- a/samples/client/petstore/bash/petstore-cli.bash-completion +++ b/samples/client/petstore/bash/petstore-cli.bash-completion @@ -106,9 +106,9 @@ _petstore-cli() operation_parameters["updatePet"]="" operation_parameters["updatePetWithForm"]="petId= " operation_parameters["uploadFile"]="petId= " - operation_parameters["deleteOrder"]="orderId= " + operation_parameters["deleteOrder"]="order_id= " operation_parameters["getInventory"]="" - operation_parameters["getOrderById"]="orderId= " + operation_parameters["getOrderById"]="order_id= " operation_parameters["placeOrder"]="" operation_parameters["createUser"]="" operation_parameters["createUsersWithArrayInput"]="" diff --git a/samples/client/petstore/csharp/SwaggerClient.v5/README.md b/samples/client/petstore/csharp/SwaggerClient.v5/README.md index cb19e7d871..d56551bfcb 100644 --- a/samples/client/petstore/csharp/SwaggerClient.v5/README.md +++ b/samples/client/petstore/csharp/SwaggerClient.v5/README.md @@ -84,9 +84,9 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID *StoreApi* | [**PlaceOrder**](docs/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet *UserApi* | [**CreateUser**](docs/UserApi.md#createuser) | **POST** /user | Create user *UserApi* | [**CreateUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array diff --git a/samples/client/petstore/csharp/SwaggerClient.v5/docs/StoreApi.md b/samples/client/petstore/csharp/SwaggerClient.v5/docs/StoreApi.md index 74094e501b..bf2fdb1ed6 100644 --- a/samples/client/petstore/csharp/SwaggerClient.v5/docs/StoreApi.md +++ b/samples/client/petstore/csharp/SwaggerClient.v5/docs/StoreApi.md @@ -4,9 +4,9 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**DeleteOrder**](StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +[**DeleteOrder**](StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID [**GetInventory**](StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -[**GetOrderById**](StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID +[**GetOrderById**](StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID [**PlaceOrder**](StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet diff --git a/samples/client/petstore/csharp/SwaggerClient.v5/src/IO.Swagger/Api/StoreApi.cs b/samples/client/petstore/csharp/SwaggerClient.v5/src/IO.Swagger/Api/StoreApi.cs index a44e000b6c..18dccb27f2 100644 --- a/samples/client/petstore/csharp/SwaggerClient.v5/src/IO.Swagger/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/SwaggerClient.v5/src/IO.Swagger/Api/StoreApi.cs @@ -241,7 +241,7 @@ namespace IO.Swagger.Api if (orderId == null) throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - var localVarPath = "./store/order/{orderId}"; + var localVarPath = "./store/order/{order_id}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -263,7 +263,7 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter + if (orderId != null) localVarPathParams.Add("order_id", Configuration.ApiClient.ParameterToString(orderId)); // path parameter // make the HTTP request @@ -376,7 +376,7 @@ namespace IO.Swagger.Api if (orderId == null) throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById"); - var localVarPath = "./store/order/{orderId}"; + var localVarPath = "./store/order/{order_id}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -398,7 +398,7 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter + if (orderId != null) localVarPathParams.Add("order_id", Configuration.ApiClient.ParameterToString(orderId)); // path parameter // make the HTTP request diff --git a/samples/client/petstore/csharp/SwaggerClient/README.md b/samples/client/petstore/csharp/SwaggerClient/README.md index 8b269fdd76..e7e5c9fb84 100644 --- a/samples/client/petstore/csharp/SwaggerClient/README.md +++ b/samples/client/petstore/csharp/SwaggerClient/README.md @@ -104,9 +104,9 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID *StoreApi* | [**PlaceOrder**](docs/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet *UserApi* | [**CreateUser**](docs/UserApi.md#createuser) | **POST** /user | Create user *UserApi* | [**CreateUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/StoreApi.md b/samples/client/petstore/csharp/SwaggerClient/docs/StoreApi.md index 74094e501b..bf2fdb1ed6 100644 --- a/samples/client/petstore/csharp/SwaggerClient/docs/StoreApi.md +++ b/samples/client/petstore/csharp/SwaggerClient/docs/StoreApi.md @@ -4,9 +4,9 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**DeleteOrder**](StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +[**DeleteOrder**](StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID [**GetInventory**](StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -[**GetOrderById**](StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID +[**GetOrderById**](StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID [**PlaceOrder**](StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/StoreApi.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/StoreApi.cs index 809f16f723..32d01eded1 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/StoreApi.cs @@ -325,7 +325,7 @@ namespace IO.Swagger.Api if (orderId == null) throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - var localVarPath = "/store/order/{orderId}"; + var localVarPath = "/store/order/{order_id}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -347,7 +347,7 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter + if (orderId != null) localVarPathParams.Add("order_id", Configuration.ApiClient.ParameterToString(orderId)); // path parameter // make the HTTP request @@ -393,7 +393,7 @@ namespace IO.Swagger.Api if (orderId == null) throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - var localVarPath = "/store/order/{orderId}"; + var localVarPath = "/store/order/{order_id}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -415,7 +415,7 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter + if (orderId != null) localVarPathParams.Add("order_id", Configuration.ApiClient.ParameterToString(orderId)); // path parameter // make the HTTP request @@ -595,7 +595,7 @@ namespace IO.Swagger.Api if (orderId == null) throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById"); - var localVarPath = "/store/order/{orderId}"; + var localVarPath = "/store/order/{order_id}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -617,7 +617,7 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter + if (orderId != null) localVarPathParams.Add("order_id", Configuration.ApiClient.ParameterToString(orderId)); // path parameter // make the HTTP request @@ -664,7 +664,7 @@ namespace IO.Swagger.Api if (orderId == null) throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById"); - var localVarPath = "/store/order/{orderId}"; + var localVarPath = "/store/order/{order_id}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -686,7 +686,7 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter + if (orderId != null) localVarPathParams.Add("order_id", Configuration.ApiClient.ParameterToString(orderId)); // path parameter // make the HTTP request diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/README.md b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/README.md index 8b269fdd76..e7e5c9fb84 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/README.md +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/README.md @@ -104,9 +104,9 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID *StoreApi* | [**PlaceOrder**](docs/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet *UserApi* | [**CreateUser**](docs/UserApi.md#createuser) | **POST** /user | Create user *UserApi* | [**CreateUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/StoreApi.md b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/StoreApi.md index 74094e501b..bf2fdb1ed6 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/StoreApi.md +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/StoreApi.md @@ -4,9 +4,9 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**DeleteOrder**](StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +[**DeleteOrder**](StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID [**GetInventory**](StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -[**GetOrderById**](StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID +[**GetOrderById**](StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID [**PlaceOrder**](StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/StoreApi.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/StoreApi.cs index 809f16f723..32d01eded1 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/StoreApi.cs @@ -325,7 +325,7 @@ namespace IO.Swagger.Api if (orderId == null) throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - var localVarPath = "/store/order/{orderId}"; + var localVarPath = "/store/order/{order_id}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -347,7 +347,7 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter + if (orderId != null) localVarPathParams.Add("order_id", Configuration.ApiClient.ParameterToString(orderId)); // path parameter // make the HTTP request @@ -393,7 +393,7 @@ namespace IO.Swagger.Api if (orderId == null) throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - var localVarPath = "/store/order/{orderId}"; + var localVarPath = "/store/order/{order_id}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -415,7 +415,7 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter + if (orderId != null) localVarPathParams.Add("order_id", Configuration.ApiClient.ParameterToString(orderId)); // path parameter // make the HTTP request @@ -595,7 +595,7 @@ namespace IO.Swagger.Api if (orderId == null) throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById"); - var localVarPath = "/store/order/{orderId}"; + var localVarPath = "/store/order/{order_id}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -617,7 +617,7 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter + if (orderId != null) localVarPathParams.Add("order_id", Configuration.ApiClient.ParameterToString(orderId)); // path parameter // make the HTTP request @@ -664,7 +664,7 @@ namespace IO.Swagger.Api if (orderId == null) throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById"); - var localVarPath = "/store/order/{orderId}"; + var localVarPath = "/store/order/{order_id}"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -686,7 +686,7 @@ namespace IO.Swagger.Api if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter + if (orderId != null) localVarPathParams.Add("order_id", Configuration.ApiClient.ParameterToString(orderId)); // path parameter // make the HTTP request diff --git a/samples/client/petstore/go/go-petstore/README.md b/samples/client/petstore/go/go-petstore/README.md index 15f3ca6f4a..90c83d951c 100644 --- a/samples/client/petstore/go/go-petstore/README.md +++ b/samples/client/petstore/go/go-petstore/README.md @@ -32,9 +32,9 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **Put** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **Post** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **Post** /pet/{petId}/uploadImage | uploads an image -*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **Delete** /store/order/{orderId} | Delete purchase order by ID +*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **Delete** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **Get** /store/inventory | Returns pet inventories by status -*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **Get** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **Get** /store/order/{order_id} | Find purchase order by ID *StoreApi* | [**PlaceOrder**](docs/StoreApi.md#placeorder) | **Post** /store/order | Place an order for a pet *UserApi* | [**CreateUser**](docs/UserApi.md#createuser) | **Post** /user | Create user *UserApi* | [**CreateUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **Post** /user/createWithArray | Creates list of users with given input array diff --git a/samples/client/petstore/go/go-petstore/docs/StoreApi.md b/samples/client/petstore/go/go-petstore/docs/StoreApi.md index f7d52eb2b9..cf0f657465 100644 --- a/samples/client/petstore/go/go-petstore/docs/StoreApi.md +++ b/samples/client/petstore/go/go-petstore/docs/StoreApi.md @@ -4,9 +4,9 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**DeleteOrder**](StoreApi.md#DeleteOrder) | **Delete** /store/order/{orderId} | Delete purchase order by ID +[**DeleteOrder**](StoreApi.md#DeleteOrder) | **Delete** /store/order/{order_id} | Delete purchase order by ID [**GetInventory**](StoreApi.md#GetInventory) | **Get** /store/inventory | Returns pet inventories by status -[**GetOrderById**](StoreApi.md#GetOrderById) | **Get** /store/order/{orderId} | Find purchase order by ID +[**GetOrderById**](StoreApi.md#GetOrderById) | **Get** /store/order/{order_id} | Find purchase order by ID [**PlaceOrder**](StoreApi.md#PlaceOrder) | **Post** /store/order | Place an order for a pet diff --git a/samples/client/petstore/go/go-petstore/store_api.go b/samples/client/petstore/go/go-petstore/store_api.go index 7f136f31f2..0e46b54bee 100644 --- a/samples/client/petstore/go/go-petstore/store_api.go +++ b/samples/client/petstore/go/go-petstore/store_api.go @@ -48,8 +48,8 @@ func (a StoreApi) DeleteOrder(orderId string) (*APIResponse, error) { var localVarHttpMethod = strings.ToUpper("Delete") // create path and map variables - localVarPath := a.Configuration.BasePath + "/store/order/{orderId}" - localVarPath = strings.Replace(localVarPath, "{"+"orderId"+"}", fmt.Sprintf("%v", orderId), -1) + localVarPath := a.Configuration.BasePath + "/store/order/{order_id}" + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", fmt.Sprintf("%v", orderId), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -170,8 +170,8 @@ func (a StoreApi) GetOrderById(orderId int64) (*Order, *APIResponse, error) { var localVarHttpMethod = strings.ToUpper("Get") // create path and map variables - localVarPath := a.Configuration.BasePath + "/store/order/{orderId}" - localVarPath = strings.Replace(localVarPath, "{"+"orderId"+"}", fmt.Sprintf("%v", orderId), -1) + localVarPath := a.Configuration.BasePath + "/store/order/{order_id}" + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", fmt.Sprintf("%v", orderId), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} diff --git a/samples/client/petstore/java/jersey1/docs/StoreApi.md b/samples/client/petstore/java/jersey1/docs/StoreApi.md index a2547a1483..e6dc635e51 100644 --- a/samples/client/petstore/java/jersey1/docs/StoreApi.md +++ b/samples/client/petstore/java/jersey1/docs/StoreApi.md @@ -4,9 +4,9 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID [**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status -[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID +[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID [**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet 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 48d7c58de7..db18bcb589 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,8 +63,8 @@ public class StoreApi { } // create path and map variables - String localVarPath = "/store/order/{orderId}" - .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); + String localVarPath = "/store/order/{order_id}" + .replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); // query params List localVarQueryParams = new ArrayList(); @@ -140,8 +140,8 @@ public class StoreApi { } // create path and map variables - String localVarPath = "/store/order/{orderId}" - .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); + String localVarPath = "/store/order/{order_id}" + .replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); // query params List localVarQueryParams = new ArrayList(); diff --git a/samples/client/petstore/java/jersey2-java8/docs/StoreApi.md b/samples/client/petstore/java/jersey2-java8/docs/StoreApi.md index a2547a1483..e6dc635e51 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/StoreApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/StoreApi.md @@ -4,9 +4,9 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID [**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status -[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID +[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID [**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet 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 d0a1e84374..22be0ebb02 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,8 +49,8 @@ public class StoreApi { } // create path and map variables - String localVarPath = "/store/order/{orderId}" - .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); + String localVarPath = "/store/order/{order_id}" + .replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); // query params List localVarQueryParams = new ArrayList(); @@ -126,8 +126,8 @@ public class StoreApi { } // create path and map variables - String localVarPath = "/store/order/{orderId}" - .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); + String localVarPath = "/store/order/{order_id}" + .replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); // query params List localVarQueryParams = new ArrayList(); diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/StoreApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/StoreApi.md index a2547a1483..e6dc635e51 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/StoreApi.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/StoreApi.md @@ -4,9 +4,9 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID [**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status -[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID +[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID [**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ApiClient.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ApiClient.java index 59b054e31c..c39625501f 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ApiClient.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/ApiClient.java @@ -727,12 +727,13 @@ public class ApiClient { * application/json * application/json; charset=UTF8 * APPLICATION/JSON - * + * application/vnd.company+json * @param mime MIME (Multipurpose Internet Mail Extensions) * @return True if the given MIME is JSON, false otherwise. */ public boolean isJsonMime(String mime) { - return mime != null && mime.matches("(?i)application\\/json(;.*)?"); + String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"; + return mime != null && mime.matches(jsonMime); } /** diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/StoreApi.java index 0b9fc0c48c..0b1d4c1232 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/StoreApi.java @@ -66,8 +66,8 @@ public class StoreApi { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/store/order/{orderId}" - .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); + String localVarPath = "/store/order/{order_id}" + .replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); List localVarQueryParams = new ArrayList(); @@ -304,8 +304,8 @@ public class StoreApi { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/store/order/{orderId}" - .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); + String localVarPath = "/store/order/{order_id}" + .replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); List localVarQueryParams = new ArrayList(); diff --git a/samples/client/petstore/java/okhttp-gson/docs/StoreApi.md b/samples/client/petstore/java/okhttp-gson/docs/StoreApi.md index a2547a1483..e6dc635e51 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/StoreApi.md +++ b/samples/client/petstore/java/okhttp-gson/docs/StoreApi.md @@ -4,9 +4,9 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID [**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status -[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID +[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID [**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet 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 0b9fc0c48c..0b1d4c1232 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 @@ -66,8 +66,8 @@ public class StoreApi { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/store/order/{orderId}" - .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); + String localVarPath = "/store/order/{order_id}" + .replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); List localVarQueryParams = new ArrayList(); @@ -304,8 +304,8 @@ public class StoreApi { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/store/order/{orderId}" - .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); + String localVarPath = "/store/order/{order_id}" + .replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); List localVarQueryParams = new ArrayList(); diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/StoreApi.java index 7dba9b5d85..f705411a0d 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/StoreApi.java @@ -22,9 +22,9 @@ public interface StoreApi { * @return Void */ - @DELETE("/store/order/{orderId}") + @DELETE("/store/order/{order_id}") Void deleteOrder( - @retrofit.http.Path("orderId") String orderId + @retrofit.http.Path("order_id") String orderId ); /** @@ -34,9 +34,9 @@ public interface StoreApi { * @param cb callback method */ - @DELETE("/store/order/{orderId}") + @DELETE("/store/order/{order_id}") void deleteOrder( - @retrofit.http.Path("orderId") String orderId, Callback cb + @retrofit.http.Path("order_id") String orderId, Callback cb ); /** * Returns pet inventories by status @@ -67,9 +67,9 @@ public interface StoreApi { * @return Order */ - @GET("/store/order/{orderId}") + @GET("/store/order/{order_id}") Order getOrderById( - @retrofit.http.Path("orderId") Long orderId + @retrofit.http.Path("order_id") Long orderId ); /** @@ -79,9 +79,9 @@ public interface StoreApi { * @param cb callback method */ - @GET("/store/order/{orderId}") + @GET("/store/order/{order_id}") void getOrderById( - @retrofit.http.Path("orderId") Long orderId, Callback cb + @retrofit.http.Path("order_id") Long orderId, Callback cb ); /** * Place an order for a pet diff --git a/samples/client/petstore/java/retrofit2-play24/docs/StoreApi.md b/samples/client/petstore/java/retrofit2-play24/docs/StoreApi.md index 509e8c9147..6b53c6a566 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/StoreApi.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/StoreApi.md @@ -4,9 +4,9 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** store/order/{orderId} | Delete purchase order by ID +[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** store/order/{order_id} | Delete purchase order by ID [**getInventory**](StoreApi.md#getInventory) | **GET** store/inventory | Returns pet inventories by status -[**getOrderById**](StoreApi.md#getOrderById) | **GET** store/order/{orderId} | Find purchase order by ID +[**getOrderById**](StoreApi.md#getOrderById) | **GET** store/order/{order_id} | Find purchase order by ID [**placeOrder**](StoreApi.md#placeOrder) | **POST** store/order | Place an order for a pet 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 94877ed389..3cfefc29b9 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 @@ -26,9 +26,9 @@ public interface StoreApi { * @param orderId ID of the order that needs to be deleted (required) * @return Call<Void> */ - @DELETE("store/order/{orderId}") + @DELETE("store/order/{order_id}") F.Promise> deleteOrder( - @retrofit2.http.Path("orderId") String orderId + @retrofit2.http.Path("order_id") String orderId ); /** @@ -46,9 +46,9 @@ public interface StoreApi { * @param orderId ID of pet that needs to be fetched (required) * @return Call<Order> */ - @GET("store/order/{orderId}") + @GET("store/order/{order_id}") F.Promise> getOrderById( - @retrofit2.http.Path("orderId") Long orderId + @retrofit2.http.Path("order_id") Long orderId ); /** diff --git a/samples/client/petstore/java/retrofit2/docs/StoreApi.md b/samples/client/petstore/java/retrofit2/docs/StoreApi.md index 509e8c9147..6b53c6a566 100644 --- a/samples/client/petstore/java/retrofit2/docs/StoreApi.md +++ b/samples/client/petstore/java/retrofit2/docs/StoreApi.md @@ -4,9 +4,9 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** store/order/{orderId} | Delete purchase order by ID +[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** store/order/{order_id} | Delete purchase order by ID [**getInventory**](StoreApi.md#getInventory) | **GET** store/inventory | Returns pet inventories by status -[**getOrderById**](StoreApi.md#getOrderById) | **GET** store/order/{orderId} | Find purchase order by ID +[**getOrderById**](StoreApi.md#getOrderById) | **GET** store/order/{order_id} | Find purchase order by ID [**placeOrder**](StoreApi.md#placeOrder) | **POST** store/order | Place an order for a pet 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 16b57ea3c9..3be2674aa7 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 @@ -24,9 +24,9 @@ public interface StoreApi { * @param orderId ID of the order that needs to be deleted (required) * @return Call<Void> */ - @DELETE("store/order/{orderId}") + @DELETE("store/order/{order_id}") Call deleteOrder( - @retrofit2.http.Path("orderId") String orderId + @retrofit2.http.Path("order_id") String orderId ); /** @@ -44,9 +44,9 @@ public interface StoreApi { * @param orderId ID of pet that needs to be fetched (required) * @return Call<Order> */ - @GET("store/order/{orderId}") + @GET("store/order/{order_id}") Call getOrderById( - @retrofit2.http.Path("orderId") Long orderId + @retrofit2.http.Path("order_id") Long orderId ); /** diff --git a/samples/client/petstore/java/retrofit2rx/docs/StoreApi.md b/samples/client/petstore/java/retrofit2rx/docs/StoreApi.md index 509e8c9147..6b53c6a566 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/StoreApi.md +++ b/samples/client/petstore/java/retrofit2rx/docs/StoreApi.md @@ -4,9 +4,9 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** store/order/{orderId} | Delete purchase order by ID +[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** store/order/{order_id} | Delete purchase order by ID [**getInventory**](StoreApi.md#getInventory) | **GET** store/inventory | Returns pet inventories by status -[**getOrderById**](StoreApi.md#getOrderById) | **GET** store/order/{orderId} | Find purchase order by ID +[**getOrderById**](StoreApi.md#getOrderById) | **GET** store/order/{order_id} | Find purchase order by ID [**placeOrder**](StoreApi.md#placeOrder) | **POST** store/order | Place an order for a pet 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 a937daca7c..c2dc749a33 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 @@ -24,9 +24,9 @@ public interface StoreApi { * @param orderId ID of the order that needs to be deleted (required) * @return Call<Void> */ - @DELETE("store/order/{orderId}") + @DELETE("store/order/{order_id}") Observable deleteOrder( - @retrofit2.http.Path("orderId") String orderId + @retrofit2.http.Path("order_id") String orderId ); /** @@ -44,9 +44,9 @@ public interface StoreApi { * @param orderId ID of pet that needs to be fetched (required) * @return Call<Order> */ - @GET("store/order/{orderId}") + @GET("store/order/{order_id}") Observable getOrderById( - @retrofit2.http.Path("orderId") Long orderId + @retrofit2.http.Path("order_id") Long orderId ); /** diff --git a/samples/client/petstore/java/retrofit2rx2/docs/StoreApi.md b/samples/client/petstore/java/retrofit2rx2/docs/StoreApi.md index 509e8c9147..6b53c6a566 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/StoreApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/StoreApi.md @@ -4,9 +4,9 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** store/order/{orderId} | Delete purchase order by ID +[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** store/order/{order_id} | Delete purchase order by ID [**getInventory**](StoreApi.md#getInventory) | **GET** store/inventory | Returns pet inventories by status -[**getOrderById**](StoreApi.md#getOrderById) | **GET** store/order/{orderId} | Find purchase order by ID +[**getOrderById**](StoreApi.md#getOrderById) | **GET** store/order/{order_id} | Find purchase order by ID [**placeOrder**](StoreApi.md#placeOrder) | **POST** store/order | Place an order for a pet diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/StoreApi.java index a937daca7c..c2dc749a33 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/StoreApi.java @@ -24,9 +24,9 @@ public interface StoreApi { * @param orderId ID of the order that needs to be deleted (required) * @return Call<Void> */ - @DELETE("store/order/{orderId}") + @DELETE("store/order/{order_id}") Observable deleteOrder( - @retrofit2.http.Path("orderId") String orderId + @retrofit2.http.Path("order_id") String orderId ); /** @@ -44,9 +44,9 @@ public interface StoreApi { * @param orderId ID of pet that needs to be fetched (required) * @return Call<Order> */ - @GET("store/order/{orderId}") + @GET("store/order/{order_id}") Observable getOrderById( - @retrofit2.http.Path("orderId") Long orderId + @retrofit2.http.Path("order_id") Long orderId ); /** diff --git a/samples/client/petstore/javascript-promise/README.md b/samples/client/petstore/javascript-promise/README.md index 73aa0e9763..ab8caef7b0 100644 --- a/samples/client/petstore/javascript-promise/README.md +++ b/samples/client/petstore/javascript-promise/README.md @@ -82,9 +82,9 @@ Class | Method | HTTP request | Description *SwaggerPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet *SwaggerPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data *SwaggerPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image -*SwaggerPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +*SwaggerPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *SwaggerPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status -*SwaggerPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID +*SwaggerPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID *SwaggerPetstore.StoreApi* | [**placeOrder**](docs/StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet *SwaggerPetstore.UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create user *SwaggerPetstore.UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array diff --git a/samples/client/petstore/javascript-promise/docs/StoreApi.md b/samples/client/petstore/javascript-promise/docs/StoreApi.md index a7ec557dce..402c198e81 100644 --- a/samples/client/petstore/javascript-promise/docs/StoreApi.md +++ b/samples/client/petstore/javascript-promise/docs/StoreApi.md @@ -4,9 +4,9 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID [**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status -[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID +[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID [**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet diff --git a/samples/client/petstore/javascript-promise/src/api/StoreApi.js b/samples/client/petstore/javascript-promise/src/api/StoreApi.js index 987f5c0bdb..eb62340381 100644 --- a/samples/client/petstore/javascript-promise/src/api/StoreApi.js +++ b/samples/client/petstore/javascript-promise/src/api/StoreApi.js @@ -62,7 +62,7 @@ var pathParams = { - 'orderId': orderId + 'order_id': orderId }; var queryParams = { }; @@ -77,7 +77,7 @@ var returnType = null; return this.apiClient.callApi( - '/store/order/{orderId}', 'DELETE', + '/store/order/{order_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType ); @@ -156,7 +156,7 @@ var pathParams = { - 'orderId': orderId + 'order_id': orderId }; var queryParams = { }; @@ -171,7 +171,7 @@ var returnType = Order; return this.apiClient.callApi( - '/store/order/{orderId}', 'GET', + '/store/order/{order_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType ); diff --git a/samples/client/petstore/javascript/README.md b/samples/client/petstore/javascript/README.md index 6e99bc5392..065bf4f1ca 100644 --- a/samples/client/petstore/javascript/README.md +++ b/samples/client/petstore/javascript/README.md @@ -85,9 +85,9 @@ Class | Method | HTTP request | Description *SwaggerPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet *SwaggerPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data *SwaggerPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image -*SwaggerPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +*SwaggerPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *SwaggerPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status -*SwaggerPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID +*SwaggerPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID *SwaggerPetstore.StoreApi* | [**placeOrder**](docs/StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet *SwaggerPetstore.UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create user *SwaggerPetstore.UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array diff --git a/samples/client/petstore/javascript/docs/StoreApi.md b/samples/client/petstore/javascript/docs/StoreApi.md index e1fa1a4fd5..0ef25bf703 100644 --- a/samples/client/petstore/javascript/docs/StoreApi.md +++ b/samples/client/petstore/javascript/docs/StoreApi.md @@ -4,9 +4,9 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID [**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status -[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID +[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID [**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet diff --git a/samples/client/petstore/javascript/src/api/StoreApi.js b/samples/client/petstore/javascript/src/api/StoreApi.js index 36cc93dc02..960b24323c 100644 --- a/samples/client/petstore/javascript/src/api/StoreApi.js +++ b/samples/client/petstore/javascript/src/api/StoreApi.js @@ -69,7 +69,7 @@ var pathParams = { - 'orderId': orderId + 'order_id': orderId }; var queryParams = { }; @@ -84,7 +84,7 @@ var returnType = null; return this.apiClient.callApi( - '/store/order/{orderId}', 'DELETE', + '/store/order/{order_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); @@ -154,7 +154,7 @@ var pathParams = { - 'orderId': orderId + 'order_id': orderId }; var queryParams = { }; @@ -169,7 +169,7 @@ var returnType = Order; return this.apiClient.callApi( - '/store/order/{orderId}', 'GET', + '/store/order/{order_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); diff --git a/samples/client/petstore/perl/README.md b/samples/client/petstore/perl/README.md index 725b8e463b..28d623894e 100644 --- a/samples/client/petstore/perl/README.md +++ b/samples/client/petstore/perl/README.md @@ -348,9 +348,9 @@ Class | Method | HTTP request | Description *PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet *PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image -*StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +*StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID *StoreApi* | [**place_order**](docs/StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet *UserApi* | [**create_user**](docs/UserApi.md#create_user) | **POST** /user | Create user *UserApi* | [**create_users_with_array_input**](docs/UserApi.md#create_users_with_array_input) | **POST** /user/createWithArray | Creates list of users with given input array diff --git a/samples/client/petstore/perl/docs/StoreApi.md b/samples/client/petstore/perl/docs/StoreApi.md index 0bbdaf511f..6d69981618 100644 --- a/samples/client/petstore/perl/docs/StoreApi.md +++ b/samples/client/petstore/perl/docs/StoreApi.md @@ -9,9 +9,9 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +[**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID [**get_inventory**](StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status -[**get_order_by_id**](StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID +[**get_order_by_id**](StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID [**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/StoreApi.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/StoreApi.pm index 87589c7a7e..a7972ed21a 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/StoreApi.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/StoreApi.pm @@ -82,7 +82,7 @@ sub delete_order { } # parse inputs - my $_resource_path = '/store/order/{orderId}'; + my $_resource_path = '/store/order/{order_id}'; my $_method = 'DELETE'; my $query_params = {}; @@ -98,7 +98,7 @@ sub delete_order { # path params if ( exists $args{'order_id'}) { - my $_base_variable = "{" . "orderId" . "}"; + my $_base_variable = "{" . "order_id" . "}"; my $_base_value = $self->{api_client}->to_path_value($args{'order_id'}); $_resource_path =~ s/$_base_variable/$_base_value/g; } @@ -194,7 +194,7 @@ sub get_order_by_id { } # parse inputs - my $_resource_path = '/store/order/{orderId}'; + my $_resource_path = '/store/order/{order_id}'; my $_method = 'GET'; my $query_params = {}; @@ -210,7 +210,7 @@ sub get_order_by_id { # path params if ( exists $args{'order_id'}) { - my $_base_variable = "{" . "orderId" . "}"; + my $_base_variable = "{" . "order_id" . "}"; my $_base_value = $self->{api_client}->to_path_value($args{'order_id'}); $_resource_path =~ s/$_base_variable/$_base_value/g; } diff --git a/samples/client/petstore/php/SwaggerClient-php/README.md b/samples/client/petstore/php/SwaggerClient-php/README.md index 49216f7fb3..0444bdd3f1 100644 --- a/samples/client/petstore/php/SwaggerClient-php/README.md +++ b/samples/client/petstore/php/SwaggerClient-php/README.md @@ -86,9 +86,9 @@ Class | Method | HTTP request | Description *PetApi* | [**updatePet**](docs/Api/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**updatePetWithForm**](docs/Api/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**uploadFile**](docs/Api/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*StoreApi* | [**deleteOrder**](docs/Api/StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +*StoreApi* | [**deleteOrder**](docs/Api/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**getInventory**](docs/Api/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | [**getOrderById**](docs/Api/StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**getOrderById**](docs/Api/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID *StoreApi* | [**placeOrder**](docs/Api/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet *UserApi* | [**createUser**](docs/Api/UserApi.md#createuser) | **POST** /user | Create user *UserApi* | [**createUsersWithArrayInput**](docs/Api/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Api/StoreApi.md b/samples/client/petstore/php/SwaggerClient-php/docs/Api/StoreApi.md index 8c0930563f..d959d6141d 100644 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Api/StoreApi.md +++ b/samples/client/petstore/php/SwaggerClient-php/docs/Api/StoreApi.md @@ -4,9 +4,9 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID [**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status -[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID +[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID [**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet 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 e3d7e46672..bfa8fd7158 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php @@ -118,7 +118,7 @@ class StoreApi throw new \InvalidArgumentException('Missing the required parameter $order_id when calling deleteOrder'); } // parse inputs - $resourcePath = "/store/order/{orderId}"; + $resourcePath = "/store/order/{order_id}"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -132,7 +132,7 @@ class StoreApi // path params if ($order_id !== null) { $resourcePath = str_replace( - "{" . "orderId" . "}", + "{" . "order_id" . "}", $this->apiClient->getSerializer()->toPathValue($order_id), $resourcePath ); @@ -153,7 +153,7 @@ class StoreApi $httpBody, $headerParams, null, - '/store/order/{orderId}' + '/store/order/{order_id}' ); return [null, $statusCode, $httpHeader]; @@ -276,7 +276,7 @@ class StoreApi } // parse inputs - $resourcePath = "/store/order/{orderId}"; + $resourcePath = "/store/order/{order_id}"; $httpBody = ''; $queryParams = []; $headerParams = []; @@ -290,7 +290,7 @@ class StoreApi // path params if ($order_id !== null) { $resourcePath = str_replace( - "{" . "orderId" . "}", + "{" . "order_id" . "}", $this->apiClient->getSerializer()->toPathValue($order_id), $resourcePath ); @@ -311,7 +311,7 @@ class StoreApi $httpBody, $headerParams, '\Swagger\Client\Model\Order', - '/store/order/{orderId}' + '/store/order/{order_id}' ); return [$this->apiClient->getSerializer()->deserialize($response, '\Swagger\Client\Model\Order', $httpHeader), $statusCode, $httpHeader]; diff --git a/samples/client/petstore/python/README.md b/samples/client/petstore/python/README.md index f1353f15b3..217b9de54b 100644 --- a/samples/client/petstore/python/README.md +++ b/samples/client/petstore/python/README.md @@ -80,9 +80,9 @@ Class | Method | HTTP request | Description *PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet *PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image -*StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +*StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID *StoreApi* | [**place_order**](docs/StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet *UserApi* | [**create_user**](docs/UserApi.md#create_user) | **POST** /user | Create user *UserApi* | [**create_users_with_array_input**](docs/UserApi.md#create_users_with_array_input) | **POST** /user/createWithArray | Creates list of users with given input array diff --git a/samples/client/petstore/python/docs/StoreApi.md b/samples/client/petstore/python/docs/StoreApi.md index 64e9ead049..25c66e25ab 100644 --- a/samples/client/petstore/python/docs/StoreApi.md +++ b/samples/client/petstore/python/docs/StoreApi.md @@ -4,9 +4,9 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +[**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID [**get_inventory**](StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status -[**get_order_by_id**](StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID +[**get_order_by_id**](StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID [**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet 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 c3f1b7f77b..1f1f2f336d 100644 --- a/samples/client/petstore/python/petstore_api/apis/store_api.py +++ b/samples/client/petstore/python/petstore_api/apis/store_api.py @@ -110,7 +110,7 @@ class StoreApi(object): path_params = {} if 'order_id' in params: - path_params['orderId'] = params['order_id'] + path_params['order_id'] = params['order_id'] query_params = {} @@ -127,7 +127,7 @@ class StoreApi(object): # Authentication setting auth_settings = [] - return self.api_client.call_api('/store/order/{orderId}', 'DELETE', + return self.api_client.call_api('/store/order/{order_id}', 'DELETE', path_params, query_params, header_params, @@ -310,7 +310,7 @@ class StoreApi(object): path_params = {} if 'order_id' in params: - path_params['orderId'] = params['order_id'] + path_params['order_id'] = params['order_id'] query_params = {} @@ -327,7 +327,7 @@ class StoreApi(object): # Authentication setting auth_settings = [] - return self.api_client.call_api('/store/order/{orderId}', 'GET', + return self.api_client.call_api('/store/order/{order_id}', 'GET', path_params, query_params, header_params, diff --git a/samples/client/petstore/ruby/README.md b/samples/client/petstore/ruby/README.md index be935d849b..02e13cfbba 100644 --- a/samples/client/petstore/ruby/README.md +++ b/samples/client/petstore/ruby/README.md @@ -86,9 +86,9 @@ Class | Method | HTTP request | Description *Petstore::PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet *Petstore::PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data *Petstore::PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image -*Petstore::StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +*Petstore::StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *Petstore::StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status -*Petstore::StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID +*Petstore::StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID *Petstore::StoreApi* | [**place_order**](docs/StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet *Petstore::UserApi* | [**create_user**](docs/UserApi.md#create_user) | **POST** /user | Create user *Petstore::UserApi* | [**create_users_with_array_input**](docs/UserApi.md#create_users_with_array_input) | **POST** /user/createWithArray | Creates list of users with given input array diff --git a/samples/client/petstore/ruby/docs/StoreApi.md b/samples/client/petstore/ruby/docs/StoreApi.md index 389f8337da..aa7eaf03bf 100644 --- a/samples/client/petstore/ruby/docs/StoreApi.md +++ b/samples/client/petstore/ruby/docs/StoreApi.md @@ -4,9 +4,9 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +[**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID [**get_inventory**](StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status -[**get_order_by_id**](StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID +[**get_order_by_id**](StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID [**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet 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 6b8978f1b9..9826b6ee5e 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 @@ module Petstore # 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('{' + 'orderId' + '}', order_id.to_s) + local_var_path = "/store/order/{order_id}".sub('{' + 'order_id' + '}', order_id.to_s) # query parameters query_params = {} @@ -146,7 +146,7 @@ module Petstore end # resource path - local_var_path = "/store/order/{orderId}".sub('{' + 'orderId' + '}', order_id.to_s) + local_var_path = "/store/order/{order_id}".sub('{' + 'order_id' + '}', order_id.to_s) # query parameters query_params = {} diff --git a/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift b/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift index faa408a214..f6b937da86 100644 --- a/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift @@ -25,7 +25,7 @@ open class StoreAPI: APIBase { /** Delete purchase order by ID - - DELETE /store/order/{orderId} + - DELETE /store/order/{order_id} - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - parameter orderId: (path) ID of the order that needs to be deleted @@ -33,7 +33,7 @@ open class StoreAPI: APIBase { - returns: RequestBuilder */ open class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder { - var path = "/store/order/{orderId}" + var path = "/store/order/{order_id}" path = path.replacingOccurrences(of: "{order_id}", with: "\(orderId)", options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path let parameters: [String:Any]? = nil @@ -99,7 +99,7 @@ open class StoreAPI: APIBase { /** Find purchase order by ID - - GET /store/order/{orderId} + - GET /store/order/{order_id} - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - examples: [{contentType=application/xml, example= 123456789 @@ -137,7 +137,7 @@ open class StoreAPI: APIBase { - returns: RequestBuilder */ open class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder { - var path = "/store/order/{orderId}" + var path = "/store/order/{order_id}" path = path.replacingOccurrences(of: "{order_id}", with: "\(orderId)", options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path let parameters: [String:Any]? = nil diff --git a/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift b/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift index 740bc511ff..369138f1d0 100644 --- a/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift @@ -43,7 +43,7 @@ open class StoreAPI: APIBase { /** Delete purchase order by ID - - DELETE /store/order/{orderId} + - DELETE /store/order/{order_id} - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - parameter orderId: (path) ID of the order that needs to be deleted @@ -51,7 +51,7 @@ open class StoreAPI: APIBase { - returns: RequestBuilder */ open class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder { - var path = "/store/order/{orderId}" + var path = "/store/order/{order_id}" path = path.replacingOccurrences(of: "{order_id}", with: "\(orderId)", options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path let parameters: [String:Any]? = nil @@ -150,7 +150,7 @@ open class StoreAPI: APIBase { /** Find purchase order by ID - - GET /store/order/{orderId} + - GET /store/order/{order_id} - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - examples: [{contentType=application/xml, example= 123456789 @@ -188,7 +188,7 @@ open class StoreAPI: APIBase { - returns: RequestBuilder */ open class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder { - var path = "/store/order/{orderId}" + var path = "/store/order/{order_id}" path = path.replacingOccurrences(of: "{order_id}", with: "\(orderId)", options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path let parameters: [String:Any]? = nil diff --git a/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift b/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift index 465a768946..5177e56f53 100644 --- a/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift @@ -45,7 +45,7 @@ open class StoreAPI: APIBase { /** Delete purchase order by ID - - DELETE /store/order/{orderId} + - DELETE /store/order/{order_id} - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - parameter orderId: (path) ID of the order that needs to be deleted @@ -53,7 +53,7 @@ open class StoreAPI: APIBase { - returns: RequestBuilder */ open class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder { - var path = "/store/order/{orderId}" + var path = "/store/order/{order_id}" path = path.replacingOccurrences(of: "{order_id}", with: "\(orderId)", options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path let parameters: [String:Any]? = nil @@ -156,7 +156,7 @@ open class StoreAPI: APIBase { /** Find purchase order by ID - - GET /store/order/{orderId} + - GET /store/order/{order_id} - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - examples: [{contentType=application/xml, example= 123456789 @@ -194,7 +194,7 @@ open class StoreAPI: APIBase { - returns: RequestBuilder */ open class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder { - var path = "/store/order/{orderId}" + var path = "/store/order/{order_id}" path = path.replacingOccurrences(of: "{order_id}", with: "\(orderId)", options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path let parameters: [String:Any]? = nil diff --git a/samples/client/petstore/typescript-node/default/api.ts b/samples/client/petstore/typescript-node/default/api.ts index 274b84d927..7d83991438 100644 --- a/samples/client/petstore/typescript-node/default/api.ts +++ b/samples/client/petstore/typescript-node/default/api.ts @@ -421,10 +421,10 @@ export class PetApi { json: true, }; - this.authentications.api_key.applyToRequest(requestOptions); - this.authentications.petstore_auth.applyToRequest(requestOptions); + this.authentications.api_key.applyToRequest(requestOptions); + this.authentications.default.applyToRequest(requestOptions); if (Object.keys(formParams).length) { diff --git a/samples/client/petstore/typescript-node/npm/api.ts b/samples/client/petstore/typescript-node/npm/api.ts index 274b84d927..7d83991438 100644 --- a/samples/client/petstore/typescript-node/npm/api.ts +++ b/samples/client/petstore/typescript-node/npm/api.ts @@ -421,10 +421,10 @@ export class PetApi { json: true, }; - this.authentications.api_key.applyToRequest(requestOptions); - this.authentications.petstore_auth.applyToRequest(requestOptions); + this.authentications.api_key.applyToRequest(requestOptions); + this.authentications.default.applyToRequest(requestOptions); if (Object.keys(formParams).length) { diff --git a/samples/server/petstore/java-inflector/src/main/swagger/swagger.yaml b/samples/server/petstore/java-inflector/src/main/swagger/swagger.yaml index dc11a9593f..1bc82b0c60 100644 --- a/samples/server/petstore/java-inflector/src/main/swagger/swagger.yaml +++ b/samples/server/petstore/java-inflector/src/main/swagger/swagger.yaml @@ -348,7 +348,7 @@ paths: description: "Invalid Order" x-contentType: "application/json" x-accepts: "application/json" - /store/order/{orderId}: + /store/order/{order_id}: get: tags: - "store" @@ -360,7 +360,7 @@ paths: - "application/xml" - "application/json" parameters: - - name: "orderId" + - name: "order_id" in: "path" description: "ID of pet that needs to be fetched" required: true @@ -390,7 +390,7 @@ paths: - "application/xml" - "application/json" parameters: - - name: "orderId" + - name: "order_id" in: "path" description: "ID of the order that needs to be deleted" required: true diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/api/StoreApi.java index 6d6aa3848f..097edd6085 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/api/StoreApi.java @@ -32,7 +32,7 @@ public class StoreApi { private final StoreApiService delegate = StoreApiServiceFactory.getStoreApi(); @DELETE - @Path("/order/{orderId}") + @Path("/order/{order_id}") @Produces({ "application/xml", "application/json" }) @io.swagger.annotations.ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = void.class, tags={ "store", }) @@ -40,7 +40,7 @@ public class StoreApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = void.class) }) - public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("orderId") String orderId + public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("order_id") String orderId ) throws NotFoundException { return delegate.deleteOrder(orderId); @@ -59,7 +59,7 @@ public class StoreApi { return delegate.getInventory(); } @GET - @Path("/order/{orderId}") + @Path("/order/{order_id}") @Produces({ "application/xml", "application/json" }) @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) @@ -69,7 +69,7 @@ public class StoreApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Order.class) }) - public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("orderId") Long orderId + public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("order_id") Long orderId ) throws NotFoundException { return delegate.getOrderById(orderId); diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/StoreApi.java index 8ddeb8f3de..2698ca445e 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/StoreApi.java @@ -25,13 +25,13 @@ import javax.validation.Valid; public interface StoreApi { @DELETE - @Path("/store/order/{orderId}") + @Path("/store/order/{order_id}") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Delete purchase order by ID", tags={ "store", }) @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid ID supplied"), @ApiResponse(code = 404, message = "Order not found") }) - public void deleteOrder(@PathParam("orderId") String orderId); + public void deleteOrder(@PathParam("order_id") String orderId); @GET @Path("/store/inventory") @@ -42,14 +42,14 @@ public interface StoreApi { public Map getInventory(); @GET - @Path("/store/order/{orderId}") + @Path("/store/order/{order_id}") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Find purchase order by ID", tags={ "store", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 400, message = "Invalid ID supplied"), @ApiResponse(code = 404, message = "Order not found") }) - public Order getOrderById(@PathParam("orderId") @Min(1) @Max(5) Long orderId); + public Order getOrderById(@PathParam("order_id") @Min(1) @Max(5) Long orderId); @POST @Path("/store/order") diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/StoreApi.java index 153fd729be..3d0a9532b5 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/StoreApi.java @@ -21,14 +21,14 @@ import javax.validation.constraints.*; public class StoreApi { @DELETE - @Path("/order/{orderId}") + @Path("/order/{order_id}") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = void.class, tags={ "store", }) @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class), @ApiResponse(code = 404, message = "Order not found", response = void.class) }) - public Response deleteOrder(@PathParam("orderId") @ApiParam("ID of the order that needs to be deleted") String orderId) { + public Response deleteOrder(@PathParam("order_id") @ApiParam("ID of the order that needs to be deleted") String orderId) { return Response.ok().entity("magic!").build(); } @@ -46,7 +46,7 @@ public class StoreApi { } @GET - @Path("/order/{orderId}") + @Path("/order/{order_id}") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) @@ -54,7 +54,7 @@ public class StoreApi { @ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class), @ApiResponse(code = 404, message = "Order not found", response = Order.class) }) - public Response getOrderById(@PathParam("orderId") @Min(1) @Max(5) @ApiParam("ID of pet that needs to be fetched") Long orderId) { + public Response getOrderById(@PathParam("order_id") @Min(1) @Max(5) @ApiParam("ID of pet that needs to be fetched") Long orderId) { return Response.ok().entity("magic!").build(); } diff --git a/samples/server/petstore/jaxrs-spec/swagger.json b/samples/server/petstore/jaxrs-spec/swagger.json index c50f78b74a..93eb48692a 100644 --- a/samples/server/petstore/jaxrs-spec/swagger.json +++ b/samples/server/petstore/jaxrs-spec/swagger.json @@ -362,7 +362,7 @@ } } }, - "/store/order/{orderId}" : { + "/store/order/{order_id}" : { "get" : { "tags" : [ "store" ], "summary" : "Find purchase order by ID", @@ -370,7 +370,7 @@ "operationId" : "getOrderById", "produces" : [ "application/xml", "application/json" ], "parameters" : [ { - "name" : "orderId", + "name" : "order_id", "in" : "path", "description" : "ID of pet that needs to be fetched", "required" : true, @@ -401,7 +401,7 @@ "operationId" : "deleteOrder", "produces" : [ "application/xml", "application/json" ], "parameters" : [ { - "name" : "orderId", + "name" : "order_id", "in" : "path", "description" : "ID of the order that needs to be deleted", "required" : true, diff --git a/samples/server/petstore/lumen/lib/app/Http/routes.php b/samples/server/petstore/lumen/lib/app/Http/routes.php index 35a8f3fe8c..510b5ee2a5 100644 --- a/samples/server/petstore/lumen/lib/app/Http/routes.php +++ b/samples/server/petstore/lumen/lib/app/Http/routes.php @@ -118,14 +118,14 @@ $app->POST('/v2/store/order', 'StoreApi@placeOrder'); * Notes: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * Output-Formats: [application/xml, application/json] */ -$app->DELETE('/v2/store/order/{orderId}', 'StoreApi@deleteOrder'); +$app->DELETE('/v2/store/order/{order_id}', 'StoreApi@deleteOrder'); /** * GET getOrderById * Summary: Find purchase order by ID * Notes: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * Output-Formats: [application/xml, application/json] */ -$app->GET('/v2/store/order/{orderId}', 'StoreApi@getOrderById'); +$app->GET('/v2/store/order/{order_id}', 'StoreApi@getOrderById'); /** * POST createUser * Summary: Create user diff --git a/samples/server/petstore/nodejs-google-cloud-functions/api/swagger.yaml b/samples/server/petstore/nodejs-google-cloud-functions/api/swagger.yaml index ced8e85705..a2b8cd0f5c 100644 --- a/samples/server/petstore/nodejs-google-cloud-functions/api/swagger.yaml +++ b/samples/server/petstore/nodejs-google-cloud-functions/api/swagger.yaml @@ -108,11 +108,11 @@ paths: type: "array" items: type: "string" - default: "available" enum: - "available" - "pending" - "sold" + default: "available" collectionFormat: "csv" responses: 200: diff --git a/samples/server/petstore/nodejs/api/swagger.yaml b/samples/server/petstore/nodejs/api/swagger.yaml index ced8e85705..a2b8cd0f5c 100644 --- a/samples/server/petstore/nodejs/api/swagger.yaml +++ b/samples/server/petstore/nodejs/api/swagger.yaml @@ -108,11 +108,11 @@ paths: type: "array" items: type: "string" - default: "available" enum: - "available" - "pending" - "sold" + default: "available" collectionFormat: "csv" responses: 200: diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/StoreApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/StoreApi.java index 227c85b9e5..a7cb2a4cc0 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/StoreApi.java @@ -26,10 +26,10 @@ public interface StoreApi { @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - @RequestMapping(value = "/store/order/{orderId}", + @RequestMapping(value = "/store/order/{order_id}", produces = { "application/xml", "application/json" }, method = RequestMethod.DELETE) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("orderId") String orderId) { + default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("order_id") String orderId) { // do some magic! return new ResponseEntity(HttpStatus.OK); } @@ -56,10 +56,10 @@ public interface StoreApi { @ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class), @ApiResponse(code = 404, message = "Order not found", response = Order.class) }) - @RequestMapping(value = "/store/order/{orderId}", + @RequestMapping(value = "/store/order/{order_id}", produces = { "application/xml", "application/json" }, method = RequestMethod.GET) - default ResponseEntity getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") Long orderId) { + default ResponseEntity getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("order_id") Long orderId) { // do some magic! return new ResponseEntity(HttpStatus.OK); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/StoreApiController.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/StoreApiController.java index 07ed22b731..6a3afe25cb 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/StoreApiController.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/StoreApiController.java @@ -29,7 +29,7 @@ public class StoreApiController implements StoreApi { } - public ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("orderId") String orderId) { + public ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("order_id") String orderId) { // do some magic! return delegate.deleteOrder(orderId); } @@ -39,7 +39,7 @@ public class StoreApiController implements StoreApi { return delegate.getInventory(); } - public ResponseEntity getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") Long orderId) { + public ResponseEntity getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("order_id") Long orderId) { // do some magic! return delegate.getOrderById(orderId); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/StoreApi.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/StoreApi.java index 7a756ae42b..361b1d5dbe 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/StoreApi.java @@ -25,10 +25,10 @@ public interface StoreApi { @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - @RequestMapping(value = "/store/order/{orderId}", + @RequestMapping(value = "/store/order/{order_id}", produces = { "application/xml", "application/json" }, method = RequestMethod.DELETE) - ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("orderId") String orderId); + ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("order_id") String orderId); @ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @@ -49,10 +49,10 @@ public interface StoreApi { @ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class), @ApiResponse(code = 404, message = "Order not found", response = Order.class) }) - @RequestMapping(value = "/store/order/{orderId}", + @RequestMapping(value = "/store/order/{order_id}", produces = { "application/xml", "application/json" }, method = RequestMethod.GET) - ResponseEntity getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") Long orderId); + ResponseEntity getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("order_id") Long orderId); @ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", }) diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/StoreApiController.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/StoreApiController.java index 07ed22b731..6a3afe25cb 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/StoreApiController.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/StoreApiController.java @@ -29,7 +29,7 @@ public class StoreApiController implements StoreApi { } - public ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("orderId") String orderId) { + public ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("order_id") String orderId) { // do some magic! return delegate.deleteOrder(orderId); } @@ -39,7 +39,7 @@ public class StoreApiController implements StoreApi { return delegate.getInventory(); } - public ResponseEntity getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") Long orderId) { + public ResponseEntity getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("order_id") Long orderId) { // do some magic! return delegate.getOrderById(orderId); } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/StoreApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/StoreApi.java index b63234b59a..ec189068d6 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/StoreApi.java @@ -27,10 +27,10 @@ public interface StoreApi { @ApiImplicitParams({ }) - @RequestMapping(value = "/store/order/{orderId}", + @RequestMapping(value = "/store/order/{order_id}", produces = { "application/xml", "application/json" }, method = RequestMethod.DELETE) - ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("orderId") String orderId); + ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("order_id") String orderId); @ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @@ -55,10 +55,10 @@ public interface StoreApi { @ApiImplicitParams({ }) - @RequestMapping(value = "/store/order/{orderId}", + @RequestMapping(value = "/store/order/{order_id}", produces = { "application/xml", "application/json" }, method = RequestMethod.GET) - ResponseEntity getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") Long orderId); + ResponseEntity getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("order_id") Long orderId); @ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", }) diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/StoreApiController.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/StoreApiController.java index 97a1b7e512..f5446d8d0d 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/StoreApiController.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/StoreApiController.java @@ -24,7 +24,7 @@ public class StoreApiController implements StoreApi { - public ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("orderId") String orderId) { + public ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("order_id") String orderId) { // do some magic! return new ResponseEntity(HttpStatus.OK); } @@ -34,7 +34,7 @@ public class StoreApiController implements StoreApi { return new ResponseEntity>(HttpStatus.OK); } - public ResponseEntity getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") Long orderId) { + public ResponseEntity getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("order_id") Long orderId) { // do some magic! return new ResponseEntity(HttpStatus.OK); } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/api/StoreApi.java b/samples/server/petstore/springboot/src/main/java/io/swagger/api/StoreApi.java index 7a756ae42b..361b1d5dbe 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/api/StoreApi.java @@ -25,10 +25,10 @@ public interface StoreApi { @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - @RequestMapping(value = "/store/order/{orderId}", + @RequestMapping(value = "/store/order/{order_id}", produces = { "application/xml", "application/json" }, method = RequestMethod.DELETE) - ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("orderId") String orderId); + ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("order_id") String orderId); @ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @@ -49,10 +49,10 @@ public interface StoreApi { @ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class), @ApiResponse(code = 404, message = "Order not found", response = Order.class) }) - @RequestMapping(value = "/store/order/{orderId}", + @RequestMapping(value = "/store/order/{order_id}", produces = { "application/xml", "application/json" }, method = RequestMethod.GET) - ResponseEntity getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") Long orderId); + ResponseEntity getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("order_id") Long orderId); @ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", }) diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/api/StoreApiController.java b/samples/server/petstore/springboot/src/main/java/io/swagger/api/StoreApiController.java index 97a1b7e512..f5446d8d0d 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/api/StoreApiController.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/api/StoreApiController.java @@ -24,7 +24,7 @@ public class StoreApiController implements StoreApi { - public ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("orderId") String orderId) { + public ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("order_id") String orderId) { // do some magic! return new ResponseEntity(HttpStatus.OK); } @@ -34,7 +34,7 @@ public class StoreApiController implements StoreApi { return new ResponseEntity>(HttpStatus.OK); } - public ResponseEntity getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") Long orderId) { + public ResponseEntity getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("order_id") Long orderId) { // do some magic! return new ResponseEntity(HttpStatus.OK); } From 2e8eea9c1832735babc7eb499bceaa3e43b79a51 Mon Sep 17 00:00:00 2001 From: wing328 Date: Sun, 2 Apr 2017 19:01:43 +0800 Subject: [PATCH 2/3] add logic to camelize path variables for feign client (#5301) --- .../codegen/languages/JavaClientCodegen.java | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaClientCodegen.java index acfd7d7846..898474c44a 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaClientCodegen.java @@ -242,14 +242,14 @@ public class JavaClientCodegen extends AbstractJavaCodegen @Override public Map postProcessOperations(Map objs) { super.postProcessOperations(objs); - if(usesAnyRetrofitLibrary()) { + if (usesAnyRetrofitLibrary()) { Map operations = (Map) objs.get("operations"); if (operations != null) { List ops = (List) operations.get("operation"); for (CodegenOperation operation : ops) { if (operation.hasConsumes == Boolean.TRUE) { - if ( isMultipartType(operation.consumes) ) { + if (isMultipartType(operation.consumes)) { operation.isMultipart = Boolean.TRUE; } else { @@ -264,6 +264,27 @@ public class JavaClientCodegen extends AbstractJavaCodegen } } } + + // camelize path variables for Feign client + if ("feign".equals(getLibrary())) { + Map operations = (Map) objs.get("operations"); + List operationList = (List) operations.get("operation"); + for (CodegenOperation op : operationList) { + String path = new String(op.path); + String[] items = path.split("/", -1); + String opsPath = ""; + int pathParamIndex = 0; + + for (int i = 0; i < items.length; ++i) { + if (items[i].matches("^\\{(.*)\\}$")) { // wrap in {} + // camelize path variable + items[i] = "{" + camelize(items[i].substring(1, items[i].length()-1), true) + "}"; + } + } + op.path = StringUtils.join(items, "/"); + } + } + return objs; } From 7db3388fdcec312b03a04f2e0034ca818a0501df Mon Sep 17 00:00:00 2001 From: wing328 Date: Sun, 2 Apr 2017 21:39:48 +0800 Subject: [PATCH 3/3] Update maven compiler plugin to the latest version (3.6.1) (#5300) * update maven compiler plugin to the latest version * update feign petstore --- .../src/main/resources/Java/libraries/jersey2/pom.mustache | 2 +- .../main/resources/Java/libraries/retrofit/pom.mustache | 2 +- .../swagger-codegen/src/main/resources/Java/pom.mustache | 2 +- .../src/main/resources/akka-scala/pom.mustache | 7 +++---- .../src/main/resources/android/pom.mustache | 6 +++--- .../src/main/resources/codegen/pom.mustache | 6 +++--- .../swagger-codegen/src/main/resources/scala/pom.mustache | 6 +++--- pom.xml | 2 +- samples/client/petstore/akka-scala/pom.xml | 7 +++---- samples/client/petstore/android/httpclient/pom.xml | 6 +++--- samples/client/petstore/java/jersey1/pom.xml | 2 +- samples/client/petstore/java/jersey2-java6/pom.xml | 2 +- samples/client/petstore/java/jersey2-java8/pom.xml | 2 +- samples/client/petstore/java/jersey2/pom.xml | 2 +- samples/client/petstore/java/retrofit/pom.xml | 2 +- samples/client/petstore/scala/pom.xml | 6 +++--- 16 files changed, 30 insertions(+), 32 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/pom.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/pom.mustache index ca467aa29b..d4d043bb0f 100644 --- a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/pom.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/pom.mustache @@ -117,7 +117,7 @@ org.apache.maven.plugins maven-compiler-plugin - 2.5.1 + 3.6.1 {{#java8}} 1.8 diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit/pom.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit/pom.mustache index 05c0e7dbe3..b7fbdb15fe 100644 --- a/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit/pom.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit/pom.mustache @@ -117,7 +117,7 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 3.6.1 1.7 1.7 diff --git a/modules/swagger-codegen/src/main/resources/Java/pom.mustache b/modules/swagger-codegen/src/main/resources/Java/pom.mustache index 43e45ee68f..67d4ba4d2a 100644 --- a/modules/swagger-codegen/src/main/resources/Java/pom.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/pom.mustache @@ -118,7 +118,7 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 3.6.1 {{#java8}} 1.8 diff --git a/modules/swagger-codegen/src/main/resources/akka-scala/pom.mustache b/modules/swagger-codegen/src/main/resources/akka-scala/pom.mustache index 8c8c377ee7..8e2790095b 100644 --- a/modules/swagger-codegen/src/main/resources/akka-scala/pom.mustache +++ b/modules/swagger-codegen/src/main/resources/akka-scala/pom.mustache @@ -104,11 +104,10 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 3.6.1 - - 1.6 - 1.6 + 1.7 + 1.7 diff --git a/modules/swagger-codegen/src/main/resources/android/pom.mustache b/modules/swagger-codegen/src/main/resources/android/pom.mustache index 758e9d62d0..355163a045 100644 --- a/modules/swagger-codegen/src/main/resources/android/pom.mustache +++ b/modules/swagger-codegen/src/main/resources/android/pom.mustache @@ -98,10 +98,10 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 3.6.1 - 1.6 - 1.6 + 1.7 + 1.7 diff --git a/modules/swagger-codegen/src/main/resources/codegen/pom.mustache b/modules/swagger-codegen/src/main/resources/codegen/pom.mustache index 30f1b14872..11e4a76e33 100644 --- a/modules/swagger-codegen/src/main/resources/codegen/pom.mustache +++ b/modules/swagger-codegen/src/main/resources/codegen/pom.mustache @@ -78,10 +78,10 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 3.6.1 - 1.6 - 1.6 + 1.7 + 1.7 diff --git a/modules/swagger-codegen/src/main/resources/scala/pom.mustache b/modules/swagger-codegen/src/main/resources/scala/pom.mustache index f0292f5789..11331dce41 100644 --- a/modules/swagger-codegen/src/main/resources/scala/pom.mustache +++ b/modules/swagger-codegen/src/main/resources/scala/pom.mustache @@ -103,10 +103,10 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 3.6.1 - 1.6 - 1.6 + 1.7 + 1.7 diff --git a/pom.xml b/pom.xml index ce57b334d5..5a2562053a 100644 --- a/pom.xml +++ b/pom.xml @@ -155,7 +155,7 @@ maven-compiler-plugin - 3.5.1 + 3.6.1 1.7 1.7 diff --git a/samples/client/petstore/akka-scala/pom.xml b/samples/client/petstore/akka-scala/pom.xml index d37f26cfb4..5593f09884 100644 --- a/samples/client/petstore/akka-scala/pom.xml +++ b/samples/client/petstore/akka-scala/pom.xml @@ -104,11 +104,10 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 3.6.1 - - 1.6 - 1.6 + 1.7 + 1.7 diff --git a/samples/client/petstore/android/httpclient/pom.xml b/samples/client/petstore/android/httpclient/pom.xml index 5ba936a570..75ef31f534 100644 --- a/samples/client/petstore/android/httpclient/pom.xml +++ b/samples/client/petstore/android/httpclient/pom.xml @@ -98,10 +98,10 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 3.6.1 - 1.6 - 1.6 + 1.7 + 1.7 diff --git a/samples/client/petstore/java/jersey1/pom.xml b/samples/client/petstore/java/jersey1/pom.xml index 3ba83ba77f..f15b614e1a 100644 --- a/samples/client/petstore/java/jersey1/pom.xml +++ b/samples/client/petstore/java/jersey1/pom.xml @@ -118,7 +118,7 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 3.6.1 1.7 1.7 diff --git a/samples/client/petstore/java/jersey2-java6/pom.xml b/samples/client/petstore/java/jersey2-java6/pom.xml index f8833b5216..375f01b23d 100644 --- a/samples/client/petstore/java/jersey2-java6/pom.xml +++ b/samples/client/petstore/java/jersey2-java6/pom.xml @@ -117,7 +117,7 @@ org.apache.maven.plugins maven-compiler-plugin - 2.5.1 + 3.6.1 1.7 1.7 diff --git a/samples/client/petstore/java/jersey2-java8/pom.xml b/samples/client/petstore/java/jersey2-java8/pom.xml index ac527b7d82..1f8805518b 100644 --- a/samples/client/petstore/java/jersey2-java8/pom.xml +++ b/samples/client/petstore/java/jersey2-java8/pom.xml @@ -117,7 +117,7 @@ org.apache.maven.plugins maven-compiler-plugin - 2.5.1 + 3.6.1 1.8 1.8 diff --git a/samples/client/petstore/java/jersey2/pom.xml b/samples/client/petstore/java/jersey2/pom.xml index e4e73cfc09..fbf552cc13 100644 --- a/samples/client/petstore/java/jersey2/pom.xml +++ b/samples/client/petstore/java/jersey2/pom.xml @@ -117,7 +117,7 @@ org.apache.maven.plugins maven-compiler-plugin - 2.5.1 + 3.6.1 1.7 1.7 diff --git a/samples/client/petstore/java/retrofit/pom.xml b/samples/client/petstore/java/retrofit/pom.xml index aaa9654d87..069c8bb3ed 100644 --- a/samples/client/petstore/java/retrofit/pom.xml +++ b/samples/client/petstore/java/retrofit/pom.xml @@ -117,7 +117,7 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 3.6.1 1.7 1.7 diff --git a/samples/client/petstore/scala/pom.xml b/samples/client/petstore/scala/pom.xml index e61ecd8f0f..a54aac0067 100644 --- a/samples/client/petstore/scala/pom.xml +++ b/samples/client/petstore/scala/pom.xml @@ -103,10 +103,10 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 3.6.1 - 1.6 - 1.6 + 1.7 + 1.7