From 1882c1798b58ec18ce52da29c6893689ac816ee1 Mon Sep 17 00:00:00 2001 From: Ahmed Yarub Hani Al Nuaimi Date: Sat, 4 Sep 2021 12:43:18 -0300 Subject: [PATCH 01/17] Undefine reserved keywords Cast to correct type when applicable to be compilable on C++ compilers Add conditional instllation of configuration files --- .../C-libcurl/CMakeLists.txt.mustache | 50 ++++++++++++++++++- .../resources/C-libcurl/api-header.mustache | 4 ++ .../resources/C-libcurl/apiClient.c.mustache | 2 +- .../resources/C-libcurl/model-header.mustache | 4 ++ 4 files changed, 57 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache index 2e6d8480fa00..b888c3743819 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache @@ -92,8 +92,54 @@ target_link_libraries(${pkgName} ${CURL_LIBRARIES} ) include(PostTarget.cmake OPTIONAL) -#install library to destination -install(TARGETS ${pkgName} DESTINATION ${CMAKE_INSTALL_PREFIX}) +if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in) + # installation of libraries, headers, and config files + include(GNUInstallDirs) + install(TARGETS ${pkgName} + EXPORT ${pkgName}Targets + ) + + foreach(HDR_FILE ${HDRS}) + get_filename_component(HDR_DIRECTORY ${HDR_FILE} DIRECTORY) + get_filename_component(ABSOLUTE_HDR_DIRECTORY ${HDR_DIRECTORY} ABSOLUTE) + file(RELATIVE_PATH RELATIVE_HDR_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${ABSOLUTE_HDR_DIRECTORY}) + install(FILES ${HDR_FILE} DESTINATION include/${RELATIVE_HDR_PATH}) + endforeach() + + include(CMakePackageConfigHelpers) + write_basic_package_version_file( + "${CMAKE_CURRENT_BINARY_DIR}/${pkgName}/${pkgName}ConfigVersion.cmake" + VERSION 0.0.1 + COMPATIBILITY AnyNewerVersion + ) + + export(EXPORT ${pkgName}Targets + FILE "${CMAKE_CURRENT_BINARY_DIR}/${pkgName}/${pkgName}Targets.cmake" + NAMESPACE ${pkgName}:: + ) + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in + "${CMAKE_CURRENT_BINARY_DIR}/${pkgName}/${pkgName}Config.cmake" + @ONLY + ) + + set(ConfigPackageLocation lib/cmake/${pkgName}) + install(EXPORT ${pkgName}Targets + FILE + ${pkgName}Targets.cmake + NAMESPACE + ${pkgName}:: + DESTINATION + ${ConfigPackageLocation} + ) + install( + FILES + "${CMAKE_CURRENT_BINARY_DIR}/${pkgName}/${pkgName}Config.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/${pkgName}/${pkgName}ConfigVersion.cmake" + DESTINATION + ${ConfigPackageLocation} + ) +endif() # Setting file variables to null set(SRCS "") diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/api-header.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/api-header.mustache index ecc80212afcf..fad779b87eec 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/api-header.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/api-header.mustache @@ -8,6 +8,10 @@ {{#imports}}{{{import}}} {{/imports}} +#undef stdin +#undef stderr +#undef stdout + {{#operations}} {{#operation}} {{#allParams}} diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache index d4d387f8f059..38656a5615b3 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache @@ -570,7 +570,7 @@ size_t writeDataCallback(void *buffer, size_t size, size_t nmemb, void *userp) { size_t size_this_time = nmemb * size; apiClient_t *apiClient = (apiClient_t *)userp; apiClient->dataReceived = (char *)realloc( apiClient->dataReceived, apiClient->dataReceivedLen + size_this_time + 1); - memcpy(apiClient->dataReceived + apiClient->dataReceivedLen, buffer, size_this_time); + memcpy((char *)apiClient->dataReceived + apiClient->dataReceivedLen, buffer, size_this_time); apiClient->dataReceivedLen += size_this_time; ((char*)apiClient->dataReceived)[apiClient->dataReceivedLen] = '\0'; // the space size of (apiClient->dataReceived) = dataReceivedLen + 1 if (apiClient->data_callback_func) { diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/model-header.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/model-header.mustache index 5bdff9f1dbfe..4e24864ba0b2 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/model-header.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/model-header.mustache @@ -19,6 +19,10 @@ typedef struct {{classname}}_t {{classname}}_t; #include "{{{.}}}.h" {{/imports}} +#undef stdin +#undef stderr +#undef stdout + {{#isEnum}} {{#allowableValues}} // Enum {{enumName}} for {{classVarName}} From 9ac37d4bd59527cd96dfef4f9b710ba89ceb737c Mon Sep 17 00:00:00 2001 From: Ahmed Yarub Hani Al Nuaimi Date: Sat, 4 Sep 2021 15:21:51 -0300 Subject: [PATCH 02/17] Update samples --- samples/client/petstore/c/api/PetAPI.h | 4 ++++ samples/client/petstore/c/api/StoreAPI.h | 4 ++++ samples/client/petstore/c/api/UserAPI.h | 4 ++++ samples/client/petstore/c/model/api_response.h | 4 ++++ samples/client/petstore/c/model/category.h | 4 ++++ samples/client/petstore/c/model/order.h | 4 ++++ samples/client/petstore/c/model/pet.h | 4 ++++ samples/client/petstore/c/model/tag.h | 4 ++++ samples/client/petstore/c/model/user.h | 4 ++++ samples/client/petstore/c/src/apiClient.c | 2 +- 10 files changed, 37 insertions(+), 1 deletion(-) diff --git a/samples/client/petstore/c/api/PetAPI.h b/samples/client/petstore/c/api/PetAPI.h index f223b60a0b8d..c24b44305cf5 100644 --- a/samples/client/petstore/c/api/PetAPI.h +++ b/samples/client/petstore/c/api/PetAPI.h @@ -8,6 +8,10 @@ #include "../model/api_response.h" #include "../model/pet.h" +#undef stdin +#undef stderr +#undef stdout + // Enum STATUS for PetAPI_findPetsByStatus typedef enum { openapi_petstore_findPetsByStatus_STATUS_NULL = 0, openapi_petstore_findPetsByStatus_STATUS_available, openapi_petstore_findPetsByStatus_STATUS_pending, openapi_petstore_findPetsByStatus_STATUS_sold } openapi_petstore_findPetsByStatus_status_e; diff --git a/samples/client/petstore/c/api/StoreAPI.h b/samples/client/petstore/c/api/StoreAPI.h index 43bdf7583767..21985044c200 100644 --- a/samples/client/petstore/c/api/StoreAPI.h +++ b/samples/client/petstore/c/api/StoreAPI.h @@ -7,6 +7,10 @@ #include "../include/binary.h" #include "../model/order.h" +#undef stdin +#undef stderr +#undef stdout + // Delete purchase order by ID // diff --git a/samples/client/petstore/c/api/UserAPI.h b/samples/client/petstore/c/api/UserAPI.h index b0a60accdab9..d6e43056f13b 100644 --- a/samples/client/petstore/c/api/UserAPI.h +++ b/samples/client/petstore/c/api/UserAPI.h @@ -7,6 +7,10 @@ #include "../include/binary.h" #include "../model/user.h" +#undef stdin +#undef stderr +#undef stdout + // Create user // diff --git a/samples/client/petstore/c/model/api_response.h b/samples/client/petstore/c/model/api_response.h index d64dcbacedd9..fe0c87f9a5f9 100644 --- a/samples/client/petstore/c/model/api_response.h +++ b/samples/client/petstore/c/model/api_response.h @@ -16,6 +16,10 @@ typedef struct api_response_t api_response_t; +#undef stdin +#undef stderr +#undef stdout + typedef struct api_response_t { diff --git a/samples/client/petstore/c/model/category.h b/samples/client/petstore/c/model/category.h index ec9efd6ccf60..9ef031f5c692 100644 --- a/samples/client/petstore/c/model/category.h +++ b/samples/client/petstore/c/model/category.h @@ -16,6 +16,10 @@ typedef struct category_t category_t; +#undef stdin +#undef stderr +#undef stdout + typedef struct category_t { diff --git a/samples/client/petstore/c/model/order.h b/samples/client/petstore/c/model/order.h index 32914a227499..099ce89d8b8a 100644 --- a/samples/client/petstore/c/model/order.h +++ b/samples/client/petstore/c/model/order.h @@ -16,6 +16,10 @@ typedef struct order_t order_t; +#undef stdin +#undef stderr +#undef stdout + // Enum STATUS for order typedef enum { openapi_petstore_order_STATUS_NULL = 0, openapi_petstore_order_STATUS_placed, openapi_petstore_order_STATUS_approved, openapi_petstore_order_STATUS_delivered } openapi_petstore_order_STATUS_e; diff --git a/samples/client/petstore/c/model/pet.h b/samples/client/petstore/c/model/pet.h index d74025510143..561d1ac508b2 100644 --- a/samples/client/petstore/c/model/pet.h +++ b/samples/client/petstore/c/model/pet.h @@ -18,6 +18,10 @@ typedef struct pet_t pet_t; #include "category.h" #include "tag.h" +#undef stdin +#undef stderr +#undef stdout + // Enum STATUS for pet typedef enum { openapi_petstore_pet_STATUS_NULL = 0, openapi_petstore_pet_STATUS_available, openapi_petstore_pet_STATUS_pending, openapi_petstore_pet_STATUS_sold } openapi_petstore_pet_STATUS_e; diff --git a/samples/client/petstore/c/model/tag.h b/samples/client/petstore/c/model/tag.h index 9e7b5d053a9d..0917db85e5c2 100644 --- a/samples/client/petstore/c/model/tag.h +++ b/samples/client/petstore/c/model/tag.h @@ -16,6 +16,10 @@ typedef struct tag_t tag_t; +#undef stdin +#undef stderr +#undef stdout + typedef struct tag_t { diff --git a/samples/client/petstore/c/model/user.h b/samples/client/petstore/c/model/user.h index 45fa42c3f91c..15f25b12c620 100644 --- a/samples/client/petstore/c/model/user.h +++ b/samples/client/petstore/c/model/user.h @@ -16,6 +16,10 @@ typedef struct user_t user_t; +#undef stdin +#undef stderr +#undef stdout + typedef struct user_t { diff --git a/samples/client/petstore/c/src/apiClient.c b/samples/client/petstore/c/src/apiClient.c index 2ab296b2e637..ce2f522cda28 100644 --- a/samples/client/petstore/c/src/apiClient.c +++ b/samples/client/petstore/c/src/apiClient.c @@ -476,7 +476,7 @@ size_t writeDataCallback(void *buffer, size_t size, size_t nmemb, void *userp) { size_t size_this_time = nmemb * size; apiClient_t *apiClient = (apiClient_t *)userp; apiClient->dataReceived = (char *)realloc( apiClient->dataReceived, apiClient->dataReceivedLen + size_this_time + 1); - memcpy(apiClient->dataReceived + apiClient->dataReceivedLen, buffer, size_this_time); + memcpy((char *)apiClient->dataReceived + apiClient->dataReceivedLen, buffer, size_this_time); apiClient->dataReceivedLen += size_this_time; ((char*)apiClient->dataReceived)[apiClient->dataReceivedLen] = '\0'; // the space size of (apiClient->dataReceived) = dataReceivedLen + 1 if (apiClient->data_callback_func) { From d1d8d2df5bc7e23db7dff55427edb3daf5f5e1d2 Mon Sep 17 00:00:00 2001 From: Ahmed Yarub Hani Al Nuaimi Date: Mon, 6 Sep 2021 18:37:01 -0300 Subject: [PATCH 03/17] Use default installation method if no configuration script is provided --- .../src/main/resources/C-libcurl/CMakeLists.txt.mustache | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache index b888c3743819..a7446c1845f0 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache @@ -92,8 +92,10 @@ target_link_libraries(${pkgName} ${CURL_LIBRARIES} ) include(PostTarget.cmake OPTIONAL) -if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in) - # installation of libraries, headers, and config files +# installation of libraries, headers, and config files +if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in) + install(TARGETS ${pkgName} DESTINATION ${CMAKE_INSTALL_PREFIX}) +else() include(GNUInstallDirs) install(TARGETS ${pkgName} EXPORT ${pkgName}Targets From 0368b8611ee5c4fb499b32ac59a1404e941f92db Mon Sep 17 00:00:00 2001 From: Ahmed Yarub Hani Al Nuaimi Date: Tue, 7 Sep 2021 01:01:10 -0300 Subject: [PATCH 04/17] Undefine stdin/stderr/stdout only for model files --- .../src/main/resources/C-libcurl/api-header.mustache | 4 ---- 1 file changed, 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/api-header.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/api-header.mustache index fad779b87eec..ecc80212afcf 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/api-header.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/api-header.mustache @@ -8,10 +8,6 @@ {{#imports}}{{{import}}} {{/imports}} -#undef stdin -#undef stderr -#undef stdout - {{#operations}} {{#operation}} {{#allParams}} From e256eec115a5bf541946f07ef6ceea3815cd7cfd Mon Sep 17 00:00:00 2001 From: Ahmed Yarub Hani Al Nuaimi Date: Tue, 7 Sep 2021 01:05:27 -0300 Subject: [PATCH 05/17] Undefine stdin/stderr/stdout only for model files in samples --- samples/client/petstore/c/api/PetAPI.h | 4 ---- samples/client/petstore/c/api/StoreAPI.h | 4 ---- samples/client/petstore/c/api/UserAPI.h | 4 ---- 3 files changed, 12 deletions(-) diff --git a/samples/client/petstore/c/api/PetAPI.h b/samples/client/petstore/c/api/PetAPI.h index c24b44305cf5..f223b60a0b8d 100644 --- a/samples/client/petstore/c/api/PetAPI.h +++ b/samples/client/petstore/c/api/PetAPI.h @@ -8,10 +8,6 @@ #include "../model/api_response.h" #include "../model/pet.h" -#undef stdin -#undef stderr -#undef stdout - // Enum STATUS for PetAPI_findPetsByStatus typedef enum { openapi_petstore_findPetsByStatus_STATUS_NULL = 0, openapi_petstore_findPetsByStatus_STATUS_available, openapi_petstore_findPetsByStatus_STATUS_pending, openapi_petstore_findPetsByStatus_STATUS_sold } openapi_petstore_findPetsByStatus_status_e; diff --git a/samples/client/petstore/c/api/StoreAPI.h b/samples/client/petstore/c/api/StoreAPI.h index 21985044c200..43bdf7583767 100644 --- a/samples/client/petstore/c/api/StoreAPI.h +++ b/samples/client/petstore/c/api/StoreAPI.h @@ -7,10 +7,6 @@ #include "../include/binary.h" #include "../model/order.h" -#undef stdin -#undef stderr -#undef stdout - // Delete purchase order by ID // diff --git a/samples/client/petstore/c/api/UserAPI.h b/samples/client/petstore/c/api/UserAPI.h index d6e43056f13b..b0a60accdab9 100644 --- a/samples/client/petstore/c/api/UserAPI.h +++ b/samples/client/petstore/c/api/UserAPI.h @@ -7,10 +7,6 @@ #include "../include/binary.h" #include "../model/user.h" -#undef stdin -#undef stderr -#undef stdout - // Create user // From e6d890c566afbcfbe1d8ed4a117c1c60f93b859f Mon Sep 17 00:00:00 2001 From: Ahmed Yarub Hani Al Nuaimi Date: Tue, 7 Sep 2021 03:46:03 -0300 Subject: [PATCH 06/17] Remove #undef directives --- .../src/main/resources/C-libcurl/model-header.mustache | 3 --- samples/client/petstore/c/model/api_response.h | 3 --- samples/client/petstore/c/model/category.h | 3 --- samples/client/petstore/c/model/order.h | 4 ---- samples/client/petstore/c/model/pet.h | 3 --- samples/client/petstore/c/model/tag.h | 3 --- samples/client/petstore/c/model/user.h | 3 --- 7 files changed, 22 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/model-header.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/model-header.mustache index 4e24864ba0b2..708a0698680b 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/model-header.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/model-header.mustache @@ -19,9 +19,6 @@ typedef struct {{classname}}_t {{classname}}_t; #include "{{{.}}}.h" {{/imports}} -#undef stdin -#undef stderr -#undef stdout {{#isEnum}} {{#allowableValues}} diff --git a/samples/client/petstore/c/model/api_response.h b/samples/client/petstore/c/model/api_response.h index fe0c87f9a5f9..b6c45db13e74 100644 --- a/samples/client/petstore/c/model/api_response.h +++ b/samples/client/petstore/c/model/api_response.h @@ -16,9 +16,6 @@ typedef struct api_response_t api_response_t; -#undef stdin -#undef stderr -#undef stdout diff --git a/samples/client/petstore/c/model/category.h b/samples/client/petstore/c/model/category.h index 9ef031f5c692..b1ca1acbe4a2 100644 --- a/samples/client/petstore/c/model/category.h +++ b/samples/client/petstore/c/model/category.h @@ -16,9 +16,6 @@ typedef struct category_t category_t; -#undef stdin -#undef stderr -#undef stdout diff --git a/samples/client/petstore/c/model/order.h b/samples/client/petstore/c/model/order.h index 099ce89d8b8a..32914a227499 100644 --- a/samples/client/petstore/c/model/order.h +++ b/samples/client/petstore/c/model/order.h @@ -16,10 +16,6 @@ typedef struct order_t order_t; -#undef stdin -#undef stderr -#undef stdout - // Enum STATUS for order typedef enum { openapi_petstore_order_STATUS_NULL = 0, openapi_petstore_order_STATUS_placed, openapi_petstore_order_STATUS_approved, openapi_petstore_order_STATUS_delivered } openapi_petstore_order_STATUS_e; diff --git a/samples/client/petstore/c/model/pet.h b/samples/client/petstore/c/model/pet.h index 561d1ac508b2..b87094588448 100644 --- a/samples/client/petstore/c/model/pet.h +++ b/samples/client/petstore/c/model/pet.h @@ -18,9 +18,6 @@ typedef struct pet_t pet_t; #include "category.h" #include "tag.h" -#undef stdin -#undef stderr -#undef stdout // Enum STATUS for pet diff --git a/samples/client/petstore/c/model/tag.h b/samples/client/petstore/c/model/tag.h index 0917db85e5c2..73a5e08dfc12 100644 --- a/samples/client/petstore/c/model/tag.h +++ b/samples/client/petstore/c/model/tag.h @@ -16,9 +16,6 @@ typedef struct tag_t tag_t; -#undef stdin -#undef stderr -#undef stdout diff --git a/samples/client/petstore/c/model/user.h b/samples/client/petstore/c/model/user.h index 15f25b12c620..bbf0fef2c762 100644 --- a/samples/client/petstore/c/model/user.h +++ b/samples/client/petstore/c/model/user.h @@ -16,9 +16,6 @@ typedef struct user_t user_t; -#undef stdin -#undef stderr -#undef stdout From b9453ccda8902230e84a5b1f7ac267eda77a21cd Mon Sep 17 00:00:00 2001 From: Ahmed Yarub Hani Al Nuaimi Date: Tue, 7 Sep 2021 03:49:40 -0300 Subject: [PATCH 07/17] Add stdin/stderr/stdout to reserved words for libcurl-C generator --- docs/generators/c.md | 3 +++ .../codegen/languages/CLibcurlClientCodegen.java | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/generators/c.md b/docs/generators/c.md index c3a79bad9fcf..29310172353f 100644 --- a/docs/generators/c.md +++ b/docs/generators/c.md @@ -135,6 +135,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • static
  • static_assert
  • static_cast
  • +
  • stdin
  • +
  • stderr
  • +
  • stdout
  • struct
  • switch
  • synchronized
  • diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java index 07b16ca17b45..61ec4a49fdde 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java @@ -245,7 +245,10 @@ public CLibcurlClientCodegen() { "final", "override", "transaction_safe", - "transaction_safe_dynamic") + "transaction_safe_dynamic", + "stdin", + "stdout", + "stderr") ); instantiationTypes.clear(); From 6953537e7a88e646664ff6eb1a792a5f96fd7e33 Mon Sep 17 00:00:00 2001 From: Ahmed Yarub Hani Al Nuaimi Date: Tue, 7 Sep 2021 03:53:24 -0300 Subject: [PATCH 08/17] Expose all symbols when compiling libcurl as a shared library on Windows Install header files Set correct flags for target link libraries --- .../src/main/resources/C-libcurl/CMakeLists.txt.mustache | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache index a7446c1845f0..1b788b7f9db4 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache @@ -6,6 +6,7 @@ cmake_policy(SET CMP0063 NEW) set(CMAKE_C_VISIBILITY_PRESET default) set(CMAKE_CXX_VISIBILITY_PRESET default) set(CMAKE_VISIBILITY_INLINES_HIDDEN OFF) +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) option(BUILD_SHARED_LIBS "Build using shared libraries" ON) @@ -86,9 +87,13 @@ include(PreTarget.cmake OPTIONAL) add_library(${pkgName} ${SRCS} ${HDRS}) # Link dependent libraries if(NOT CMAKE_VERSION VERSION_LESS 3.4) - target_link_libraries(${pkgName} OpenSSL::SSL OpenSSL::Crypto) + target_link_libraries(${pkgName} PRIVATE OpenSSL::SSL OpenSSL::Crypto) endif() -target_link_libraries(${pkgName} ${CURL_LIBRARIES} ) +target_link_libraries(${pkgName} PUBLIC ${CURL_LIBRARIES} ) +target_include_directories( + ${pkgName} PUBLIC $ + $ +) include(PostTarget.cmake OPTIONAL) From 6eb81d61574ec512c167849584070c30821314a3 Mon Sep 17 00:00:00 2001 From: Ahmed Yarub Hani Al Nuaimi Date: Tue, 7 Sep 2021 04:16:26 -0300 Subject: [PATCH 09/17] Remove line --- .../src/main/resources/C-libcurl/model-header.mustache | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/model-header.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/model-header.mustache index 708a0698680b..5bdff9f1dbfe 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/model-header.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/model-header.mustache @@ -19,7 +19,6 @@ typedef struct {{classname}}_t {{classname}}_t; #include "{{{.}}}.h" {{/imports}} - {{#isEnum}} {{#allowableValues}} // Enum {{enumName}} for {{classVarName}} From 8207f02d0369da81f5476bc4e48da4a7e5f970d3 Mon Sep 17 00:00:00 2001 From: Ahmed Yarub Hani Al Nuaimi Date: Tue, 7 Sep 2021 04:19:13 -0300 Subject: [PATCH 10/17] Regenerate samples --- samples/client/petstore/c/model/api_response.h | 1 - samples/client/petstore/c/model/category.h | 1 - samples/client/petstore/c/model/pet.h | 1 - samples/client/petstore/c/model/tag.h | 1 - samples/client/petstore/c/model/user.h | 1 - 5 files changed, 5 deletions(-) diff --git a/samples/client/petstore/c/model/api_response.h b/samples/client/petstore/c/model/api_response.h index b6c45db13e74..d64dcbacedd9 100644 --- a/samples/client/petstore/c/model/api_response.h +++ b/samples/client/petstore/c/model/api_response.h @@ -18,7 +18,6 @@ typedef struct api_response_t api_response_t; - typedef struct api_response_t { int code; //numeric char *type; // string diff --git a/samples/client/petstore/c/model/category.h b/samples/client/petstore/c/model/category.h index b1ca1acbe4a2..ec9efd6ccf60 100644 --- a/samples/client/petstore/c/model/category.h +++ b/samples/client/petstore/c/model/category.h @@ -18,7 +18,6 @@ typedef struct category_t category_t; - typedef struct category_t { long id; //numeric char *name; // string diff --git a/samples/client/petstore/c/model/pet.h b/samples/client/petstore/c/model/pet.h index b87094588448..d74025510143 100644 --- a/samples/client/petstore/c/model/pet.h +++ b/samples/client/petstore/c/model/pet.h @@ -18,7 +18,6 @@ typedef struct pet_t pet_t; #include "category.h" #include "tag.h" - // Enum STATUS for pet typedef enum { openapi_petstore_pet_STATUS_NULL = 0, openapi_petstore_pet_STATUS_available, openapi_petstore_pet_STATUS_pending, openapi_petstore_pet_STATUS_sold } openapi_petstore_pet_STATUS_e; diff --git a/samples/client/petstore/c/model/tag.h b/samples/client/petstore/c/model/tag.h index 73a5e08dfc12..9e7b5d053a9d 100644 --- a/samples/client/petstore/c/model/tag.h +++ b/samples/client/petstore/c/model/tag.h @@ -18,7 +18,6 @@ typedef struct tag_t tag_t; - typedef struct tag_t { long id; //numeric char *name; // string diff --git a/samples/client/petstore/c/model/user.h b/samples/client/petstore/c/model/user.h index bbf0fef2c762..45fa42c3f91c 100644 --- a/samples/client/petstore/c/model/user.h +++ b/samples/client/petstore/c/model/user.h @@ -18,7 +18,6 @@ typedef struct user_t user_t; - typedef struct user_t { long id; //numeric char *username; // string From 15cccbfaa321b3c7fac0a061761e013d21a77bfa Mon Sep 17 00:00:00 2001 From: Ahmed Yarub Hani Al Nuaimi Date: Tue, 7 Sep 2021 04:25:28 -0300 Subject: [PATCH 11/17] Add comment --- .../openapitools/codegen/languages/CLibcurlClientCodegen.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java index 61ec4a49fdde..58803d150a15 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java @@ -246,6 +246,8 @@ public CLibcurlClientCodegen() { "override", "transaction_safe", "transaction_safe_dynamic", + + // VC++ reserved keywords "stdin", "stdout", "stderr") From 0e25659de2d68753e1e033eaa83e769c028de5cb Mon Sep 17 00:00:00 2001 From: Ahmed Yarub Hani Al Nuaimi Date: Tue, 7 Sep 2021 04:34:35 -0300 Subject: [PATCH 12/17] Update documentations --- docs/generators/c.md | 3 - docs/generators/scala-play-server.md | 1 - docs/generators/scala-sttp.md | 1 - docs/generators/scalatra.md | 1 - docs/generators/typescript-angular.md | 2 +- .../java/apache-httpclient/docs/FakeApi.md | 14 +-- .../java/google-api-client/docs/FakeApi.md | 14 +-- .../petstore/java/jersey1/docs/FakeApi.md | 14 +-- .../docs/FakeApi.md | 14 +-- .../java/jersey2-java8/docs/FakeApi.md | 14 +-- .../java/native-async/docs/FakeApi.md | 28 ++--- .../petstore/java/native/docs/FakeApi.md | 28 ++--- .../docs/FakeApi.md | 14 +-- .../docs/FakeApi.md | 14 +-- .../petstore/java/okhttp-gson/docs/FakeApi.md | 14 +-- .../petstore/java/resteasy/docs/FakeApi.md | 14 +-- .../java/resttemplate-withXml/docs/FakeApi.md | 14 +-- .../java/resttemplate/docs/FakeApi.md | 14 +-- .../java/retrofit2-play26/docs/FakeApi.md | 14 +-- .../petstore/java/retrofit2/docs/FakeApi.md | 14 +-- .../java/retrofit2rx2/docs/FakeApi.md | 14 +-- .../java/retrofit2rx3/docs/FakeApi.md | 14 +-- .../java/vertx-no-nullable/docs/FakeApi.md | 14 +-- .../petstore/java/vertx/docs/FakeApi.md | 14 +-- .../petstore/java/webclient/docs/FakeApi.md | 14 +-- .../builds/default/api/pet.service.ts | 106 ++++++------------ .../builds/default/api/store.service.ts | 54 +++------ .../builds/default/api/user.service.ts | 106 ++++++------------ .../builds/with-npm/api/pet.service.ts | 106 ++++++------------ .../builds/with-npm/api/store.service.ts | 54 +++------ .../builds/with-npm/api/user.service.ts | 106 ++++++------------ .../builds/with-npm/package.json | 8 +- .../java/jersey2-java8/docs/FakeApi.md | 16 +-- .../php-slim4/.openapi-generator/FILES | 18 +++ 34 files changed, 351 insertions(+), 539 deletions(-) diff --git a/docs/generators/c.md b/docs/generators/c.md index 29310172353f..c3a79bad9fcf 100644 --- a/docs/generators/c.md +++ b/docs/generators/c.md @@ -135,9 +135,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • static
  • static_assert
  • static_cast
  • -
  • stdin
  • -
  • stderr
  • -
  • stdout
  • struct
  • switch
  • synchronized
  • diff --git a/docs/generators/scala-play-server.md b/docs/generators/scala-play-server.md index d734fed60c2e..208bdd72c18e 100644 --- a/docs/generators/scala-play-server.md +++ b/docs/generators/scala-play-server.md @@ -83,7 +83,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • case
  • catch
  • class
  • -
  • clone
  • def
  • do
  • else
  • diff --git a/docs/generators/scala-sttp.md b/docs/generators/scala-sttp.md index 8a8b5d33c261..77891a59141a 100644 --- a/docs/generators/scala-sttp.md +++ b/docs/generators/scala-sttp.md @@ -81,7 +81,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • case
  • catch
  • class
  • -
  • clone
  • def
  • do
  • else
  • diff --git a/docs/generators/scalatra.md b/docs/generators/scalatra.md index d3a9b5149131..897421a205d6 100644 --- a/docs/generators/scalatra.md +++ b/docs/generators/scalatra.md @@ -76,7 +76,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • case
  • catch
  • class
  • -
  • clone
  • def
  • do
  • else
  • diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index 126ccd5ae386..67341026ceb5 100644 --- a/docs/generators/typescript-angular.md +++ b/docs/generators/typescript-angular.md @@ -19,7 +19,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |modelFileSuffix|The suffix of the file of the generated model (model<suffix>.ts).| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original| |modelSuffix|The suffix of the generated model.| |null| -|ngVersion|The version of Angular. (At least 6.0.0)| |12.0.0| +|ngVersion|The version of Angular. (At least 6.0.0)| |11.0.0| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| |npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| diff --git a/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md b/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md index c76fd80c3245..4f81e527a107 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md +++ b/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = LocalDate.now(); // LocalDate | None + LocalDate date = new LocalDate(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -669,13 +669,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "_abc"; // String | Header parameter enum test (string) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "_abc"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) - String enumFormString = "_abc"; // String | Form parameter enum test (string) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/google-api-client/docs/FakeApi.md b/samples/client/petstore/java/google-api-client/docs/FakeApi.md index c76fd80c3245..4f81e527a107 100644 --- a/samples/client/petstore/java/google-api-client/docs/FakeApi.md +++ b/samples/client/petstore/java/google-api-client/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = LocalDate.now(); // LocalDate | None + LocalDate date = new LocalDate(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -669,13 +669,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "_abc"; // String | Header parameter enum test (string) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "_abc"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) - String enumFormString = "_abc"; // String | Form parameter enum test (string) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/jersey1/docs/FakeApi.md b/samples/client/petstore/java/jersey1/docs/FakeApi.md index c76fd80c3245..4f81e527a107 100644 --- a/samples/client/petstore/java/jersey1/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey1/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = LocalDate.now(); // LocalDate | None + LocalDate date = new LocalDate(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -669,13 +669,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "_abc"; // String | Header parameter enum test (string) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "_abc"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) - String enumFormString = "_abc"; // String | Form parameter enum test (string) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md index c538fd7fcd4b..9b87b7538f6d 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = LocalDate.now(); // LocalDate | None + LocalDate date = new LocalDate(); // LocalDate | None LocalDateTime dateTime = new LocalDateTime(); // LocalDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -668,13 +668,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "_abc"; // String | Header parameter enum test (string) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "_abc"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) - String enumFormString = "_abc"; // String | Form parameter enum test (string) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md index 29f799203941..a5c59d91e0b5 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = LocalDate.now(); // LocalDate | None + LocalDate date = new LocalDate(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -668,13 +668,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "_abc"; // String | Header parameter enum test (string) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "_abc"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) - String enumFormString = "_abc"; // String | Form parameter enum test (string) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/native-async/docs/FakeApi.md b/samples/client/petstore/java/native-async/docs/FakeApi.md index fd327749d6c4..40a35f715d83 100644 --- a/samples/client/petstore/java/native-async/docs/FakeApi.md +++ b/samples/client/petstore/java/native-async/docs/FakeApi.md @@ -1214,7 +1214,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = LocalDate.now(); // LocalDate | None + LocalDate date = new LocalDate(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -1313,7 +1313,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = LocalDate.now(); // LocalDate | None + LocalDate date = new LocalDate(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -1406,13 +1406,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "_abc"; // String | Header parameter enum test (string) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "_abc"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) - String enumFormString = "_abc"; // String | Form parameter enum test (string) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) try { CompletableFuture result = apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { @@ -1487,13 +1487,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "_abc"; // String | Header parameter enum test (string) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "_abc"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) - String enumFormString = "_abc"; // String | Form parameter enum test (string) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) try { CompletableFuture> response = apiInstance.testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); System.out.println("Status code: " + response.get().getStatusCode()); diff --git a/samples/client/petstore/java/native/docs/FakeApi.md b/samples/client/petstore/java/native/docs/FakeApi.md index 1d0e8ca9ebbf..64ac73b2bbc8 100644 --- a/samples/client/petstore/java/native/docs/FakeApi.md +++ b/samples/client/petstore/java/native/docs/FakeApi.md @@ -1141,7 +1141,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = LocalDate.now(); // LocalDate | None + LocalDate date = new LocalDate(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -1239,7 +1239,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = LocalDate.now(); // LocalDate | None + LocalDate date = new LocalDate(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -1324,13 +1324,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "_abc"; // String | Header parameter enum test (string) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "_abc"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) - String enumFormString = "_abc"; // String | Form parameter enum test (string) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { @@ -1404,13 +1404,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "_abc"; // String | Header parameter enum test (string) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "_abc"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) - String enumFormString = "_abc"; // String | Form parameter enum test (string) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) try { ApiResponse response = apiInstance.testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); System.out.println("Status code: " + response.getStatusCode()); diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md index 5a20b8b1911d..6a47638bab78 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md @@ -552,7 +552,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = LocalDate.now(); // LocalDate | None + LocalDate date = new LocalDate(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -631,13 +631,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "_abc"; // String | Header parameter enum test (string) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "_abc"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) - String enumFormString = "_abc"; // String | Form parameter enum test (string) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md index 5a20b8b1911d..6a47638bab78 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md @@ -552,7 +552,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = LocalDate.now(); // LocalDate | None + LocalDate date = new LocalDate(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -631,13 +631,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "_abc"; // String | Header parameter enum test (string) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "_abc"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) - String enumFormString = "_abc"; // String | Form parameter enum test (string) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md index 5a20b8b1911d..6a47638bab78 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md @@ -552,7 +552,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = LocalDate.now(); // LocalDate | None + LocalDate date = new LocalDate(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -631,13 +631,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "_abc"; // String | Header parameter enum test (string) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "_abc"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) - String enumFormString = "_abc"; // String | Form parameter enum test (string) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/resteasy/docs/FakeApi.md b/samples/client/petstore/java/resteasy/docs/FakeApi.md index c76fd80c3245..4f81e527a107 100644 --- a/samples/client/petstore/java/resteasy/docs/FakeApi.md +++ b/samples/client/petstore/java/resteasy/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = LocalDate.now(); // LocalDate | None + LocalDate date = new LocalDate(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -669,13 +669,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "_abc"; // String | Header parameter enum test (string) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "_abc"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) - String enumFormString = "_abc"; // String | Form parameter enum test (string) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md index c76fd80c3245..4f81e527a107 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = LocalDate.now(); // LocalDate | None + LocalDate date = new LocalDate(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -669,13 +669,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "_abc"; // String | Header parameter enum test (string) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "_abc"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) - String enumFormString = "_abc"; // String | Form parameter enum test (string) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/resttemplate/docs/FakeApi.md b/samples/client/petstore/java/resttemplate/docs/FakeApi.md index c76fd80c3245..4f81e527a107 100644 --- a/samples/client/petstore/java/resttemplate/docs/FakeApi.md +++ b/samples/client/petstore/java/resttemplate/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = LocalDate.now(); // LocalDate | None + LocalDate date = new LocalDate(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -669,13 +669,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "_abc"; // String | Header parameter enum test (string) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "_abc"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) - String enumFormString = "_abc"; // String | Form parameter enum test (string) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md b/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md index d0080643e4bf..740c810f28be 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = LocalDate.now(); // LocalDate | None + LocalDate date = new LocalDate(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -669,13 +669,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "_abc"; // String | Header parameter enum test (string) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "_abc"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) - String enumFormString = "_abc"; // String | Form parameter enum test (string) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/retrofit2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2/docs/FakeApi.md index d0080643e4bf..740c810f28be 100644 --- a/samples/client/petstore/java/retrofit2/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = LocalDate.now(); // LocalDate | None + LocalDate date = new LocalDate(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -669,13 +669,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "_abc"; // String | Header parameter enum test (string) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "_abc"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) - String enumFormString = "_abc"; // String | Form parameter enum test (string) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md index d0080643e4bf..740c810f28be 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = LocalDate.now(); // LocalDate | None + LocalDate date = new LocalDate(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -669,13 +669,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "_abc"; // String | Header parameter enum test (string) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "_abc"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) - String enumFormString = "_abc"; // String | Form parameter enum test (string) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md index d0080643e4bf..740c810f28be 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = LocalDate.now(); // LocalDate | None + LocalDate date = new LocalDate(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -669,13 +669,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "_abc"; // String | Header parameter enum test (string) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "_abc"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) - String enumFormString = "_abc"; // String | Form parameter enum test (string) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md b/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md index 99c87b67656e..c50095a6a58b 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None AsyncFile binary = new AsyncFile(); // AsyncFile | None - LocalDate date = LocalDate.now(); // LocalDate | None + LocalDate date = new LocalDate(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -669,13 +669,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "_abc"; // String | Header parameter enum test (string) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "_abc"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) - String enumFormString = "_abc"; // String | Form parameter enum test (string) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/vertx/docs/FakeApi.md b/samples/client/petstore/java/vertx/docs/FakeApi.md index 99c87b67656e..c50095a6a58b 100644 --- a/samples/client/petstore/java/vertx/docs/FakeApi.md +++ b/samples/client/petstore/java/vertx/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None AsyncFile binary = new AsyncFile(); // AsyncFile | None - LocalDate date = LocalDate.now(); // LocalDate | None + LocalDate date = new LocalDate(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -669,13 +669,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "_abc"; // String | Header parameter enum test (string) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "_abc"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) - String enumFormString = "_abc"; // String | Form parameter enum test (string) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/webclient/docs/FakeApi.md b/samples/client/petstore/java/webclient/docs/FakeApi.md index c3ed83515d13..025a2cb0ea24 100644 --- a/samples/client/petstore/java/webclient/docs/FakeApi.md +++ b/samples/client/petstore/java/webclient/docs/FakeApi.md @@ -784,7 +784,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = LocalDate.now(); // LocalDate | None + LocalDate date = new LocalDate(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -867,13 +867,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "_abc"; // String | Header parameter enum test (string) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "_abc"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) - String enumFormString = "_abc"; // String | Form parameter enum test (string) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/pet.service.ts index d8009ed719cf..800853664a05 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/pet.service.ts @@ -13,7 +13,7 @@ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; @@ -105,10 +105,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public addPet(body: Pet, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; - public addPet(body: Pet, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public addPet(body: Pet, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public addPet(body: Pet, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + public addPet(body: Pet, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; + public addPet(body: Pet, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public addPet(body: Pet, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public addPet(body: Pet, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling addPet.'); } @@ -133,10 +133,6 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } // to determine the Content-Type header @@ -157,7 +153,6 @@ export class PetService { return this.httpClient.post(`${this.configuration.basePath}/pet`, body, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -174,10 +169,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public deletePet(petId: number, apiKey?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; - public deletePet(petId: number, apiKey?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public deletePet(petId: number, apiKey?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public deletePet(petId: number, apiKey?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + public deletePet(petId: number, apiKey?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; + public deletePet(petId: number, apiKey?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public deletePet(petId: number, apiKey?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public deletePet(petId: number, apiKey?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { if (petId === null || petId === undefined) { throw new Error('Required parameter petId was null or undefined when calling deletePet.'); } @@ -205,10 +200,6 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } let responseType_: 'text' | 'json' = 'json'; @@ -218,7 +209,6 @@ export class PetService { return this.httpClient.delete(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -235,10 +225,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>>; - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>>; - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>>; + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>>; + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { if (status === null || status === undefined) { throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); } @@ -271,10 +261,6 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } let responseType_: 'text' | 'json' = 'json'; @@ -284,7 +270,6 @@ export class PetService { return this.httpClient.get>(`${this.configuration.basePath}/pet/findByStatus`, { - context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, @@ -303,10 +288,10 @@ export class PetService { * @param reportProgress flag to report request and response progress. * @deprecated */ - public findPetsByTags(tags: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; - public findPetsByTags(tags: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>>; - public findPetsByTags(tags: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>>; - public findPetsByTags(tags: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { + public findPetsByTags(tags: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; + public findPetsByTags(tags: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>>; + public findPetsByTags(tags: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>>; + public findPetsByTags(tags: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { if (tags === null || tags === undefined) { throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); } @@ -339,10 +324,6 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } let responseType_: 'text' | 'json' = 'json'; @@ -352,7 +333,6 @@ export class PetService { return this.httpClient.get>(`${this.configuration.basePath}/pet/findByTags`, { - context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, @@ -370,10 +350,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getPetById(petId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; - public getPetById(petId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; - public getPetById(petId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; - public getPetById(petId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { + public getPetById(petId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable; + public getPetById(petId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; + public getPetById(petId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; + public getPetById(petId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { if (petId === null || petId === undefined) { throw new Error('Required parameter petId was null or undefined when calling getPetById.'); } @@ -400,10 +380,6 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } let responseType_: 'text' | 'json' = 'json'; @@ -413,7 +389,6 @@ export class PetService { return this.httpClient.get(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -429,10 +404,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public updatePet(body: Pet, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; - public updatePet(body: Pet, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public updatePet(body: Pet, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public updatePet(body: Pet, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + public updatePet(body: Pet, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; + public updatePet(body: Pet, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public updatePet(body: Pet, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public updatePet(body: Pet, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling updatePet.'); } @@ -457,10 +432,6 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } // to determine the Content-Type header @@ -481,7 +452,6 @@ export class PetService { return this.httpClient.put(`${this.configuration.basePath}/pet`, body, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -499,10 +469,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; - public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public updatePetWithForm(petId: number, name?: string, status?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; + public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public updatePetWithForm(petId: number, name?: string, status?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { if (petId === null || petId === undefined) { throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); } @@ -527,10 +497,6 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } // to determine the Content-Type header const consumes: string[] = [ @@ -557,7 +523,6 @@ export class PetService { return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -575,10 +540,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; - public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; - public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; - public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { + public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json',}): Observable; + public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json',}): Observable>; + public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json',}): Observable>; + public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json',}): Observable { if (petId === null || petId === undefined) { throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); } @@ -604,10 +569,6 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } // to determine the Content-Type header const consumes: string[] = [ @@ -634,7 +595,6 @@ export class PetService { return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/store.service.ts index 2f3ced393ccd..1397ffd2d02e 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/store.service.ts @@ -13,7 +13,7 @@ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; @@ -92,10 +92,10 @@ export class StoreService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public deleteOrder(orderId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; - public deleteOrder(orderId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public deleteOrder(orderId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public deleteOrder(orderId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + public deleteOrder(orderId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; + public deleteOrder(orderId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public deleteOrder(orderId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public deleteOrder(orderId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { if (orderId === null || orderId === undefined) { throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); } @@ -113,10 +113,6 @@ export class StoreService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } let responseType_: 'text' | 'json' = 'json'; @@ -126,7 +122,6 @@ export class StoreService { return this.httpClient.delete(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -142,10 +137,10 @@ export class StoreService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getInventory(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<{ [key: string]: number; }>; - public getInventory(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; - public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; - public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { + public getInventory(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json',}): Observable<{ [key: string]: number; }>; + public getInventory(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json',}): Observable>; + public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json',}): Observable>; + public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json',}): Observable { let localVarHeaders = this.defaultHeaders; @@ -168,10 +163,6 @@ export class StoreService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } let responseType_: 'text' | 'json' = 'json'; @@ -181,7 +172,6 @@ export class StoreService { return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -198,10 +188,10 @@ export class StoreService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getOrderById(orderId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; - public getOrderById(orderId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; - public getOrderById(orderId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; - public getOrderById(orderId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { + public getOrderById(orderId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable; + public getOrderById(orderId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; + public getOrderById(orderId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; + public getOrderById(orderId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { if (orderId === null || orderId === undefined) { throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); } @@ -221,10 +211,6 @@ export class StoreService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } let responseType_: 'text' | 'json' = 'json'; @@ -234,7 +220,6 @@ export class StoreService { return this.httpClient.get(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -250,10 +235,10 @@ export class StoreService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public placeOrder(body: Order, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; - public placeOrder(body: Order, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; - public placeOrder(body: Order, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; - public placeOrder(body: Order, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { + public placeOrder(body: Order, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable; + public placeOrder(body: Order, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; + public placeOrder(body: Order, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; + public placeOrder(body: Order, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling placeOrder.'); } @@ -273,10 +258,6 @@ export class StoreService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } // to determine the Content-Type header @@ -295,7 +276,6 @@ export class StoreService { return this.httpClient.post(`${this.configuration.basePath}/store/order`, body, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/user.service.ts index a1daecfe0d54..9809f730029c 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/user.service.ts @@ -13,7 +13,7 @@ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; @@ -92,10 +92,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public createUser(body: User, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; - public createUser(body: User, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public createUser(body: User, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public createUser(body: User, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + public createUser(body: User, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; + public createUser(body: User, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public createUser(body: User, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public createUser(body: User, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createUser.'); } @@ -113,10 +113,6 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } // to determine the Content-Type header @@ -135,7 +131,6 @@ export class UserService { return this.httpClient.post(`${this.configuration.basePath}/user`, body, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -151,10 +146,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public createUsersWithArrayInput(body: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; - public createUsersWithArrayInput(body: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public createUsersWithArrayInput(body: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public createUsersWithArrayInput(body: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + public createUsersWithArrayInput(body: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; + public createUsersWithArrayInput(body: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public createUsersWithArrayInput(body: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public createUsersWithArrayInput(body: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); } @@ -172,10 +167,6 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } // to determine the Content-Type header @@ -194,7 +185,6 @@ export class UserService { return this.httpClient.post(`${this.configuration.basePath}/user/createWithArray`, body, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -210,10 +200,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public createUsersWithListInput(body: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; - public createUsersWithListInput(body: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public createUsersWithListInput(body: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public createUsersWithListInput(body: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + public createUsersWithListInput(body: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; + public createUsersWithListInput(body: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public createUsersWithListInput(body: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public createUsersWithListInput(body: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); } @@ -231,10 +221,6 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } // to determine the Content-Type header @@ -253,7 +239,6 @@ export class UserService { return this.httpClient.post(`${this.configuration.basePath}/user/createWithList`, body, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -270,10 +255,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public deleteUser(username: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; - public deleteUser(username: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public deleteUser(username: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public deleteUser(username: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + public deleteUser(username: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; + public deleteUser(username: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public deleteUser(username: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public deleteUser(username: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { if (username === null || username === undefined) { throw new Error('Required parameter username was null or undefined when calling deleteUser.'); } @@ -291,10 +276,6 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } let responseType_: 'text' | 'json' = 'json'; @@ -304,7 +285,6 @@ export class UserService { return this.httpClient.delete(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -320,10 +300,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getUserByName(username: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; - public getUserByName(username: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; - public getUserByName(username: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; - public getUserByName(username: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { + public getUserByName(username: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable; + public getUserByName(username: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; + public getUserByName(username: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; + public getUserByName(username: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { if (username === null || username === undefined) { throw new Error('Required parameter username was null or undefined when calling getUserByName.'); } @@ -343,10 +323,6 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } let responseType_: 'text' | 'json' = 'json'; @@ -356,7 +332,6 @@ export class UserService { return this.httpClient.get(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -373,10 +348,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public loginUser(username: string, password: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; - public loginUser(username: string, password: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; - public loginUser(username: string, password: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; - public loginUser(username: string, password: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { + public loginUser(username: string, password: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable; + public loginUser(username: string, password: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; + public loginUser(username: string, password: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; + public loginUser(username: string, password: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { if (username === null || username === undefined) { throw new Error('Required parameter username was null or undefined when calling loginUser.'); } @@ -409,10 +384,6 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } let responseType_: 'text' | 'json' = 'json'; @@ -422,7 +393,6 @@ export class UserService { return this.httpClient.get(`${this.configuration.basePath}/user/login`, { - context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, @@ -438,10 +408,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public logoutUser(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; - public logoutUser(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + public logoutUser(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; + public logoutUser(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { let localVarHeaders = this.defaultHeaders; @@ -456,10 +426,6 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } let responseType_: 'text' | 'json' = 'json'; @@ -469,7 +435,6 @@ export class UserService { return this.httpClient.get(`${this.configuration.basePath}/user/logout`, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -487,10 +452,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public updateUser(username: string, body: User, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; - public updateUser(username: string, body: User, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public updateUser(username: string, body: User, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public updateUser(username: string, body: User, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + public updateUser(username: string, body: User, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; + public updateUser(username: string, body: User, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public updateUser(username: string, body: User, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public updateUser(username: string, body: User, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { if (username === null || username === undefined) { throw new Error('Required parameter username was null or undefined when calling updateUser.'); } @@ -511,10 +476,6 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } // to determine the Content-Type header @@ -533,7 +494,6 @@ export class UserService { return this.httpClient.put(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, body, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/pet.service.ts index d8009ed719cf..800853664a05 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/pet.service.ts @@ -13,7 +13,7 @@ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; @@ -105,10 +105,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public addPet(body: Pet, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; - public addPet(body: Pet, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public addPet(body: Pet, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public addPet(body: Pet, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + public addPet(body: Pet, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; + public addPet(body: Pet, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public addPet(body: Pet, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public addPet(body: Pet, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling addPet.'); } @@ -133,10 +133,6 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } // to determine the Content-Type header @@ -157,7 +153,6 @@ export class PetService { return this.httpClient.post(`${this.configuration.basePath}/pet`, body, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -174,10 +169,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public deletePet(petId: number, apiKey?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; - public deletePet(petId: number, apiKey?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public deletePet(petId: number, apiKey?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public deletePet(petId: number, apiKey?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + public deletePet(petId: number, apiKey?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; + public deletePet(petId: number, apiKey?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public deletePet(petId: number, apiKey?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public deletePet(petId: number, apiKey?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { if (petId === null || petId === undefined) { throw new Error('Required parameter petId was null or undefined when calling deletePet.'); } @@ -205,10 +200,6 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } let responseType_: 'text' | 'json' = 'json'; @@ -218,7 +209,6 @@ export class PetService { return this.httpClient.delete(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -235,10 +225,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>>; - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>>; - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>>; + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>>; + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { if (status === null || status === undefined) { throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); } @@ -271,10 +261,6 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } let responseType_: 'text' | 'json' = 'json'; @@ -284,7 +270,6 @@ export class PetService { return this.httpClient.get>(`${this.configuration.basePath}/pet/findByStatus`, { - context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, @@ -303,10 +288,10 @@ export class PetService { * @param reportProgress flag to report request and response progress. * @deprecated */ - public findPetsByTags(tags: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; - public findPetsByTags(tags: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>>; - public findPetsByTags(tags: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>>; - public findPetsByTags(tags: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { + public findPetsByTags(tags: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; + public findPetsByTags(tags: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>>; + public findPetsByTags(tags: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>>; + public findPetsByTags(tags: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { if (tags === null || tags === undefined) { throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); } @@ -339,10 +324,6 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } let responseType_: 'text' | 'json' = 'json'; @@ -352,7 +333,6 @@ export class PetService { return this.httpClient.get>(`${this.configuration.basePath}/pet/findByTags`, { - context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, @@ -370,10 +350,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getPetById(petId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; - public getPetById(petId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; - public getPetById(petId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; - public getPetById(petId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { + public getPetById(petId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable; + public getPetById(petId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; + public getPetById(petId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; + public getPetById(petId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { if (petId === null || petId === undefined) { throw new Error('Required parameter petId was null or undefined when calling getPetById.'); } @@ -400,10 +380,6 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } let responseType_: 'text' | 'json' = 'json'; @@ -413,7 +389,6 @@ export class PetService { return this.httpClient.get(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -429,10 +404,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public updatePet(body: Pet, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; - public updatePet(body: Pet, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public updatePet(body: Pet, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public updatePet(body: Pet, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + public updatePet(body: Pet, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; + public updatePet(body: Pet, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public updatePet(body: Pet, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public updatePet(body: Pet, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling updatePet.'); } @@ -457,10 +432,6 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } // to determine the Content-Type header @@ -481,7 +452,6 @@ export class PetService { return this.httpClient.put(`${this.configuration.basePath}/pet`, body, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -499,10 +469,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; - public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public updatePetWithForm(petId: number, name?: string, status?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; + public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public updatePetWithForm(petId: number, name?: string, status?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { if (petId === null || petId === undefined) { throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); } @@ -527,10 +497,6 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } // to determine the Content-Type header const consumes: string[] = [ @@ -557,7 +523,6 @@ export class PetService { return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -575,10 +540,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; - public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; - public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; - public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { + public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json',}): Observable; + public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json',}): Observable>; + public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json',}): Observable>; + public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json',}): Observable { if (petId === null || petId === undefined) { throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); } @@ -604,10 +569,6 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } // to determine the Content-Type header const consumes: string[] = [ @@ -634,7 +595,6 @@ export class PetService { return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/store.service.ts index 2f3ced393ccd..1397ffd2d02e 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/store.service.ts @@ -13,7 +13,7 @@ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; @@ -92,10 +92,10 @@ export class StoreService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public deleteOrder(orderId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; - public deleteOrder(orderId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public deleteOrder(orderId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public deleteOrder(orderId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + public deleteOrder(orderId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; + public deleteOrder(orderId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public deleteOrder(orderId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public deleteOrder(orderId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { if (orderId === null || orderId === undefined) { throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); } @@ -113,10 +113,6 @@ export class StoreService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } let responseType_: 'text' | 'json' = 'json'; @@ -126,7 +122,6 @@ export class StoreService { return this.httpClient.delete(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -142,10 +137,10 @@ export class StoreService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getInventory(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<{ [key: string]: number; }>; - public getInventory(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; - public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; - public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { + public getInventory(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json',}): Observable<{ [key: string]: number; }>; + public getInventory(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json',}): Observable>; + public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json',}): Observable>; + public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json',}): Observable { let localVarHeaders = this.defaultHeaders; @@ -168,10 +163,6 @@ export class StoreService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } let responseType_: 'text' | 'json' = 'json'; @@ -181,7 +172,6 @@ export class StoreService { return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -198,10 +188,10 @@ export class StoreService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getOrderById(orderId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; - public getOrderById(orderId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; - public getOrderById(orderId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; - public getOrderById(orderId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { + public getOrderById(orderId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable; + public getOrderById(orderId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; + public getOrderById(orderId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; + public getOrderById(orderId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { if (orderId === null || orderId === undefined) { throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); } @@ -221,10 +211,6 @@ export class StoreService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } let responseType_: 'text' | 'json' = 'json'; @@ -234,7 +220,6 @@ export class StoreService { return this.httpClient.get(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -250,10 +235,10 @@ export class StoreService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public placeOrder(body: Order, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; - public placeOrder(body: Order, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; - public placeOrder(body: Order, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; - public placeOrder(body: Order, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { + public placeOrder(body: Order, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable; + public placeOrder(body: Order, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; + public placeOrder(body: Order, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; + public placeOrder(body: Order, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling placeOrder.'); } @@ -273,10 +258,6 @@ export class StoreService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } // to determine the Content-Type header @@ -295,7 +276,6 @@ export class StoreService { return this.httpClient.post(`${this.configuration.basePath}/store/order`, body, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/user.service.ts index a1daecfe0d54..9809f730029c 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/user.service.ts @@ -13,7 +13,7 @@ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; @@ -92,10 +92,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public createUser(body: User, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; - public createUser(body: User, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public createUser(body: User, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public createUser(body: User, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + public createUser(body: User, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; + public createUser(body: User, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public createUser(body: User, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public createUser(body: User, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createUser.'); } @@ -113,10 +113,6 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } // to determine the Content-Type header @@ -135,7 +131,6 @@ export class UserService { return this.httpClient.post(`${this.configuration.basePath}/user`, body, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -151,10 +146,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public createUsersWithArrayInput(body: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; - public createUsersWithArrayInput(body: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public createUsersWithArrayInput(body: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public createUsersWithArrayInput(body: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + public createUsersWithArrayInput(body: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; + public createUsersWithArrayInput(body: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public createUsersWithArrayInput(body: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public createUsersWithArrayInput(body: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); } @@ -172,10 +167,6 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } // to determine the Content-Type header @@ -194,7 +185,6 @@ export class UserService { return this.httpClient.post(`${this.configuration.basePath}/user/createWithArray`, body, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -210,10 +200,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public createUsersWithListInput(body: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; - public createUsersWithListInput(body: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public createUsersWithListInput(body: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public createUsersWithListInput(body: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + public createUsersWithListInput(body: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; + public createUsersWithListInput(body: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public createUsersWithListInput(body: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public createUsersWithListInput(body: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); } @@ -231,10 +221,6 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } // to determine the Content-Type header @@ -253,7 +239,6 @@ export class UserService { return this.httpClient.post(`${this.configuration.basePath}/user/createWithList`, body, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -270,10 +255,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public deleteUser(username: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; - public deleteUser(username: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public deleteUser(username: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public deleteUser(username: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + public deleteUser(username: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; + public deleteUser(username: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public deleteUser(username: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public deleteUser(username: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { if (username === null || username === undefined) { throw new Error('Required parameter username was null or undefined when calling deleteUser.'); } @@ -291,10 +276,6 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } let responseType_: 'text' | 'json' = 'json'; @@ -304,7 +285,6 @@ export class UserService { return this.httpClient.delete(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -320,10 +300,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getUserByName(username: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; - public getUserByName(username: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; - public getUserByName(username: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; - public getUserByName(username: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { + public getUserByName(username: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable; + public getUserByName(username: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; + public getUserByName(username: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; + public getUserByName(username: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { if (username === null || username === undefined) { throw new Error('Required parameter username was null or undefined when calling getUserByName.'); } @@ -343,10 +323,6 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } let responseType_: 'text' | 'json' = 'json'; @@ -356,7 +332,6 @@ export class UserService { return this.httpClient.get(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -373,10 +348,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public loginUser(username: string, password: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; - public loginUser(username: string, password: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; - public loginUser(username: string, password: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; - public loginUser(username: string, password: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { + public loginUser(username: string, password: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable; + public loginUser(username: string, password: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; + public loginUser(username: string, password: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; + public loginUser(username: string, password: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { if (username === null || username === undefined) { throw new Error('Required parameter username was null or undefined when calling loginUser.'); } @@ -409,10 +384,6 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } let responseType_: 'text' | 'json' = 'json'; @@ -422,7 +393,6 @@ export class UserService { return this.httpClient.get(`${this.configuration.basePath}/user/login`, { - context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, @@ -438,10 +408,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public logoutUser(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; - public logoutUser(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + public logoutUser(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; + public logoutUser(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { let localVarHeaders = this.defaultHeaders; @@ -456,10 +426,6 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } let responseType_: 'text' | 'json' = 'json'; @@ -469,7 +435,6 @@ export class UserService { return this.httpClient.get(`${this.configuration.basePath}/user/logout`, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -487,10 +452,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public updateUser(username: string, body: User, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; - public updateUser(username: string, body: User, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public updateUser(username: string, body: User, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public updateUser(username: string, body: User, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + public updateUser(username: string, body: User, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; + public updateUser(username: string, body: User, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public updateUser(username: string, body: User, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; + public updateUser(username: string, body: User, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { if (username === null || username === undefined) { throw new Error('Required parameter username was null or undefined when calling updateUser.'); } @@ -511,10 +476,6 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } // to determine the Content-Type header @@ -533,7 +494,6 @@ export class UserService { return this.httpClient.put(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, body, { - context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/package.json b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/package.json index 8c5657078867..c3cb294442aa 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/package.json +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/package.json @@ -21,12 +21,12 @@ "@angular/compiler-cli": "^12.0.0", "@angular/core": "^12.0.0", "@angular/platform-browser": "^12.0.0", - "ng-packagr": "^12.2.1", + "ng-packagr": "^11.0.2", "reflect-metadata": "^0.1.3", "rxjs": "^6.6.0", - "tsickle": "^0.43.0", - "typescript": ">=4.2.3 <4.3.0", - "zone.js": "^0.11.4" + "tsickle": "^0.39.1", + "typescript": ">=4.0.0 <4.1.0", + "zone.js": "^0.11.3" }, "publishConfig": { "registry": "https://skimdb.npmjs.com/registry" diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md index 32a66fa54dc2..505db20273f4 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md @@ -642,8 +642,8 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = LocalDate.now(); // LocalDate | None - OffsetDateTime dateTime = OffsetDateTime.parse("OffsetDateTime.parse("2010-02-01T09:20:10.111110Z[UTC]", java.time.format.DateTimeFormatter.ISO_ZONED_DATE_TIME.withZone(java.time.ZoneId.systemDefault()))"); // OffsetDateTime | None + LocalDate date = new LocalDate(); // LocalDate | None + OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None try { @@ -724,13 +724,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "_abc"; // String | Header parameter enum test (string) + String enumHeaderString = "-efg"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "_abc"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumFormStringArray = ">"; // List | Form parameter enum test (string array) - String enumFormString = "_abc"; // String | Form parameter enum test (string) + String enumQueryString = "-efg"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) + List enumFormStringArray = "$"; // List | Form parameter enum test (string array) + String enumFormString = "-efg"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/server/petstore/php-slim4/.openapi-generator/FILES b/samples/server/petstore/php-slim4/.openapi-generator/FILES index 70090586115d..8bd8c2bae334 100644 --- a/samples/server/petstore/php-slim4/.openapi-generator/FILES +++ b/samples/server/petstore/php-slim4/.openapi-generator/FILES @@ -8,6 +8,24 @@ lib/Api/AbstractPetApi.php lib/Api/AbstractStoreApi.php lib/Api/AbstractUserApi.php lib/Auth/AbstractAuthenticator.php +lib/Auth/AbstractAuthenticator.php +lib/Auth/AbstractAuthenticator.php +lib/Auth/AbstractAuthenticator.php +lib/Auth/AbstractAuthenticator.php +lib/Auth/AbstractAuthenticator.php +lib/Auth/AbstractAuthenticator.php +lib/Auth/AbstractAuthenticator.php +lib/Auth/AbstractAuthenticator.php +lib/Auth/AbstractAuthenticator.php +lib/Auth/AbstractAuthenticator.php +lib/Auth/AbstractAuthenticator.php +lib/Auth/AbstractAuthenticator.php +lib/Auth/AbstractAuthenticator.php +lib/Auth/AbstractAuthenticator.php +lib/Auth/AbstractAuthenticator.php +lib/Auth/AbstractAuthenticator.php +lib/Auth/AbstractAuthenticator.php +lib/Auth/AbstractAuthenticator.php lib/BaseModel.php lib/Middleware/JsonBodyParserMiddleware.php lib/Model/ApiResponse.php From cd31cbf0751889a3a5efc4820072ac61cf259681 Mon Sep 17 00:00:00 2001 From: Ahmed Yarub Hani Al Nuaimi Date: Tue, 7 Sep 2021 04:43:00 -0300 Subject: [PATCH 13/17] Revert "Update documentations" This reverts commit 0e25659de2d68753e1e033eaa83e769c028de5cb. --- docs/generators/c.md | 3 + docs/generators/scala-play-server.md | 1 + docs/generators/scala-sttp.md | 1 + docs/generators/scalatra.md | 1 + docs/generators/typescript-angular.md | 2 +- .../java/apache-httpclient/docs/FakeApi.md | 14 +-- .../java/google-api-client/docs/FakeApi.md | 14 +-- .../petstore/java/jersey1/docs/FakeApi.md | 14 +-- .../docs/FakeApi.md | 14 +-- .../java/jersey2-java8/docs/FakeApi.md | 14 +-- .../java/native-async/docs/FakeApi.md | 28 ++--- .../petstore/java/native/docs/FakeApi.md | 28 ++--- .../docs/FakeApi.md | 14 +-- .../docs/FakeApi.md | 14 +-- .../petstore/java/okhttp-gson/docs/FakeApi.md | 14 +-- .../petstore/java/resteasy/docs/FakeApi.md | 14 +-- .../java/resttemplate-withXml/docs/FakeApi.md | 14 +-- .../java/resttemplate/docs/FakeApi.md | 14 +-- .../java/retrofit2-play26/docs/FakeApi.md | 14 +-- .../petstore/java/retrofit2/docs/FakeApi.md | 14 +-- .../java/retrofit2rx2/docs/FakeApi.md | 14 +-- .../java/retrofit2rx3/docs/FakeApi.md | 14 +-- .../java/vertx-no-nullable/docs/FakeApi.md | 14 +-- .../petstore/java/vertx/docs/FakeApi.md | 14 +-- .../petstore/java/webclient/docs/FakeApi.md | 14 +-- .../builds/default/api/pet.service.ts | 106 ++++++++++++------ .../builds/default/api/store.service.ts | 54 ++++++--- .../builds/default/api/user.service.ts | 106 ++++++++++++------ .../builds/with-npm/api/pet.service.ts | 106 ++++++++++++------ .../builds/with-npm/api/store.service.ts | 54 ++++++--- .../builds/with-npm/api/user.service.ts | 106 ++++++++++++------ .../builds/with-npm/package.json | 8 +- .../java/jersey2-java8/docs/FakeApi.md | 16 +-- .../php-slim4/.openapi-generator/FILES | 18 --- 34 files changed, 539 insertions(+), 351 deletions(-) diff --git a/docs/generators/c.md b/docs/generators/c.md index c3a79bad9fcf..29310172353f 100644 --- a/docs/generators/c.md +++ b/docs/generators/c.md @@ -135,6 +135,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • static
  • static_assert
  • static_cast
  • +
  • stdin
  • +
  • stderr
  • +
  • stdout
  • struct
  • switch
  • synchronized
  • diff --git a/docs/generators/scala-play-server.md b/docs/generators/scala-play-server.md index 208bdd72c18e..d734fed60c2e 100644 --- a/docs/generators/scala-play-server.md +++ b/docs/generators/scala-play-server.md @@ -83,6 +83,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • case
  • catch
  • class
  • +
  • clone
  • def
  • do
  • else
  • diff --git a/docs/generators/scala-sttp.md b/docs/generators/scala-sttp.md index 77891a59141a..8a8b5d33c261 100644 --- a/docs/generators/scala-sttp.md +++ b/docs/generators/scala-sttp.md @@ -81,6 +81,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • case
  • catch
  • class
  • +
  • clone
  • def
  • do
  • else
  • diff --git a/docs/generators/scalatra.md b/docs/generators/scalatra.md index 897421a205d6..d3a9b5149131 100644 --- a/docs/generators/scalatra.md +++ b/docs/generators/scalatra.md @@ -76,6 +76,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • case
  • catch
  • class
  • +
  • clone
  • def
  • do
  • else
  • diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index 67341026ceb5..126ccd5ae386 100644 --- a/docs/generators/typescript-angular.md +++ b/docs/generators/typescript-angular.md @@ -19,7 +19,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |modelFileSuffix|The suffix of the file of the generated model (model<suffix>.ts).| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original| |modelSuffix|The suffix of the generated model.| |null| -|ngVersion|The version of Angular. (At least 6.0.0)| |11.0.0| +|ngVersion|The version of Angular. (At least 6.0.0)| |12.0.0| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| |npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| diff --git a/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md b/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md index 4f81e527a107..c76fd80c3245 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md +++ b/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = new LocalDate(); // LocalDate | None + LocalDate date = LocalDate.now(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -669,13 +669,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + String enumHeaderString = "_abc"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "-efg"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) - List enumFormStringArray = "$"; // List | Form parameter enum test (string array) - String enumFormString = "-efg"; // String | Form parameter enum test (string) + String enumQueryString = "_abc"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/google-api-client/docs/FakeApi.md b/samples/client/petstore/java/google-api-client/docs/FakeApi.md index 4f81e527a107..c76fd80c3245 100644 --- a/samples/client/petstore/java/google-api-client/docs/FakeApi.md +++ b/samples/client/petstore/java/google-api-client/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = new LocalDate(); // LocalDate | None + LocalDate date = LocalDate.now(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -669,13 +669,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + String enumHeaderString = "_abc"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "-efg"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) - List enumFormStringArray = "$"; // List | Form parameter enum test (string array) - String enumFormString = "-efg"; // String | Form parameter enum test (string) + String enumQueryString = "_abc"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/jersey1/docs/FakeApi.md b/samples/client/petstore/java/jersey1/docs/FakeApi.md index 4f81e527a107..c76fd80c3245 100644 --- a/samples/client/petstore/java/jersey1/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey1/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = new LocalDate(); // LocalDate | None + LocalDate date = LocalDate.now(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -669,13 +669,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + String enumHeaderString = "_abc"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "-efg"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) - List enumFormStringArray = "$"; // List | Form parameter enum test (string array) - String enumFormString = "-efg"; // String | Form parameter enum test (string) + String enumQueryString = "_abc"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md index 9b87b7538f6d..c538fd7fcd4b 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = new LocalDate(); // LocalDate | None + LocalDate date = LocalDate.now(); // LocalDate | None LocalDateTime dateTime = new LocalDateTime(); // LocalDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -668,13 +668,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + String enumHeaderString = "_abc"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "-efg"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) - List enumFormStringArray = "$"; // List | Form parameter enum test (string array) - String enumFormString = "-efg"; // String | Form parameter enum test (string) + String enumQueryString = "_abc"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md index a5c59d91e0b5..29f799203941 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = new LocalDate(); // LocalDate | None + LocalDate date = LocalDate.now(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -668,13 +668,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + String enumHeaderString = "_abc"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "-efg"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) - List enumFormStringArray = "$"; // List | Form parameter enum test (string array) - String enumFormString = "-efg"; // String | Form parameter enum test (string) + String enumQueryString = "_abc"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/native-async/docs/FakeApi.md b/samples/client/petstore/java/native-async/docs/FakeApi.md index 40a35f715d83..fd327749d6c4 100644 --- a/samples/client/petstore/java/native-async/docs/FakeApi.md +++ b/samples/client/petstore/java/native-async/docs/FakeApi.md @@ -1214,7 +1214,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = new LocalDate(); // LocalDate | None + LocalDate date = LocalDate.now(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -1313,7 +1313,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = new LocalDate(); // LocalDate | None + LocalDate date = LocalDate.now(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -1406,13 +1406,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + String enumHeaderString = "_abc"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "-efg"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) - List enumFormStringArray = "$"; // List | Form parameter enum test (string array) - String enumFormString = "-efg"; // String | Form parameter enum test (string) + String enumQueryString = "_abc"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + String enumFormString = "_abc"; // String | Form parameter enum test (string) try { CompletableFuture result = apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { @@ -1487,13 +1487,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + String enumHeaderString = "_abc"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "-efg"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) - List enumFormStringArray = "$"; // List | Form parameter enum test (string array) - String enumFormString = "-efg"; // String | Form parameter enum test (string) + String enumQueryString = "_abc"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + String enumFormString = "_abc"; // String | Form parameter enum test (string) try { CompletableFuture> response = apiInstance.testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); System.out.println("Status code: " + response.get().getStatusCode()); diff --git a/samples/client/petstore/java/native/docs/FakeApi.md b/samples/client/petstore/java/native/docs/FakeApi.md index 64ac73b2bbc8..1d0e8ca9ebbf 100644 --- a/samples/client/petstore/java/native/docs/FakeApi.md +++ b/samples/client/petstore/java/native/docs/FakeApi.md @@ -1141,7 +1141,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = new LocalDate(); // LocalDate | None + LocalDate date = LocalDate.now(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -1239,7 +1239,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = new LocalDate(); // LocalDate | None + LocalDate date = LocalDate.now(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -1324,13 +1324,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + String enumHeaderString = "_abc"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "-efg"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) - List enumFormStringArray = "$"; // List | Form parameter enum test (string array) - String enumFormString = "-efg"; // String | Form parameter enum test (string) + String enumQueryString = "_abc"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { @@ -1404,13 +1404,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + String enumHeaderString = "_abc"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "-efg"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) - List enumFormStringArray = "$"; // List | Form parameter enum test (string array) - String enumFormString = "-efg"; // String | Form parameter enum test (string) + String enumQueryString = "_abc"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + String enumFormString = "_abc"; // String | Form parameter enum test (string) try { ApiResponse response = apiInstance.testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); System.out.println("Status code: " + response.getStatusCode()); diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md index 6a47638bab78..5a20b8b1911d 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md @@ -552,7 +552,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = new LocalDate(); // LocalDate | None + LocalDate date = LocalDate.now(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -631,13 +631,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + String enumHeaderString = "_abc"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "-efg"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) - List enumFormStringArray = "$"; // List | Form parameter enum test (string array) - String enumFormString = "-efg"; // String | Form parameter enum test (string) + String enumQueryString = "_abc"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md index 6a47638bab78..5a20b8b1911d 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md @@ -552,7 +552,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = new LocalDate(); // LocalDate | None + LocalDate date = LocalDate.now(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -631,13 +631,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + String enumHeaderString = "_abc"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "-efg"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) - List enumFormStringArray = "$"; // List | Form parameter enum test (string array) - String enumFormString = "-efg"; // String | Form parameter enum test (string) + String enumQueryString = "_abc"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md index 6a47638bab78..5a20b8b1911d 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md @@ -552,7 +552,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = new LocalDate(); // LocalDate | None + LocalDate date = LocalDate.now(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -631,13 +631,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + String enumHeaderString = "_abc"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "-efg"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) - List enumFormStringArray = "$"; // List | Form parameter enum test (string array) - String enumFormString = "-efg"; // String | Form parameter enum test (string) + String enumQueryString = "_abc"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/resteasy/docs/FakeApi.md b/samples/client/petstore/java/resteasy/docs/FakeApi.md index 4f81e527a107..c76fd80c3245 100644 --- a/samples/client/petstore/java/resteasy/docs/FakeApi.md +++ b/samples/client/petstore/java/resteasy/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = new LocalDate(); // LocalDate | None + LocalDate date = LocalDate.now(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -669,13 +669,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + String enumHeaderString = "_abc"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "-efg"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) - List enumFormStringArray = "$"; // List | Form parameter enum test (string array) - String enumFormString = "-efg"; // String | Form parameter enum test (string) + String enumQueryString = "_abc"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md index 4f81e527a107..c76fd80c3245 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = new LocalDate(); // LocalDate | None + LocalDate date = LocalDate.now(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -669,13 +669,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + String enumHeaderString = "_abc"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "-efg"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) - List enumFormStringArray = "$"; // List | Form parameter enum test (string array) - String enumFormString = "-efg"; // String | Form parameter enum test (string) + String enumQueryString = "_abc"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/resttemplate/docs/FakeApi.md b/samples/client/petstore/java/resttemplate/docs/FakeApi.md index 4f81e527a107..c76fd80c3245 100644 --- a/samples/client/petstore/java/resttemplate/docs/FakeApi.md +++ b/samples/client/petstore/java/resttemplate/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = new LocalDate(); // LocalDate | None + LocalDate date = LocalDate.now(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -669,13 +669,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + String enumHeaderString = "_abc"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "-efg"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) - List enumFormStringArray = "$"; // List | Form parameter enum test (string array) - String enumFormString = "-efg"; // String | Form parameter enum test (string) + String enumQueryString = "_abc"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md b/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md index 740c810f28be..d0080643e4bf 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = new LocalDate(); // LocalDate | None + LocalDate date = LocalDate.now(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -669,13 +669,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + String enumHeaderString = "_abc"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "-efg"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) - List enumFormStringArray = "$"; // List | Form parameter enum test (string array) - String enumFormString = "-efg"; // String | Form parameter enum test (string) + String enumQueryString = "_abc"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/retrofit2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2/docs/FakeApi.md index 740c810f28be..d0080643e4bf 100644 --- a/samples/client/petstore/java/retrofit2/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = new LocalDate(); // LocalDate | None + LocalDate date = LocalDate.now(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -669,13 +669,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + String enumHeaderString = "_abc"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "-efg"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) - List enumFormStringArray = "$"; // List | Form parameter enum test (string array) - String enumFormString = "-efg"; // String | Form parameter enum test (string) + String enumQueryString = "_abc"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md index 740c810f28be..d0080643e4bf 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = new LocalDate(); // LocalDate | None + LocalDate date = LocalDate.now(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -669,13 +669,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + String enumHeaderString = "_abc"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "-efg"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) - List enumFormStringArray = "$"; // List | Form parameter enum test (string array) - String enumFormString = "-efg"; // String | Form parameter enum test (string) + String enumQueryString = "_abc"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md index 740c810f28be..d0080643e4bf 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = new LocalDate(); // LocalDate | None + LocalDate date = LocalDate.now(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -669,13 +669,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + String enumHeaderString = "_abc"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "-efg"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) - List enumFormStringArray = "$"; // List | Form parameter enum test (string array) - String enumFormString = "-efg"; // String | Form parameter enum test (string) + String enumQueryString = "_abc"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md b/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md index c50095a6a58b..99c87b67656e 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None AsyncFile binary = new AsyncFile(); // AsyncFile | None - LocalDate date = new LocalDate(); // LocalDate | None + LocalDate date = LocalDate.now(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -669,13 +669,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + String enumHeaderString = "_abc"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "-efg"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) - List enumFormStringArray = "$"; // List | Form parameter enum test (string array) - String enumFormString = "-efg"; // String | Form parameter enum test (string) + String enumQueryString = "_abc"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/vertx/docs/FakeApi.md b/samples/client/petstore/java/vertx/docs/FakeApi.md index c50095a6a58b..99c87b67656e 100644 --- a/samples/client/petstore/java/vertx/docs/FakeApi.md +++ b/samples/client/petstore/java/vertx/docs/FakeApi.md @@ -586,7 +586,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None AsyncFile binary = new AsyncFile(); // AsyncFile | None - LocalDate date = new LocalDate(); // LocalDate | None + LocalDate date = LocalDate.now(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -669,13 +669,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + String enumHeaderString = "_abc"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "-efg"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) - List enumFormStringArray = "$"; // List | Form parameter enum test (string array) - String enumFormString = "-efg"; // String | Form parameter enum test (string) + String enumQueryString = "_abc"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/java/webclient/docs/FakeApi.md b/samples/client/petstore/java/webclient/docs/FakeApi.md index 025a2cb0ea24..c3ed83515d13 100644 --- a/samples/client/petstore/java/webclient/docs/FakeApi.md +++ b/samples/client/petstore/java/webclient/docs/FakeApi.md @@ -784,7 +784,7 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = new LocalDate(); // LocalDate | None + LocalDate date = LocalDate.now(); // LocalDate | None OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None @@ -867,13 +867,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + String enumHeaderString = "_abc"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "-efg"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) - List enumFormStringArray = "$"; // List | Form parameter enum test (string array) - String enumFormString = "-efg"; // String | Form parameter enum test (string) + String enumQueryString = "_abc"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/pet.service.ts index 800853664a05..d8009ed719cf 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/pet.service.ts @@ -13,7 +13,7 @@ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http'; import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; @@ -105,10 +105,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public addPet(body: Pet, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; - public addPet(body: Pet, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public addPet(body: Pet, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public addPet(body: Pet, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { + public addPet(body: Pet, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public addPet(body: Pet, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public addPet(body: Pet, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public addPet(body: Pet, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling addPet.'); } @@ -133,6 +133,10 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } // to determine the Content-Type header @@ -153,6 +157,7 @@ export class PetService { return this.httpClient.post(`${this.configuration.basePath}/pet`, body, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -169,10 +174,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public deletePet(petId: number, apiKey?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; - public deletePet(petId: number, apiKey?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public deletePet(petId: number, apiKey?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public deletePet(petId: number, apiKey?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { + public deletePet(petId: number, apiKey?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public deletePet(petId: number, apiKey?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public deletePet(petId: number, apiKey?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public deletePet(petId: number, apiKey?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (petId === null || petId === undefined) { throw new Error('Required parameter petId was null or undefined when calling deletePet.'); } @@ -200,6 +205,10 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } let responseType_: 'text' | 'json' = 'json'; @@ -209,6 +218,7 @@ export class PetService { return this.httpClient.delete(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -225,10 +235,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>>; - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>>; - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>>; + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>>; + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { if (status === null || status === undefined) { throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); } @@ -261,6 +271,10 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } let responseType_: 'text' | 'json' = 'json'; @@ -270,6 +284,7 @@ export class PetService { return this.httpClient.get>(`${this.configuration.basePath}/pet/findByStatus`, { + context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, @@ -288,10 +303,10 @@ export class PetService { * @param reportProgress flag to report request and response progress. * @deprecated */ - public findPetsByTags(tags: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; - public findPetsByTags(tags: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>>; - public findPetsByTags(tags: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>>; - public findPetsByTags(tags: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { + public findPetsByTags(tags: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public findPetsByTags(tags: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>>; + public findPetsByTags(tags: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>>; + public findPetsByTags(tags: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { if (tags === null || tags === undefined) { throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); } @@ -324,6 +339,10 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } let responseType_: 'text' | 'json' = 'json'; @@ -333,6 +352,7 @@ export class PetService { return this.httpClient.get>(`${this.configuration.basePath}/pet/findByTags`, { + context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, @@ -350,10 +370,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getPetById(petId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable; - public getPetById(petId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; - public getPetById(petId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; - public getPetById(petId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { + public getPetById(petId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; + public getPetById(petId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public getPetById(petId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public getPetById(petId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { if (petId === null || petId === undefined) { throw new Error('Required parameter petId was null or undefined when calling getPetById.'); } @@ -380,6 +400,10 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } let responseType_: 'text' | 'json' = 'json'; @@ -389,6 +413,7 @@ export class PetService { return this.httpClient.get(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -404,10 +429,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public updatePet(body: Pet, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; - public updatePet(body: Pet, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public updatePet(body: Pet, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public updatePet(body: Pet, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { + public updatePet(body: Pet, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public updatePet(body: Pet, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public updatePet(body: Pet, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public updatePet(body: Pet, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling updatePet.'); } @@ -432,6 +457,10 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } // to determine the Content-Type header @@ -452,6 +481,7 @@ export class PetService { return this.httpClient.put(`${this.configuration.basePath}/pet`, body, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -469,10 +499,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; - public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public updatePetWithForm(petId: number, name?: string, status?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { + public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public updatePetWithForm(petId: number, name?: string, status?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (petId === null || petId === undefined) { throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); } @@ -497,6 +527,10 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } // to determine the Content-Type header const consumes: string[] = [ @@ -523,6 +557,7 @@ export class PetService { return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -540,10 +575,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json',}): Observable; - public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json',}): Observable>; - public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json',}): Observable>; - public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json',}): Observable { + public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; + public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { if (petId === null || petId === undefined) { throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); } @@ -569,6 +604,10 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } // to determine the Content-Type header const consumes: string[] = [ @@ -595,6 +634,7 @@ export class PetService { return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/store.service.ts index 1397ffd2d02e..2f3ced393ccd 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/store.service.ts @@ -13,7 +13,7 @@ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http'; import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; @@ -92,10 +92,10 @@ export class StoreService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public deleteOrder(orderId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; - public deleteOrder(orderId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public deleteOrder(orderId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public deleteOrder(orderId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { + public deleteOrder(orderId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public deleteOrder(orderId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public deleteOrder(orderId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public deleteOrder(orderId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (orderId === null || orderId === undefined) { throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); } @@ -113,6 +113,10 @@ export class StoreService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } let responseType_: 'text' | 'json' = 'json'; @@ -122,6 +126,7 @@ export class StoreService { return this.httpClient.delete(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -137,10 +142,10 @@ export class StoreService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getInventory(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json',}): Observable<{ [key: string]: number; }>; - public getInventory(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json',}): Observable>; - public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json',}): Observable>; - public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json',}): Observable { + public getInventory(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<{ [key: string]: number; }>; + public getInventory(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { let localVarHeaders = this.defaultHeaders; @@ -163,6 +168,10 @@ export class StoreService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } let responseType_: 'text' | 'json' = 'json'; @@ -172,6 +181,7 @@ export class StoreService { return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -188,10 +198,10 @@ export class StoreService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getOrderById(orderId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable; - public getOrderById(orderId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; - public getOrderById(orderId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; - public getOrderById(orderId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { + public getOrderById(orderId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; + public getOrderById(orderId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public getOrderById(orderId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public getOrderById(orderId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { if (orderId === null || orderId === undefined) { throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); } @@ -211,6 +221,10 @@ export class StoreService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } let responseType_: 'text' | 'json' = 'json'; @@ -220,6 +234,7 @@ export class StoreService { return this.httpClient.get(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -235,10 +250,10 @@ export class StoreService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public placeOrder(body: Order, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable; - public placeOrder(body: Order, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; - public placeOrder(body: Order, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; - public placeOrder(body: Order, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { + public placeOrder(body: Order, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; + public placeOrder(body: Order, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public placeOrder(body: Order, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public placeOrder(body: Order, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling placeOrder.'); } @@ -258,6 +273,10 @@ export class StoreService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } // to determine the Content-Type header @@ -276,6 +295,7 @@ export class StoreService { return this.httpClient.post(`${this.configuration.basePath}/store/order`, body, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/user.service.ts index 9809f730029c..a1daecfe0d54 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/user.service.ts @@ -13,7 +13,7 @@ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http'; import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; @@ -92,10 +92,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public createUser(body: User, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; - public createUser(body: User, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public createUser(body: User, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public createUser(body: User, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { + public createUser(body: User, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public createUser(body: User, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public createUser(body: User, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public createUser(body: User, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createUser.'); } @@ -113,6 +113,10 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } // to determine the Content-Type header @@ -131,6 +135,7 @@ export class UserService { return this.httpClient.post(`${this.configuration.basePath}/user`, body, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -146,10 +151,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public createUsersWithArrayInput(body: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; - public createUsersWithArrayInput(body: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public createUsersWithArrayInput(body: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public createUsersWithArrayInput(body: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { + public createUsersWithArrayInput(body: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public createUsersWithArrayInput(body: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public createUsersWithArrayInput(body: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public createUsersWithArrayInput(body: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); } @@ -167,6 +172,10 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } // to determine the Content-Type header @@ -185,6 +194,7 @@ export class UserService { return this.httpClient.post(`${this.configuration.basePath}/user/createWithArray`, body, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -200,10 +210,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public createUsersWithListInput(body: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; - public createUsersWithListInput(body: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public createUsersWithListInput(body: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public createUsersWithListInput(body: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { + public createUsersWithListInput(body: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public createUsersWithListInput(body: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public createUsersWithListInput(body: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public createUsersWithListInput(body: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); } @@ -221,6 +231,10 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } // to determine the Content-Type header @@ -239,6 +253,7 @@ export class UserService { return this.httpClient.post(`${this.configuration.basePath}/user/createWithList`, body, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -255,10 +270,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public deleteUser(username: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; - public deleteUser(username: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public deleteUser(username: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public deleteUser(username: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { + public deleteUser(username: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public deleteUser(username: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public deleteUser(username: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public deleteUser(username: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (username === null || username === undefined) { throw new Error('Required parameter username was null or undefined when calling deleteUser.'); } @@ -276,6 +291,10 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } let responseType_: 'text' | 'json' = 'json'; @@ -285,6 +304,7 @@ export class UserService { return this.httpClient.delete(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -300,10 +320,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getUserByName(username: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable; - public getUserByName(username: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; - public getUserByName(username: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; - public getUserByName(username: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { + public getUserByName(username: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; + public getUserByName(username: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public getUserByName(username: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public getUserByName(username: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { if (username === null || username === undefined) { throw new Error('Required parameter username was null or undefined when calling getUserByName.'); } @@ -323,6 +343,10 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } let responseType_: 'text' | 'json' = 'json'; @@ -332,6 +356,7 @@ export class UserService { return this.httpClient.get(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -348,10 +373,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public loginUser(username: string, password: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable; - public loginUser(username: string, password: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; - public loginUser(username: string, password: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; - public loginUser(username: string, password: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { + public loginUser(username: string, password: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; + public loginUser(username: string, password: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public loginUser(username: string, password: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public loginUser(username: string, password: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { if (username === null || username === undefined) { throw new Error('Required parameter username was null or undefined when calling loginUser.'); } @@ -384,6 +409,10 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } let responseType_: 'text' | 'json' = 'json'; @@ -393,6 +422,7 @@ export class UserService { return this.httpClient.get(`${this.configuration.basePath}/user/login`, { + context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, @@ -408,10 +438,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public logoutUser(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; - public logoutUser(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { + public logoutUser(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public logoutUser(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { let localVarHeaders = this.defaultHeaders; @@ -426,6 +456,10 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } let responseType_: 'text' | 'json' = 'json'; @@ -435,6 +469,7 @@ export class UserService { return this.httpClient.get(`${this.configuration.basePath}/user/logout`, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -452,10 +487,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public updateUser(username: string, body: User, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; - public updateUser(username: string, body: User, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public updateUser(username: string, body: User, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public updateUser(username: string, body: User, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { + public updateUser(username: string, body: User, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public updateUser(username: string, body: User, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public updateUser(username: string, body: User, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public updateUser(username: string, body: User, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (username === null || username === undefined) { throw new Error('Required parameter username was null or undefined when calling updateUser.'); } @@ -476,6 +511,10 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } // to determine the Content-Type header @@ -494,6 +533,7 @@ export class UserService { return this.httpClient.put(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, body, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/pet.service.ts index 800853664a05..d8009ed719cf 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/pet.service.ts @@ -13,7 +13,7 @@ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http'; import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; @@ -105,10 +105,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public addPet(body: Pet, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; - public addPet(body: Pet, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public addPet(body: Pet, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public addPet(body: Pet, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { + public addPet(body: Pet, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public addPet(body: Pet, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public addPet(body: Pet, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public addPet(body: Pet, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling addPet.'); } @@ -133,6 +133,10 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } // to determine the Content-Type header @@ -153,6 +157,7 @@ export class PetService { return this.httpClient.post(`${this.configuration.basePath}/pet`, body, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -169,10 +174,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public deletePet(petId: number, apiKey?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; - public deletePet(petId: number, apiKey?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public deletePet(petId: number, apiKey?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public deletePet(petId: number, apiKey?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { + public deletePet(petId: number, apiKey?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public deletePet(petId: number, apiKey?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public deletePet(petId: number, apiKey?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public deletePet(petId: number, apiKey?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (petId === null || petId === undefined) { throw new Error('Required parameter petId was null or undefined when calling deletePet.'); } @@ -200,6 +205,10 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } let responseType_: 'text' | 'json' = 'json'; @@ -209,6 +218,7 @@ export class PetService { return this.httpClient.delete(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -225,10 +235,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>>; - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>>; - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>>; + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>>; + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { if (status === null || status === undefined) { throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); } @@ -261,6 +271,10 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } let responseType_: 'text' | 'json' = 'json'; @@ -270,6 +284,7 @@ export class PetService { return this.httpClient.get>(`${this.configuration.basePath}/pet/findByStatus`, { + context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, @@ -288,10 +303,10 @@ export class PetService { * @param reportProgress flag to report request and response progress. * @deprecated */ - public findPetsByTags(tags: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; - public findPetsByTags(tags: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>>; - public findPetsByTags(tags: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>>; - public findPetsByTags(tags: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { + public findPetsByTags(tags: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public findPetsByTags(tags: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>>; + public findPetsByTags(tags: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>>; + public findPetsByTags(tags: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { if (tags === null || tags === undefined) { throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); } @@ -324,6 +339,10 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } let responseType_: 'text' | 'json' = 'json'; @@ -333,6 +352,7 @@ export class PetService { return this.httpClient.get>(`${this.configuration.basePath}/pet/findByTags`, { + context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, @@ -350,10 +370,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getPetById(petId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable; - public getPetById(petId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; - public getPetById(petId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; - public getPetById(petId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { + public getPetById(petId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; + public getPetById(petId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public getPetById(petId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public getPetById(petId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { if (petId === null || petId === undefined) { throw new Error('Required parameter petId was null or undefined when calling getPetById.'); } @@ -380,6 +400,10 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } let responseType_: 'text' | 'json' = 'json'; @@ -389,6 +413,7 @@ export class PetService { return this.httpClient.get(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -404,10 +429,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public updatePet(body: Pet, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; - public updatePet(body: Pet, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public updatePet(body: Pet, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public updatePet(body: Pet, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { + public updatePet(body: Pet, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public updatePet(body: Pet, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public updatePet(body: Pet, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public updatePet(body: Pet, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling updatePet.'); } @@ -432,6 +457,10 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } // to determine the Content-Type header @@ -452,6 +481,7 @@ export class PetService { return this.httpClient.put(`${this.configuration.basePath}/pet`, body, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -469,10 +499,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; - public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public updatePetWithForm(petId: number, name?: string, status?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { + public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public updatePetWithForm(petId: number, name?: string, status?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (petId === null || petId === undefined) { throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); } @@ -497,6 +527,10 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } // to determine the Content-Type header const consumes: string[] = [ @@ -523,6 +557,7 @@ export class PetService { return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -540,10 +575,10 @@ export class PetService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json',}): Observable; - public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json',}): Observable>; - public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json',}): Observable>; - public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json',}): Observable { + public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; + public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { if (petId === null || petId === undefined) { throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); } @@ -569,6 +604,10 @@ export class PetService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } // to determine the Content-Type header const consumes: string[] = [ @@ -595,6 +634,7 @@ export class PetService { return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/store.service.ts index 1397ffd2d02e..2f3ced393ccd 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/store.service.ts @@ -13,7 +13,7 @@ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http'; import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; @@ -92,10 +92,10 @@ export class StoreService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public deleteOrder(orderId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; - public deleteOrder(orderId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public deleteOrder(orderId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public deleteOrder(orderId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { + public deleteOrder(orderId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public deleteOrder(orderId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public deleteOrder(orderId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public deleteOrder(orderId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (orderId === null || orderId === undefined) { throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); } @@ -113,6 +113,10 @@ export class StoreService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } let responseType_: 'text' | 'json' = 'json'; @@ -122,6 +126,7 @@ export class StoreService { return this.httpClient.delete(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -137,10 +142,10 @@ export class StoreService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getInventory(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json',}): Observable<{ [key: string]: number; }>; - public getInventory(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json',}): Observable>; - public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json',}): Observable>; - public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json',}): Observable { + public getInventory(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<{ [key: string]: number; }>; + public getInventory(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { let localVarHeaders = this.defaultHeaders; @@ -163,6 +168,10 @@ export class StoreService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } let responseType_: 'text' | 'json' = 'json'; @@ -172,6 +181,7 @@ export class StoreService { return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -188,10 +198,10 @@ export class StoreService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getOrderById(orderId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable; - public getOrderById(orderId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; - public getOrderById(orderId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; - public getOrderById(orderId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { + public getOrderById(orderId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; + public getOrderById(orderId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public getOrderById(orderId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public getOrderById(orderId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { if (orderId === null || orderId === undefined) { throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); } @@ -211,6 +221,10 @@ export class StoreService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } let responseType_: 'text' | 'json' = 'json'; @@ -220,6 +234,7 @@ export class StoreService { return this.httpClient.get(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -235,10 +250,10 @@ export class StoreService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public placeOrder(body: Order, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable; - public placeOrder(body: Order, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; - public placeOrder(body: Order, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; - public placeOrder(body: Order, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { + public placeOrder(body: Order, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; + public placeOrder(body: Order, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public placeOrder(body: Order, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public placeOrder(body: Order, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling placeOrder.'); } @@ -258,6 +273,10 @@ export class StoreService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } // to determine the Content-Type header @@ -276,6 +295,7 @@ export class StoreService { return this.httpClient.post(`${this.configuration.basePath}/store/order`, body, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/user.service.ts index 9809f730029c..a1daecfe0d54 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/user.service.ts @@ -13,7 +13,7 @@ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http'; import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; @@ -92,10 +92,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public createUser(body: User, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; - public createUser(body: User, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public createUser(body: User, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public createUser(body: User, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { + public createUser(body: User, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public createUser(body: User, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public createUser(body: User, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public createUser(body: User, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createUser.'); } @@ -113,6 +113,10 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } // to determine the Content-Type header @@ -131,6 +135,7 @@ export class UserService { return this.httpClient.post(`${this.configuration.basePath}/user`, body, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -146,10 +151,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public createUsersWithArrayInput(body: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; - public createUsersWithArrayInput(body: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public createUsersWithArrayInput(body: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public createUsersWithArrayInput(body: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { + public createUsersWithArrayInput(body: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public createUsersWithArrayInput(body: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public createUsersWithArrayInput(body: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public createUsersWithArrayInput(body: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); } @@ -167,6 +172,10 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } // to determine the Content-Type header @@ -185,6 +194,7 @@ export class UserService { return this.httpClient.post(`${this.configuration.basePath}/user/createWithArray`, body, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -200,10 +210,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public createUsersWithListInput(body: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; - public createUsersWithListInput(body: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public createUsersWithListInput(body: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public createUsersWithListInput(body: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { + public createUsersWithListInput(body: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public createUsersWithListInput(body: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public createUsersWithListInput(body: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public createUsersWithListInput(body: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); } @@ -221,6 +231,10 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } // to determine the Content-Type header @@ -239,6 +253,7 @@ export class UserService { return this.httpClient.post(`${this.configuration.basePath}/user/createWithList`, body, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -255,10 +270,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public deleteUser(username: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; - public deleteUser(username: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public deleteUser(username: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public deleteUser(username: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { + public deleteUser(username: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public deleteUser(username: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public deleteUser(username: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public deleteUser(username: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (username === null || username === undefined) { throw new Error('Required parameter username was null or undefined when calling deleteUser.'); } @@ -276,6 +291,10 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } let responseType_: 'text' | 'json' = 'json'; @@ -285,6 +304,7 @@ export class UserService { return this.httpClient.delete(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -300,10 +320,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getUserByName(username: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable; - public getUserByName(username: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; - public getUserByName(username: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; - public getUserByName(username: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { + public getUserByName(username: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; + public getUserByName(username: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public getUserByName(username: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public getUserByName(username: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { if (username === null || username === undefined) { throw new Error('Required parameter username was null or undefined when calling getUserByName.'); } @@ -323,6 +343,10 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } let responseType_: 'text' | 'json' = 'json'; @@ -332,6 +356,7 @@ export class UserService { return this.httpClient.get(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -348,10 +373,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public loginUser(username: string, password: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable; - public loginUser(username: string, password: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; - public loginUser(username: string, password: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable>; - public loginUser(username: string, password: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json',}): Observable { + public loginUser(username: string, password: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; + public loginUser(username: string, password: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public loginUser(username: string, password: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public loginUser(username: string, password: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { if (username === null || username === undefined) { throw new Error('Required parameter username was null or undefined when calling loginUser.'); } @@ -384,6 +409,10 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } let responseType_: 'text' | 'json' = 'json'; @@ -393,6 +422,7 @@ export class UserService { return this.httpClient.get(`${this.configuration.basePath}/user/login`, { + context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, @@ -408,10 +438,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public logoutUser(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; - public logoutUser(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { + public logoutUser(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public logoutUser(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { let localVarHeaders = this.defaultHeaders; @@ -426,6 +456,10 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } let responseType_: 'text' | 'json' = 'json'; @@ -435,6 +469,7 @@ export class UserService { return this.httpClient.get(`${this.configuration.basePath}/user/logout`, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -452,10 +487,10 @@ export class UserService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public updateUser(username: string, body: User, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable; - public updateUser(username: string, body: User, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public updateUser(username: string, body: User, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined,}): Observable>; - public updateUser(username: string, body: User, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined,}): Observable { + public updateUser(username: string, body: User, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public updateUser(username: string, body: User, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public updateUser(username: string, body: User, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public updateUser(username: string, body: User, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (username === null || username === undefined) { throw new Error('Required parameter username was null or undefined when calling updateUser.'); } @@ -476,6 +511,10 @@ export class UserService { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } // to determine the Content-Type header @@ -494,6 +533,7 @@ export class UserService { return this.httpClient.put(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, body, { + context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/package.json b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/package.json index c3cb294442aa..8c5657078867 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/package.json +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/package.json @@ -21,12 +21,12 @@ "@angular/compiler-cli": "^12.0.0", "@angular/core": "^12.0.0", "@angular/platform-browser": "^12.0.0", - "ng-packagr": "^11.0.2", + "ng-packagr": "^12.2.1", "reflect-metadata": "^0.1.3", "rxjs": "^6.6.0", - "tsickle": "^0.39.1", - "typescript": ">=4.0.0 <4.1.0", - "zone.js": "^0.11.3" + "tsickle": "^0.43.0", + "typescript": ">=4.2.3 <4.3.0", + "zone.js": "^0.11.4" }, "publishConfig": { "registry": "https://skimdb.npmjs.com/registry" diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md index 505db20273f4..32a66fa54dc2 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md @@ -642,8 +642,8 @@ public class Example { Float _float = 3.4F; // Float | None String string = "string_example"; // String | None File binary = new File("/path/to/file"); // File | None - LocalDate date = new LocalDate(); // LocalDate | None - OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None + LocalDate date = LocalDate.now(); // LocalDate | None + OffsetDateTime dateTime = OffsetDateTime.parse("OffsetDateTime.parse("2010-02-01T09:20:10.111110Z[UTC]", java.time.format.DateTimeFormatter.ISO_ZONED_DATE_TIME.withZone(java.time.ZoneId.systemDefault()))"); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None try { @@ -724,13 +724,13 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "-efg"; // String | Header parameter enum test (string) + String enumHeaderString = "_abc"; // String | Header parameter enum test (string) List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "-efg"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) - List enumFormStringArray = "$"; // List | Form parameter enum test (string array) - String enumFormString = "-efg"; // String | Form parameter enum test (string) + String enumQueryString = "_abc"; // String | Query parameter enum test (string) + Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) + Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumFormStringArray = ">"; // List | Form parameter enum test (string array) + String enumFormString = "_abc"; // String | Form parameter enum test (string) try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (ApiException e) { diff --git a/samples/server/petstore/php-slim4/.openapi-generator/FILES b/samples/server/petstore/php-slim4/.openapi-generator/FILES index 8bd8c2bae334..70090586115d 100644 --- a/samples/server/petstore/php-slim4/.openapi-generator/FILES +++ b/samples/server/petstore/php-slim4/.openapi-generator/FILES @@ -8,24 +8,6 @@ lib/Api/AbstractPetApi.php lib/Api/AbstractStoreApi.php lib/Api/AbstractUserApi.php lib/Auth/AbstractAuthenticator.php -lib/Auth/AbstractAuthenticator.php -lib/Auth/AbstractAuthenticator.php -lib/Auth/AbstractAuthenticator.php -lib/Auth/AbstractAuthenticator.php -lib/Auth/AbstractAuthenticator.php -lib/Auth/AbstractAuthenticator.php -lib/Auth/AbstractAuthenticator.php -lib/Auth/AbstractAuthenticator.php -lib/Auth/AbstractAuthenticator.php -lib/Auth/AbstractAuthenticator.php -lib/Auth/AbstractAuthenticator.php -lib/Auth/AbstractAuthenticator.php -lib/Auth/AbstractAuthenticator.php -lib/Auth/AbstractAuthenticator.php -lib/Auth/AbstractAuthenticator.php -lib/Auth/AbstractAuthenticator.php -lib/Auth/AbstractAuthenticator.php -lib/Auth/AbstractAuthenticator.php lib/BaseModel.php lib/Middleware/JsonBodyParserMiddleware.php lib/Model/ApiResponse.php From 47a90f75165c538cc83ebe6caf863bae760455b3 Mon Sep 17 00:00:00 2001 From: Ahmed Yarub Hani Al Nuaimi Date: Tue, 7 Sep 2021 04:46:16 -0300 Subject: [PATCH 14/17] Update documentations --- docs/generators/c.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/generators/c.md b/docs/generators/c.md index 29310172353f..98f84c458762 100644 --- a/docs/generators/c.md +++ b/docs/generators/c.md @@ -135,8 +135,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • static
  • static_assert
  • static_cast
  • -
  • stdin
  • stderr
  • +
  • stdin
  • stdout
  • struct
  • switch
  • From 5a84eac15c63e2f3d932e6ad48bf9ad44781cc26 Mon Sep 17 00:00:00 2001 From: Ahmed Yarub Hani Al Nuaimi Date: Tue, 7 Sep 2021 04:49:15 -0300 Subject: [PATCH 15/17] Add versioning support --- .../src/main/resources/C-libcurl/CMakeLists.txt.mustache | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache index 1b788b7f9db4..3427a345196a 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache @@ -81,6 +81,7 @@ set(HDRS ) +set(VERSION 0.0.1) include(PreTarget.cmake OPTIONAL) # Add library with project file with project name as library name @@ -116,7 +117,7 @@ else() include(CMakePackageConfigHelpers) write_basic_package_version_file( "${CMAKE_CURRENT_BINARY_DIR}/${pkgName}/${pkgName}ConfigVersion.cmake" - VERSION 0.0.1 + VERSION "${VERSION}" COMPATIBILITY AnyNewerVersion ) From d79dba2a7034cff91f3de9a29931f8e04f0bfd5f Mon Sep 17 00:00:00 2001 From: Ahmed Yarub Hani Al Nuaimi Date: Tue, 7 Sep 2021 04:55:36 -0300 Subject: [PATCH 16/17] Add versioning support --- .../src/main/resources/C-libcurl/CMakeLists.txt.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache index 3427a345196a..708b0fd19b21 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache @@ -28,6 +28,7 @@ else() endif() set(pkgName "{{projectName}}") +set(VERSION 0.0.1) find_package(CURL 7.58.0 REQUIRED) if(CURL_FOUND) @@ -81,7 +82,6 @@ set(HDRS ) -set(VERSION 0.0.1) include(PreTarget.cmake OPTIONAL) # Add library with project file with project name as library name From ee387c42491215a43b4168726543129993be51a3 Mon Sep 17 00:00:00 2001 From: Ahmed Yarub Hani Al Nuaimi Date: Tue, 7 Sep 2021 05:03:23 -0300 Subject: [PATCH 17/17] Add comment --- .../src/main/resources/C-libcurl/CMakeLists.txt.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache index 708b0fd19b21..33d82b5786dc 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache @@ -28,7 +28,7 @@ else() endif() set(pkgName "{{projectName}}") -set(VERSION 0.0.1) +set(VERSION 0.0.1) # this default version can be overridden in PreTarget.cmake find_package(CURL 7.58.0 REQUIRED) if(CURL_FOUND)