From 19f21acd85f57188ef08466412af6673c07cbfa3 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 1 Feb 2021 16:29:01 +0800 Subject: [PATCH 01/44] Fix handling of 1xx and 3xx in Rust Reqwest (#8574) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove redundant Rust use statement * Return errors only for 4xx and 5xx in Rust reqwest Since 1xx and 3xx are perfectly valid status codes the client might need to handle. see: https://docs.rs/reqwest/0.11.0/reqwest/struct.StatusCode.html#method.is_informational * Regenerate samples Co-authored-by: Gabriel Féron --- .../src/main/resources/rust/reqwest/api.mustache | 2 +- .../main/resources/rust/reqwest/api_mod.mustache | 2 -- .../rust/reqwest/petstore-async/src/apis/mod.rs | 2 -- .../reqwest/petstore-async/src/apis/pet_api.rs | 16 ++++++++-------- .../reqwest/petstore-async/src/apis/store_api.rs | 8 ++++---- .../reqwest/petstore-async/src/apis/user_api.rs | 16 ++++++++-------- .../rust/reqwest/petstore/src/apis/mod.rs | 2 -- .../rust/reqwest/petstore/src/apis/pet_api.rs | 16 ++++++++-------- .../rust/reqwest/petstore/src/apis/store_api.rs | 8 ++++---- .../rust/reqwest/petstore/src/apis/user_api.rs | 16 ++++++++-------- 10 files changed, 41 insertions(+), 47 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache b/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache index 54a1518f85b..977f0b6edbc 100644 --- a/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache +++ b/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache @@ -283,7 +283,7 @@ pub {{#supportAsync}}async {{/supportAsync}}fn {{{operationId}}}(configuration: let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text(){{#supportAsync}}.await{{/supportAsync}}?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { {{^supportMultipleResponses}} {{^returnType}} Ok(()) diff --git a/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache b/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache index 5bf951361d9..e4daf80c8f6 100644 --- a/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache +++ b/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache @@ -1,5 +1,3 @@ -use reqwest; -use serde_json; use std::error; use std::fmt; diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/mod.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/mod.rs index 181305dc4fe..c24f345edf3 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/mod.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/mod.rs @@ -1,5 +1,3 @@ -use reqwest; -use serde_json; use std::error; use std::fmt; diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs index 20644907820..e4162a33129 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs @@ -231,7 +231,7 @@ pub async fn add_pet(configuration: &configuration::Configuration, params: AddPe let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text().await?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; Ok(local_var_result) @@ -269,7 +269,7 @@ pub async fn delete_pet(configuration: &configuration::Configuration, params: De let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text().await?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; Ok(local_var_result) @@ -305,7 +305,7 @@ pub async fn find_pets_by_status(configuration: &configuration::Configuration, p let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text().await?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; Ok(local_var_result) @@ -341,7 +341,7 @@ pub async fn find_pets_by_tags(configuration: &configuration::Configuration, par let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text().await?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; Ok(local_var_result) @@ -381,7 +381,7 @@ pub async fn get_pet_by_id(configuration: &configuration::Configuration, params: let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text().await?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; Ok(local_var_result) @@ -416,7 +416,7 @@ pub async fn update_pet(configuration: &configuration::Configuration, params: Up let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text().await?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; Ok(local_var_result) @@ -460,7 +460,7 @@ pub async fn update_pet_with_form(configuration: &configuration::Configuration, let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text().await?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; Ok(local_var_result) @@ -502,7 +502,7 @@ pub async fn upload_file(configuration: &configuration::Configuration, params: U let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text().await?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; Ok(local_var_result) diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs index df70cd42495..21647faa062 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs @@ -122,7 +122,7 @@ pub async fn delete_order(configuration: &configuration::Configuration, params: let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text().await?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; Ok(local_var_result) @@ -161,7 +161,7 @@ pub async fn get_inventory(configuration: &configuration::Configuration) -> Resu let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text().await?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; Ok(local_var_result) @@ -193,7 +193,7 @@ pub async fn get_order_by_id(configuration: &configuration::Configuration, param let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text().await?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; Ok(local_var_result) @@ -225,7 +225,7 @@ pub async fn place_order(configuration: &configuration::Configuration, params: P let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text().await?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; Ok(local_var_result) diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/user_api.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/user_api.rs index 7a0375ba9b1..a791bfbc9bb 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/user_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/user_api.rs @@ -216,7 +216,7 @@ pub async fn create_user(configuration: &configuration::Configuration, params: C let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text().await?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; Ok(local_var_result) @@ -248,7 +248,7 @@ pub async fn create_users_with_array_input(configuration: &configuration::Config let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text().await?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; Ok(local_var_result) @@ -280,7 +280,7 @@ pub async fn create_users_with_list_input(configuration: &configuration::Configu let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text().await?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; Ok(local_var_result) @@ -312,7 +312,7 @@ pub async fn delete_user(configuration: &configuration::Configuration, params: D let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text().await?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; Ok(local_var_result) @@ -343,7 +343,7 @@ pub async fn get_user_by_name(configuration: &configuration::Configuration, para let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text().await?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; Ok(local_var_result) @@ -377,7 +377,7 @@ pub async fn login_user(configuration: &configuration::Configuration, params: Lo let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text().await?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; Ok(local_var_result) @@ -407,7 +407,7 @@ pub async fn logout_user(configuration: &configuration::Configuration) -> Result let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text().await?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; Ok(local_var_result) @@ -441,7 +441,7 @@ pub async fn update_user(configuration: &configuration::Configuration, params: U let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text().await?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; Ok(local_var_result) diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/mod.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/mod.rs index 181305dc4fe..c24f345edf3 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/mod.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/mod.rs @@ -1,5 +1,3 @@ -use reqwest; -use serde_json; use std::error; use std::fmt; diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs index 301943aa635..47cf47f1d59 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs @@ -103,7 +103,7 @@ pub fn add_pet(configuration: &configuration::Configuration, body: crate::models let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text()?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); @@ -135,7 +135,7 @@ pub fn delete_pet(configuration: &configuration::Configuration, pet_id: i64, api let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text()?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); @@ -166,7 +166,7 @@ pub fn find_pets_by_status(configuration: &configuration::Configuration, status: let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text()?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); @@ -197,7 +197,7 @@ pub fn find_pets_by_tags(configuration: &configuration::Configuration, tags: Vec let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text()?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); @@ -232,7 +232,7 @@ pub fn get_pet_by_id(configuration: &configuration::Configuration, pet_id: i64) let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text()?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); @@ -262,7 +262,7 @@ pub fn update_pet(configuration: &configuration::Configuration, body: crate::mod let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text()?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); @@ -299,7 +299,7 @@ pub fn update_pet_with_form(configuration: &configuration::Configuration, pet_id let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text()?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); @@ -336,7 +336,7 @@ pub fn upload_file(configuration: &configuration::Configuration, pet_id: i64, ad let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text()?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs index f7f9fa87b1e..898599f9b2f 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs @@ -67,7 +67,7 @@ pub fn delete_order(configuration: &configuration::Configuration, order_id: &str let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text()?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); @@ -102,7 +102,7 @@ pub fn get_inventory(configuration: &configuration::Configuration, ) -> Result<: let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text()?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); @@ -129,7 +129,7 @@ pub fn get_order_by_id(configuration: &configuration::Configuration, order_id: i let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text()?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); @@ -156,7 +156,7 @@ pub fn place_order(configuration: &configuration::Configuration, body: crate::mo let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text()?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/user_api.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/user_api.rs index 4aaf235f8ee..97f0f3c4e14 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/user_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/user_api.rs @@ -102,7 +102,7 @@ pub fn create_user(configuration: &configuration::Configuration, body: crate::mo let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text()?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); @@ -129,7 +129,7 @@ pub fn create_users_with_array_input(configuration: &configuration::Configuratio let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text()?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); @@ -156,7 +156,7 @@ pub fn create_users_with_list_input(configuration: &configuration::Configuration let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text()?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); @@ -183,7 +183,7 @@ pub fn delete_user(configuration: &configuration::Configuration, username: &str) let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text()?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); @@ -209,7 +209,7 @@ pub fn get_user_by_name(configuration: &configuration::Configuration, username: let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text()?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); @@ -237,7 +237,7 @@ pub fn login_user(configuration: &configuration::Configuration, username: &str, let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text()?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); @@ -263,7 +263,7 @@ pub fn logout_user(configuration: &configuration::Configuration, ) -> Result<(), let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text()?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); @@ -291,7 +291,7 @@ pub fn update_user(configuration: &configuration::Configuration, username: &str, let local_var_status = local_var_resp.status(); let local_var_content = local_var_resp.text()?; - if local_var_status.is_success() { + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); From 26f21bb6a09a59861e4cf096659e059df3f4c7a3 Mon Sep 17 00:00:00 2001 From: Peter Leibiger Date: Mon, 1 Feb 2021 15:29:20 +0100 Subject: [PATCH 02/44] [dart-dio] Add missing isRedirect parameter to response (#8588) --- .../src/main/resources/dart-dio/api.mustache | 1 + .../dart-dio/petstore_client_lib/lib/api/pet_api.dart | 4 ++++ .../dart-dio/petstore_client_lib/lib/api/store_api.dart | 3 +++ .../dart-dio/petstore_client_lib/lib/api/user_api.dart | 2 ++ .../dart-dio/petstore_client_lib/lib/api/pet_api.dart | 6 ++++++ .../dart-dio/petstore_client_lib/lib/api/store_api.dart | 3 +++ .../dart-dio/petstore_client_lib/lib/api/user_api.dart | 2 ++ .../petstore_client_lib_fake/lib/api/another_fake_api.dart | 1 + .../petstore_client_lib_fake/lib/api/default_api.dart | 1 + .../dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart | 6 ++++++ .../lib/api/fake_classname_tags123_api.dart | 1 + .../dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart | 5 +++++ .../petstore_client_lib_fake/lib/api/store_api.dart | 3 +++ .../dart-dio/petstore_client_lib_fake/lib/api/user_api.dart | 2 ++ 14 files changed, 40 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache index dcfedc065ed..f81a83035aa 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache @@ -149,6 +149,7 @@ class {{classname}} { return Response<{{{returnType}}}>( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart index fe5c9299841..4b922d83a1a 100644 --- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart +++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart @@ -193,6 +193,7 @@ class PetApi { return Response>( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -263,6 +264,7 @@ class PetApi { return Response>( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -331,6 +333,7 @@ class PetApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -525,6 +528,7 @@ class PetApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart index f9a8754907a..300bfee362a 100644 --- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart +++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart @@ -125,6 +125,7 @@ class StoreApi { return Response>( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -186,6 +187,7 @@ class StoreApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -252,6 +254,7 @@ class StoreApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart index 17b551bc911..7dab8b5726e 100644 --- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart +++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart @@ -266,6 +266,7 @@ class UserApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -326,6 +327,7 @@ class UserApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart index 95db7626674..69b1f6c4195 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart @@ -87,6 +87,7 @@ class PetApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -209,6 +210,7 @@ class PetApi { return Response>( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -279,6 +281,7 @@ class PetApi { return Response>( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -347,6 +350,7 @@ class PetApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -421,6 +425,7 @@ class PetApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -557,6 +562,7 @@ class PetApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart index 5f58e788091..048c7bd5556 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart @@ -125,6 +125,7 @@ class StoreApi { return Response>( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -186,6 +187,7 @@ class StoreApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -254,6 +256,7 @@ class StoreApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart index a4d59b2978c..82b1658a1ea 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart @@ -300,6 +300,7 @@ class UserApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -360,6 +361,7 @@ class UserApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart index 72310ff3533..bb8b4df8f38 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart @@ -77,6 +77,7 @@ class AnotherFakeApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/default_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/default_api.dart index a47b383960b..08d265f15a7 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/default_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/default_api.dart @@ -69,6 +69,7 @@ class DefaultApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart index 96d776d36f9..e47ce652fe5 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart @@ -77,6 +77,7 @@ class FakeApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -202,6 +203,7 @@ class FakeApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -270,6 +272,7 @@ class FakeApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -333,6 +336,7 @@ class FakeApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -396,6 +400,7 @@ class FakeApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -570,6 +575,7 @@ class FakeApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart index 81d1c554818..4e98faa733c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart @@ -84,6 +84,7 @@ class FakeClassnameTags123Api { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart index 6bb8363f2ae..d81906b899d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart @@ -193,6 +193,7 @@ class PetApi { return Response>( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -263,6 +264,7 @@ class PetApi { return Response>( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -331,6 +333,7 @@ class PetApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -525,6 +528,7 @@ class PetApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -601,6 +605,7 @@ class PetApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart index b9be3d2f72d..4cd63ae0224 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart @@ -125,6 +125,7 @@ class StoreApi { return Response>( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -186,6 +187,7 @@ class StoreApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -254,6 +256,7 @@ class StoreApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart index e73986ac493..eebeb895671 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart @@ -272,6 +272,7 @@ class UserApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, @@ -332,6 +333,7 @@ class UserApi { return Response( data: data, headers: response.headers, + isRedirect: response.isRedirect, request: response.request, redirects: response.redirects, statusCode: response.statusCode, From 1baec57de81804fbf0039bd7bd35f73c086a8150 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 2 Feb 2021 11:47:13 +0800 Subject: [PATCH 03/44] remove old script reference in readme (#8595) --- README.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e3658844c93..32d760fbffc 100644 --- a/README.md +++ b/README.md @@ -450,10 +450,10 @@ To get a list of PHP specified options (which can be passed to the generator wit You can build a client against the [Petstore API](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml) as follows: ```sh -./bin/java-petstore-okhttp-gson.sh +./bin/generate-samples.sh ./bin/configs/java-okhttp-gson.yaml ``` -(On Windows, run `.\bin\windows\java-petstore-okhttp-gson.bat` instead) +(On Windows, please install [GIT Bash for Windows](https://gitforwindows.org/) to run the command above) This script uses the default library, which is `okhttp-gson`. It will run the generator with this command: @@ -461,6 +461,8 @@ This script uses the default library, which is `okhttp-gson`. It will run the ge java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \ -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml \ -g java \ + -t modules/openapi-generator/src/main/resources/Java \ + --additional-properties artifactId=petstore-okhttp-gson,hideGenerationTimestamp:true \ -o samples/client/petstore/java/okhttp-gson ``` @@ -526,13 +528,7 @@ cd samples/client/petstore/java/okhttp-gson mvn package ``` -Other languages have petstore samples, too: - -- [Swift5](https://github.com/OpenAPITools/openapi-generator/tree/master/samples/client/petstore/swift5) -- [Ruby](https://github.com/OpenAPITools/openapi-generator/tree/master/samples/client/petstore/ruby) -- [Kotlin](https://github.com/OpenAPITools/openapi-generator/tree/master/samples/client/petstore/kotlin) - -... and more. +Other generators have [samples](https://github.com/OpenAPITools/openapi-generator/tree/master/samples) too. ### [3.1 - Customization](#table-of-contents) From f01ee4a8d27ba89a746d0479eac0cb20695f486e Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 2 Feb 2021 15:37:40 +0800 Subject: [PATCH 04/44] Add a link to presentation at Open Source Summit Japan 2020 (#8596) * Add a link to presentation at Open Source Summit Japan 2020 * rearrange --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 32d760fbffc..eaf0700137b 100644 --- a/README.md +++ b/README.md @@ -804,6 +804,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - 2020-10-31 - [[B2] OpenAPI Specification으로 타입-세이프하게 API 개발하기: 희망편 VS 절망편](https://www.youtube.com/watch?v=J4JHLESAiFk) by 최태건 at [FEConf 2020](https://2020.feconf.kr/) - 2020-11-05 - [Automated REST-Api Code Generation: Wie IT-Systeme miteinander sprechen](https://www.massiveart.com/blog/automated-rest-api-code-generation-wie-it-systeme-miteinander-sprechen) by Stefan Rottensteiner at [MASSIVE ART Blog](https://www.massiveart.com/blog) - 2020-12-01 - [OpenAPI GeneratorでGoのAPIサーバー/クライアントコードを自動生成する](https://qiita.com/saki-engineering/items/b20d8b6074c4da9664a5) by [@saki-engineering](https://qiita.com/saki-engineering) +- 2020-12-04 - [Scaling the Test Coverage of OpenAPI Generator for 30+ Programming Languages](https://www.youtube.com/watch?v=7Lke9dHRqT0) by [William Cheng](https://github.com/wing328) at [Open Source Summit Japan + Automotive Linux Summit 2020](https://events.linuxfoundation.org/archive/2020/open-source-summit-japan/) ([Slides](https://speakerdeck.com/wing328/scaling-the-test-coverage-of-openapi-generator-for-30-plus-programming-languages)) - 2020-12-09 - [プロジェクトにOpenAPI Generatorで自動生成された型付きAPI Clientを導入した話](https://qiita.com/yoshifujiT/items/905c18700ede23f40840) by [@yoshifujiT](https://github.com/yoshifujiT) - 2020-12-15 - [Next.js + NestJS + GraphQLで変化に追従するフロントエンドへ 〜 ショッピングクーポンの事例紹介](https://techblog.yahoo.co.jp/entry/2020121530052952/) by [小倉 陸](https://github.com/ogugu9) at [Yahoo! JAPAN Tech Blog](https://techblog.yahoo.co.jp/) - 2021-01-08 - [Hello, New API – Part 1](https://www.nginx.com/blog/hello-new-api-part-1/) by [Jeremy Schulman](https://www.nginx.com/people/jeremy-schulman/) at [Major League Baseball](https://www.mlb.com) From 769b0e0e382be3d44b5bc448e886832aaa5c0c7d Mon Sep 17 00:00:00 2001 From: Peter Leibiger Date: Tue, 2 Feb 2021 11:42:45 +0100 Subject: [PATCH 05/44] [feature][dart] Add support for uniqueItems/sets (#8375) * [dart][dart-dio] Add support for set types * copy `uniqueItems` usage from 2.0 fake spec to `3.0` * add support for sets in parameters, responses and properties * Regenerate all other samples * Fix broken tests due to invalid cast * Update documentation * Regenerate samples * update samples Co-authored-by: William Cheng --- docs/generators/dart-dio.md | 2 - docs/generators/dart-jaguar.md | 2 - docs/generators/dart.md | 2 - .../codegen/languages/DartClientCodegen.java | 11 +++--- .../languages/DartDioClientCodegen.java | 7 +++- .../src/main/resources/dart-dio/api.mustache | 5 +-- .../resources/dart-dio/serializers.mustache | 4 +- .../src/main/resources/dart2/api.mustache | 4 +- .../main/resources/dart2/api_client.mustache | 6 +++ .../src/main/resources/dart2/apilib.mustache | 1 + .../src/main/resources/dart2/class.mustache | 2 +- .../codegen/dart/DartModelTest.java | 39 +++++++++++++++++++ .../codegen/dartdio/DartDioModelTest.java | 38 ++++++++++++++++++ ...ith-fake-endpoints-models-for-testing.yaml | 4 ++ .../src/Org.OpenAPITools/Model/Pet.cs | 2 + .../petstore_client_lib/lib/api/pet_api.dart | 6 +-- .../lib/api/store_api.dart | 3 +- .../dart2/petstore_client_lib/lib/api.dart | 1 + .../petstore_client_lib/lib/api/pet_api.dart | 4 +- .../petstore_client_lib/lib/api_client.dart | 6 +++ .../php/OpenAPIClient-php/lib/Api/PetApi.php | 1 + .../php/OpenAPIClient-php/lib/Model/Pet.php | 2 + .../ruby-faraday/lib/petstore/models/pet.rb | 10 +++++ .../petstore/ruby/lib/petstore/models/pet.rb | 10 +++++ .../builds/default-v3.0/apis/PetApi.ts | 6 +-- .../builds/default-v3.0/models/Pet.ts | 4 +- .../petstore_client_lib/lib/api/pet_api.dart | 6 +-- .../lib/api/store_api.dart | 3 +- .../petstore_client_lib_fake/doc/Pet.md | 2 +- .../petstore_client_lib_fake/doc/PetApi.md | 8 ++-- .../lib/api/pet_api.dart | 14 +++---- .../lib/api/store_api.dart | 3 +- .../lib/model/pet.dart | 2 +- .../lib/serializers.dart | 4 ++ .../test/pet_api_test.dart | 2 +- .../test/pet_test.dart | 2 +- .../dart2/petstore_client_lib/lib/api.dart | 1 + .../petstore_client_lib/lib/api/pet_api.dart | 4 +- .../petstore_client_lib/lib/api_client.dart | 6 +++ .../dart2/petstore_client_lib_fake/doc/Pet.md | 2 +- .../petstore_client_lib_fake/doc/PetApi.md | 8 ++-- .../petstore_client_lib_fake/lib/api.dart | 1 + .../lib/api/pet_api.dart | 16 ++++---- .../lib/api_client.dart | 6 +++ .../lib/model/pet.dart | 6 +-- .../test/pet_api_test.dart | 2 +- .../test/pet_test.dart | 2 +- .../gen/java/org/openapitools/api/PetApi.java | 7 ++-- .../org/openapitools/api/PetApiService.java | 3 +- .../gen/java/org/openapitools/model/Pet.java | 10 +++-- .../api/impl/PetApiServiceImpl.java | 3 +- 51 files changed, 219 insertions(+), 86 deletions(-) diff --git a/docs/generators/dart-dio.md b/docs/generators/dart-dio.md index 755e95f1932..ffff1394c42 100644 --- a/docs/generators/dart-dio.md +++ b/docs/generators/dart-dio.md @@ -41,8 +41,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl | Type/Alias | Instantiated By | | ---------- | --------------- | -|array|List| -|map|Map| ## LANGUAGE PRIMITIVES diff --git a/docs/generators/dart-jaguar.md b/docs/generators/dart-jaguar.md index b2afa28babe..3ecb03d5221 100644 --- a/docs/generators/dart-jaguar.md +++ b/docs/generators/dart-jaguar.md @@ -36,8 +36,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl | Type/Alias | Instantiated By | | ---------- | --------------- | -|array|List| -|map|Map| ## LANGUAGE PRIMITIVES diff --git a/docs/generators/dart.md b/docs/generators/dart.md index 395295b07e6..e7dae224efc 100644 --- a/docs/generators/dart.md +++ b/docs/generators/dart.md @@ -34,8 +34,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl | Type/Alias | Instantiated By | | ---------- | --------------- | -|array|List| -|map|Map| ## LANGUAGE PRIMITIVES diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java index 987110760d4..91b1f05dddb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java @@ -141,14 +141,13 @@ public class DartClientCodegen extends DefaultCodegen { "double", "dynamic" ); - instantiationTypes.put("array", "List"); - instantiationTypes.put("map", "Map"); typeMapping = new HashMap<>(); typeMapping.put("Array", "List"); typeMapping.put("array", "List"); typeMapping.put("map", "Map"); typeMapping.put("List", "List"); + typeMapping.put("set", "Set"); typeMapping.put("boolean", "bool"); typeMapping.put("string", "String"); typeMapping.put("char", "String"); @@ -468,9 +467,10 @@ public class DartClientCodegen extends DefaultCodegen { @Override public String toDefaultValue(Schema schema) { - if (ModelUtils.isMapSchema(schema)) { + if (ModelUtils.isMapSchema(schema) || ModelUtils.isSet(schema)) { return "const {}"; - } else if (ModelUtils.isArraySchema(schema)) { + } + if (ModelUtils.isArraySchema(schema)) { return "const []"; } @@ -494,7 +494,8 @@ public class DartClientCodegen extends DefaultCodegen { if (ModelUtils.isArraySchema(target)) { Schema items = getSchemaItems((ArraySchema) schema); return getSchemaType(target) + "<" + getTypeDeclaration(items) + ">"; - } else if (ModelUtils.isMapSchema(target)) { + } + if (ModelUtils.isMapSchema(target)) { // Note: ModelUtils.isMapSchema(p) returns true when p is a composed schema that also defines // additionalproperties: true Schema inner = getAdditionalProperties(target); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java index 582402c2251..66be8bc4184 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java @@ -127,6 +127,9 @@ public class DartDioClientCodegen extends DartClientCodegen { public String toDefaultValue(Schema schema) { if (schema.getDefault() != null) { if (ModelUtils.isArraySchema(schema)) { + if (ModelUtils.isSet(schema)) { + return "SetBuilder()"; + } return "ListBuilder()"; } if (ModelUtils.isMapSchema(schema)) { @@ -318,6 +321,7 @@ public class DartDioClientCodegen extends DartClientCodegen { if (param.isContainer) { final Map serializer = new HashMap<>(); serializer.put("isArray", param.isArray); + serializer.put("uniqueItems", param.uniqueItems); serializer.put("isMap", param.isMap); serializer.put("baseType", param.baseType); serializers.add(serializer); @@ -347,7 +351,8 @@ public class DartDioClientCodegen extends DartClientCodegen { if (op.returnContainer != null) { final Map serializer = new HashMap<>(); - serializer.put("isArray", Objects.equals("array", op.returnContainer)); + serializer.put("isArray", Objects.equals("array", op.returnContainer) || Objects.equals("set", op.returnContainer)); + serializer.put("uniqueItems", op.uniqueItems); serializer.put("isMap", Objects.equals("map", op.returnContainer)); serializer.put("baseType", op.returnBaseType); serializers.add(serializer); diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache index f81a83035aa..44d9c067416 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache @@ -69,7 +69,7 @@ class {{classname}} { {{#isContainer}} {{#isArray}} - const type = FullType(BuiltList, [FullType({{baseType}})]); + const type = FullType(Built{{#uniqueItems}}Built{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}, [FullType({{baseType}})]); final serializedBody = _serializers.serialize({{paramName}}, specifiedType: type); {{/isArray}} {{#isMap}} @@ -135,8 +135,7 @@ class {{classname}} { {{/returnTypeIsPrimitive}} {{/returnSimpleType}} {{^returnSimpleType}} - const collectionType = {{#isMap}}BuiltMap{{/isMap}}{{^isMap}}BuiltList{{/isMap}}; - const type = FullType(collectionType, [{{#isMap}}FullType(String), {{/isMap}}FullType({{{returnBaseType}}})]); + const type = FullType(Built{{#isMap}}Map{{/isMap}}{{#isArray}}{{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}{{/isArray}}, [{{#isMap}}FullType(String), {{/isMap}}FullType({{{returnBaseType}}})]); final data = _serializers.deserialize( response.data is String ? jsonDecode(response.data as String) diff --git a/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache b/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache index eb73bd7453a..ec6464fca00 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache @@ -18,8 +18,8 @@ part 'serializers.g.dart'; Serializers serializers = (_$serializers.toBuilder(){{#apiInfo}}{{#apis}}{{#serializers}} ..addBuilderFactory( {{#isArray}} - const FullType(BuiltList, [FullType({{baseType}})]), - () => ListBuilder<{{baseType}}>(), + const FullType(Built{{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}, [FullType({{baseType}})]), + () => {{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}Builder<{{baseType}}>(), {{/isArray}} {{#isMap}} const FullType(BuiltMap, [FullType(String), FullType({{baseType}})]), diff --git a/modules/openapi-generator/src/main/resources/dart2/api.mustache b/modules/openapi-generator/src/main/resources/dart2/api.mustache index 716118fa428..cc0bba98b46 100644 --- a/modules/openapi-generator/src/main/resources/dart2/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/api.mustache @@ -187,8 +187,8 @@ class {{{classname}}} { if (response.body != null && response.statusCode != HttpStatus.noContent) { {{#isArray}} return (apiClient.deserialize(_decodeBodyBytes(response), '{{{returnType}}}') as List) - .map((item) => item as {{{returnBaseType}}}) - .toList(growable: false); + .cast<{{{returnBaseType}}}>() + .{{#uniqueItems}}toSet(){{/uniqueItems}}{{^uniqueItems}}toList(growable: false){{/uniqueItems}}; {{/isArray}} {{^isArray}} {{#isMap}} diff --git a/modules/openapi-generator/src/main/resources/dart2/api_client.mustache b/modules/openapi-generator/src/main/resources/dart2/api_client.mustache index 44af2418ca9..e289a31b63a 100644 --- a/modules/openapi-generator/src/main/resources/dart2/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/api_client.mustache @@ -194,6 +194,12 @@ class ApiClient { .map((v) => _deserialize(v, newTargetType, growable: growable)) .toList(growable: true == growable); } + if (value is Set && (match = _regSet.firstMatch(targetType)) != null) { + final newTargetType = match[1]; + return value + .map((v) => _deserialize(v, newTargetType, growable: growable)) + .toSet(); + } if (value is Map && (match = _regMap.firstMatch(targetType)) != null) { final newTargetType = match[1]; return Map.fromIterables( diff --git a/modules/openapi-generator/src/main/resources/dart2/apilib.mustache b/modules/openapi-generator/src/main/resources/dart2/apilib.mustache index 7502f877acd..5329912c5a2 100644 --- a/modules/openapi-generator/src/main/resources/dart2/apilib.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/apilib.mustache @@ -26,6 +26,7 @@ const _delimiters = {'csv': ',', 'ssv': ' ', 'tsv': '\t', 'pipes': '|'}; const _dateEpochMarker = 'epoch'; final _dateFormatter = DateFormat('yyyy-MM-dd'); final _regList = RegExp(r'^List<(.*)>$'); +final _regSet = RegExp(r'^Set<(.*)>$'); final _regMap = RegExp(r'^Map$'); ApiClient defaultApiClient = ApiClient(); diff --git a/modules/openapi-generator/src/main/resources/dart2/class.mustache b/modules/openapi-generator/src/main/resources/dart2/class.mustache index 5376a17691b..834200b592c 100644 --- a/modules/openapi-generator/src/main/resources/dart2/class.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/class.mustache @@ -156,7 +156,7 @@ class {{{classname}}} { {{^isEnum}} {{{name}}}: json[r'{{{baseName}}}'] == null ? null - : (json[r'{{{baseName}}}'] as List).cast<{{{items.datatype}}}>(), + : (json[r'{{{baseName}}}'] as {{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}).cast<{{{items.datatype}}}>(), {{/isEnum}} {{/isArray}} {{^isArray}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/DartModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/DartModelTest.java index c8438e80a0f..36daa8b1335 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/DartModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/DartModelTest.java @@ -142,6 +142,45 @@ public class DartModelTest { Assert.assertTrue(property2.isContainer); } + @Test(description = "convert a model with set property") + public void setPropertyTest() { + final Schema model = new Schema() + .description("a sample model") + .addProperties("id", new IntegerSchema()) + .addProperties("urls", new ArraySchema().items(new StringSchema()).uniqueItems(true)) + .addRequiredItem("id"); + + final DefaultCodegen codegen = new DartClientCodegen(); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); + codegen.setOpenAPI(openAPI); + final CodegenModel cm = codegen.fromModel("sample", model); + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "a sample model"); + Assert.assertEquals(cm.vars.size(), 2); + + final CodegenProperty property1 = cm.vars.get(0); + Assert.assertEquals(property1.baseName, "id"); + Assert.assertEquals(property1.dataType, "int"); + Assert.assertEquals(property1.name, "id"); + Assert.assertNull(property1.defaultValue); + Assert.assertEquals(property1.baseType, "int"); + Assert.assertTrue(property1.required); + Assert.assertTrue(property1.isPrimitiveType); + Assert.assertFalse(property1.isContainer); + + final CodegenProperty property2 = cm.vars.get(1); + Assert.assertEquals(property2.baseName, "urls"); + Assert.assertEquals(property2.dataType, "Set"); + Assert.assertEquals(property2.name, "urls"); + Assert.assertEquals(property2.baseType, "Set"); + Assert.assertEquals(property2.containerType, "set"); + Assert.assertFalse(property2.required); + Assert.assertTrue(property2.isPrimitiveType); + Assert.assertTrue(property2.isContainer); + } + @Test(description = "convert a model with a map property") public void mapPropertyTest() { final Schema model = new Schema() diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dartdio/DartDioModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dartdio/DartDioModelTest.java index 3faa4d477a0..7aac98353d6 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dartdio/DartDioModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dartdio/DartDioModelTest.java @@ -204,6 +204,44 @@ public class DartDioModelTest { Assert.assertTrue(property2.isContainer); } + @Test(description = "convert a model with set property") + public void setPropertyTest() { + final Schema model = new Schema() + .description("a sample model") + .addProperties("id", new IntegerSchema()) + .addProperties("urls", new ArraySchema().items(new StringSchema()).uniqueItems(true)) + .addRequiredItem("id"); + final DefaultCodegen codegen = new DartDioClientCodegen(); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); + codegen.setOpenAPI(openAPI); + final CodegenModel cm = codegen.fromModel("sample", model); + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "a sample model"); + Assert.assertEquals(cm.vars.size(), 2); + + final CodegenProperty property1 = cm.vars.get(0); + Assert.assertEquals(property1.baseName, "id"); + Assert.assertEquals(property1.dataType, "int"); + Assert.assertEquals(property1.name, "id"); + Assert.assertNull(property1.defaultValue); + Assert.assertEquals(property1.baseType, "int"); + Assert.assertTrue(property1.required); + Assert.assertTrue(property1.isPrimitiveType); + Assert.assertFalse(property1.isContainer); + + final CodegenProperty property2 = cm.vars.get(1); + Assert.assertEquals(property2.baseName, "urls"); + Assert.assertEquals(property2.dataType, "BuiltSet"); + Assert.assertEquals(property2.name, "urls"); + Assert.assertEquals(property2.baseType, "BuiltSet"); + Assert.assertEquals(property2.containerType, "set"); + Assert.assertFalse(property2.required); + Assert.assertTrue(property2.isPrimitiveType); + Assert.assertTrue(property2.isContainer); + } + @Test(description = "convert a model with a map property") public void mapPropertyTest() { final Schema model = new Schema() diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml index a729d26077b..9ab686484d1 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml @@ -134,6 +134,7 @@ paths: type: array items: type: string + uniqueItems: true responses: '200': description: successful operation @@ -143,11 +144,13 @@ paths: type: array items: $ref: '#/components/schemas/Pet' + uniqueItems: true application/json: schema: type: array items: $ref: '#/components/schemas/Pet' + uniqueItems: true '400': description: Invalid tag value security: @@ -1313,6 +1316,7 @@ components: wrapped: true items: type: string + uniqueItems: true tags: type: array xml: diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs index b37ec697acd..90236aaab2f 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs @@ -250,6 +250,8 @@ namespace Org.OpenAPITools.Model /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { + + yield break; } } diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart index 4b922d83a1a..842f537de9e 100644 --- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart +++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart @@ -181,8 +181,7 @@ class PetApi { onSendProgress: onSendProgress, onReceiveProgress: onReceiveProgress, ).then((response) { - const collectionType = BuiltList; - const type = FullType(collectionType, [FullType(Pet)]); + const type = FullType(BuiltList, [FullType(Pet)]); final data = _serializers.deserialize( response.data is String ? jsonDecode(response.data as String) @@ -252,8 +251,7 @@ class PetApi { onSendProgress: onSendProgress, onReceiveProgress: onReceiveProgress, ).then((response) { - const collectionType = BuiltList; - const type = FullType(collectionType, [FullType(Pet)]); + const type = FullType(BuiltList, [FullType(Pet)]); final data = _serializers.deserialize( response.data is String ? jsonDecode(response.data as String) diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart index 300bfee362a..38b37fa2e0c 100644 --- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart +++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart @@ -113,8 +113,7 @@ class StoreApi { onSendProgress: onSendProgress, onReceiveProgress: onReceiveProgress, ).then((response) { - const collectionType = BuiltMap; - const type = FullType(collectionType, [FullType(String), FullType(int)]); + const type = FullType(BuiltMap, [FullType(String), FullType(int)]); final data = _serializers.deserialize( response.data is String ? jsonDecode(response.data as String) diff --git a/samples/client/petstore/dart2/petstore_client_lib/lib/api.dart b/samples/client/petstore/dart2/petstore_client_lib/lib/api.dart index 5fa4f759553..bfa6db0fd38 100644 --- a/samples/client/petstore/dart2/petstore_client_lib/lib/api.dart +++ b/samples/client/petstore/dart2/petstore_client_lib/lib/api.dart @@ -41,6 +41,7 @@ const _delimiters = {'csv': ',', 'ssv': ' ', 'tsv': '\t', 'pipes': '|'}; const _dateEpochMarker = 'epoch'; final _dateFormatter = DateFormat('yyyy-MM-dd'); final _regList = RegExp(r'^List<(.*)>$'); +final _regSet = RegExp(r'^Set<(.*)>$'); final _regMap = RegExp(r'^Map$'); ApiClient defaultApiClient = ApiClient(); diff --git a/samples/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart b/samples/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart index 5611cb3d2c6..0bf9bd5595d 100644 --- a/samples/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart +++ b/samples/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart @@ -222,7 +222,7 @@ class PetApi { // FormatException when trying to decode an empty string. if (response.body != null && response.statusCode != HttpStatus.noContent) { return (apiClient.deserialize(_decodeBodyBytes(response), 'List') as List) - .map((item) => item as Pet) + .cast() .toList(growable: false); } return null; @@ -300,7 +300,7 @@ class PetApi { // FormatException when trying to decode an empty string. if (response.body != null && response.statusCode != HttpStatus.noContent) { return (apiClient.deserialize(_decodeBodyBytes(response), 'List') as List) - .map((item) => item as Pet) + .cast() .toList(growable: false); } return null; diff --git a/samples/client/petstore/dart2/petstore_client_lib/lib/api_client.dart b/samples/client/petstore/dart2/petstore_client_lib/lib/api_client.dart index 6a45211ea6e..9f875dba12d 100644 --- a/samples/client/petstore/dart2/petstore_client_lib/lib/api_client.dart +++ b/samples/client/petstore/dart2/petstore_client_lib/lib/api_client.dart @@ -188,6 +188,12 @@ class ApiClient { .map((v) => _deserialize(v, newTargetType, growable: growable)) .toList(growable: true == growable); } + if (value is Set && (match = _regSet.firstMatch(targetType)) != null) { + final newTargetType = match[1]; + return value + .map((v) => _deserialize(v, newTargetType, growable: growable)) + .toSet(); + } if (value is Map && (match = _regMap.firstMatch(targetType)) != null) { final newTargetType = match[1]; return Map.fromIterables( diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php index 7270ba1bcdb..cd71a0bf1bf 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php @@ -1055,6 +1055,7 @@ class PetApi ); } + $resourcePath = '/pet/findByTags'; $formParams = []; $queryParams = []; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php index 4bbf610db3c..9ce26953114 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php @@ -362,6 +362,8 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setPhotoUrls($photo_urls) { + + $this->container['photo_urls'] = $photo_urls; return $this; diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb index c4222f8d8bb..8eaf66b6405 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb @@ -154,6 +154,16 @@ module Petstore true end + # Custom attribute writer method with validation + # @param [Object] photo_urls Value to be assigned + def photo_urls=(photo_urls) + if photo_urls.nil? + fail ArgumentError, 'photo_urls cannot be nil' + end + + @photo_urls = photo_urls + end + # Custom attribute writer method checking allowed values (enum). # @param [Object] status Object to be assigned def status=(status) diff --git a/samples/client/petstore/ruby/lib/petstore/models/pet.rb b/samples/client/petstore/ruby/lib/petstore/models/pet.rb index c4222f8d8bb..8eaf66b6405 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/pet.rb @@ -154,6 +154,16 @@ module Petstore true end + # Custom attribute writer method with validation + # @param [Object] photo_urls Value to be assigned + def photo_urls=(photo_urls) + if photo_urls.nil? + fail ArgumentError, 'photo_urls cannot be nil' + end + + @photo_urls = photo_urls + end + # Custom attribute writer method checking allowed values (enum). # @param [Object] status Object to be assigned def status=(status) diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/PetApi.ts index 8b0237a728b..4b5e5912374 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/PetApi.ts @@ -37,7 +37,7 @@ export interface FindPetsByStatusRequest { } export interface FindPetsByTagsRequest { - tags: Array; + tags: Set; } export interface GetPetByIdRequest { @@ -203,7 +203,7 @@ export class PetApi extends runtime.BaseAPI { * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * Finds Pets by tags */ - async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest): Promise>> { + async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest): Promise>> { if (requestParameters.tags === null || requestParameters.tags === undefined) { throw new runtime.RequiredError('tags','Required parameter requestParameters.tags was null or undefined when calling findPetsByTags.'); } @@ -239,7 +239,7 @@ export class PetApi extends runtime.BaseAPI { * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * Finds Pets by tags */ - async findPetsByTags(requestParameters: FindPetsByTagsRequest): Promise> { + async findPetsByTags(requestParameters: FindPetsByTagsRequest): Promise> { const response = await this.findPetsByTagsRaw(requestParameters); return await response.value(); } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Pet.ts index f188f88dcee..7318e62574c 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Pet.ts @@ -50,10 +50,10 @@ export interface Pet { name: string; /** * - * @type {Array} + * @type {Set} * @memberof Pet */ - photoUrls: Array; + photoUrls: Set; /** * * @type {Array} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart index 69b1f6c4195..e49f7800703 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart @@ -198,8 +198,7 @@ class PetApi { onSendProgress: onSendProgress, onReceiveProgress: onReceiveProgress, ).then((response) { - const collectionType = BuiltList; - const type = FullType(collectionType, [FullType(Pet)]); + const type = FullType(BuiltList, [FullType(Pet)]); final data = _serializers.deserialize( response.data is String ? jsonDecode(response.data as String) @@ -269,8 +268,7 @@ class PetApi { onSendProgress: onSendProgress, onReceiveProgress: onReceiveProgress, ).then((response) { - const collectionType = BuiltList; - const type = FullType(collectionType, [FullType(Pet)]); + const type = FullType(BuiltList, [FullType(Pet)]); final data = _serializers.deserialize( response.data is String ? jsonDecode(response.data as String) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart index 048c7bd5556..5adaabf7126 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart @@ -113,8 +113,7 @@ class StoreApi { onSendProgress: onSendProgress, onReceiveProgress: onReceiveProgress, ).then((response) { - const collectionType = BuiltMap; - const type = FullType(collectionType, [FullType(String), FullType(int)]); + const type = FullType(BuiltMap, [FullType(String), FullType(int)]); final data = _serializers.deserialize( response.data is String ? jsonDecode(response.data as String) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Pet.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Pet.md index 3a8dd5b8996..3640640df19 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Pet.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Pet.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **id** | **int** | | [optional] **category** | [**Category**](Category.md) | | [optional] **name** | **String** | | -**photoUrls** | **BuiltList** | | +**photoUrls** | **BuiltSet** | | **tags** | [**BuiltList**](Tag.md) | | [optional] **status** | **String** | pet status in the store | [optional] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/PetApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/PetApi.md index 24e5719295d..f844ee8eaf3 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/PetApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/PetApi.md @@ -152,7 +152,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **findPetsByTags** -> BuiltList findPetsByTags(tags) +> BuiltSet findPetsByTags(tags) Finds Pets by tags @@ -165,7 +165,7 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; var api_instance = new PetApi(); -var tags = []; // BuiltList | Tags to filter by +var tags = []; // BuiltSet | Tags to filter by try { var result = api_instance.findPetsByTags(tags); @@ -179,11 +179,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **tags** | [**BuiltList**](String.md)| Tags to filter by | + **tags** | [**BuiltSet**](String.md)| Tags to filter by | ### Return type -[**BuiltList**](Pet.md) +[**BuiltSet**](Pet.md) ### Authorization diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart index d81906b899d..aa51abb7fde 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart @@ -181,8 +181,7 @@ class PetApi { onSendProgress: onSendProgress, onReceiveProgress: onReceiveProgress, ).then((response) { - const collectionType = BuiltList; - const type = FullType(collectionType, [FullType(Pet)]); + const type = FullType(BuiltList, [FullType(Pet)]); final data = _serializers.deserialize( response.data is String ? jsonDecode(response.data as String) @@ -206,8 +205,8 @@ class PetApi { /// Finds Pets by tags /// /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - Future>> findPetsByTags( - BuiltList tags, { + Future>> findPetsByTags( + BuiltSet tags, { CancelToken cancelToken, Map headers, Map extra, @@ -252,16 +251,15 @@ class PetApi { onSendProgress: onSendProgress, onReceiveProgress: onReceiveProgress, ).then((response) { - const collectionType = BuiltList; - const type = FullType(collectionType, [FullType(Pet)]); + const type = FullType(BuiltSet, [FullType(Pet)]); final data = _serializers.deserialize( response.data is String ? jsonDecode(response.data as String) : response.data, specifiedType: type, - ) as BuiltList; + ) as BuiltSet; - return Response>( + return Response>( data: data, headers: response.headers, isRedirect: response.isRedirect, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart index 4cd63ae0224..3f770836b33 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart @@ -113,8 +113,7 @@ class StoreApi { onSendProgress: onSendProgress, onReceiveProgress: onReceiveProgress, ).then((response) { - const collectionType = BuiltMap; - const type = FullType(collectionType, [FullType(String), FullType(int)]); + const type = FullType(BuiltMap, [FullType(String), FullType(int)]); final data = _serializers.deserialize( response.data is String ? jsonDecode(response.data as String) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/pet.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/pet.dart index 98757f5e7ce..fc3e493ad1c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/pet.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/model/pet.dart @@ -29,7 +29,7 @@ abstract class Pet implements Built { @nullable @BuiltValueField(wireName: r'photoUrls') - BuiltList get photoUrls; + BuiltSet get photoUrls; @nullable @BuiltValueField(wireName: r'tags') diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/serializers.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/serializers.dart index 93a24c5a7d2..b3f9ae7c26d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/serializers.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/serializers.dart @@ -109,6 +109,10 @@ Serializers serializers = (_$serializers.toBuilder() const FullType(BuiltMap, [FullType(String), FullType(String)]), () => MapBuilder(), ) + ..addBuilderFactory( + const FullType(BuiltSet, [FullType(Pet)]), + () => SetBuilder(), + ) ..addBuilderFactory( const FullType(BuiltList, [FullType(Pet)]), () => ListBuilder(), diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/pet_api_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/pet_api_test.dart index 7724f48b5df..6248518fa68 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/pet_api_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/pet_api_test.dart @@ -35,7 +35,7 @@ void main() { // // Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. // - //Future> findPetsByTags(BuiltList tags) async + //Future> findPetsByTags(BuiltSet tags) async test('test findPetsByTags', () async { // TODO }); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/pet_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/pet_test.dart index 9d5b6e4dd4a..20f82b235a8 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/pet_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/pet_test.dart @@ -21,7 +21,7 @@ void main() { // TODO }); - // BuiltList photoUrls + // BuiltSet photoUrls test('to test the property `photoUrls`', () async { // TODO }); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api.dart index 5fa4f759553..bfa6db0fd38 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api.dart @@ -41,6 +41,7 @@ const _delimiters = {'csv': ',', 'ssv': ' ', 'tsv': '\t', 'pipes': '|'}; const _dateEpochMarker = 'epoch'; final _dateFormatter = DateFormat('yyyy-MM-dd'); final _regList = RegExp(r'^List<(.*)>$'); +final _regSet = RegExp(r'^Set<(.*)>$'); final _regMap = RegExp(r'^Map$'); ApiClient defaultApiClient = ApiClient(); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart index 50e2e25bf74..630b93df846 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart @@ -229,7 +229,7 @@ class PetApi { // FormatException when trying to decode an empty string. if (response.body != null && response.statusCode != HttpStatus.noContent) { return (apiClient.deserialize(_decodeBodyBytes(response), 'List') as List) - .map((item) => item as Pet) + .cast() .toList(growable: false); } return null; @@ -307,7 +307,7 @@ class PetApi { // FormatException when trying to decode an empty string. if (response.body != null && response.statusCode != HttpStatus.noContent) { return (apiClient.deserialize(_decodeBodyBytes(response), 'List') as List) - .map((item) => item as Pet) + .cast() .toList(growable: false); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api_client.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api_client.dart index 6a45211ea6e..9f875dba12d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api_client.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api_client.dart @@ -188,6 +188,12 @@ class ApiClient { .map((v) => _deserialize(v, newTargetType, growable: growable)) .toList(growable: true == growable); } + if (value is Set && (match = _regSet.firstMatch(targetType)) != null) { + final newTargetType = match[1]; + return value + .map((v) => _deserialize(v, newTargetType, growable: growable)) + .toSet(); + } if (value is Map && (match = _regMap.firstMatch(targetType)) != null) { final newTargetType = match[1]; return Map.fromIterables( diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Pet.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Pet.md index 88512ee3703..b6fdea5299b 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Pet.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Pet.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **id** | **int** | | [optional] **category** | [**Category**](Category.md) | | [optional] **name** | **String** | | -**photoUrls** | **List** | | [default to const []] +**photoUrls** | **Set** | | [default to const {}] **tags** | [**List**](Tag.md) | | [optional] [default to const []] **status** | **String** | pet status in the store | [optional] diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/PetApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/PetApi.md index 5320ca9ae5a..aeb082c9686 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/PetApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/PetApi.md @@ -152,7 +152,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **findPetsByTags** -> List findPetsByTags(tags) +> Set findPetsByTags(tags) Finds Pets by tags @@ -165,7 +165,7 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = PetApi(); -final tags = []; // List | Tags to filter by +final tags = []; // Set | Tags to filter by try { final result = api_instance.findPetsByTags(tags); @@ -179,11 +179,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **tags** | [**List**](String.md)| Tags to filter by | [default to const []] + **tags** | [**Set**](String.md)| Tags to filter by | [default to const {}] ### Return type -[**List**](Pet.md) +[**Set**](Pet.md) ### Authorization diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api.dart index 3563dcbfc00..8d406863994 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api.dart @@ -82,6 +82,7 @@ const _delimiters = {'csv': ',', 'ssv': ' ', 'tsv': '\t', 'pipes': '|'}; const _dateEpochMarker = 'epoch'; final _dateFormatter = DateFormat('yyyy-MM-dd'); final _regList = RegExp(r'^List<(.*)>$'); +final _regSet = RegExp(r'^Set<(.*)>$'); final _regMap = RegExp(r'^Map$'); ApiClient defaultApiClient = ApiClient(); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/pet_api.dart index 64323b3beec..256bfd22f1d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/pet_api.dart @@ -222,7 +222,7 @@ class PetApi { // FormatException when trying to decode an empty string. if (response.body != null && response.statusCode != HttpStatus.noContent) { return (apiClient.deserialize(_decodeBodyBytes(response), 'List') as List) - .map((item) => item as Pet) + .cast() .toList(growable: false); } return null; @@ -236,9 +236,9 @@ class PetApi { /// /// Parameters: /// - /// * [List] tags (required): + /// * [Set] tags (required): /// Tags to filter by - Future findPetsByTagsWithHttpInfo(List tags) async { + Future findPetsByTagsWithHttpInfo(Set tags) async { // Verify required params are set. if (tags == null) { throw ApiException(HttpStatus.badRequest, 'Missing required param: tags'); @@ -288,9 +288,9 @@ class PetApi { /// /// Parameters: /// - /// * [List] tags (required): + /// * [Set] tags (required): /// Tags to filter by - Future> findPetsByTags(List tags) async { + Future> findPetsByTags(Set tags) async { final response = await findPetsByTagsWithHttpInfo(tags); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, _decodeBodyBytes(response)); @@ -299,9 +299,9 @@ class PetApi { // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. if (response.body != null && response.statusCode != HttpStatus.noContent) { - return (apiClient.deserialize(_decodeBodyBytes(response), 'List') as List) - .map((item) => item as Pet) - .toList(growable: false); + return (apiClient.deserialize(_decodeBodyBytes(response), 'Set') as List) + .cast() + .toSet(); } return null; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_client.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_client.dart index 4332d26fca4..585c9038dea 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_client.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_client.dart @@ -265,6 +265,12 @@ class ApiClient { .map((v) => _deserialize(v, newTargetType, growable: growable)) .toList(growable: true == growable); } + if (value is Set && (match = _regSet.firstMatch(targetType)) != null) { + final newTargetType = match[1]; + return value + .map((v) => _deserialize(v, newTargetType, growable: growable)) + .toSet(); + } if (value is Map && (match = _regMap.firstMatch(targetType)) != null) { final newTargetType = match[1]; return Map.fromIterables( diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/pet.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/pet.dart index edb8930c11d..6a8cdb9612a 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/pet.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/pet.dart @@ -15,7 +15,7 @@ class Pet { this.id, this.category, @required this.name, - this.photoUrls = const [], + this.photoUrls = const {}, this.tags = const [], this.status, }); @@ -26,7 +26,7 @@ class Pet { String name; - List photoUrls; + Set photoUrls; List tags; @@ -87,7 +87,7 @@ class Pet { name: json[r'name'], photoUrls: json[r'photoUrls'] == null ? null - : (json[r'photoUrls'] as List).cast(), + : (json[r'photoUrls'] as Set).cast(), tags: Tag.listFromJson(json[r'tags']), status: PetStatusEnum.fromJson(json[r'status']), ); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/pet_api_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/pet_api_test.dart index 697fcdfd0c0..5f4c994acef 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/pet_api_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/pet_api_test.dart @@ -43,7 +43,7 @@ void main() { // // Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. // - //Future> findPetsByTags(List tags) async + //Future> findPetsByTags(Set tags) async test('test findPetsByTags', () async { // TODO }); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/pet_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/pet_test.dart index b91619505ef..4c0f8f635e2 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/pet_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/pet_test.dart @@ -21,7 +21,7 @@ void main() { // TODO }); - // List photoUrls (default value: const []) + // Set photoUrls (default value: const {}) test('to test the property `photoUrls`', () async { // TODO }); diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApi.java index 498a5e0d55a..7bd7f41f120 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApi.java @@ -10,6 +10,7 @@ import io.swagger.jaxrs.*; import java.io.File; import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import java.util.Set; import java.util.Map; import java.util.List; @@ -115,17 +116,17 @@ public class PetApi { @Path("/findByTags") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { + @io.swagger.annotations.ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) }) - public Response findPetsByTags(@ApiParam(value = "Tags to filter by", required = true) @QueryParam("tags") @NotNull @Valid List tags,@Context SecurityContext securityContext) + public Response findPetsByTags(@ApiParam(value = "Tags to filter by", required = true) @QueryParam("tags") @NotNull @Valid Set tags,@Context SecurityContext securityContext) throws NotFoundException { return delegate.findPetsByTags(tags, securityContext); } diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApiService.java index 980e4a86f31..a019a9f498f 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApiService.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApiService.java @@ -8,6 +8,7 @@ import org.glassfish.jersey.media.multipart.FormDataBodyPart; import java.io.File; import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import java.util.Set; import java.util.List; import org.openapitools.api.NotFoundException; @@ -22,7 +23,7 @@ public abstract class PetApiService { public abstract Response addPet(Pet pet,SecurityContext securityContext) throws NotFoundException; public abstract Response deletePet(Long petId,String apiKey,SecurityContext securityContext) throws NotFoundException; public abstract Response findPetsByStatus( @NotNull List status,SecurityContext securityContext) throws NotFoundException; - public abstract Response findPetsByTags( @NotNull List tags,SecurityContext securityContext) throws NotFoundException; + public abstract Response findPetsByTags( @NotNull Set tags,SecurityContext securityContext) throws NotFoundException; public abstract Response getPetById(Long petId,SecurityContext securityContext) throws NotFoundException; public abstract Response updatePet(Pet pet,SecurityContext securityContext) throws NotFoundException; public abstract Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Pet.java index 65d3a132944..adcdbf24a57 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Pet.java @@ -20,7 +20,9 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; +import java.util.LinkedHashSet; import java.util.List; +import java.util.Set; import org.openapitools.model.Category; import org.openapitools.model.Tag; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -54,7 +56,7 @@ public class Pet { public static final String JSON_PROPERTY_PHOTO_URLS = "photoUrls"; @JsonProperty(JSON_PROPERTY_PHOTO_URLS) - private List photoUrls = new ArrayList(); + private Set photoUrls = new LinkedHashSet(); public static final String JSON_PROPERTY_TAGS = "tags"; @JsonProperty(JSON_PROPERTY_TAGS) @@ -157,7 +159,7 @@ public class Pet { this.name = name; } - public Pet photoUrls(List photoUrls) { + public Pet photoUrls(Set photoUrls) { this.photoUrls = photoUrls; return this; } @@ -174,11 +176,11 @@ public class Pet { @JsonProperty("photoUrls") @ApiModelProperty(required = true, value = "") @NotNull - public List getPhotoUrls() { + public Set getPhotoUrls() { return photoUrls; } - public void setPhotoUrls(List photoUrls) { + public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } diff --git a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index 6d874bf7d91..950a9f175fa 100644 --- a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -6,6 +6,7 @@ import org.openapitools.model.*; import java.io.File; import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import java.util.Set; import java.util.List; import org.openapitools.api.NotFoundException; @@ -35,7 +36,7 @@ public class PetApiServiceImpl extends PetApiService { return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response findPetsByTags( @NotNull List tags, SecurityContext securityContext) throws NotFoundException { + public Response findPetsByTags( @NotNull Set tags, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } From 1b440e191cb98d7895aee4554b3c808b1dcefb06 Mon Sep 17 00:00:00 2001 From: Peter Leibiger Date: Tue, 2 Feb 2021 11:46:51 +0100 Subject: [PATCH 06/44] [dart-dio] Improve API & API-Client field initialization (#8589) --- .../src/main/resources/dart-dio/api.mustache | 8 ++-- .../main/resources/dart-dio/apilib.mustache | 42 +++++++++++-------- .../dart-dio/local_date_serializer.mustache | 6 +++ .../resources/dart-dio/serializers.mustache | 4 +- .../dart-dio/petstore_client_lib/lib/api.dart | 42 +++++++++++-------- .../petstore_client_lib/lib/api/pet_api.dart | 8 ++-- .../lib/api/store_api.dart | 8 ++-- .../petstore_client_lib/lib/api/user_api.dart | 8 ++-- .../dart-dio/petstore_client_lib/lib/api.dart | 42 +++++++++++-------- .../petstore_client_lib/lib/api/pet_api.dart | 8 ++-- .../lib/api/store_api.dart | 8 ++-- .../petstore_client_lib/lib/api/user_api.dart | 8 ++-- .../petstore_client_lib_fake/lib/api.dart | 42 +++++++++++-------- .../lib/api/another_fake_api.dart | 8 ++-- .../lib/api/default_api.dart | 8 ++-- .../lib/api/fake_api.dart | 8 ++-- .../lib/api/fake_classname_tags123_api.dart | 8 ++-- .../lib/api/pet_api.dart | 8 ++-- .../lib/api/store_api.dart | 8 ++-- .../lib/api/user_api.dart | 8 ++-- 20 files changed, 174 insertions(+), 116 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache index 44d9c067416..95dc66a46e1 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache @@ -11,10 +11,12 @@ import 'package:built_value/serializer.dart'; {{/fullImports}} class {{classname}} { - final Dio _dio; - Serializers _serializers; - {{classname}}(this._dio, this._serializers); + final Dio _dio; + + final Serializers _serializers; + + const {{classname}}(this._dio, this._serializers); {{#operation}} /// {{{summary}}} diff --git a/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache b/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache index 645a5fe7877..62f2bfc06bc 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache @@ -10,31 +10,37 @@ import 'package:{{pubName}}/auth/oauth.dart'; {{#apiInfo}}{{#apis}}import 'package:{{pubName}}/api/{{classFilename}}.dart'; {{/apis}}{{/apiInfo}} -final _defaultInterceptors = [OAuthInterceptor(), BasicAuthInterceptor(), ApiKeyAuthInterceptor()]; +final _defaultInterceptors = [ + OAuthInterceptor(), + BasicAuthInterceptor(), + ApiKeyAuthInterceptor(), +]; class {{clientName}} { - Dio dio; - Serializers serializers; - String basePath = '{{{basePath}}}'; + static const String basePath = r'{{{basePath}}}'; - {{clientName}}({this.dio, Serializers serializers, String basePathOverride, List interceptors}) { - if (dio == null) { - BaseOptions options = new BaseOptions( + final Dio dio; + + final Serializers serializers; + + {{clientName}}({ + Dio dio, + Serializers serializers, + String basePathOverride, + List interceptors, + }) : this.serializers = serializers ?? standardSerializers, + this.dio = dio ?? + Dio(BaseOptions( baseUrl: basePathOverride ?? basePath, connectTimeout: 5000, receiveTimeout: 3000, - ); - this.dio = new Dio(options); - } - - if (interceptors == null) { - this.dio.interceptors.addAll(_defaultInterceptors); - } else { - this.dio.interceptors.addAll(interceptors); - } - - this.serializers = serializers ?? standardSerializers; + )) { + if (interceptors == null) { + this.dio.interceptors.addAll(_defaultInterceptors); + } else { + this.dio.interceptors.addAll(interceptors); + } } void setOAuthToken(String name, String token) { diff --git a/modules/openapi-generator/src/main/resources/dart-dio/local_date_serializer.mustache b/modules/openapi-generator/src/main/resources/dart-dio/local_date_serializer.mustache index 31440035f4a..68cfd5e31c6 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/local_date_serializer.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/local_date_serializer.mustache @@ -4,6 +4,9 @@ import 'package:built_value/serializer.dart'; import 'package:time_machine/time_machine.dart'; class OffsetDateSerializer implements PrimitiveSerializer { + + const OffsetDateSerializer(); + @override Iterable get types => BuiltList([OffsetDate]); @@ -25,6 +28,9 @@ class OffsetDateSerializer implements PrimitiveSerializer { } class OffsetDateTimeSerializer implements PrimitiveSerializer { + + const OffsetDateTimeSerializer(); + @override Iterable get types => BuiltList([OffsetDateTime]); diff --git a/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache b/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache index ec6464fca00..4697d00c323 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache @@ -26,8 +26,8 @@ Serializers serializers = (_$serializers.toBuilder(){{#apiInfo}}{{#apis}}{{#seri () => MapBuilder(), {{/isMap}} ){{/serializers}}{{/apis}}{{/apiInfo}}{{#timeMachine}} - ..add(OffsetDateSerializer()) - ..add(OffsetDateTimeSerializer()){{/timeMachine}} + ..add(const OffsetDateSerializer()) + ..add(const OffsetDateTimeSerializer()){{/timeMachine}} ..add(Iso8601DateTimeSerializer())) .build(); diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api.dart index 2422d33a0f3..2bdb6d8f833 100644 --- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api.dart +++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api.dart @@ -18,31 +18,37 @@ import 'package:openapi/api/store_api.dart'; import 'package:openapi/api/user_api.dart'; -final _defaultInterceptors = [OAuthInterceptor(), BasicAuthInterceptor(), ApiKeyAuthInterceptor()]; +final _defaultInterceptors = [ + OAuthInterceptor(), + BasicAuthInterceptor(), + ApiKeyAuthInterceptor(), +]; class Openapi { - Dio dio; - Serializers serializers; - String basePath = 'http://petstore.swagger.io/v2'; + static const String basePath = r'http://petstore.swagger.io/v2'; - Openapi({this.dio, Serializers serializers, String basePathOverride, List interceptors}) { - if (dio == null) { - BaseOptions options = new BaseOptions( + final Dio dio; + + final Serializers serializers; + + Openapi({ + Dio dio, + Serializers serializers, + String basePathOverride, + List interceptors, + }) : this.serializers = serializers ?? standardSerializers, + this.dio = dio ?? + Dio(BaseOptions( baseUrl: basePathOverride ?? basePath, connectTimeout: 5000, receiveTimeout: 3000, - ); - this.dio = new Dio(options); - } - - if (interceptors == null) { - this.dio.interceptors.addAll(_defaultInterceptors); - } else { - this.dio.interceptors.addAll(interceptors); - } - - this.serializers = serializers ?? standardSerializers; + )) { + if (interceptors == null) { + this.dio.interceptors.addAll(_defaultInterceptors); + } else { + this.dio.interceptors.addAll(interceptors); + } } void setOAuthToken(String name, String token) { diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart index 842f537de9e..9b4f286f41e 100644 --- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart +++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart @@ -17,10 +17,12 @@ import 'package:built_collection/built_collection.dart'; import 'package:openapi/api_util.dart'; class PetApi { - final Dio _dio; - Serializers _serializers; - PetApi(this._dio, this._serializers); + final Dio _dio; + + final Serializers _serializers; + + const PetApi(this._dio, this._serializers); /// Add a new pet to the store /// diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart index 38b37fa2e0c..0dce4aeeb87 100644 --- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart +++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart @@ -14,10 +14,12 @@ import 'package:openapi/model/order.dart'; import 'package:built_collection/built_collection.dart'; class StoreApi { - final Dio _dio; - Serializers _serializers; - StoreApi(this._dio, this._serializers); + final Dio _dio; + + final Serializers _serializers; + + const StoreApi(this._dio, this._serializers); /// Delete purchase order by ID /// diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart index 7dab8b5726e..7357aace8d7 100644 --- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart +++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart @@ -14,10 +14,12 @@ import 'package:openapi/model/user.dart'; import 'package:built_collection/built_collection.dart'; class UserApi { - final Dio _dio; - Serializers _serializers; - UserApi(this._dio, this._serializers); + final Dio _dio; + + final Serializers _serializers; + + const UserApi(this._dio, this._serializers); /// Create user /// diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api.dart index 2422d33a0f3..2bdb6d8f833 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api.dart @@ -18,31 +18,37 @@ import 'package:openapi/api/store_api.dart'; import 'package:openapi/api/user_api.dart'; -final _defaultInterceptors = [OAuthInterceptor(), BasicAuthInterceptor(), ApiKeyAuthInterceptor()]; +final _defaultInterceptors = [ + OAuthInterceptor(), + BasicAuthInterceptor(), + ApiKeyAuthInterceptor(), +]; class Openapi { - Dio dio; - Serializers serializers; - String basePath = 'http://petstore.swagger.io/v2'; + static const String basePath = r'http://petstore.swagger.io/v2'; - Openapi({this.dio, Serializers serializers, String basePathOverride, List interceptors}) { - if (dio == null) { - BaseOptions options = new BaseOptions( + final Dio dio; + + final Serializers serializers; + + Openapi({ + Dio dio, + Serializers serializers, + String basePathOverride, + List interceptors, + }) : this.serializers = serializers ?? standardSerializers, + this.dio = dio ?? + Dio(BaseOptions( baseUrl: basePathOverride ?? basePath, connectTimeout: 5000, receiveTimeout: 3000, - ); - this.dio = new Dio(options); - } - - if (interceptors == null) { - this.dio.interceptors.addAll(_defaultInterceptors); - } else { - this.dio.interceptors.addAll(interceptors); - } - - this.serializers = serializers ?? standardSerializers; + )) { + if (interceptors == null) { + this.dio.interceptors.addAll(_defaultInterceptors); + } else { + this.dio.interceptors.addAll(interceptors); + } } void setOAuthToken(String name, String token) { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart index e49f7800703..dacefa336bf 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart @@ -17,10 +17,12 @@ import 'package:built_collection/built_collection.dart'; import 'package:openapi/api_util.dart'; class PetApi { - final Dio _dio; - Serializers _serializers; - PetApi(this._dio, this._serializers); + final Dio _dio; + + final Serializers _serializers; + + const PetApi(this._dio, this._serializers); /// Add a new pet to the store /// diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart index 5adaabf7126..0c9f666e1b7 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart @@ -14,10 +14,12 @@ import 'package:openapi/model/order.dart'; import 'package:built_collection/built_collection.dart'; class StoreApi { - final Dio _dio; - Serializers _serializers; - StoreApi(this._dio, this._serializers); + final Dio _dio; + + final Serializers _serializers; + + const StoreApi(this._dio, this._serializers); /// Delete purchase order by ID /// diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart index 82b1658a1ea..ce8c20111f0 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart @@ -14,10 +14,12 @@ import 'package:openapi/model/user.dart'; import 'package:built_collection/built_collection.dart'; class UserApi { - final Dio _dio; - Serializers _serializers; - UserApi(this._dio, this._serializers); + final Dio _dio; + + final Serializers _serializers; + + const UserApi(this._dio, this._serializers); /// Create user /// diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api.dart index 3e1dec02f81..378be30a74a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api.dart @@ -22,31 +22,37 @@ import 'package:openapi/api/store_api.dart'; import 'package:openapi/api/user_api.dart'; -final _defaultInterceptors = [OAuthInterceptor(), BasicAuthInterceptor(), ApiKeyAuthInterceptor()]; +final _defaultInterceptors = [ + OAuthInterceptor(), + BasicAuthInterceptor(), + ApiKeyAuthInterceptor(), +]; class Openapi { - Dio dio; - Serializers serializers; - String basePath = 'http://petstore.swagger.io:80/v2'; + static const String basePath = r'http://petstore.swagger.io:80/v2'; - Openapi({this.dio, Serializers serializers, String basePathOverride, List interceptors}) { - if (dio == null) { - BaseOptions options = new BaseOptions( + final Dio dio; + + final Serializers serializers; + + Openapi({ + Dio dio, + Serializers serializers, + String basePathOverride, + List interceptors, + }) : this.serializers = serializers ?? standardSerializers, + this.dio = dio ?? + Dio(BaseOptions( baseUrl: basePathOverride ?? basePath, connectTimeout: 5000, receiveTimeout: 3000, - ); - this.dio = new Dio(options); - } - - if (interceptors == null) { - this.dio.interceptors.addAll(_defaultInterceptors); - } else { - this.dio.interceptors.addAll(interceptors); - } - - this.serializers = serializers ?? standardSerializers; + )) { + if (interceptors == null) { + this.dio.interceptors.addAll(_defaultInterceptors); + } else { + this.dio.interceptors.addAll(interceptors); + } } void setOAuthToken(String name, String token) { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart index bb8b4df8f38..21bcd8d0475 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/another_fake_api.dart @@ -13,10 +13,12 @@ import 'package:built_value/serializer.dart'; import 'package:openapi/model/model_client.dart'; class AnotherFakeApi { - final Dio _dio; - Serializers _serializers; - AnotherFakeApi(this._dio, this._serializers); + final Dio _dio; + + final Serializers _serializers; + + const AnotherFakeApi(this._dio, this._serializers); /// To test special tags /// diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/default_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/default_api.dart index 08d265f15a7..7dabdff912d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/default_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/default_api.dart @@ -13,10 +13,12 @@ import 'package:built_value/serializer.dart'; import 'package:openapi/model/inline_response_default.dart'; class DefaultApi { - final Dio _dio; - Serializers _serializers; - DefaultApi(this._dio, this._serializers); + final Dio _dio; + + final Serializers _serializers; + + const DefaultApi(this._dio, this._serializers); /// /// diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart index e47ce652fe5..022866c3722 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart @@ -21,10 +21,12 @@ import 'package:built_collection/built_collection.dart'; import 'package:openapi/api_util.dart'; class FakeApi { - final Dio _dio; - Serializers _serializers; - FakeApi(this._dio, this._serializers); + final Dio _dio; + + final Serializers _serializers; + + const FakeApi(this._dio, this._serializers); /// Health check endpoint /// diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart index 4e98faa733c..10092d010b4 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart @@ -13,10 +13,12 @@ import 'package:built_value/serializer.dart'; import 'package:openapi/model/model_client.dart'; class FakeClassnameTags123Api { - final Dio _dio; - Serializers _serializers; - FakeClassnameTags123Api(this._dio, this._serializers); + final Dio _dio; + + final Serializers _serializers; + + const FakeClassnameTags123Api(this._dio, this._serializers); /// To test class name in snake case /// diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart index aa51abb7fde..d01f1b2a8ba 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart @@ -17,10 +17,12 @@ import 'package:built_collection/built_collection.dart'; import 'package:openapi/api_util.dart'; class PetApi { - final Dio _dio; - Serializers _serializers; - PetApi(this._dio, this._serializers); + final Dio _dio; + + final Serializers _serializers; + + const PetApi(this._dio, this._serializers); /// Add a new pet to the store /// diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart index 3f770836b33..fa30f5d3d7b 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart @@ -14,10 +14,12 @@ import 'package:openapi/model/order.dart'; import 'package:built_collection/built_collection.dart'; class StoreApi { - final Dio _dio; - Serializers _serializers; - StoreApi(this._dio, this._serializers); + final Dio _dio; + + final Serializers _serializers; + + const StoreApi(this._dio, this._serializers); /// Delete purchase order by ID /// diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart index eebeb895671..6e4eb642e18 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart @@ -14,10 +14,12 @@ import 'package:openapi/model/user.dart'; import 'package:built_collection/built_collection.dart'; class UserApi { - final Dio _dio; - Serializers _serializers; - UserApi(this._dio, this._serializers); + final Dio _dio; + + final Serializers _serializers; + + const UserApi(this._dio, this._serializers); /// Create user /// From b78d4fce6aa29f64eafa8c7dac2c4f5ce0742233 Mon Sep 17 00:00:00 2001 From: Jens Oberender <1905126+burberius@users.noreply.github.com> Date: Wed, 3 Feb 2021 02:45:09 +0100 Subject: [PATCH 07/44] Upgraded dependency versions in okhttp generator. (#8604) Co-authored-by: Jens Oberender --- .../Java/libraries/okhttp-gson/pom.mustache | 12 ++++++------ .../java/okhttp-gson-dynamicOperations/pom.xml | 10 +++++----- .../java/okhttp-gson-parcelableModel/pom.xml | 10 +++++----- samples/client/petstore/java/okhttp-gson/pom.xml | 10 +++++----- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache index d99f278244e..74a1b796dcd 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache @@ -330,16 +330,16 @@ {{#java8}}1.8{{/java8}}{{^java8}}1.7{{/java8}} ${java.version} ${java.version} - 1.8.4 - 1.5.24 - 3.14.7 + 1.8.5 + 1.6.2 + 4.9.1 2.8.6 - 3.10 + 3.11 {{#joda}} - 2.9.9 + 2.10.9 {{/joda}} {{#threetenbp}} - 1.4.3 + 1.5.0 {{/threetenbp}} 1.3.2 4.13.1 diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/pom.xml b/samples/client/petstore/java/okhttp-gson-dynamicOperations/pom.xml index 2be37fd6ee9..942da2a74f0 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/pom.xml +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/pom.xml @@ -279,12 +279,12 @@ 1.7 ${java.version} ${java.version} - 1.8.4 - 1.5.24 - 3.14.7 + 1.8.5 + 1.6.2 + 4.9.1 2.8.6 - 3.10 - 1.4.3 + 3.11 + 1.5.0 1.3.2 4.13.1 UTF-8 diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml b/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml index a3798d00f11..a2bb80af7fa 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml @@ -281,12 +281,12 @@ 1.7 ${java.version} ${java.version} - 1.8.4 - 1.5.24 - 3.14.7 + 1.8.5 + 1.6.2 + 4.9.1 2.8.6 - 3.10 - 1.4.3 + 3.11 + 1.5.0 1.3.2 4.13.1 UTF-8 diff --git a/samples/client/petstore/java/okhttp-gson/pom.xml b/samples/client/petstore/java/okhttp-gson/pom.xml index 8a927846d79..bdd59dd9f37 100644 --- a/samples/client/petstore/java/okhttp-gson/pom.xml +++ b/samples/client/petstore/java/okhttp-gson/pom.xml @@ -274,12 +274,12 @@ 1.7 ${java.version} ${java.version} - 1.8.4 - 1.5.24 - 3.14.7 + 1.8.5 + 1.6.2 + 4.9.1 2.8.6 - 3.10 - 1.4.3 + 3.11 + 1.5.0 1.3.2 4.13.1 UTF-8 From 45fc02350b46acc4d167decbd9ffbfe2edb5cb68 Mon Sep 17 00:00:00 2001 From: Bruno Coelho <4brunu@users.noreply.github.com> Date: Wed, 3 Feb 2021 01:55:51 +0000 Subject: [PATCH 08/44] [kotlin] fix Date types usages (#8594) * [kotlin] fix Date types usages --- docs/generators/kotlin-server.md | 4 +- docs/generators/kotlin-vertx.md | 4 +- docs/generators/kotlin.md | 4 +- docs/generators/ktorm-schema.md | 4 +- .../languages/AbstractKotlinCodegen.java | 8 +-- .../languages/KotlinSpringServerCodegen.java | 8 --- .../infrastructure/Serializer.kt.mustache | 3 - .../client/infrastructure/Serializer.kt | 1 - .../client/infrastructure/Serializer.kt | 2 - .../client/infrastructure/Serializer.kt | 1 - .../client/infrastructure/Serializer.kt | 2 - .../client/infrastructure/Serializer.kt | 2 - .../client/infrastructure/Serializer.kt | 2 - .../client/infrastructure/Serializer.kt | 2 - .../client/infrastructure/Serializer.kt | 2 - .../client/infrastructure/Serializer.kt | 2 - .../client/infrastructure/Serializer.kt | 2 - .../client/infrastructure/Serializer.kt | 2 - .../.openapi-generator/VERSION | 2 +- .../kotlin-uppercase-enum/build.gradle | 1 - .../infrastructure/ResponseExtensions.kt | 1 + .../client/infrastructure/Serializer.kt | 2 - .../client/infrastructure/Serializer.kt | 2 - .../.openapi-generator/FILES | 12 ---- .../.openapi-generator/VERSION | 2 +- .../kotlin-jvm-retrofit2-coroutines/README.md | 6 -- .../build.gradle | 3 +- .../docs/FakeApi.md | 38 +++++------ .../docs/FormatTest.md | 1 + .../docs/List.md | 2 +- .../docs/PetApi.md | 16 ++--- .../docs/SpecialModelName.md | 2 +- .../docs/UserApi.md | 8 +-- .../client/apis/AnotherFakeApi.kt | 2 +- .../openapitools/client/apis/DefaultApi.kt | 2 +- .../org/openapitools/client/apis/FakeApi.kt | 48 +++++++------- .../client/apis/FakeClassnameTags123Api.kt | 2 +- .../org/openapitools/client/apis/PetApi.kt | 28 +++++---- .../org/openapitools/client/apis/StoreApi.kt | 8 +-- .../org/openapitools/client/apis/UserApi.kt | 20 +++--- .../client/infrastructure/ApiClient.kt | 24 +++---- .../client/infrastructure/Serializer.kt | 1 - .../openapitools/client/models/FormatTest.kt | 3 + .../org/openapitools/client/models/List.kt | 4 +- .../client/models/SpecialModelname.kt | 4 +- .../.openapi-generator/FILES | 12 ---- .../.openapi-generator/VERSION | 2 +- .../kotlin-jvm-retrofit2-rx/README.md | 6 -- .../kotlin-jvm-retrofit2-rx/build.gradle | 3 +- .../kotlin-jvm-retrofit2-rx/docs/FakeApi.md | 38 +++++------ .../docs/FormatTest.md | 1 + .../kotlin-jvm-retrofit2-rx/docs/List.md | 2 +- .../kotlin-jvm-retrofit2-rx/docs/PetApi.md | 16 ++--- .../docs/SpecialModelName.md | 2 +- .../kotlin-jvm-retrofit2-rx/docs/UserApi.md | 8 +-- .../client/apis/AnotherFakeApi.kt | 2 +- .../openapitools/client/apis/DefaultApi.kt | 2 +- .../org/openapitools/client/apis/FakeApi.kt | 48 +++++++------- .../client/apis/FakeClassnameTags123Api.kt | 2 +- .../org/openapitools/client/apis/PetApi.kt | 28 +++++---- .../org/openapitools/client/apis/StoreApi.kt | 8 +-- .../org/openapitools/client/apis/UserApi.kt | 20 +++--- .../client/infrastructure/ApiClient.kt | 24 +++---- .../client/infrastructure/Serializer.kt | 1 - .../openapitools/client/models/FormatTest.kt | 3 + .../org/openapitools/client/models/List.kt | 4 +- .../client/models/SpecialModelname.kt | 4 +- .../.openapi-generator/FILES | 12 ---- .../.openapi-generator/VERSION | 2 +- .../kotlin-jvm-retrofit2-rx2/README.md | 6 -- .../kotlin-jvm-retrofit2-rx2/build.gradle | 3 +- .../kotlin-jvm-retrofit2-rx2/docs/FakeApi.md | 38 +++++------ .../docs/FormatTest.md | 1 + .../kotlin-jvm-retrofit2-rx2/docs/List.md | 2 +- .../kotlin-jvm-retrofit2-rx2/docs/PetApi.md | 16 ++--- .../docs/SpecialModelName.md | 2 +- .../kotlin-jvm-retrofit2-rx2/docs/UserApi.md | 8 +-- .../client/apis/AnotherFakeApi.kt | 2 +- .../openapitools/client/apis/DefaultApi.kt | 2 +- .../org/openapitools/client/apis/FakeApi.kt | 48 +++++++------- .../client/apis/FakeClassnameTags123Api.kt | 2 +- .../org/openapitools/client/apis/PetApi.kt | 28 +++++---- .../org/openapitools/client/apis/StoreApi.kt | 8 +-- .../org/openapitools/client/apis/UserApi.kt | 20 +++--- .../client/infrastructure/ApiClient.kt | 26 ++++---- .../client/infrastructure/Serializer.kt | 1 - .../openapitools/client/models/FormatTest.kt | 3 + .../org/openapitools/client/models/List.kt | 4 +- .../client/models/SpecialModelname.kt | 4 +- .../.openapi-generator/FILES | 12 ---- .../.openapi-generator/VERSION | 2 +- .../petstore/kotlin-multiplatform/README.md | 6 -- .../kotlin-multiplatform/docs/FakeApi.md | 8 +-- .../kotlin-multiplatform/docs/FormatTest.md | 1 + .../kotlin-multiplatform/docs/List.md | 2 +- .../docs/SpecialModelName.md | 2 +- .../org/openapitools/client/apis/FakeApi.kt | 8 +-- .../client/infrastructure/ApiClient.kt | 21 +++---- .../openapitools/client/models/FormatTest.kt | 2 + .../org/openapitools/client/models/List.kt | 4 +- .../client/models/SpecialModelname.kt | 4 +- .../petstore/kotlin/.openapi-generator/FILES | 13 ---- .../kotlin/.openapi-generator/VERSION | 2 +- .../openapi3/client/petstore/kotlin/README.md | 6 -- .../client/petstore/kotlin/build.gradle | 2 - .../client/petstore/kotlin/docs/FakeApi.md | 8 +-- .../client/petstore/kotlin/docs/FormatTest.md | 1 + .../client/petstore/kotlin/docs/List.md | 2 +- .../petstore/kotlin/docs/SpecialModelName.md | 2 +- .../org/openapitools/client/apis/FakeApi.kt | 19 +++--- .../org/openapitools/client/apis/PetApi.kt | 3 +- .../infrastructure/ResponseExtensions.kt | 1 + .../client/infrastructure/Serializer.kt | 2 - .../openapitools/client/models/FormatTest.kt | 3 + .../org/openapitools/client/models/List.kt | 4 +- .../client/models/SpecialModelname.kt | 4 +- .../.openapi-generator/FILES | 2 - .../.openapi-generator/VERSION | 2 +- .../kotlin/org/openapitools/api/PetApi.kt | 63 +++++++++---------- .../kotlin/org/openapitools/api/StoreApi.kt | 35 +++++------ .../kotlin/org/openapitools/api/UserApi.kt | 57 ++++++++--------- .../kotlin/org/openapitools/model/Category.kt | 3 +- .../openapitools/model/ModelApiResponse.kt | 1 + .../kotlin/org/openapitools/model/Order.kt | 3 +- .../main/kotlin/org/openapitools/model/Pet.kt | 9 +-- .../main/kotlin/org/openapitools/model/Tag.kt | 1 + .../kotlin/org/openapitools/model/User.kt | 1 + .../.openapi-generator/FILES | 2 - .../.openapi-generator/VERSION | 2 +- .../kotlin/org/openapitools/api/PetApi.kt | 63 +++++++++---------- .../kotlin/org/openapitools/api/StoreApi.kt | 35 +++++------ .../kotlin/org/openapitools/api/UserApi.kt | 57 ++++++++--------- .../kotlin/org/openapitools/model/Category.kt | 3 +- .../openapitools/model/ModelApiResponse.kt | 1 + .../kotlin/org/openapitools/model/Order.kt | 3 +- .../main/kotlin/org/openapitools/model/Pet.kt | 9 +-- .../main/kotlin/org/openapitools/model/Tag.kt | 1 + .../kotlin/org/openapitools/model/User.kt | 1 + .../org/openapitools/server/models/Order.kt | 2 +- .../.openapi-generator/VERSION | 2 +- .../kotlin/org/openapitools/api/PetApi.kt | 61 ++++++++---------- .../kotlin/org/openapitools/api/StoreApi.kt | 35 +++++------ .../kotlin/org/openapitools/api/UserApi.kt | 59 ++++++++--------- .../kotlin/org/openapitools/model/Category.kt | 1 + .../openapitools/model/ModelApiResponse.kt | 1 + .../kotlin/org/openapitools/model/Order.kt | 3 +- .../main/kotlin/org/openapitools/model/Pet.kt | 9 +-- .../main/kotlin/org/openapitools/model/Tag.kt | 1 + .../kotlin/org/openapitools/model/User.kt | 1 + .../kotlin/vertx/.openapi-generator/VERSION | 2 +- .../openapitools/server/api/model/Order.kt | 2 +- 151 files changed, 660 insertions(+), 790 deletions(-) diff --git a/docs/generators/kotlin-server.md b/docs/generators/kotlin-server.md index 58852a97ccf..ecaf99a294f 100644 --- a/docs/generators/kotlin-server.md +++ b/docs/generators/kotlin-server.md @@ -32,8 +32,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl | Type/Alias | Imports | | ---------- | ------- | |BigDecimal|java.math.BigDecimal| -|Date|java.util.Date| -|DateTime|java.time.LocalDateTime| +|Date|java.time.LocalDate| +|DateTime|java.time.OffsetDateTime| |File|java.io.File| |LocalDate|java.time.LocalDate| |LocalDateTime|java.time.LocalDateTime| diff --git a/docs/generators/kotlin-vertx.md b/docs/generators/kotlin-vertx.md index 56539f00d46..f92dadaf520 100644 --- a/docs/generators/kotlin-vertx.md +++ b/docs/generators/kotlin-vertx.md @@ -26,8 +26,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl | Type/Alias | Imports | | ---------- | ------- | |BigDecimal|java.math.BigDecimal| -|Date|java.util.Date| -|DateTime|java.time.LocalDateTime| +|Date|java.time.LocalDate| +|DateTime|java.time.OffsetDateTime| |File|java.io.File| |LocalDate|java.time.LocalDate| |LocalDateTime|java.time.LocalDateTime| diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md index cdf4968400b..ef76c9af691 100644 --- a/docs/generators/kotlin.md +++ b/docs/generators/kotlin.md @@ -34,8 +34,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl | Type/Alias | Imports | | ---------- | ------- | |BigDecimal|java.math.BigDecimal| -|Date|java.util.Date| -|DateTime|java.time.LocalDateTime| +|Date|java.time.LocalDate| +|DateTime|java.time.OffsetDateTime| |File|java.io.File| |LocalDate|java.time.LocalDate| |LocalDateTime|java.time.LocalDateTime| diff --git a/docs/generators/ktorm-schema.md b/docs/generators/ktorm-schema.md index 4f65a1ecc81..7a45b88b69a 100644 --- a/docs/generators/ktorm-schema.md +++ b/docs/generators/ktorm-schema.md @@ -27,8 +27,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl | Type/Alias | Imports | | ---------- | ------- | |BigDecimal|java.math.BigDecimal| -|Date|java.util.Date| -|DateTime|java.time.LocalDateTime| +|Date|java.time.LocalDate| +|DateTime|java.time.OffsetDateTime| |File|java.io.File| |LocalDate|java.time.LocalDate| |LocalDateTime|java.time.LocalDateTime| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java index 32c7c3cff45..79152024e3e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java @@ -153,7 +153,7 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co typeMapping.put("ByteArray", "kotlin.ByteArray"); typeMapping.put("number", "java.math.BigDecimal"); typeMapping.put("decimal", "java.math.BigDecimal"); - typeMapping.put("date-time", "java.time.LocalDateTime"); + typeMapping.put("date-time", "java.time.OffsetDateTime"); typeMapping.put("date", "java.time.LocalDate"); typeMapping.put("file", "java.io.File"); typeMapping.put("array", "kotlin.Array"); @@ -163,7 +163,7 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co typeMapping.put("object", "kotlin.Any"); typeMapping.put("binary", "kotlin.ByteArray"); typeMapping.put("Date", "java.time.LocalDate"); - typeMapping.put("DateTime", "java.time.LocalDateTime"); + typeMapping.put("DateTime", "java.time.OffsetDateTime"); instantiationTypes.put("array", "kotlin.collections.ArrayList"); instantiationTypes.put("list", "kotlin.collections.ArrayList"); @@ -174,9 +174,9 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co importMapping.put("UUID", "java.util.UUID"); importMapping.put("URI", "java.net.URI"); importMapping.put("File", "java.io.File"); - importMapping.put("Date", "java.util.Date"); + importMapping.put("Date", "java.time.LocalDate"); importMapping.put("Timestamp", "java.sql.Timestamp"); - importMapping.put("DateTime", "java.time.LocalDateTime"); + importMapping.put("DateTime", "java.time.OffsetDateTime"); importMapping.put("LocalDateTime", "java.time.LocalDateTime"); importMapping.put("LocalDate", "java.time.LocalDate"); importMapping.put("LocalTime", "java.time.LocalTime"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java index 909c1f59cf2..29f2bc72c8a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java @@ -125,17 +125,9 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen typeMapping.put("array", "kotlin.collections.List"); typeMapping.put("list", "kotlin.collections.List"); - typeMapping.put("date", "java.time.LocalDate"); - typeMapping.put("date-time", "java.time.OffsetDateTime"); - typeMapping.put("Date", "java.time.LocalDate"); - typeMapping.put("DateTime", "java.time.OffsetDateTime"); - // use resource for file handling typeMapping.put("file", "org.springframework.core.io.Resource"); - importMapping.put("Date", "java.time.LocalDate"); - importMapping.put("DateTime", "java.time.OffsetDateTime"); - addOption(TITLE, "server title name or client service name", title); addOption(BASE_PACKAGE, "base package (invokerPackage) for generated code", basePackage); addOption(SERVER_PORT, "configuration the port in which the sever is to run on", serverPort); diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/Serializer.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/Serializer.kt.mustache index 7ccd5079677..3074614db75 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/Serializer.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/Serializer.kt.mustache @@ -2,7 +2,6 @@ package {{packageName}}.infrastructure {{#moshi}} import com.squareup.moshi.Moshi -import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter {{^moshiCodeGen}} import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory {{/moshiCodeGen}} @@ -36,7 +35,6 @@ import java.util.Date {{#moshi}} @JvmStatic val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe()) .add(OffsetDateTimeAdapter()) .add(LocalDateTimeAdapter()) .add(LocalDateAdapter()) @@ -54,7 +52,6 @@ import java.util.Date {{#gson}} @JvmStatic val gsonBuilder: GsonBuilder = GsonBuilder() - .registerTypeAdapter(Date::class.java, DateAdapter()) .registerTypeAdapter(OffsetDateTime::class.java, OffsetDateTimeAdapter()) .registerTypeAdapter(LocalDateTime::class.java, LocalDateTimeAdapter()) .registerTypeAdapter(LocalDate::class.java, LocalDateAdapter()) diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt index 6465f148553..b80e0390de2 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt @@ -11,7 +11,6 @@ import java.util.Date object Serializer { @JvmStatic val gsonBuilder: GsonBuilder = GsonBuilder() - .registerTypeAdapter(Date::class.java, DateAdapter()) .registerTypeAdapter(OffsetDateTime::class.java, OffsetDateTimeAdapter()) .registerTypeAdapter(LocalDateTime::class.java, LocalDateTimeAdapter()) .registerTypeAdapter(LocalDate::class.java, LocalDateAdapter()) diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt index 697559b2ec1..9a45b67d9b1 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt @@ -1,14 +1,12 @@ package org.openapitools.client.infrastructure import com.squareup.moshi.Moshi -import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory import java.util.Date object Serializer { @JvmStatic val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe()) .add(OffsetDateTimeAdapter()) .add(LocalDateTimeAdapter()) .add(LocalDateAdapter()) diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt index 6465f148553..b80e0390de2 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt @@ -11,7 +11,6 @@ import java.util.Date object Serializer { @JvmStatic val gsonBuilder: GsonBuilder = GsonBuilder() - .registerTypeAdapter(Date::class.java, DateAdapter()) .registerTypeAdapter(OffsetDateTime::class.java, OffsetDateTimeAdapter()) .registerTypeAdapter(LocalDateTime::class.java, LocalDateTimeAdapter()) .registerTypeAdapter(LocalDate::class.java, LocalDateAdapter()) diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt index 06d9fe0bdc8..25447c818e6 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt @@ -1,13 +1,11 @@ package org.openapitools.client.infrastructure import com.squareup.moshi.Moshi -import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter import java.util.Date object Serializer { @JvmStatic val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe()) .add(OffsetDateTimeAdapter()) .add(LocalDateTimeAdapter()) .add(LocalDateAdapter()) diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt index 371e2a7013e..7265f759142 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt @@ -1,14 +1,12 @@ package org.openapitools.client.infrastructure import com.squareup.moshi.Moshi -import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory import java.util.Date internal object Serializer { @JvmStatic val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe()) .add(OffsetDateTimeAdapter()) .add(LocalDateTimeAdapter()) .add(LocalDateAdapter()) diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt index 697559b2ec1..9a45b67d9b1 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt @@ -1,14 +1,12 @@ package org.openapitools.client.infrastructure import com.squareup.moshi.Moshi -import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory import java.util.Date object Serializer { @JvmStatic val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe()) .add(OffsetDateTimeAdapter()) .add(LocalDateTimeAdapter()) .add(LocalDateAdapter()) diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt index 697559b2ec1..9a45b67d9b1 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt @@ -1,14 +1,12 @@ package org.openapitools.client.infrastructure import com.squareup.moshi.Moshi -import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory import java.util.Date object Serializer { @JvmStatic val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe()) .add(OffsetDateTimeAdapter()) .add(LocalDateTimeAdapter()) .add(LocalDateAdapter()) diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt index 697559b2ec1..9a45b67d9b1 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt @@ -1,14 +1,12 @@ package org.openapitools.client.infrastructure import com.squareup.moshi.Moshi -import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory import java.util.Date object Serializer { @JvmStatic val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe()) .add(OffsetDateTimeAdapter()) .add(LocalDateTimeAdapter()) .add(LocalDateAdapter()) diff --git a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt index 697559b2ec1..9a45b67d9b1 100644 --- a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt @@ -1,14 +1,12 @@ package org.openapitools.client.infrastructure import com.squareup.moshi.Moshi -import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory import java.util.Date object Serializer { @JvmStatic val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe()) .add(OffsetDateTimeAdapter()) .add(LocalDateTimeAdapter()) .add(LocalDateAdapter()) diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt index 697559b2ec1..9a45b67d9b1 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt @@ -1,14 +1,12 @@ package org.openapitools.client.infrastructure import com.squareup.moshi.Moshi -import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory import java.util.Date object Serializer { @JvmStatic val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe()) .add(OffsetDateTimeAdapter()) .add(LocalDateTimeAdapter()) .add(LocalDateAdapter()) diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt index 697559b2ec1..9a45b67d9b1 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt @@ -1,14 +1,12 @@ package org.openapitools.client.infrastructure import com.squareup.moshi.Moshi -import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory import java.util.Date object Serializer { @JvmStatic val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe()) .add(OffsetDateTimeAdapter()) .add(LocalDateTimeAdapter()) .add(LocalDateAdapter()) diff --git a/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION b/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION index d99e7162d01..3fa3b389a57 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0-SNAPSHOT \ No newline at end of file +5.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-uppercase-enum/build.gradle b/samples/client/petstore/kotlin-uppercase-enum/build.gradle index adff312f725..56be0bd0dd8 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/build.gradle +++ b/samples/client/petstore/kotlin-uppercase-enum/build.gradle @@ -33,6 +33,5 @@ dependencies { compile "com.squareup.moshi:moshi-kotlin:1.9.2" compile "com.squareup.moshi:moshi-adapters:1.9.2" compile "com.squareup.okhttp3:okhttp:4.2.2" - compile "com.squareup.okhttp3:logging-interceptor:4.4.0" testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" } diff --git a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt index 69b562becb0..9bd2790dc14 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt +++ b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt @@ -10,6 +10,7 @@ val Response.isInformational : Boolean get() = this.code in 100..199 /** * Provides an extension to evaluation whether the response is a 3xx code */ +@Suppress("EXTENSION_SHADOWED_BY_MEMBER") val Response.isRedirect : Boolean get() = this.code in 300..399 /** diff --git a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt index 697559b2ec1..9a45b67d9b1 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt @@ -1,14 +1,12 @@ package org.openapitools.client.infrastructure import com.squareup.moshi.Moshi -import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory import java.util.Date object Serializer { @JvmStatic val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe()) .add(OffsetDateTimeAdapter()) .add(LocalDateTimeAdapter()) .add(LocalDateAdapter()) diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt index 697559b2ec1..9a45b67d9b1 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt @@ -1,14 +1,12 @@ package org.openapitools.client.infrastructure import com.squareup.moshi.Moshi -import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory import java.util.Date object Serializer { @JvmStatic val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe()) .add(OffsetDateTimeAdapter()) .add(LocalDateTimeAdapter()) .add(LocalDateAdapter()) diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/.openapi-generator/FILES b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/.openapi-generator/FILES index 106ea4db2ae..2fcf69d6457 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/.openapi-generator/FILES @@ -27,12 +27,6 @@ docs/Foo.md docs/FormatTest.md docs/HasOnlyReadOnly.md docs/HealthCheckResult.md -docs/InlineObject.md -docs/InlineObject1.md -docs/InlineObject2.md -docs/InlineObject3.md -docs/InlineObject4.md -docs/InlineObject5.md docs/InlineResponseDefault.md docs/List.md docs/MapTest.md @@ -100,12 +94,6 @@ src/main/kotlin/org/openapitools/client/models/Foo.kt src/main/kotlin/org/openapitools/client/models/FormatTest.kt src/main/kotlin/org/openapitools/client/models/HasOnlyReadOnly.kt src/main/kotlin/org/openapitools/client/models/HealthCheckResult.kt -src/main/kotlin/org/openapitools/client/models/InlineObject.kt -src/main/kotlin/org/openapitools/client/models/InlineObject1.kt -src/main/kotlin/org/openapitools/client/models/InlineObject2.kt -src/main/kotlin/org/openapitools/client/models/InlineObject3.kt -src/main/kotlin/org/openapitools/client/models/InlineObject4.kt -src/main/kotlin/org/openapitools/client/models/InlineObject5.kt src/main/kotlin/org/openapitools/client/models/InlineResponseDefault.kt src/main/kotlin/org/openapitools/client/models/List.kt src/main/kotlin/org/openapitools/client/models/MapTest.kt diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/.openapi-generator/VERSION b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/.openapi-generator/VERSION index d99e7162d01..3fa3b389a57 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0-SNAPSHOT \ No newline at end of file +5.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/README.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/README.md index 7d37a628331..fca869bcf49 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/README.md +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/README.md @@ -101,12 +101,6 @@ Class | Method | HTTP request | Description - [org.openapitools.client.models.FormatTest](docs/FormatTest.md) - [org.openapitools.client.models.HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - [org.openapitools.client.models.HealthCheckResult](docs/HealthCheckResult.md) - - [org.openapitools.client.models.InlineObject](docs/InlineObject.md) - - [org.openapitools.client.models.InlineObject1](docs/InlineObject1.md) - - [org.openapitools.client.models.InlineObject2](docs/InlineObject2.md) - - [org.openapitools.client.models.InlineObject3](docs/InlineObject3.md) - - [org.openapitools.client.models.InlineObject4](docs/InlineObject4.md) - - [org.openapitools.client.models.InlineObject5](docs/InlineObject5.md) - [org.openapitools.client.models.InlineResponseDefault](docs/InlineResponseDefault.md) - [org.openapitools.client.models.List](docs/List.md) - [org.openapitools.client.models.MapTest](docs/MapTest.md) diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/build.gradle b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/build.gradle index 9c970542197..7bce53584b2 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/build.gradle +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/build.gradle @@ -30,8 +30,9 @@ test { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.0" compile "com.google.code.gson:gson:2.8.6" + compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.0" + compile "com.squareup.okhttp3:logging-interceptor:4.4.0" compile "com.squareup.retrofit2:retrofit:$retrofitVersion" compile "com.squareup.retrofit2:converter-gson:$retrofitVersion" compile "com.squareup.retrofit2:converter-scalars:$retrofitVersion" diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/FakeApi.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/FakeApi.md index 6220efdaa29..1ea11abbf1f 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/FakeApi.md @@ -460,13 +460,13 @@ To test enum parameters val apiClient = ApiClient() val webService = apiClient.createWebservice(FakeApi::class.java) -val enumHeaderStringArray : kotlin.Array = // kotlin.Array | Header parameter enum test (string array) +val enumHeaderStringArray : kotlin.collections.List = // kotlin.collections.List | Header parameter enum test (string array) val enumHeaderString : kotlin.String = enumHeaderString_example // kotlin.String | Header parameter enum test (string) -val enumQueryStringArray : kotlin.Array = // kotlin.Array | Query parameter enum test (string array) +val enumQueryStringArray : kotlin.collections.List = // kotlin.collections.List | Query parameter enum test (string array) val enumQueryString : kotlin.String = enumQueryString_example // kotlin.String | Query parameter enum test (string) val enumQueryInteger : kotlin.Int = 56 // kotlin.Int | Query parameter enum test (double) val enumQueryDouble : kotlin.Double = 1.2 // kotlin.Double | Query parameter enum test (double) -val enumFormStringArray : kotlin.Array = enumFormStringArray_example // kotlin.Array | Form parameter enum test (string array) +val enumFormStringArray : kotlin.collections.List = enumFormStringArray_example // kotlin.collections.List | Form parameter enum test (string array) val enumFormString : kotlin.String = enumFormString_example // kotlin.String | Form parameter enum test (string) launch(Dispatchers.IO) { @@ -478,14 +478,14 @@ launch(Dispatchers.IO) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **kotlin.String**| Header parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **kotlin.String**| Query parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)] + **enumHeaderStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] + **enumHeaderString** | **kotlin.String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] + **enumQueryStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] + **enumQueryString** | **kotlin.String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] **enumQueryInteger** | **kotlin.Int**| Query parameter enum test (double) | [optional] [enum: 1, -2] **enumQueryDouble** | **kotlin.Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Form parameter enum test (string array) | [optional] [default to "$"] [enum: >, $] - **enumFormString** | **kotlin.String**| Form parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)] + **enumFormStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Form parameter enum test (string array) | [optional] [default to $] [enum: >, $] + **enumFormString** | **kotlin.String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] ### Return type @@ -645,11 +645,11 @@ To test the collection format in query parameters val apiClient = ApiClient() val webService = apiClient.createWebservice(FakeApi::class.java) -val pipe : kotlin.Array = // kotlin.Array | -val ioutil : kotlin.Array = // kotlin.Array | -val http : kotlin.Array = // kotlin.Array | -val url : kotlin.Array = // kotlin.Array | -val context : kotlin.Array = // kotlin.Array | +val pipe : kotlin.collections.List = // kotlin.collections.List | +val ioutil : kotlin.collections.List = // kotlin.collections.List | +val http : kotlin.collections.List = // kotlin.collections.List | +val url : kotlin.collections.List = // kotlin.collections.List | +val context : kotlin.collections.List = // kotlin.collections.List | launch(Dispatchers.IO) { webService.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context) @@ -660,11 +660,11 @@ launch(Dispatchers.IO) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pipe** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| | - **ioutil** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| | - **http** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| | - **url** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| | - **context** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| | + **pipe** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| | + **ioutil** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| | + **http** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| | + **url** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| | + **context** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| | ### Return type diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/FormatTest.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/FormatTest.md index 0357923c97a..01b408499e7 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/FormatTest.md +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/FormatTest.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **int64** | **kotlin.Long** | | [optional] **float** | **kotlin.Float** | | [optional] **double** | **kotlin.Double** | | [optional] +**decimal** | [**java.math.BigDecimal**](java.math.BigDecimal.md) | | [optional] **string** | **kotlin.String** | | [optional] **binary** | [**java.io.File**](java.io.File.md) | | [optional] **dateTime** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/List.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/List.md index 13a09a4c414..f426d541a40 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/List.md +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/List.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**`123minusList`** | **kotlin.String** | | [optional] +**`123list`** | **kotlin.String** | | [optional] diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/PetApi.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/PetApi.md index 44d83290931..9b0310b42aa 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/PetApi.md +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/PetApi.md @@ -107,10 +107,10 @@ Multiple status values can be provided with comma separated strings val apiClient = ApiClient() val webService = apiClient.createWebservice(PetApi::class.java) -val status : kotlin.Array = // kotlin.Array | Status values that need to be considered for filter +val status : kotlin.collections.List = // kotlin.collections.List | Status values that need to be considered for filter launch(Dispatchers.IO) { - val result : kotlin.Array = webService.findPetsByStatus(status) + val result : kotlin.collections.List = webService.findPetsByStatus(status) } ``` @@ -118,11 +118,11 @@ launch(Dispatchers.IO) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] + **status** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] ### Return type -[**kotlin.Array<Pet>**](Pet.md) +[**kotlin.collections.List<Pet>**](Pet.md) ### Authorization @@ -147,10 +147,10 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 val apiClient = ApiClient() val webService = apiClient.createWebservice(PetApi::class.java) -val tags : kotlin.Array = // kotlin.Array | Tags to filter by +val tags : kotlin.collections.List = // kotlin.collections.List | Tags to filter by launch(Dispatchers.IO) { - val result : kotlin.Array = webService.findPetsByTags(tags) + val result : kotlin.collections.List = webService.findPetsByTags(tags) } ``` @@ -158,11 +158,11 @@ launch(Dispatchers.IO) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **tags** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Tags to filter by | + **tags** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Tags to filter by | ### Return type -[**kotlin.Array<Pet>**](Pet.md) +[**kotlin.collections.List<Pet>**](Pet.md) ### Authorization diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/SpecialModelName.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/SpecialModelName.md index 282649449d9..b179e705ab0 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/SpecialModelName.md +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/SpecialModelName.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket** | **kotlin.Long** | | [optional] +**dollarSpecialPropertyName** | **kotlin.Long** | | [optional] diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/UserApi.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/UserApi.md index 5cf48438773..c7b08232ddf 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/UserApi.md +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/UserApi.md @@ -66,7 +66,7 @@ Creates list of users with given input array val apiClient = ApiClient() val webService = apiClient.createWebservice(UserApi::class.java) -val user : kotlin.Array = // kotlin.Array | List of user object +val user : kotlin.collections.List = // kotlin.collections.List | List of user object launch(Dispatchers.IO) { webService.createUsersWithArrayInput(user) @@ -77,7 +77,7 @@ launch(Dispatchers.IO) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | [**kotlin.Array<User>**](User.md)| List of user object | + **user** | [**kotlin.collections.List<User>**](User.md)| List of user object | ### Return type @@ -104,7 +104,7 @@ Creates list of users with given input array val apiClient = ApiClient() val webService = apiClient.createWebservice(UserApi::class.java) -val user : kotlin.Array = // kotlin.Array | List of user object +val user : kotlin.collections.List = // kotlin.collections.List | List of user object launch(Dispatchers.IO) { webService.createUsersWithListInput(user) @@ -115,7 +115,7 @@ launch(Dispatchers.IO) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | [**kotlin.Array<User>**](User.md)| List of user object | + **user** | [**kotlin.collections.List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/AnotherFakeApi.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/AnotherFakeApi.kt index 8dc4e6d334e..18be349e9d6 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/AnotherFakeApi.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/AnotherFakeApi.kt @@ -15,7 +15,7 @@ interface AnotherFakeApi { * - 200: successful operation * * @param client client model - * @return [Client] + * @return [Client] */ @PATCH("another-fake/dummy") suspend fun call123testSpecialTags(@Body client: Client): Response diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt index 27bde56495c..0d4492f9cce 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt @@ -14,7 +14,7 @@ interface DefaultApi { * Responses: * - 0: response * - * @return [InlineResponseDefault] + * @return [InlineResponseDefault] */ @GET("foo") suspend fun fooGet(): Response diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt index 8e8d0a6bf63..05c879abb35 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt @@ -12,6 +12,8 @@ import org.openapitools.client.models.OuterComposite import org.openapitools.client.models.Pet import org.openapitools.client.models.User +import okhttp3.MultipartBody + interface FakeApi { /** * Health check endpoint @@ -19,7 +21,7 @@ interface FakeApi { * Responses: * - 200: The instance started successfully * - * @return [HealthCheckResult] + * @return [HealthCheckResult] */ @GET("fake/health") suspend fun fakeHealthGet(): Response @@ -33,10 +35,10 @@ interface FakeApi { * @param pet Pet object that needs to be added to the store * @param query1 query parameter (optional) * @param header1 header parameter (optional) - * @return [Unit] + * @return [Unit] */ @GET("fake/http-signature-test") - suspend fun fakeHttpSignatureTest(@Body pet: Pet, @Query("query_1") query1: kotlin.String, @Header("header_1") header1: kotlin.String): Response + suspend fun fakeHttpSignatureTest(@Body pet: Pet, @Query("query_1") query1: kotlin.String? = null, @Header("header_1") header1: kotlin.String): Response /** * @@ -45,7 +47,7 @@ interface FakeApi { * - 200: Output boolean * * @param body Input boolean as post body (optional) - * @return [kotlin.Boolean] + * @return [kotlin.Boolean] */ @POST("fake/outer/boolean") suspend fun fakeOuterBooleanSerialize(@Body body: kotlin.Boolean? = null): Response @@ -57,7 +59,7 @@ interface FakeApi { * - 200: Output composite * * @param outerComposite Input composite as post body (optional) - * @return [OuterComposite] + * @return [OuterComposite] */ @POST("fake/outer/composite") suspend fun fakeOuterCompositeSerialize(@Body outerComposite: OuterComposite? = null): Response @@ -69,7 +71,7 @@ interface FakeApi { * - 200: Output number * * @param body Input number as post body (optional) - * @return [java.math.BigDecimal] + * @return [java.math.BigDecimal] */ @POST("fake/outer/number") suspend fun fakeOuterNumberSerialize(@Body body: java.math.BigDecimal? = null): Response @@ -81,7 +83,7 @@ interface FakeApi { * - 200: Output string * * @param body Input string as post body (optional) - * @return [kotlin.String] + * @return [kotlin.String] */ @POST("fake/outer/string") suspend fun fakeOuterStringSerialize(@Body body: kotlin.String? = null): Response @@ -93,7 +95,7 @@ interface FakeApi { * - 200: Success * * @param fileSchemaTestClass - * @return [Unit] + * @return [Unit] */ @PUT("fake/body-with-file-schema") suspend fun testBodyWithFileSchema(@Body fileSchemaTestClass: FileSchemaTestClass): Response @@ -106,7 +108,7 @@ interface FakeApi { * * @param query * @param user - * @return [Unit] + * @return [Unit] */ @PUT("fake/body-with-query-params") suspend fun testBodyWithQueryParams(@Query("query") query: kotlin.String, @Body user: User): Response @@ -118,7 +120,7 @@ interface FakeApi { * - 200: successful operation * * @param client client model - * @return [Client] + * @return [Client] */ @PATCH("fake") suspend fun testClientModel(@Body client: Client): Response @@ -144,7 +146,7 @@ interface FakeApi { * @param dateTime None (optional) * @param password None (optional) * @param paramCallback None (optional) - * @return [Unit] + * @return [Unit] */ @FormUrlEncoded @POST("fake") @@ -158,18 +160,18 @@ interface FakeApi { * - 404: Not found * * @param enumHeaderStringArray Header parameter enum test (string array) (optional) - * @param enumHeaderString Header parameter enum test (string) (optional, default to "-efg") + * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) * @param enumQueryStringArray Query parameter enum test (string array) (optional) - * @param enumQueryString Query parameter enum test (string) (optional, default to "-efg") + * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to "$") - * @param enumFormString Form parameter enum test (string) (optional, default to "-efg") - * @return [Unit] + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormString Form parameter enum test (string) (optional, default to -efg) + * @return [Unit] */ @FormUrlEncoded @GET("fake") - suspend fun testEnumParameters(@Header("enum_header_string_array") enumHeaderStringArray: kotlin.Array, @Header("enum_header_string") enumHeaderString: kotlin.String, @Query("enum_query_string_array") enumQueryStringArray: kotlin.Array, @Query("enum_query_string") enumQueryString: kotlin.String, @Query("enum_query_integer") enumQueryInteger: kotlin.Int, @Query("enum_query_double") enumQueryDouble: kotlin.Double, @Field("enum_form_string_array") enumFormStringArray: kotlin.Array, @Field("enum_form_string") enumFormString: kotlin.String): Response + suspend fun testEnumParameters(@Header("enum_header_string_array") enumHeaderStringArray: kotlin.collections.List, @Header("enum_header_string") enumHeaderString: kotlin.String, @Query("enum_query_string_array") enumQueryStringArray: kotlin.collections.List? = null, @Query("enum_query_string") enumQueryString: kotlin.String? = null, @Query("enum_query_integer") enumQueryInteger: kotlin.Int? = null, @Query("enum_query_double") enumQueryDouble: kotlin.Double? = null, @Field("enum_form_string_array") enumFormStringArray: kotlin.collections.List, @Field("enum_form_string") enumFormString: kotlin.String): Response /** * Fake endpoint to test group parameters (optional) @@ -183,10 +185,10 @@ interface FakeApi { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return [Unit] + * @return [Unit] */ @DELETE("fake") - suspend fun testGroupParameters(@Query("required_string_group") requiredStringGroup: kotlin.Int, @Header("required_boolean_group") requiredBooleanGroup: kotlin.Boolean, @Query("required_int64_group") requiredInt64Group: kotlin.Long, @Query("string_group") stringGroup: kotlin.Int, @Header("boolean_group") booleanGroup: kotlin.Boolean, @Query("int64_group") int64Group: kotlin.Long): Response + suspend fun testGroupParameters(@Query("required_string_group") requiredStringGroup: kotlin.Int, @Header("required_boolean_group") requiredBooleanGroup: kotlin.Boolean, @Query("required_int64_group") requiredInt64Group: kotlin.Long, @Query("string_group") stringGroup: kotlin.Int? = null, @Header("boolean_group") booleanGroup: kotlin.Boolean, @Query("int64_group") int64Group: kotlin.Long? = null): Response /** * test inline additionalProperties @@ -195,7 +197,7 @@ interface FakeApi { * - 200: successful operation * * @param requestBody request body - * @return [Unit] + * @return [Unit] */ @POST("fake/inline-additionalProperties") suspend fun testInlineAdditionalProperties(@Body requestBody: kotlin.collections.Map): Response @@ -208,7 +210,7 @@ interface FakeApi { * * @param param field1 * @param param2 field2 - * @return [Unit] + * @return [Unit] */ @FormUrlEncoded @GET("fake/jsonFormData") @@ -225,9 +227,9 @@ interface FakeApi { * @param http * @param url * @param context - * @return [Unit] + * @return [Unit] */ @PUT("fake/test-query-paramters") - suspend fun testQueryParameterCollectionFormat(@Query("pipe") pipe: kotlin.Array, @Query("ioutil") ioutil: CSVParams, @Query("http") http: SSVParams, @Query("url") url: CSVParams, @Query("context") context: kotlin.Array): Response + suspend fun testQueryParameterCollectionFormat(@Query("pipe") pipe: kotlin.collections.List, @Query("ioutil") ioutil: CSVParams, @Query("http") http: SSVParams, @Query("url") url: CSVParams, @Query("context") context: kotlin.collections.List): Response } diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/FakeClassnameTags123Api.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/FakeClassnameTags123Api.kt index 773483df2a6..c4733d0835b 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/FakeClassnameTags123Api.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/FakeClassnameTags123Api.kt @@ -15,7 +15,7 @@ interface FakeClassnameTags123Api { * - 200: successful operation * * @param client client model - * @return [Client] + * @return [Client] */ @PATCH("fake_classname_test") suspend fun testClassname(@Body client: Client): Response diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index c4a95abd2f3..c149a3ffce3 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -8,15 +8,18 @@ import okhttp3.RequestBody import org.openapitools.client.models.ApiResponse import org.openapitools.client.models.Pet +import okhttp3.MultipartBody + interface PetApi { /** * Add a new pet to the store * * Responses: + * - 200: Successful operation * - 405: Invalid input * * @param pet Pet object that needs to be added to the store - * @return [Unit] + * @return [Unit] */ @POST("pet") suspend fun addPet(@Body pet: Pet): Response @@ -25,11 +28,12 @@ interface PetApi { * Deletes a pet * * Responses: + * - 200: Successful operation * - 400: Invalid pet value * * @param petId Pet id to delete * @param apiKey (optional) - * @return [Unit] + * @return [Unit] */ @DELETE("pet/{petId}") suspend fun deletePet(@Path("petId") petId: kotlin.Long, @Header("api_key") apiKey: kotlin.String): Response @@ -42,10 +46,10 @@ interface PetApi { * - 400: Invalid status value * * @param status Status values that need to be considered for filter - * @return [kotlin.Array] + * @return [kotlin.collections.List] */ @GET("pet/findByStatus") - suspend fun findPetsByStatus(@Query("status") status: CSVParams): Response> + suspend fun findPetsByStatus(@Query("status") status: CSVParams): Response> /** * Finds Pets by tags @@ -55,11 +59,11 @@ interface PetApi { * - 400: Invalid tag value * * @param tags Tags to filter by - * @return [kotlin.Array] + * @return [kotlin.collections.List] */ @Deprecated("This api was deprecated") @GET("pet/findByTags") - suspend fun findPetsByTags(@Query("tags") tags: CSVParams): Response> + suspend fun findPetsByTags(@Query("tags") tags: CSVParams): Response> /** * Find pet by ID @@ -70,7 +74,7 @@ interface PetApi { * - 404: Pet not found * * @param petId ID of pet to return - * @return [Pet] + * @return [Pet] */ @GET("pet/{petId}") suspend fun getPetById(@Path("petId") petId: kotlin.Long): Response @@ -79,12 +83,13 @@ interface PetApi { * Update an existing pet * * Responses: + * - 200: Successful operation * - 400: Invalid ID supplied * - 404: Pet not found * - 405: Validation exception * * @param pet Pet object that needs to be added to the store - * @return [Unit] + * @return [Unit] */ @PUT("pet") suspend fun updatePet(@Body pet: Pet): Response @@ -93,12 +98,13 @@ interface PetApi { * Updates a pet in the store with form data * * Responses: + * - 200: Successful operation * - 405: Invalid input * * @param petId ID of pet that needs to be updated * @param name Updated name of the pet (optional) * @param status Updated status of the pet (optional) - * @return [Unit] + * @return [Unit] */ @FormUrlEncoded @POST("pet/{petId}") @@ -113,7 +119,7 @@ interface PetApi { * @param petId ID of pet to update * @param additionalMetadata Additional data to pass to server (optional) * @param file file to upload (optional) - * @return [ApiResponse] + * @return [ApiResponse] */ @Multipart @POST("pet/{petId}/uploadImage") @@ -128,7 +134,7 @@ interface PetApi { * @param petId ID of pet to update * @param requiredFile file to upload * @param additionalMetadata Additional data to pass to server (optional) - * @return [ApiResponse] + * @return [ApiResponse] */ @Multipart @POST("fake/{petId}/uploadImageWithRequiredFile") diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 7171b3d45c5..13b1b964164 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -16,7 +16,7 @@ interface StoreApi { * - 404: Order not found * * @param orderId ID of the order that needs to be deleted - * @return [Unit] + * @return [Unit] */ @DELETE("store/order/{order_id}") suspend fun deleteOrder(@Path("order_id") orderId: kotlin.String): Response @@ -27,7 +27,7 @@ interface StoreApi { * Responses: * - 200: successful operation * - * @return [kotlin.collections.Map] + * @return [kotlin.collections.Map] */ @GET("store/inventory") suspend fun getInventory(): Response> @@ -41,7 +41,7 @@ interface StoreApi { * - 404: Order not found * * @param orderId ID of pet that needs to be fetched - * @return [Order] + * @return [Order] */ @GET("store/order/{order_id}") suspend fun getOrderById(@Path("order_id") orderId: kotlin.Long): Response @@ -54,7 +54,7 @@ interface StoreApi { * - 400: Invalid Order * * @param order order placed for purchasing the pet - * @return [Order] + * @return [Order] */ @POST("store/order") suspend fun placeOrder(@Body order: Order): Response diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 2d0bd056b8e..5faf314cdde 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -15,7 +15,7 @@ interface UserApi { * - 0: successful operation * * @param user Created user object - * @return [Unit] + * @return [Unit] */ @POST("user") suspend fun createUser(@Body user: User): Response @@ -27,10 +27,10 @@ interface UserApi { * - 0: successful operation * * @param user List of user object - * @return [Unit] + * @return [Unit] */ @POST("user/createWithArray") - suspend fun createUsersWithArrayInput(@Body user: kotlin.Array): Response + suspend fun createUsersWithArrayInput(@Body user: kotlin.collections.List): Response /** * Creates list of users with given input array @@ -39,10 +39,10 @@ interface UserApi { * - 0: successful operation * * @param user List of user object - * @return [Unit] + * @return [Unit] */ @POST("user/createWithList") - suspend fun createUsersWithListInput(@Body user: kotlin.Array): Response + suspend fun createUsersWithListInput(@Body user: kotlin.collections.List): Response /** * Delete user @@ -52,7 +52,7 @@ interface UserApi { * - 404: User not found * * @param username The name that needs to be deleted - * @return [Unit] + * @return [Unit] */ @DELETE("user/{username}") suspend fun deleteUser(@Path("username") username: kotlin.String): Response @@ -66,7 +66,7 @@ interface UserApi { * - 404: User not found * * @param username The name that needs to be fetched. Use user1 for testing. - * @return [User] + * @return [User] */ @GET("user/{username}") suspend fun getUserByName(@Path("username") username: kotlin.String): Response @@ -80,7 +80,7 @@ interface UserApi { * * @param username The user name for login * @param password The password for login in clear text - * @return [kotlin.String] + * @return [kotlin.String] */ @GET("user/login") suspend fun loginUser(@Query("username") username: kotlin.String, @Query("password") password: kotlin.String): Response @@ -91,7 +91,7 @@ interface UserApi { * Responses: * - 0: successful operation * - * @return [Unit] + * @return [Unit] */ @GET("user/logout") suspend fun logoutUser(): Response @@ -105,7 +105,7 @@ interface UserApi { * * @param username name that need to be deleted * @param user Updated user object - * @return [Unit] + * @return [Unit] */ @PUT("user/{username}") suspend fun updateUser(@Path("username") username: kotlin.String, @Body user: User): Response diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index d40b6349782..faf5bd523fe 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -21,7 +21,8 @@ import retrofit2.converter.gson.GsonConverterFactory class ApiClient( private var baseUrl: String = defaultBasePath, private val okHttpClientBuilder: OkHttpClient.Builder? = null, - private val serializerBuilder: GsonBuilder = Serializer.gsonBuilder + private val serializerBuilder: GsonBuilder = Serializer.gsonBuilder, + private val okHttpClient : OkHttpClient? = null ) { private val apiAuthorizations = mutableMapOf() var logger: ((String) -> Unit)? = null @@ -72,7 +73,7 @@ class ApiClient( baseUrl: String = defaultBasePath, okHttpClientBuilder: OkHttpClient.Builder? = null, serializerBuilder: GsonBuilder = Serializer.gsonBuilder, - authName: String, + authName: String, bearerToken: String ) : this(baseUrl, okHttpClientBuilder, serializerBuilder, arrayOf(authName)) { setBearerToken(bearerToken) @@ -82,8 +83,8 @@ class ApiClient( baseUrl: String = defaultBasePath, okHttpClientBuilder: OkHttpClient.Builder? = null, serializerBuilder: GsonBuilder = Serializer.gsonBuilder, - authName: String, - username: String, + authName: String, + username: String, password: String ) : this(baseUrl, okHttpClientBuilder, serializerBuilder, arrayOf(authName)) { setCredentials(username, password) @@ -93,10 +94,10 @@ class ApiClient( baseUrl: String = defaultBasePath, okHttpClientBuilder: OkHttpClient.Builder? = null, serializerBuilder: GsonBuilder = Serializer.gsonBuilder, - authName: String, - clientId: String, - secret: String, - username: String, + authName: String, + clientId: String, + secret: String, + username: String, password: String ) : this(baseUrl, okHttpClientBuilder, serializerBuilder, arrayOf(authName)) { getTokenEndPoint() @@ -224,7 +225,8 @@ class ApiClient( } fun createService(serviceClass: Class): S { - return retrofitBuilder.client(clientBuilder.build()).build().create(serviceClass) + val usedClient = this.okHttpClient ?: clientBuilder.build() + return retrofitBuilder.client(usedClient).build().create(serviceClass) } private fun normalizeBaseUrl() { @@ -242,10 +244,10 @@ class ApiClient( } } - companion object { + companion object { @JvmStatic val defaultBasePath: String by lazy { System.getProperties().getProperty("org.openapitools.client.baseUrl", "http://petstore.swagger.io:80/v2") } } -} \ No newline at end of file +} diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt index 6465f148553..b80e0390de2 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt @@ -11,7 +11,6 @@ import java.util.Date object Serializer { @JvmStatic val gsonBuilder: GsonBuilder = GsonBuilder() - .registerTypeAdapter(Date::class.java, DateAdapter()) .registerTypeAdapter(OffsetDateTime::class.java, OffsetDateTimeAdapter()) .registerTypeAdapter(LocalDateTime::class.java, LocalDateTimeAdapter()) .registerTypeAdapter(LocalDate::class.java, LocalDateAdapter()) diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/models/FormatTest.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/models/FormatTest.kt index d6968333776..54c88ca8e90 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/models/FormatTest.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/models/FormatTest.kt @@ -26,6 +26,7 @@ import java.io.Serializable * @param int64 * @param float * @param double + * @param decimal * @param string * @param binary * @param dateTime @@ -53,6 +54,8 @@ data class FormatTest ( val float: kotlin.Float? = null, @SerializedName("double") val double: kotlin.Double? = null, + @SerializedName("decimal") + val decimal: java.math.BigDecimal? = null, @SerializedName("string") val string: kotlin.String? = null, @SerializedName("binary") diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/models/List.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/models/List.kt index 8de0d080ced..d614d69d93b 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/models/List.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/models/List.kt @@ -17,12 +17,12 @@ import java.io.Serializable /** * - * @param `123minusList` + * @param `123list` */ data class List ( @SerializedName("123-list") - val `123minusList`: kotlin.String? = null + val `123list`: kotlin.String? = null ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/models/SpecialModelname.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/models/SpecialModelname.kt index 23cd075e530..2dfb12b8b69 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/models/SpecialModelname.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/models/SpecialModelname.kt @@ -17,12 +17,12 @@ import java.io.Serializable /** * - * @param dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket + * @param dollarSpecialPropertyName */ data class SpecialModelname ( @SerializedName("\$special[property.name]") - val dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket: kotlin.Long? = null + val dollarSpecialPropertyName: kotlin.Long? = null ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/.openapi-generator/FILES b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/.openapi-generator/FILES index 106ea4db2ae..2fcf69d6457 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/.openapi-generator/FILES @@ -27,12 +27,6 @@ docs/Foo.md docs/FormatTest.md docs/HasOnlyReadOnly.md docs/HealthCheckResult.md -docs/InlineObject.md -docs/InlineObject1.md -docs/InlineObject2.md -docs/InlineObject3.md -docs/InlineObject4.md -docs/InlineObject5.md docs/InlineResponseDefault.md docs/List.md docs/MapTest.md @@ -100,12 +94,6 @@ src/main/kotlin/org/openapitools/client/models/Foo.kt src/main/kotlin/org/openapitools/client/models/FormatTest.kt src/main/kotlin/org/openapitools/client/models/HasOnlyReadOnly.kt src/main/kotlin/org/openapitools/client/models/HealthCheckResult.kt -src/main/kotlin/org/openapitools/client/models/InlineObject.kt -src/main/kotlin/org/openapitools/client/models/InlineObject1.kt -src/main/kotlin/org/openapitools/client/models/InlineObject2.kt -src/main/kotlin/org/openapitools/client/models/InlineObject3.kt -src/main/kotlin/org/openapitools/client/models/InlineObject4.kt -src/main/kotlin/org/openapitools/client/models/InlineObject5.kt src/main/kotlin/org/openapitools/client/models/InlineResponseDefault.kt src/main/kotlin/org/openapitools/client/models/List.kt src/main/kotlin/org/openapitools/client/models/MapTest.kt diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/.openapi-generator/VERSION b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/.openapi-generator/VERSION index d99e7162d01..3fa3b389a57 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0-SNAPSHOT \ No newline at end of file +5.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/README.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/README.md index 7d37a628331..fca869bcf49 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/README.md +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/README.md @@ -101,12 +101,6 @@ Class | Method | HTTP request | Description - [org.openapitools.client.models.FormatTest](docs/FormatTest.md) - [org.openapitools.client.models.HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - [org.openapitools.client.models.HealthCheckResult](docs/HealthCheckResult.md) - - [org.openapitools.client.models.InlineObject](docs/InlineObject.md) - - [org.openapitools.client.models.InlineObject1](docs/InlineObject1.md) - - [org.openapitools.client.models.InlineObject2](docs/InlineObject2.md) - - [org.openapitools.client.models.InlineObject3](docs/InlineObject3.md) - - [org.openapitools.client.models.InlineObject4](docs/InlineObject4.md) - - [org.openapitools.client.models.InlineObject5](docs/InlineObject5.md) - [org.openapitools.client.models.InlineResponseDefault](docs/InlineResponseDefault.md) - [org.openapitools.client.models.List](docs/List.md) - [org.openapitools.client.models.MapTest](docs/MapTest.md) diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/build.gradle b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/build.gradle index a6f5c0fe492..d459b42d020 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/build.gradle +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/build.gradle @@ -31,8 +31,9 @@ test { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.0" compile "com.google.code.gson:gson:2.8.6" + compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.0" + compile "com.squareup.okhttp3:logging-interceptor:4.4.0" compile "io.reactivex:rxjava:$rxJavaVersion" compile "com.squareup.retrofit2:adapter-rxjava:$retrofitVersion" compile "com.squareup.retrofit2:retrofit:$retrofitVersion" diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/FakeApi.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/FakeApi.md index 6f5c1cbb479..f94e91773ad 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/FakeApi.md @@ -440,13 +440,13 @@ To test enum parameters val apiClient = ApiClient() val webService = apiClient.createWebservice(FakeApi::class.java) -val enumHeaderStringArray : kotlin.Array = // kotlin.Array | Header parameter enum test (string array) +val enumHeaderStringArray : kotlin.collections.List = // kotlin.collections.List | Header parameter enum test (string array) val enumHeaderString : kotlin.String = enumHeaderString_example // kotlin.String | Header parameter enum test (string) -val enumQueryStringArray : kotlin.Array = // kotlin.Array | Query parameter enum test (string array) +val enumQueryStringArray : kotlin.collections.List = // kotlin.collections.List | Query parameter enum test (string array) val enumQueryString : kotlin.String = enumQueryString_example // kotlin.String | Query parameter enum test (string) val enumQueryInteger : kotlin.Int = 56 // kotlin.Int | Query parameter enum test (double) val enumQueryDouble : kotlin.Double = 1.2 // kotlin.Double | Query parameter enum test (double) -val enumFormStringArray : kotlin.Array = enumFormStringArray_example // kotlin.Array | Form parameter enum test (string array) +val enumFormStringArray : kotlin.collections.List = enumFormStringArray_example // kotlin.collections.List | Form parameter enum test (string array) val enumFormString : kotlin.String = enumFormString_example // kotlin.String | Form parameter enum test (string) webService.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) @@ -456,14 +456,14 @@ webService.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQuery Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **kotlin.String**| Header parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **kotlin.String**| Query parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)] + **enumHeaderStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] + **enumHeaderString** | **kotlin.String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] + **enumQueryStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] + **enumQueryString** | **kotlin.String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] **enumQueryInteger** | **kotlin.Int**| Query parameter enum test (double) | [optional] [enum: 1, -2] **enumQueryDouble** | **kotlin.Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Form parameter enum test (string array) | [optional] [default to "$"] [enum: >, $] - **enumFormString** | **kotlin.String**| Form parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)] + **enumFormStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Form parameter enum test (string array) | [optional] [default to $] [enum: >, $] + **enumFormString** | **kotlin.String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] ### Return type @@ -617,11 +617,11 @@ To test the collection format in query parameters val apiClient = ApiClient() val webService = apiClient.createWebservice(FakeApi::class.java) -val pipe : kotlin.Array = // kotlin.Array | -val ioutil : kotlin.Array = // kotlin.Array | -val http : kotlin.Array = // kotlin.Array | -val url : kotlin.Array = // kotlin.Array | -val context : kotlin.Array = // kotlin.Array | +val pipe : kotlin.collections.List = // kotlin.collections.List | +val ioutil : kotlin.collections.List = // kotlin.collections.List | +val http : kotlin.collections.List = // kotlin.collections.List | +val url : kotlin.collections.List = // kotlin.collections.List | +val context : kotlin.collections.List = // kotlin.collections.List | webService.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context) ``` @@ -630,11 +630,11 @@ webService.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pipe** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| | - **ioutil** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| | - **http** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| | - **url** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| | - **context** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| | + **pipe** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| | + **ioutil** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| | + **http** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| | + **url** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| | + **context** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| | ### Return type diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/FormatTest.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/FormatTest.md index 0357923c97a..01b408499e7 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/FormatTest.md +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/FormatTest.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **int64** | **kotlin.Long** | | [optional] **float** | **kotlin.Float** | | [optional] **double** | **kotlin.Double** | | [optional] +**decimal** | [**java.math.BigDecimal**](java.math.BigDecimal.md) | | [optional] **string** | **kotlin.String** | | [optional] **binary** | [**java.io.File**](java.io.File.md) | | [optional] **dateTime** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/List.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/List.md index 13a09a4c414..f426d541a40 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/List.md +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/List.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**`123minusList`** | **kotlin.String** | | [optional] +**`123list`** | **kotlin.String** | | [optional] diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/PetApi.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/PetApi.md index 7445920ab03..32d031b57a9 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/PetApi.md +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/PetApi.md @@ -103,20 +103,20 @@ Multiple status values can be provided with comma separated strings val apiClient = ApiClient() val webService = apiClient.createWebservice(PetApi::class.java) -val status : kotlin.Array = // kotlin.Array | Status values that need to be considered for filter +val status : kotlin.collections.List = // kotlin.collections.List | Status values that need to be considered for filter -val result : kotlin.Array = webService.findPetsByStatus(status) +val result : kotlin.collections.List = webService.findPetsByStatus(status) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] + **status** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] ### Return type -[**kotlin.Array<Pet>**](Pet.md) +[**kotlin.collections.List<Pet>**](Pet.md) ### Authorization @@ -141,20 +141,20 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 val apiClient = ApiClient() val webService = apiClient.createWebservice(PetApi::class.java) -val tags : kotlin.Array = // kotlin.Array | Tags to filter by +val tags : kotlin.collections.List = // kotlin.collections.List | Tags to filter by -val result : kotlin.Array = webService.findPetsByTags(tags) +val result : kotlin.collections.List = webService.findPetsByTags(tags) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **tags** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Tags to filter by | + **tags** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Tags to filter by | ### Return type -[**kotlin.Array<Pet>**](Pet.md) +[**kotlin.collections.List<Pet>**](Pet.md) ### Authorization diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/SpecialModelName.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/SpecialModelName.md index 282649449d9..b179e705ab0 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/SpecialModelName.md +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/SpecialModelName.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket** | **kotlin.Long** | | [optional] +**dollarSpecialPropertyName** | **kotlin.Long** | | [optional] diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/UserApi.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/UserApi.md index b667d3b0a60..bb904d243cf 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/UserApi.md +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/UserApi.md @@ -64,7 +64,7 @@ Creates list of users with given input array val apiClient = ApiClient() val webService = apiClient.createWebservice(UserApi::class.java) -val user : kotlin.Array = // kotlin.Array | List of user object +val user : kotlin.collections.List = // kotlin.collections.List | List of user object webService.createUsersWithArrayInput(user) ``` @@ -73,7 +73,7 @@ webService.createUsersWithArrayInput(user) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | [**kotlin.Array<User>**](User.md)| List of user object | + **user** | [**kotlin.collections.List<User>**](User.md)| List of user object | ### Return type @@ -100,7 +100,7 @@ Creates list of users with given input array val apiClient = ApiClient() val webService = apiClient.createWebservice(UserApi::class.java) -val user : kotlin.Array = // kotlin.Array | List of user object +val user : kotlin.collections.List = // kotlin.collections.List | List of user object webService.createUsersWithListInput(user) ``` @@ -109,7 +109,7 @@ webService.createUsersWithListInput(user) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | [**kotlin.Array<User>**](User.md)| List of user object | + **user** | [**kotlin.collections.List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/AnotherFakeApi.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/AnotherFakeApi.kt index e2a7aad9b72..2a83ecce73e 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/AnotherFakeApi.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/AnotherFakeApi.kt @@ -15,7 +15,7 @@ interface AnotherFakeApi { * - 200: successful operation * * @param client client model - * @return [Call]<[Client]> + * @return [Call]<[Client]> */ @PATCH("another-fake/dummy") fun call123testSpecialTags(@Body client: Client): Observable diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt index 6d4eae90743..c4aa25b4eea 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt @@ -14,7 +14,7 @@ interface DefaultApi { * Responses: * - 0: response * - * @return [Call]<[InlineResponseDefault]> + * @return [Call]<[InlineResponseDefault]> */ @GET("foo") fun fooGet(): Observable diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt index cf681d2069c..b2971b603dd 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt @@ -12,6 +12,8 @@ import org.openapitools.client.models.OuterComposite import org.openapitools.client.models.Pet import org.openapitools.client.models.User +import okhttp3.MultipartBody + interface FakeApi { /** * Health check endpoint @@ -19,7 +21,7 @@ interface FakeApi { * Responses: * - 200: The instance started successfully * - * @return [Call]<[HealthCheckResult]> + * @return [Call]<[HealthCheckResult]> */ @GET("fake/health") fun fakeHealthGet(): Observable @@ -33,10 +35,10 @@ interface FakeApi { * @param pet Pet object that needs to be added to the store * @param query1 query parameter (optional) * @param header1 header parameter (optional) - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @GET("fake/http-signature-test") - fun fakeHttpSignatureTest(@Body pet: Pet, @Query("query_1") query1: kotlin.String, @Header("header_1") header1: kotlin.String): Observable + fun fakeHttpSignatureTest(@Body pet: Pet, @Query("query_1") query1: kotlin.String? = null, @Header("header_1") header1: kotlin.String): Observable /** * @@ -45,7 +47,7 @@ interface FakeApi { * - 200: Output boolean * * @param body Input boolean as post body (optional) - * @return [Call]<[kotlin.Boolean]> + * @return [Call]<[kotlin.Boolean]> */ @POST("fake/outer/boolean") fun fakeOuterBooleanSerialize(@Body body: kotlin.Boolean? = null): Observable @@ -57,7 +59,7 @@ interface FakeApi { * - 200: Output composite * * @param outerComposite Input composite as post body (optional) - * @return [Call]<[OuterComposite]> + * @return [Call]<[OuterComposite]> */ @POST("fake/outer/composite") fun fakeOuterCompositeSerialize(@Body outerComposite: OuterComposite? = null): Observable @@ -69,7 +71,7 @@ interface FakeApi { * - 200: Output number * * @param body Input number as post body (optional) - * @return [Call]<[java.math.BigDecimal]> + * @return [Call]<[java.math.BigDecimal]> */ @POST("fake/outer/number") fun fakeOuterNumberSerialize(@Body body: java.math.BigDecimal? = null): Observable @@ -81,7 +83,7 @@ interface FakeApi { * - 200: Output string * * @param body Input string as post body (optional) - * @return [Call]<[kotlin.String]> + * @return [Call]<[kotlin.String]> */ @POST("fake/outer/string") fun fakeOuterStringSerialize(@Body body: kotlin.String? = null): Observable @@ -93,7 +95,7 @@ interface FakeApi { * - 200: Success * * @param fileSchemaTestClass - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @PUT("fake/body-with-file-schema") fun testBodyWithFileSchema(@Body fileSchemaTestClass: FileSchemaTestClass): Observable @@ -106,7 +108,7 @@ interface FakeApi { * * @param query * @param user - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @PUT("fake/body-with-query-params") fun testBodyWithQueryParams(@Query("query") query: kotlin.String, @Body user: User): Observable @@ -118,7 +120,7 @@ interface FakeApi { * - 200: successful operation * * @param client client model - * @return [Call]<[Client]> + * @return [Call]<[Client]> */ @PATCH("fake") fun testClientModel(@Body client: Client): Observable @@ -144,7 +146,7 @@ interface FakeApi { * @param dateTime None (optional) * @param password None (optional) * @param paramCallback None (optional) - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @FormUrlEncoded @POST("fake") @@ -158,18 +160,18 @@ interface FakeApi { * - 404: Not found * * @param enumHeaderStringArray Header parameter enum test (string array) (optional) - * @param enumHeaderString Header parameter enum test (string) (optional, default to "-efg") + * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) * @param enumQueryStringArray Query parameter enum test (string array) (optional) - * @param enumQueryString Query parameter enum test (string) (optional, default to "-efg") + * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to "$") - * @param enumFormString Form parameter enum test (string) (optional, default to "-efg") - * @return [Call]<[Unit]> + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormString Form parameter enum test (string) (optional, default to -efg) + * @return [Call]<[Unit]> */ @FormUrlEncoded @GET("fake") - fun testEnumParameters(@Header("enum_header_string_array") enumHeaderStringArray: kotlin.Array, @Header("enum_header_string") enumHeaderString: kotlin.String, @Query("enum_query_string_array") enumQueryStringArray: kotlin.Array, @Query("enum_query_string") enumQueryString: kotlin.String, @Query("enum_query_integer") enumQueryInteger: kotlin.Int, @Query("enum_query_double") enumQueryDouble: kotlin.Double, @Field("enum_form_string_array") enumFormStringArray: kotlin.Array, @Field("enum_form_string") enumFormString: kotlin.String): Observable + fun testEnumParameters(@Header("enum_header_string_array") enumHeaderStringArray: kotlin.collections.List, @Header("enum_header_string") enumHeaderString: kotlin.String, @Query("enum_query_string_array") enumQueryStringArray: kotlin.collections.List? = null, @Query("enum_query_string") enumQueryString: kotlin.String? = null, @Query("enum_query_integer") enumQueryInteger: kotlin.Int? = null, @Query("enum_query_double") enumQueryDouble: kotlin.Double? = null, @Field("enum_form_string_array") enumFormStringArray: kotlin.collections.List, @Field("enum_form_string") enumFormString: kotlin.String): Observable /** * Fake endpoint to test group parameters (optional) @@ -183,10 +185,10 @@ interface FakeApi { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @DELETE("fake") - fun testGroupParameters(@Query("required_string_group") requiredStringGroup: kotlin.Int, @Header("required_boolean_group") requiredBooleanGroup: kotlin.Boolean, @Query("required_int64_group") requiredInt64Group: kotlin.Long, @Query("string_group") stringGroup: kotlin.Int, @Header("boolean_group") booleanGroup: kotlin.Boolean, @Query("int64_group") int64Group: kotlin.Long): Observable + fun testGroupParameters(@Query("required_string_group") requiredStringGroup: kotlin.Int, @Header("required_boolean_group") requiredBooleanGroup: kotlin.Boolean, @Query("required_int64_group") requiredInt64Group: kotlin.Long, @Query("string_group") stringGroup: kotlin.Int? = null, @Header("boolean_group") booleanGroup: kotlin.Boolean, @Query("int64_group") int64Group: kotlin.Long? = null): Observable /** * test inline additionalProperties @@ -195,7 +197,7 @@ interface FakeApi { * - 200: successful operation * * @param requestBody request body - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @POST("fake/inline-additionalProperties") fun testInlineAdditionalProperties(@Body requestBody: kotlin.collections.Map): Observable @@ -208,7 +210,7 @@ interface FakeApi { * * @param param field1 * @param param2 field2 - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @FormUrlEncoded @GET("fake/jsonFormData") @@ -225,9 +227,9 @@ interface FakeApi { * @param http * @param url * @param context - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @PUT("fake/test-query-paramters") - fun testQueryParameterCollectionFormat(@Query("pipe") pipe: kotlin.Array, @Query("ioutil") ioutil: CSVParams, @Query("http") http: SSVParams, @Query("url") url: CSVParams, @Query("context") context: kotlin.Array): Observable + fun testQueryParameterCollectionFormat(@Query("pipe") pipe: kotlin.collections.List, @Query("ioutil") ioutil: CSVParams, @Query("http") http: SSVParams, @Query("url") url: CSVParams, @Query("context") context: kotlin.collections.List): Observable } diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/FakeClassnameTags123Api.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/FakeClassnameTags123Api.kt index 5c6c95d2db4..4a5856cdd0f 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/FakeClassnameTags123Api.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/FakeClassnameTags123Api.kt @@ -15,7 +15,7 @@ interface FakeClassnameTags123Api { * - 200: successful operation * * @param client client model - * @return [Call]<[Client]> + * @return [Call]<[Client]> */ @PATCH("fake_classname_test") fun testClassname(@Body client: Client): Observable diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index 8532622d639..7564e9260db 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -8,15 +8,18 @@ import rx.Observable import org.openapitools.client.models.ApiResponse import org.openapitools.client.models.Pet +import okhttp3.MultipartBody + interface PetApi { /** * Add a new pet to the store * * Responses: + * - 200: Successful operation * - 405: Invalid input * * @param pet Pet object that needs to be added to the store - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @POST("pet") fun addPet(@Body pet: Pet): Observable @@ -25,11 +28,12 @@ interface PetApi { * Deletes a pet * * Responses: + * - 200: Successful operation * - 400: Invalid pet value * * @param petId Pet id to delete * @param apiKey (optional) - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @DELETE("pet/{petId}") fun deletePet(@Path("petId") petId: kotlin.Long, @Header("api_key") apiKey: kotlin.String): Observable @@ -42,10 +46,10 @@ interface PetApi { * - 400: Invalid status value * * @param status Status values that need to be considered for filter - * @return [Call]<[kotlin.Array]> + * @return [Call]<[kotlin.collections.List]> */ @GET("pet/findByStatus") - fun findPetsByStatus(@Query("status") status: CSVParams): Observable> + fun findPetsByStatus(@Query("status") status: CSVParams): Observable> /** * Finds Pets by tags @@ -55,11 +59,11 @@ interface PetApi { * - 400: Invalid tag value * * @param tags Tags to filter by - * @return [Call]<[kotlin.Array]> + * @return [Call]<[kotlin.collections.List]> */ @Deprecated("This api was deprecated") @GET("pet/findByTags") - fun findPetsByTags(@Query("tags") tags: CSVParams): Observable> + fun findPetsByTags(@Query("tags") tags: CSVParams): Observable> /** * Find pet by ID @@ -70,7 +74,7 @@ interface PetApi { * - 404: Pet not found * * @param petId ID of pet to return - * @return [Call]<[Pet]> + * @return [Call]<[Pet]> */ @GET("pet/{petId}") fun getPetById(@Path("petId") petId: kotlin.Long): Observable @@ -79,12 +83,13 @@ interface PetApi { * Update an existing pet * * Responses: + * - 200: Successful operation * - 400: Invalid ID supplied * - 404: Pet not found * - 405: Validation exception * * @param pet Pet object that needs to be added to the store - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @PUT("pet") fun updatePet(@Body pet: Pet): Observable @@ -93,12 +98,13 @@ interface PetApi { * Updates a pet in the store with form data * * Responses: + * - 200: Successful operation * - 405: Invalid input * * @param petId ID of pet that needs to be updated * @param name Updated name of the pet (optional) * @param status Updated status of the pet (optional) - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @FormUrlEncoded @POST("pet/{petId}") @@ -113,7 +119,7 @@ interface PetApi { * @param petId ID of pet to update * @param additionalMetadata Additional data to pass to server (optional) * @param file file to upload (optional) - * @return [Call]<[ApiResponse]> + * @return [Call]<[ApiResponse]> */ @Multipart @POST("pet/{petId}/uploadImage") @@ -128,7 +134,7 @@ interface PetApi { * @param petId ID of pet to update * @param requiredFile file to upload * @param additionalMetadata Additional data to pass to server (optional) - * @return [Call]<[ApiResponse]> + * @return [Call]<[ApiResponse]> */ @Multipart @POST("fake/{petId}/uploadImageWithRequiredFile") diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index fef564f9465..5b2aabc8fd6 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -16,7 +16,7 @@ interface StoreApi { * - 404: Order not found * * @param orderId ID of the order that needs to be deleted - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @DELETE("store/order/{order_id}") fun deleteOrder(@Path("order_id") orderId: kotlin.String): Observable @@ -27,7 +27,7 @@ interface StoreApi { * Responses: * - 200: successful operation * - * @return [Call]<[kotlin.collections.Map]> + * @return [Call]<[kotlin.collections.Map]> */ @GET("store/inventory") fun getInventory(): Observable> @@ -41,7 +41,7 @@ interface StoreApi { * - 404: Order not found * * @param orderId ID of pet that needs to be fetched - * @return [Call]<[Order]> + * @return [Call]<[Order]> */ @GET("store/order/{order_id}") fun getOrderById(@Path("order_id") orderId: kotlin.Long): Observable @@ -54,7 +54,7 @@ interface StoreApi { * - 400: Invalid Order * * @param order order placed for purchasing the pet - * @return [Call]<[Order]> + * @return [Call]<[Order]> */ @POST("store/order") fun placeOrder(@Body order: Order): Observable diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 465705c8ef7..6884a8b85c1 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -15,7 +15,7 @@ interface UserApi { * - 0: successful operation * * @param user Created user object - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @POST("user") fun createUser(@Body user: User): Observable @@ -27,10 +27,10 @@ interface UserApi { * - 0: successful operation * * @param user List of user object - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @POST("user/createWithArray") - fun createUsersWithArrayInput(@Body user: kotlin.Array): Observable + fun createUsersWithArrayInput(@Body user: kotlin.collections.List): Observable /** * Creates list of users with given input array @@ -39,10 +39,10 @@ interface UserApi { * - 0: successful operation * * @param user List of user object - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @POST("user/createWithList") - fun createUsersWithListInput(@Body user: kotlin.Array): Observable + fun createUsersWithListInput(@Body user: kotlin.collections.List): Observable /** * Delete user @@ -52,7 +52,7 @@ interface UserApi { * - 404: User not found * * @param username The name that needs to be deleted - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @DELETE("user/{username}") fun deleteUser(@Path("username") username: kotlin.String): Observable @@ -66,7 +66,7 @@ interface UserApi { * - 404: User not found * * @param username The name that needs to be fetched. Use user1 for testing. - * @return [Call]<[User]> + * @return [Call]<[User]> */ @GET("user/{username}") fun getUserByName(@Path("username") username: kotlin.String): Observable @@ -80,7 +80,7 @@ interface UserApi { * * @param username The user name for login * @param password The password for login in clear text - * @return [Call]<[kotlin.String]> + * @return [Call]<[kotlin.String]> */ @GET("user/login") fun loginUser(@Query("username") username: kotlin.String, @Query("password") password: kotlin.String): Observable @@ -91,7 +91,7 @@ interface UserApi { * Responses: * - 0: successful operation * - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @GET("user/logout") fun logoutUser(): Observable @@ -105,7 +105,7 @@ interface UserApi { * * @param username name that need to be deleted * @param user Updated user object - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @PUT("user/{username}") fun updateUser(@Path("username") username: kotlin.String, @Body user: User): Observable diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index eaf1cd79b17..656b5e261e8 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -22,7 +22,8 @@ import retrofit2.converter.gson.GsonConverterFactory class ApiClient( private var baseUrl: String = defaultBasePath, private val okHttpClientBuilder: OkHttpClient.Builder? = null, - private val serializerBuilder: GsonBuilder = Serializer.gsonBuilder + private val serializerBuilder: GsonBuilder = Serializer.gsonBuilder, + private val okHttpClient : OkHttpClient? = null ) { private val apiAuthorizations = mutableMapOf() var logger: ((String) -> Unit)? = null @@ -74,7 +75,7 @@ class ApiClient( baseUrl: String = defaultBasePath, okHttpClientBuilder: OkHttpClient.Builder? = null, serializerBuilder: GsonBuilder = Serializer.gsonBuilder, - authName: String, + authName: String, bearerToken: String ) : this(baseUrl, okHttpClientBuilder, serializerBuilder, arrayOf(authName)) { setBearerToken(bearerToken) @@ -84,8 +85,8 @@ class ApiClient( baseUrl: String = defaultBasePath, okHttpClientBuilder: OkHttpClient.Builder? = null, serializerBuilder: GsonBuilder = Serializer.gsonBuilder, - authName: String, - username: String, + authName: String, + username: String, password: String ) : this(baseUrl, okHttpClientBuilder, serializerBuilder, arrayOf(authName)) { setCredentials(username, password) @@ -95,10 +96,10 @@ class ApiClient( baseUrl: String = defaultBasePath, okHttpClientBuilder: OkHttpClient.Builder? = null, serializerBuilder: GsonBuilder = Serializer.gsonBuilder, - authName: String, - clientId: String, - secret: String, - username: String, + authName: String, + clientId: String, + secret: String, + username: String, password: String ) : this(baseUrl, okHttpClientBuilder, serializerBuilder, arrayOf(authName)) { getTokenEndPoint() @@ -226,7 +227,8 @@ class ApiClient( } fun createService(serviceClass: Class): S { - return retrofitBuilder.client(clientBuilder.build()).build().create(serviceClass) + val usedClient = this.okHttpClient ?: clientBuilder.build() + return retrofitBuilder.client(usedClient).build().create(serviceClass) } private fun normalizeBaseUrl() { @@ -244,10 +246,10 @@ class ApiClient( } } - companion object { + companion object { @JvmStatic val defaultBasePath: String by lazy { System.getProperties().getProperty("org.openapitools.client.baseUrl", "http://petstore.swagger.io:80/v2") } } -} \ No newline at end of file +} diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt index 6465f148553..b80e0390de2 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt @@ -11,7 +11,6 @@ import java.util.Date object Serializer { @JvmStatic val gsonBuilder: GsonBuilder = GsonBuilder() - .registerTypeAdapter(Date::class.java, DateAdapter()) .registerTypeAdapter(OffsetDateTime::class.java, OffsetDateTimeAdapter()) .registerTypeAdapter(LocalDateTime::class.java, LocalDateTimeAdapter()) .registerTypeAdapter(LocalDate::class.java, LocalDateAdapter()) diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/models/FormatTest.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/models/FormatTest.kt index d6968333776..54c88ca8e90 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/models/FormatTest.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/models/FormatTest.kt @@ -26,6 +26,7 @@ import java.io.Serializable * @param int64 * @param float * @param double + * @param decimal * @param string * @param binary * @param dateTime @@ -53,6 +54,8 @@ data class FormatTest ( val float: kotlin.Float? = null, @SerializedName("double") val double: kotlin.Double? = null, + @SerializedName("decimal") + val decimal: java.math.BigDecimal? = null, @SerializedName("string") val string: kotlin.String? = null, @SerializedName("binary") diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/models/List.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/models/List.kt index 8de0d080ced..d614d69d93b 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/models/List.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/models/List.kt @@ -17,12 +17,12 @@ import java.io.Serializable /** * - * @param `123minusList` + * @param `123list` */ data class List ( @SerializedName("123-list") - val `123minusList`: kotlin.String? = null + val `123list`: kotlin.String? = null ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/models/SpecialModelname.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/models/SpecialModelname.kt index 23cd075e530..2dfb12b8b69 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/models/SpecialModelname.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/models/SpecialModelname.kt @@ -17,12 +17,12 @@ import java.io.Serializable /** * - * @param dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket + * @param dollarSpecialPropertyName */ data class SpecialModelname ( @SerializedName("\$special[property.name]") - val dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket: kotlin.Long? = null + val dollarSpecialPropertyName: kotlin.Long? = null ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/.openapi-generator/FILES b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/.openapi-generator/FILES index 106ea4db2ae..2fcf69d6457 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/.openapi-generator/FILES @@ -27,12 +27,6 @@ docs/Foo.md docs/FormatTest.md docs/HasOnlyReadOnly.md docs/HealthCheckResult.md -docs/InlineObject.md -docs/InlineObject1.md -docs/InlineObject2.md -docs/InlineObject3.md -docs/InlineObject4.md -docs/InlineObject5.md docs/InlineResponseDefault.md docs/List.md docs/MapTest.md @@ -100,12 +94,6 @@ src/main/kotlin/org/openapitools/client/models/Foo.kt src/main/kotlin/org/openapitools/client/models/FormatTest.kt src/main/kotlin/org/openapitools/client/models/HasOnlyReadOnly.kt src/main/kotlin/org/openapitools/client/models/HealthCheckResult.kt -src/main/kotlin/org/openapitools/client/models/InlineObject.kt -src/main/kotlin/org/openapitools/client/models/InlineObject1.kt -src/main/kotlin/org/openapitools/client/models/InlineObject2.kt -src/main/kotlin/org/openapitools/client/models/InlineObject3.kt -src/main/kotlin/org/openapitools/client/models/InlineObject4.kt -src/main/kotlin/org/openapitools/client/models/InlineObject5.kt src/main/kotlin/org/openapitools/client/models/InlineResponseDefault.kt src/main/kotlin/org/openapitools/client/models/List.kt src/main/kotlin/org/openapitools/client/models/MapTest.kt diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/.openapi-generator/VERSION b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/.openapi-generator/VERSION index d99e7162d01..3fa3b389a57 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0-SNAPSHOT \ No newline at end of file +5.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/README.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/README.md index 7d37a628331..fca869bcf49 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/README.md +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/README.md @@ -101,12 +101,6 @@ Class | Method | HTTP request | Description - [org.openapitools.client.models.FormatTest](docs/FormatTest.md) - [org.openapitools.client.models.HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - [org.openapitools.client.models.HealthCheckResult](docs/HealthCheckResult.md) - - [org.openapitools.client.models.InlineObject](docs/InlineObject.md) - - [org.openapitools.client.models.InlineObject1](docs/InlineObject1.md) - - [org.openapitools.client.models.InlineObject2](docs/InlineObject2.md) - - [org.openapitools.client.models.InlineObject3](docs/InlineObject3.md) - - [org.openapitools.client.models.InlineObject4](docs/InlineObject4.md) - - [org.openapitools.client.models.InlineObject5](docs/InlineObject5.md) - [org.openapitools.client.models.InlineResponseDefault](docs/InlineResponseDefault.md) - [org.openapitools.client.models.List](docs/List.md) - [org.openapitools.client.models.MapTest](docs/MapTest.md) diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/build.gradle b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/build.gradle index 0f07a7da124..745b5ece43d 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/build.gradle +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/build.gradle @@ -31,8 +31,9 @@ test { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.0" compile "com.google.code.gson:gson:2.8.6" + compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.0" + compile "com.squareup.okhttp3:logging-interceptor:4.4.0" compile "io.reactivex.rxjava2:rxjava:$rxJava2Version" compile "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion" compile "com.squareup.retrofit2:retrofit:$retrofitVersion" diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/FakeApi.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/FakeApi.md index 6f5c1cbb479..f94e91773ad 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/FakeApi.md @@ -440,13 +440,13 @@ To test enum parameters val apiClient = ApiClient() val webService = apiClient.createWebservice(FakeApi::class.java) -val enumHeaderStringArray : kotlin.Array = // kotlin.Array | Header parameter enum test (string array) +val enumHeaderStringArray : kotlin.collections.List = // kotlin.collections.List | Header parameter enum test (string array) val enumHeaderString : kotlin.String = enumHeaderString_example // kotlin.String | Header parameter enum test (string) -val enumQueryStringArray : kotlin.Array = // kotlin.Array | Query parameter enum test (string array) +val enumQueryStringArray : kotlin.collections.List = // kotlin.collections.List | Query parameter enum test (string array) val enumQueryString : kotlin.String = enumQueryString_example // kotlin.String | Query parameter enum test (string) val enumQueryInteger : kotlin.Int = 56 // kotlin.Int | Query parameter enum test (double) val enumQueryDouble : kotlin.Double = 1.2 // kotlin.Double | Query parameter enum test (double) -val enumFormStringArray : kotlin.Array = enumFormStringArray_example // kotlin.Array | Form parameter enum test (string array) +val enumFormStringArray : kotlin.collections.List = enumFormStringArray_example // kotlin.collections.List | Form parameter enum test (string array) val enumFormString : kotlin.String = enumFormString_example // kotlin.String | Form parameter enum test (string) webService.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) @@ -456,14 +456,14 @@ webService.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQuery Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **kotlin.String**| Header parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)] - **enumQueryStringArray** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **kotlin.String**| Query parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)] + **enumHeaderStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] + **enumHeaderString** | **kotlin.String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] + **enumQueryStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] + **enumQueryString** | **kotlin.String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] **enumQueryInteger** | **kotlin.Int**| Query parameter enum test (double) | [optional] [enum: 1, -2] **enumQueryDouble** | **kotlin.Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Form parameter enum test (string array) | [optional] [default to "$"] [enum: >, $] - **enumFormString** | **kotlin.String**| Form parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)] + **enumFormStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Form parameter enum test (string array) | [optional] [default to $] [enum: >, $] + **enumFormString** | **kotlin.String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] ### Return type @@ -617,11 +617,11 @@ To test the collection format in query parameters val apiClient = ApiClient() val webService = apiClient.createWebservice(FakeApi::class.java) -val pipe : kotlin.Array = // kotlin.Array | -val ioutil : kotlin.Array = // kotlin.Array | -val http : kotlin.Array = // kotlin.Array | -val url : kotlin.Array = // kotlin.Array | -val context : kotlin.Array = // kotlin.Array | +val pipe : kotlin.collections.List = // kotlin.collections.List | +val ioutil : kotlin.collections.List = // kotlin.collections.List | +val http : kotlin.collections.List = // kotlin.collections.List | +val url : kotlin.collections.List = // kotlin.collections.List | +val context : kotlin.collections.List = // kotlin.collections.List | webService.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context) ``` @@ -630,11 +630,11 @@ webService.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pipe** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| | - **ioutil** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| | - **http** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| | - **url** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| | - **context** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| | + **pipe** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| | + **ioutil** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| | + **http** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| | + **url** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| | + **context** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| | ### Return type diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/FormatTest.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/FormatTest.md index 0357923c97a..01b408499e7 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/FormatTest.md +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/FormatTest.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **int64** | **kotlin.Long** | | [optional] **float** | **kotlin.Float** | | [optional] **double** | **kotlin.Double** | | [optional] +**decimal** | [**java.math.BigDecimal**](java.math.BigDecimal.md) | | [optional] **string** | **kotlin.String** | | [optional] **binary** | [**java.io.File**](java.io.File.md) | | [optional] **dateTime** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/List.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/List.md index 13a09a4c414..f426d541a40 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/List.md +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/List.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**`123minusList`** | **kotlin.String** | | [optional] +**`123list`** | **kotlin.String** | | [optional] diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/PetApi.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/PetApi.md index 7445920ab03..32d031b57a9 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/PetApi.md +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/PetApi.md @@ -103,20 +103,20 @@ Multiple status values can be provided with comma separated strings val apiClient = ApiClient() val webService = apiClient.createWebservice(PetApi::class.java) -val status : kotlin.Array = // kotlin.Array | Status values that need to be considered for filter +val status : kotlin.collections.List = // kotlin.collections.List | Status values that need to be considered for filter -val result : kotlin.Array = webService.findPetsByStatus(status) +val result : kotlin.collections.List = webService.findPetsByStatus(status) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] + **status** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] ### Return type -[**kotlin.Array<Pet>**](Pet.md) +[**kotlin.collections.List<Pet>**](Pet.md) ### Authorization @@ -141,20 +141,20 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 val apiClient = ApiClient() val webService = apiClient.createWebservice(PetApi::class.java) -val tags : kotlin.Array = // kotlin.Array | Tags to filter by +val tags : kotlin.collections.List = // kotlin.collections.List | Tags to filter by -val result : kotlin.Array = webService.findPetsByTags(tags) +val result : kotlin.collections.List = webService.findPetsByTags(tags) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **tags** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Tags to filter by | + **tags** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Tags to filter by | ### Return type -[**kotlin.Array<Pet>**](Pet.md) +[**kotlin.collections.List<Pet>**](Pet.md) ### Authorization diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/SpecialModelName.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/SpecialModelName.md index 282649449d9..b179e705ab0 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/SpecialModelName.md +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/SpecialModelName.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket** | **kotlin.Long** | | [optional] +**dollarSpecialPropertyName** | **kotlin.Long** | | [optional] diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/UserApi.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/UserApi.md index b667d3b0a60..bb904d243cf 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/UserApi.md +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/UserApi.md @@ -64,7 +64,7 @@ Creates list of users with given input array val apiClient = ApiClient() val webService = apiClient.createWebservice(UserApi::class.java) -val user : kotlin.Array = // kotlin.Array | List of user object +val user : kotlin.collections.List = // kotlin.collections.List | List of user object webService.createUsersWithArrayInput(user) ``` @@ -73,7 +73,7 @@ webService.createUsersWithArrayInput(user) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | [**kotlin.Array<User>**](User.md)| List of user object | + **user** | [**kotlin.collections.List<User>**](User.md)| List of user object | ### Return type @@ -100,7 +100,7 @@ Creates list of users with given input array val apiClient = ApiClient() val webService = apiClient.createWebservice(UserApi::class.java) -val user : kotlin.Array = // kotlin.Array | List of user object +val user : kotlin.collections.List = // kotlin.collections.List | List of user object webService.createUsersWithListInput(user) ``` @@ -109,7 +109,7 @@ webService.createUsersWithListInput(user) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user** | [**kotlin.Array<User>**](User.md)| List of user object | + **user** | [**kotlin.collections.List<User>**](User.md)| List of user object | ### Return type diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/AnotherFakeApi.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/AnotherFakeApi.kt index 21fe5e2e2af..269f69f3fee 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/AnotherFakeApi.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/AnotherFakeApi.kt @@ -16,7 +16,7 @@ interface AnotherFakeApi { * - 200: successful operation * * @param client client model - * @return [Call]<[Client]> + * @return [Call]<[Client]> */ @PATCH("another-fake/dummy") fun call123testSpecialTags(@Body client: Client): Single diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt index 7ccf2391af8..9247827ae17 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt @@ -15,7 +15,7 @@ interface DefaultApi { * Responses: * - 0: response * - * @return [Call]<[InlineResponseDefault]> + * @return [Call]<[InlineResponseDefault]> */ @GET("foo") fun fooGet(): Single diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt index 07975625104..19579ff3139 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt @@ -13,6 +13,8 @@ import org.openapitools.client.models.OuterComposite import org.openapitools.client.models.Pet import org.openapitools.client.models.User +import okhttp3.MultipartBody + interface FakeApi { /** * Health check endpoint @@ -20,7 +22,7 @@ interface FakeApi { * Responses: * - 200: The instance started successfully * - * @return [Call]<[HealthCheckResult]> + * @return [Call]<[HealthCheckResult]> */ @GET("fake/health") fun fakeHealthGet(): Single @@ -34,10 +36,10 @@ interface FakeApi { * @param pet Pet object that needs to be added to the store * @param query1 query parameter (optional) * @param header1 header parameter (optional) - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @GET("fake/http-signature-test") - fun fakeHttpSignatureTest(@Body pet: Pet, @Query("query_1") query1: kotlin.String, @Header("header_1") header1: kotlin.String): Completable + fun fakeHttpSignatureTest(@Body pet: Pet, @Query("query_1") query1: kotlin.String? = null, @Header("header_1") header1: kotlin.String): Completable /** * @@ -46,7 +48,7 @@ interface FakeApi { * - 200: Output boolean * * @param body Input boolean as post body (optional) - * @return [Call]<[kotlin.Boolean]> + * @return [Call]<[kotlin.Boolean]> */ @POST("fake/outer/boolean") fun fakeOuterBooleanSerialize(@Body body: kotlin.Boolean? = null): Single @@ -58,7 +60,7 @@ interface FakeApi { * - 200: Output composite * * @param outerComposite Input composite as post body (optional) - * @return [Call]<[OuterComposite]> + * @return [Call]<[OuterComposite]> */ @POST("fake/outer/composite") fun fakeOuterCompositeSerialize(@Body outerComposite: OuterComposite? = null): Single @@ -70,7 +72,7 @@ interface FakeApi { * - 200: Output number * * @param body Input number as post body (optional) - * @return [Call]<[java.math.BigDecimal]> + * @return [Call]<[java.math.BigDecimal]> */ @POST("fake/outer/number") fun fakeOuterNumberSerialize(@Body body: java.math.BigDecimal? = null): Single @@ -82,7 +84,7 @@ interface FakeApi { * - 200: Output string * * @param body Input string as post body (optional) - * @return [Call]<[kotlin.String]> + * @return [Call]<[kotlin.String]> */ @POST("fake/outer/string") fun fakeOuterStringSerialize(@Body body: kotlin.String? = null): Single @@ -94,7 +96,7 @@ interface FakeApi { * - 200: Success * * @param fileSchemaTestClass - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @PUT("fake/body-with-file-schema") fun testBodyWithFileSchema(@Body fileSchemaTestClass: FileSchemaTestClass): Completable @@ -107,7 +109,7 @@ interface FakeApi { * * @param query * @param user - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @PUT("fake/body-with-query-params") fun testBodyWithQueryParams(@Query("query") query: kotlin.String, @Body user: User): Completable @@ -119,7 +121,7 @@ interface FakeApi { * - 200: successful operation * * @param client client model - * @return [Call]<[Client]> + * @return [Call]<[Client]> */ @PATCH("fake") fun testClientModel(@Body client: Client): Single @@ -145,7 +147,7 @@ interface FakeApi { * @param dateTime None (optional) * @param password None (optional) * @param paramCallback None (optional) - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @FormUrlEncoded @POST("fake") @@ -159,18 +161,18 @@ interface FakeApi { * - 404: Not found * * @param enumHeaderStringArray Header parameter enum test (string array) (optional) - * @param enumHeaderString Header parameter enum test (string) (optional, default to "-efg") + * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) * @param enumQueryStringArray Query parameter enum test (string array) (optional) - * @param enumQueryString Query parameter enum test (string) (optional, default to "-efg") + * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to "$") - * @param enumFormString Form parameter enum test (string) (optional, default to "-efg") - * @return [Call]<[Unit]> + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormString Form parameter enum test (string) (optional, default to -efg) + * @return [Call]<[Unit]> */ @FormUrlEncoded @GET("fake") - fun testEnumParameters(@Header("enum_header_string_array") enumHeaderStringArray: kotlin.Array, @Header("enum_header_string") enumHeaderString: kotlin.String, @Query("enum_query_string_array") enumQueryStringArray: kotlin.Array, @Query("enum_query_string") enumQueryString: kotlin.String, @Query("enum_query_integer") enumQueryInteger: kotlin.Int, @Query("enum_query_double") enumQueryDouble: kotlin.Double, @Field("enum_form_string_array") enumFormStringArray: kotlin.Array, @Field("enum_form_string") enumFormString: kotlin.String): Completable + fun testEnumParameters(@Header("enum_header_string_array") enumHeaderStringArray: kotlin.collections.List, @Header("enum_header_string") enumHeaderString: kotlin.String, @Query("enum_query_string_array") enumQueryStringArray: kotlin.collections.List? = null, @Query("enum_query_string") enumQueryString: kotlin.String? = null, @Query("enum_query_integer") enumQueryInteger: kotlin.Int? = null, @Query("enum_query_double") enumQueryDouble: kotlin.Double? = null, @Field("enum_form_string_array") enumFormStringArray: kotlin.collections.List, @Field("enum_form_string") enumFormString: kotlin.String): Completable /** * Fake endpoint to test group parameters (optional) @@ -184,10 +186,10 @@ interface FakeApi { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @DELETE("fake") - fun testGroupParameters(@Query("required_string_group") requiredStringGroup: kotlin.Int, @Header("required_boolean_group") requiredBooleanGroup: kotlin.Boolean, @Query("required_int64_group") requiredInt64Group: kotlin.Long, @Query("string_group") stringGroup: kotlin.Int, @Header("boolean_group") booleanGroup: kotlin.Boolean, @Query("int64_group") int64Group: kotlin.Long): Completable + fun testGroupParameters(@Query("required_string_group") requiredStringGroup: kotlin.Int, @Header("required_boolean_group") requiredBooleanGroup: kotlin.Boolean, @Query("required_int64_group") requiredInt64Group: kotlin.Long, @Query("string_group") stringGroup: kotlin.Int? = null, @Header("boolean_group") booleanGroup: kotlin.Boolean, @Query("int64_group") int64Group: kotlin.Long? = null): Completable /** * test inline additionalProperties @@ -196,7 +198,7 @@ interface FakeApi { * - 200: successful operation * * @param requestBody request body - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @POST("fake/inline-additionalProperties") fun testInlineAdditionalProperties(@Body requestBody: kotlin.collections.Map): Completable @@ -209,7 +211,7 @@ interface FakeApi { * * @param param field1 * @param param2 field2 - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @FormUrlEncoded @GET("fake/jsonFormData") @@ -226,9 +228,9 @@ interface FakeApi { * @param http * @param url * @param context - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @PUT("fake/test-query-paramters") - fun testQueryParameterCollectionFormat(@Query("pipe") pipe: kotlin.Array, @Query("ioutil") ioutil: CSVParams, @Query("http") http: SSVParams, @Query("url") url: CSVParams, @Query("context") context: kotlin.Array): Completable + fun testQueryParameterCollectionFormat(@Query("pipe") pipe: kotlin.collections.List, @Query("ioutil") ioutil: CSVParams, @Query("http") http: SSVParams, @Query("url") url: CSVParams, @Query("context") context: kotlin.collections.List): Completable } diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/FakeClassnameTags123Api.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/FakeClassnameTags123Api.kt index d55a974eb11..518a75780ff 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/FakeClassnameTags123Api.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/FakeClassnameTags123Api.kt @@ -16,7 +16,7 @@ interface FakeClassnameTags123Api { * - 200: successful operation * * @param client client model - * @return [Call]<[Client]> + * @return [Call]<[Client]> */ @PATCH("fake_classname_test") fun testClassname(@Body client: Client): Single diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index 75c7a7051e8..82c0bc4b59f 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -9,15 +9,18 @@ import io.reactivex.Completable import org.openapitools.client.models.ApiResponse import org.openapitools.client.models.Pet +import okhttp3.MultipartBody + interface PetApi { /** * Add a new pet to the store * * Responses: + * - 200: Successful operation * - 405: Invalid input * * @param pet Pet object that needs to be added to the store - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @POST("pet") fun addPet(@Body pet: Pet): Completable @@ -26,11 +29,12 @@ interface PetApi { * Deletes a pet * * Responses: + * - 200: Successful operation * - 400: Invalid pet value * * @param petId Pet id to delete * @param apiKey (optional) - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @DELETE("pet/{petId}") fun deletePet(@Path("petId") petId: kotlin.Long, @Header("api_key") apiKey: kotlin.String): Completable @@ -43,10 +47,10 @@ interface PetApi { * - 400: Invalid status value * * @param status Status values that need to be considered for filter - * @return [Call]<[kotlin.Array]> + * @return [Call]<[kotlin.collections.List]> */ @GET("pet/findByStatus") - fun findPetsByStatus(@Query("status") status: CSVParams): Single> + fun findPetsByStatus(@Query("status") status: CSVParams): Single> /** * Finds Pets by tags @@ -56,11 +60,11 @@ interface PetApi { * - 400: Invalid tag value * * @param tags Tags to filter by - * @return [Call]<[kotlin.Array]> + * @return [Call]<[kotlin.collections.List]> */ @Deprecated("This api was deprecated") @GET("pet/findByTags") - fun findPetsByTags(@Query("tags") tags: CSVParams): Single> + fun findPetsByTags(@Query("tags") tags: CSVParams): Single> /** * Find pet by ID @@ -71,7 +75,7 @@ interface PetApi { * - 404: Pet not found * * @param petId ID of pet to return - * @return [Call]<[Pet]> + * @return [Call]<[Pet]> */ @GET("pet/{petId}") fun getPetById(@Path("petId") petId: kotlin.Long): Single @@ -80,12 +84,13 @@ interface PetApi { * Update an existing pet * * Responses: + * - 200: Successful operation * - 400: Invalid ID supplied * - 404: Pet not found * - 405: Validation exception * * @param pet Pet object that needs to be added to the store - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @PUT("pet") fun updatePet(@Body pet: Pet): Completable @@ -94,12 +99,13 @@ interface PetApi { * Updates a pet in the store with form data * * Responses: + * - 200: Successful operation * - 405: Invalid input * * @param petId ID of pet that needs to be updated * @param name Updated name of the pet (optional) * @param status Updated status of the pet (optional) - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @FormUrlEncoded @POST("pet/{petId}") @@ -114,7 +120,7 @@ interface PetApi { * @param petId ID of pet to update * @param additionalMetadata Additional data to pass to server (optional) * @param file file to upload (optional) - * @return [Call]<[ApiResponse]> + * @return [Call]<[ApiResponse]> */ @Multipart @POST("pet/{petId}/uploadImage") @@ -129,7 +135,7 @@ interface PetApi { * @param petId ID of pet to update * @param requiredFile file to upload * @param additionalMetadata Additional data to pass to server (optional) - * @return [Call]<[ApiResponse]> + * @return [Call]<[ApiResponse]> */ @Multipart @POST("fake/{petId}/uploadImageWithRequiredFile") diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 1b55d025d06..6c489f46407 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -17,7 +17,7 @@ interface StoreApi { * - 404: Order not found * * @param orderId ID of the order that needs to be deleted - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @DELETE("store/order/{order_id}") fun deleteOrder(@Path("order_id") orderId: kotlin.String): Completable @@ -28,7 +28,7 @@ interface StoreApi { * Responses: * - 200: successful operation * - * @return [Call]<[kotlin.collections.Map]> + * @return [Call]<[kotlin.collections.Map]> */ @GET("store/inventory") fun getInventory(): Single> @@ -42,7 +42,7 @@ interface StoreApi { * - 404: Order not found * * @param orderId ID of pet that needs to be fetched - * @return [Call]<[Order]> + * @return [Call]<[Order]> */ @GET("store/order/{order_id}") fun getOrderById(@Path("order_id") orderId: kotlin.Long): Single @@ -55,7 +55,7 @@ interface StoreApi { * - 400: Invalid Order * * @param order order placed for purchasing the pet - * @return [Call]<[Order]> + * @return [Call]<[Order]> */ @POST("store/order") fun placeOrder(@Body order: Order): Single diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 0948c0c47a7..eceeeb29d9c 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -16,7 +16,7 @@ interface UserApi { * - 0: successful operation * * @param user Created user object - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @POST("user") fun createUser(@Body user: User): Completable @@ -28,10 +28,10 @@ interface UserApi { * - 0: successful operation * * @param user List of user object - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @POST("user/createWithArray") - fun createUsersWithArrayInput(@Body user: kotlin.Array): Completable + fun createUsersWithArrayInput(@Body user: kotlin.collections.List): Completable /** * Creates list of users with given input array @@ -40,10 +40,10 @@ interface UserApi { * - 0: successful operation * * @param user List of user object - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @POST("user/createWithList") - fun createUsersWithListInput(@Body user: kotlin.Array): Completable + fun createUsersWithListInput(@Body user: kotlin.collections.List): Completable /** * Delete user @@ -53,7 +53,7 @@ interface UserApi { * - 404: User not found * * @param username The name that needs to be deleted - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @DELETE("user/{username}") fun deleteUser(@Path("username") username: kotlin.String): Completable @@ -67,7 +67,7 @@ interface UserApi { * - 404: User not found * * @param username The name that needs to be fetched. Use user1 for testing. - * @return [Call]<[User]> + * @return [Call]<[User]> */ @GET("user/{username}") fun getUserByName(@Path("username") username: kotlin.String): Single @@ -81,7 +81,7 @@ interface UserApi { * * @param username The user name for login * @param password The password for login in clear text - * @return [Call]<[kotlin.String]> + * @return [Call]<[kotlin.String]> */ @GET("user/login") fun loginUser(@Query("username") username: kotlin.String, @Query("password") password: kotlin.String): Single @@ -92,7 +92,7 @@ interface UserApi { * Responses: * - 0: successful operation * - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @GET("user/logout") fun logoutUser(): Completable @@ -106,7 +106,7 @@ interface UserApi { * * @param username name that need to be deleted * @param user Updated user object - * @return [Call]<[Unit]> + * @return [Call]<[Unit]> */ @PUT("user/{username}") fun updateUser(@Path("username") username: kotlin.String, @Body user: User): Completable diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 1e9f9e39d85..1691620ea5e 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -22,7 +22,8 @@ import retrofit2.converter.gson.GsonConverterFactory class ApiClient( private var baseUrl: String = defaultBasePath, private val okHttpClientBuilder: OkHttpClient.Builder? = null, - private val serializerBuilder: GsonBuilder = Serializer.gsonBuilder + private val serializerBuilder: GsonBuilder = Serializer.gsonBuilder, + private val okHttpClient : OkHttpClient? = null ) { private val apiAuthorizations = mutableMapOf() var logger: ((String) -> Unit)? = null @@ -33,7 +34,7 @@ class ApiClient( .addConverterFactory(ScalarsConverterFactory.create()) .addConverterFactory(GsonConverterFactory.create(serializerBuilder.create())) .addCallAdapterFactory(RxJava2CallAdapterFactory.create()) - } + } private val clientBuilder: OkHttpClient.Builder by lazy { okHttpClientBuilder ?: defaultClientBuilder @@ -74,7 +75,7 @@ class ApiClient( baseUrl: String = defaultBasePath, okHttpClientBuilder: OkHttpClient.Builder? = null, serializerBuilder: GsonBuilder = Serializer.gsonBuilder, - authName: String, + authName: String, bearerToken: String ) : this(baseUrl, okHttpClientBuilder, serializerBuilder, arrayOf(authName)) { setBearerToken(bearerToken) @@ -84,8 +85,8 @@ class ApiClient( baseUrl: String = defaultBasePath, okHttpClientBuilder: OkHttpClient.Builder? = null, serializerBuilder: GsonBuilder = Serializer.gsonBuilder, - authName: String, - username: String, + authName: String, + username: String, password: String ) : this(baseUrl, okHttpClientBuilder, serializerBuilder, arrayOf(authName)) { setCredentials(username, password) @@ -95,10 +96,10 @@ class ApiClient( baseUrl: String = defaultBasePath, okHttpClientBuilder: OkHttpClient.Builder? = null, serializerBuilder: GsonBuilder = Serializer.gsonBuilder, - authName: String, - clientId: String, - secret: String, - username: String, + authName: String, + clientId: String, + secret: String, + username: String, password: String ) : this(baseUrl, okHttpClientBuilder, serializerBuilder, arrayOf(authName)) { getTokenEndPoint() @@ -226,7 +227,8 @@ class ApiClient( } fun createService(serviceClass: Class): S { - return retrofitBuilder.client(clientBuilder.build()).build().create(serviceClass) + val usedClient = this.okHttpClient ?: clientBuilder.build() + return retrofitBuilder.client(usedClient).build().create(serviceClass) } private fun normalizeBaseUrl() { @@ -244,10 +246,10 @@ class ApiClient( } } - companion object { + companion object { @JvmStatic val defaultBasePath: String by lazy { System.getProperties().getProperty("org.openapitools.client.baseUrl", "http://petstore.swagger.io:80/v2") } } -} \ No newline at end of file +} diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt index 6465f148553..b80e0390de2 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt @@ -11,7 +11,6 @@ import java.util.Date object Serializer { @JvmStatic val gsonBuilder: GsonBuilder = GsonBuilder() - .registerTypeAdapter(Date::class.java, DateAdapter()) .registerTypeAdapter(OffsetDateTime::class.java, OffsetDateTimeAdapter()) .registerTypeAdapter(LocalDateTime::class.java, LocalDateTimeAdapter()) .registerTypeAdapter(LocalDate::class.java, LocalDateAdapter()) diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/models/FormatTest.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/models/FormatTest.kt index d6968333776..54c88ca8e90 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/models/FormatTest.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/models/FormatTest.kt @@ -26,6 +26,7 @@ import java.io.Serializable * @param int64 * @param float * @param double + * @param decimal * @param string * @param binary * @param dateTime @@ -53,6 +54,8 @@ data class FormatTest ( val float: kotlin.Float? = null, @SerializedName("double") val double: kotlin.Double? = null, + @SerializedName("decimal") + val decimal: java.math.BigDecimal? = null, @SerializedName("string") val string: kotlin.String? = null, @SerializedName("binary") diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/models/List.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/models/List.kt index 8de0d080ced..d614d69d93b 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/models/List.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/models/List.kt @@ -17,12 +17,12 @@ import java.io.Serializable /** * - * @param `123minusList` + * @param `123list` */ data class List ( @SerializedName("123-list") - val `123minusList`: kotlin.String? = null + val `123list`: kotlin.String? = null ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/models/SpecialModelname.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/models/SpecialModelname.kt index 23cd075e530..2dfb12b8b69 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/models/SpecialModelname.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/models/SpecialModelname.kt @@ -17,12 +17,12 @@ import java.io.Serializable /** * - * @param dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket + * @param dollarSpecialPropertyName */ data class SpecialModelname ( @SerializedName("\$special[property.name]") - val dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket: kotlin.Long? = null + val dollarSpecialPropertyName: kotlin.Long? = null ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/openapi3/client/petstore/kotlin-multiplatform/.openapi-generator/FILES b/samples/openapi3/client/petstore/kotlin-multiplatform/.openapi-generator/FILES index 17ac9baa409..f350611489a 100644 --- a/samples/openapi3/client/petstore/kotlin-multiplatform/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/kotlin-multiplatform/.openapi-generator/FILES @@ -27,12 +27,6 @@ docs/Foo.md docs/FormatTest.md docs/HasOnlyReadOnly.md docs/HealthCheckResult.md -docs/InlineObject.md -docs/InlineObject1.md -docs/InlineObject2.md -docs/InlineObject3.md -docs/InlineObject4.md -docs/InlineObject5.md docs/InlineResponseDefault.md docs/List.md docs/MapTest.md @@ -102,12 +96,6 @@ src/commonMain/kotlin/org/openapitools/client/models/Foo.kt src/commonMain/kotlin/org/openapitools/client/models/FormatTest.kt src/commonMain/kotlin/org/openapitools/client/models/HasOnlyReadOnly.kt src/commonMain/kotlin/org/openapitools/client/models/HealthCheckResult.kt -src/commonMain/kotlin/org/openapitools/client/models/InlineObject.kt -src/commonMain/kotlin/org/openapitools/client/models/InlineObject1.kt -src/commonMain/kotlin/org/openapitools/client/models/InlineObject2.kt -src/commonMain/kotlin/org/openapitools/client/models/InlineObject3.kt -src/commonMain/kotlin/org/openapitools/client/models/InlineObject4.kt -src/commonMain/kotlin/org/openapitools/client/models/InlineObject5.kt src/commonMain/kotlin/org/openapitools/client/models/InlineResponseDefault.kt src/commonMain/kotlin/org/openapitools/client/models/List.kt src/commonMain/kotlin/org/openapitools/client/models/MapTest.kt diff --git a/samples/openapi3/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION b/samples/openapi3/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION index d99e7162d01..3fa3b389a57 100644 --- a/samples/openapi3/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0-SNAPSHOT \ No newline at end of file +5.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/kotlin-multiplatform/README.md b/samples/openapi3/client/petstore/kotlin-multiplatform/README.md index aeb7c3ce798..aa3323bbf71 100644 --- a/samples/openapi3/client/petstore/kotlin-multiplatform/README.md +++ b/samples/openapi3/client/petstore/kotlin-multiplatform/README.md @@ -92,12 +92,6 @@ Class | Method | HTTP request | Description - [org.openapitools.client.models.FormatTest](docs/FormatTest.md) - [org.openapitools.client.models.HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - [org.openapitools.client.models.HealthCheckResult](docs/HealthCheckResult.md) - - [org.openapitools.client.models.InlineObject](docs/InlineObject.md) - - [org.openapitools.client.models.InlineObject1](docs/InlineObject1.md) - - [org.openapitools.client.models.InlineObject2](docs/InlineObject2.md) - - [org.openapitools.client.models.InlineObject3](docs/InlineObject3.md) - - [org.openapitools.client.models.InlineObject4](docs/InlineObject4.md) - - [org.openapitools.client.models.InlineObject5](docs/InlineObject5.md) - [org.openapitools.client.models.InlineResponseDefault](docs/InlineResponseDefault.md) - [org.openapitools.client.models.List](docs/List.md) - [org.openapitools.client.models.MapTest](docs/MapTest.md) diff --git a/samples/openapi3/client/petstore/kotlin-multiplatform/docs/FakeApi.md b/samples/openapi3/client/petstore/kotlin-multiplatform/docs/FakeApi.md index 851d2f46821..b8dfefb771b 100644 --- a/samples/openapi3/client/petstore/kotlin-multiplatform/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/kotlin-multiplatform/docs/FakeApi.md @@ -551,13 +551,13 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **enumHeaderStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **kotlin.String**| Header parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)] + **enumHeaderString** | **kotlin.String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] **enumQueryStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **kotlin.String**| Query parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)] + **enumQueryString** | **kotlin.String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] **enumQueryInteger** | **kotlin.Int**| Query parameter enum test (double) | [optional] [enum: 1, -2] **enumQueryDouble** | **kotlin.Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Form parameter enum test (string array) | [optional] [default to "$"] [enum: >, $] - **enumFormString** | **kotlin.String**| Form parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)] + **enumFormStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Form parameter enum test (string array) | [optional] [default to $] [enum: >, $] + **enumFormString** | **kotlin.String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] ### Return type diff --git a/samples/openapi3/client/petstore/kotlin-multiplatform/docs/FormatTest.md b/samples/openapi3/client/petstore/kotlin-multiplatform/docs/FormatTest.md index 080b13c2d8e..cfabf1976d6 100644 --- a/samples/openapi3/client/petstore/kotlin-multiplatform/docs/FormatTest.md +++ b/samples/openapi3/client/petstore/kotlin-multiplatform/docs/FormatTest.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **int64** | **kotlin.Long** | | [optional] **float** | **kotlin.Float** | | [optional] **double** | **kotlin.Double** | | [optional] +**decimal** | [**java.math.BigDecimal**](java.math.BigDecimal.md) | | [optional] **string** | **kotlin.String** | | [optional] **binary** | [**org.openapitools.client.infrastructure.OctetByteArray**](org.openapitools.client.infrastructure.OctetByteArray.md) | | [optional] **dateTime** | **kotlin.String** | | [optional] diff --git a/samples/openapi3/client/petstore/kotlin-multiplatform/docs/List.md b/samples/openapi3/client/petstore/kotlin-multiplatform/docs/List.md index 13a09a4c414..f426d541a40 100644 --- a/samples/openapi3/client/petstore/kotlin-multiplatform/docs/List.md +++ b/samples/openapi3/client/petstore/kotlin-multiplatform/docs/List.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**`123minusList`** | **kotlin.String** | | [optional] +**`123list`** | **kotlin.String** | | [optional] diff --git a/samples/openapi3/client/petstore/kotlin-multiplatform/docs/SpecialModelName.md b/samples/openapi3/client/petstore/kotlin-multiplatform/docs/SpecialModelName.md index 282649449d9..b179e705ab0 100644 --- a/samples/openapi3/client/petstore/kotlin-multiplatform/docs/SpecialModelName.md +++ b/samples/openapi3/client/petstore/kotlin-multiplatform/docs/SpecialModelName.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket** | **kotlin.Long** | | [optional] +**dollarSpecialPropertyName** | **kotlin.Long** | | [optional] diff --git a/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/apis/FakeApi.kt b/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/apis/FakeApi.kt index d98ccb9adb0..73a8ed48ed6 100644 --- a/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/apis/FakeApi.kt +++ b/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/apis/FakeApi.kt @@ -405,13 +405,13 @@ class FakeApi @UseExperimental(UnstableDefault::class) constructor( * To test enum parameters * To test enum parameters * @param enumHeaderStringArray Header parameter enum test (string array) (optional) - * @param enumHeaderString Header parameter enum test (string) (optional, default to "-efg") + * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) * @param enumQueryStringArray Query parameter enum test (string array) (optional) - * @param enumQueryString Query parameter enum test (string) (optional, default to "-efg") + * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to "$") - * @param enumFormString Form parameter enum test (string) (optional, default to "-efg") + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return void */ suspend fun testEnumParameters(enumHeaderStringArray: kotlin.collections.List?, enumHeaderString: kotlin.String?, enumQueryStringArray: kotlin.collections.List?, enumQueryString: kotlin.String?, enumQueryInteger: kotlin.Int?, enumQueryDouble: kotlin.Double?, enumFormStringArray: kotlin.collections.List?, enumFormString: kotlin.String?): HttpResponse { diff --git a/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index f866f94634f..ed8e2858814 100644 --- a/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -46,7 +46,6 @@ open class ApiClient( val clientConfig: (HttpClientConfig<*>) -> Unit = { it.install(JsonFeature, jsonConfig) } httpClientEngine?.let { HttpClient(it, clientConfig) } ?: HttpClient(clientConfig) } - private val authentications: kotlin.collections.Map by lazy { mapOf( "api_key" to ApiKeyAuth("header", "api_key"), @@ -98,12 +97,6 @@ open class ApiClient( serializer.setMapper(org.openapitools.client.models.FormatTest::class, org.openapitools.client.models.FormatTest.serializer()) serializer.setMapper(org.openapitools.client.models.HasOnlyReadOnly::class, org.openapitools.client.models.HasOnlyReadOnly.serializer()) serializer.setMapper(org.openapitools.client.models.HealthCheckResult::class, org.openapitools.client.models.HealthCheckResult.serializer()) - serializer.setMapper(org.openapitools.client.models.InlineObject::class, org.openapitools.client.models.InlineObject.serializer()) - serializer.setMapper(org.openapitools.client.models.InlineObject1::class, org.openapitools.client.models.InlineObject1.serializer()) - serializer.setMapper(org.openapitools.client.models.InlineObject2::class, org.openapitools.client.models.InlineObject2.serializer()) - serializer.setMapper(org.openapitools.client.models.InlineObject3::class, org.openapitools.client.models.InlineObject3.serializer()) - serializer.setMapper(org.openapitools.client.models.InlineObject4::class, org.openapitools.client.models.InlineObject4.serializer()) - serializer.setMapper(org.openapitools.client.models.InlineObject5::class, org.openapitools.client.models.InlineObject5.serializer()) serializer.setMapper(org.openapitools.client.models.InlineResponseDefault::class, org.openapitools.client.models.InlineResponseDefault.serializer()) serializer.setMapper(org.openapitools.client.models.List::class, org.openapitools.client.models.List.serializer()) serializer.setMapper(org.openapitools.client.models.MapTest::class, org.openapitools.client.models.MapTest.serializer()) @@ -133,7 +126,7 @@ open class ApiClient( * @param username Username */ fun setUsername(username: String) { - val auth = authentications.values.firstOrNull { it is HttpBasicAuth } as HttpBasicAuth? + val auth = authentications?.values?.firstOrNull { it is HttpBasicAuth } as HttpBasicAuth? ?: throw Exception("No HTTP basic authentication configured") auth.username = username } @@ -144,7 +137,7 @@ open class ApiClient( * @param password Password */ fun setPassword(password: String) { - val auth = authentications.values.firstOrNull { it is HttpBasicAuth } as HttpBasicAuth? + val auth = authentications?.values?.firstOrNull { it is HttpBasicAuth } as HttpBasicAuth? ?: throw Exception("No HTTP basic authentication configured") auth.password = password } @@ -156,7 +149,7 @@ open class ApiClient( * @param paramName The name of the API key parameter, or null or set the first key. */ fun setApiKey(apiKey: String, paramName: String? = null) { - val auth = authentications.values.firstOrNull { it is ApiKeyAuth && (paramName == null || paramName == it.paramName)} as ApiKeyAuth? + val auth = authentications?.values?.firstOrNull { it is ApiKeyAuth && (paramName == null || paramName == it.paramName)} as ApiKeyAuth? ?: throw Exception("No API key authentication configured") auth.apiKey = apiKey } @@ -168,7 +161,7 @@ open class ApiClient( * @param paramName The name of the API key parameter, or null or set the first key. */ fun setApiKeyPrefix(apiKeyPrefix: String, paramName: String? = null) { - val auth = authentications.values.firstOrNull { it is ApiKeyAuth && (paramName == null || paramName == it.paramName) } as ApiKeyAuth? + val auth = authentications?.values?.firstOrNull { it is ApiKeyAuth && (paramName == null || paramName == it.paramName) } as ApiKeyAuth? ?: throw Exception("No API key authentication configured") auth.apiKeyPrefix = apiKeyPrefix } @@ -179,7 +172,7 @@ open class ApiClient( * @param accessToken Access token */ fun setAccessToken(accessToken: String) { - val auth = authentications.values.firstOrNull { it is OAuth } as OAuth? + val auth = authentications?.values?.firstOrNull { it is OAuth } as OAuth? ?: throw Exception("No OAuth2 authentication configured") auth.accessToken = accessToken } @@ -190,7 +183,7 @@ open class ApiClient( * @param bearerToken The bearer token. */ fun setBearerToken(bearerToken: String) { - val auth = authentications.values.firstOrNull { it is HttpBearerAuth } as HttpBearerAuth? + val auth = authentications?.values?.firstOrNull { it is HttpBearerAuth } as HttpBearerAuth? ?: throw Exception("No Bearer authentication configured") auth.bearerToken = bearerToken } @@ -234,7 +227,7 @@ open class ApiClient( private fun RequestConfig.updateForAuth(authNames: kotlin.collections.List) { for (authName in authNames) { - val auth = authentications[authName] ?: throw Exception("Authentication undefined: $authName") + val auth = authentications?.get(authName) ?: throw Exception("Authentication undefined: $authName") auth.apply(query, headers) } } diff --git a/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/FormatTest.kt b/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/FormatTest.kt index ed2e0e2eec2..251ce3fe48d 100644 --- a/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/FormatTest.kt +++ b/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/FormatTest.kt @@ -26,6 +26,7 @@ import kotlinx.serialization.internal.CommonEnumSerializer * @param int64 * @param float * @param double + * @param decimal * @param string * @param binary * @param dateTime @@ -44,6 +45,7 @@ data class FormatTest ( @SerialName(value = "int64") val int64: kotlin.Long? = null, @SerialName(value = "float") val float: kotlin.Float? = null, @SerialName(value = "double") val double: kotlin.Double? = null, + @SerialName(value = "decimal") val decimal: java.math.BigDecimal? = null, @SerialName(value = "string") val string: kotlin.String? = null, @SerialName(value = "binary") val binary: org.openapitools.client.infrastructure.OctetByteArray? = null, @SerialName(value = "dateTime") val dateTime: kotlin.String? = null, diff --git a/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/List.kt b/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/List.kt index f68a4dc3a86..ea3ede2d5cb 100644 --- a/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/List.kt +++ b/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/List.kt @@ -17,10 +17,10 @@ import kotlinx.serialization.internal.CommonEnumSerializer /** * - * @param `123minusList` + * @param `123list` */ @Serializable data class List ( - @SerialName(value = "123-list") val `123minusList`: kotlin.String? = null + @SerialName(value = "123-list") val `123list`: kotlin.String? = null ) diff --git a/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/SpecialModelname.kt b/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/SpecialModelname.kt index 7a8c1c83c8b..e8a3ddd658f 100644 --- a/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/SpecialModelname.kt +++ b/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/SpecialModelname.kt @@ -17,10 +17,10 @@ import kotlinx.serialization.internal.CommonEnumSerializer /** * - * @param dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket + * @param dollarSpecialPropertyName */ @Serializable data class SpecialModelname ( - @SerialName(value = "\$special[property.name]") val dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket: kotlin.Long? = null + @SerialName(value = "\$special[property.name]") val dollarSpecialPropertyName: kotlin.Long? = null ) diff --git a/samples/openapi3/client/petstore/kotlin/.openapi-generator/FILES b/samples/openapi3/client/petstore/kotlin/.openapi-generator/FILES index 535d2438cfd..2deaf69a977 100644 --- a/samples/openapi3/client/petstore/kotlin/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/kotlin/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md build.gradle docs/200Response.md @@ -28,12 +27,6 @@ docs/Foo.md docs/FormatTest.md docs/HasOnlyReadOnly.md docs/HealthCheckResult.md -docs/InlineObject.md -docs/InlineObject1.md -docs/InlineObject2.md -docs/InlineObject3.md -docs/InlineObject4.md -docs/InlineObject5.md docs/InlineResponseDefault.md docs/List.md docs/MapTest.md @@ -100,12 +93,6 @@ src/main/kotlin/org/openapitools/client/models/Foo.kt src/main/kotlin/org/openapitools/client/models/FormatTest.kt src/main/kotlin/org/openapitools/client/models/HasOnlyReadOnly.kt src/main/kotlin/org/openapitools/client/models/HealthCheckResult.kt -src/main/kotlin/org/openapitools/client/models/InlineObject.kt -src/main/kotlin/org/openapitools/client/models/InlineObject1.kt -src/main/kotlin/org/openapitools/client/models/InlineObject2.kt -src/main/kotlin/org/openapitools/client/models/InlineObject3.kt -src/main/kotlin/org/openapitools/client/models/InlineObject4.kt -src/main/kotlin/org/openapitools/client/models/InlineObject5.kt src/main/kotlin/org/openapitools/client/models/InlineResponseDefault.kt src/main/kotlin/org/openapitools/client/models/List.kt src/main/kotlin/org/openapitools/client/models/MapTest.kt diff --git a/samples/openapi3/client/petstore/kotlin/.openapi-generator/VERSION b/samples/openapi3/client/petstore/kotlin/.openapi-generator/VERSION index d99e7162d01..3fa3b389a57 100644 --- a/samples/openapi3/client/petstore/kotlin/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/kotlin/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0-SNAPSHOT \ No newline at end of file +5.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/kotlin/README.md b/samples/openapi3/client/petstore/kotlin/README.md index 0039d13c356..76aa2b6cd52 100644 --- a/samples/openapi3/client/petstore/kotlin/README.md +++ b/samples/openapi3/client/petstore/kotlin/README.md @@ -101,12 +101,6 @@ Class | Method | HTTP request | Description - [org.openapitools.client.models.FormatTest](docs/FormatTest.md) - [org.openapitools.client.models.HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - [org.openapitools.client.models.HealthCheckResult](docs/HealthCheckResult.md) - - [org.openapitools.client.models.InlineObject](docs/InlineObject.md) - - [org.openapitools.client.models.InlineObject1](docs/InlineObject1.md) - - [org.openapitools.client.models.InlineObject2](docs/InlineObject2.md) - - [org.openapitools.client.models.InlineObject3](docs/InlineObject3.md) - - [org.openapitools.client.models.InlineObject4](docs/InlineObject4.md) - - [org.openapitools.client.models.InlineObject5](docs/InlineObject5.md) - [org.openapitools.client.models.InlineResponseDefault](docs/InlineResponseDefault.md) - [org.openapitools.client.models.List](docs/List.md) - [org.openapitools.client.models.MapTest](docs/MapTest.md) diff --git a/samples/openapi3/client/petstore/kotlin/build.gradle b/samples/openapi3/client/petstore/kotlin/build.gradle index 9d6960b77a1..56be0bd0dd8 100644 --- a/samples/openapi3/client/petstore/kotlin/build.gradle +++ b/samples/openapi3/client/petstore/kotlin/build.gradle @@ -29,11 +29,9 @@ test { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.0" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "com.squareup.moshi:moshi-kotlin:1.9.2" compile "com.squareup.moshi:moshi-adapters:1.9.2" compile "com.squareup.okhttp3:okhttp:4.2.2" - compile "com.squareup.okhttp3:logging-interceptor:4.4.0" testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" } diff --git a/samples/openapi3/client/petstore/kotlin/docs/FakeApi.md b/samples/openapi3/client/petstore/kotlin/docs/FakeApi.md index 40ca579b51b..e5aef0b8b6d 100644 --- a/samples/openapi3/client/petstore/kotlin/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/kotlin/docs/FakeApi.md @@ -551,13 +551,13 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **enumHeaderStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | **kotlin.String**| Header parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)] + **enumHeaderString** | **kotlin.String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] **enumQueryStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | **kotlin.String**| Query parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)] + **enumQueryString** | **kotlin.String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] **enumQueryInteger** | **kotlin.Int**| Query parameter enum test (double) | [optional] [enum: 1, -2] **enumQueryDouble** | **kotlin.Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] - **enumFormStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Form parameter enum test (string array) | [optional] [default to "$"] [enum: >, $] - **enumFormString** | **kotlin.String**| Form parameter enum test (string) | [optional] [default to "-efg"] [enum: _abc, -efg, (xyz)] + **enumFormStringArray** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| Form parameter enum test (string array) | [optional] [default to $] [enum: >, $] + **enumFormString** | **kotlin.String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] ### Return type diff --git a/samples/openapi3/client/petstore/kotlin/docs/FormatTest.md b/samples/openapi3/client/petstore/kotlin/docs/FormatTest.md index 0357923c97a..01b408499e7 100644 --- a/samples/openapi3/client/petstore/kotlin/docs/FormatTest.md +++ b/samples/openapi3/client/petstore/kotlin/docs/FormatTest.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **int64** | **kotlin.Long** | | [optional] **float** | **kotlin.Float** | | [optional] **double** | **kotlin.Double** | | [optional] +**decimal** | [**java.math.BigDecimal**](java.math.BigDecimal.md) | | [optional] **string** | **kotlin.String** | | [optional] **binary** | [**java.io.File**](java.io.File.md) | | [optional] **dateTime** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional] diff --git a/samples/openapi3/client/petstore/kotlin/docs/List.md b/samples/openapi3/client/petstore/kotlin/docs/List.md index 13a09a4c414..f426d541a40 100644 --- a/samples/openapi3/client/petstore/kotlin/docs/List.md +++ b/samples/openapi3/client/petstore/kotlin/docs/List.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**`123minusList`** | **kotlin.String** | | [optional] +**`123list`** | **kotlin.String** | | [optional] diff --git a/samples/openapi3/client/petstore/kotlin/docs/SpecialModelName.md b/samples/openapi3/client/petstore/kotlin/docs/SpecialModelName.md index 282649449d9..b179e705ab0 100644 --- a/samples/openapi3/client/petstore/kotlin/docs/SpecialModelName.md +++ b/samples/openapi3/client/petstore/kotlin/docs/SpecialModelName.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket** | **kotlin.Long** | | [optional] +**dollarSpecialPropertyName** | **kotlin.Long** | | [optional] diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt index 647272f7e2b..085f742fe20 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt @@ -98,7 +98,8 @@ class FakeApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { put("query_1", listOf(query1.toString())) } } - val localVariableHeaders: MutableMap = mutableMapOf("header_1" to header1.toString()) + val localVariableHeaders: MutableMap = mutableMapOf() + header1?.apply { localVariableHeaders["header_1"] = this.toString() } val localVariableConfig = RequestConfig( RequestMethod.GET, "/fake/http-signature-test", @@ -471,13 +472,13 @@ class FakeApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { * To test enum parameters * To test enum parameters * @param enumHeaderStringArray Header parameter enum test (string array) (optional) - * @param enumHeaderString Header parameter enum test (string) (optional, default to "-efg") + * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) * @param enumQueryStringArray Query parameter enum test (string array) (optional) - * @param enumQueryString Query parameter enum test (string) (optional, default to "-efg") + * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to "$") - * @param enumFormString Form parameter enum test (string) (optional, default to "-efg") + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return void * @throws UnsupportedOperationException If the API returns an informational or redirection response * @throws ClientException If the API returns a client error response @@ -501,7 +502,9 @@ class FakeApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { put("enum_query_double", listOf(enumQueryDouble.toString())) } } - val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded", "enum_header_string_array" to enumHeaderStringArray.joinToString(separator = collectionDelimiter("csv")), "enum_header_string" to enumHeaderString.toString()) + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") + enumHeaderStringArray?.apply { localVariableHeaders["enum_header_string_array"] = this.joinToString(separator = collectionDelimiter("csv")) } + enumHeaderString?.apply { localVariableHeaders["enum_header_string"] = this.toString() } val localVariableConfig = RequestConfig( RequestMethod.GET, "/fake", @@ -556,7 +559,9 @@ class FakeApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { put("int64_group", listOf(int64Group.toString())) } } - val localVariableHeaders: MutableMap = mutableMapOf("required_boolean_group" to requiredBooleanGroup.toString(), "boolean_group" to booleanGroup.toString()) + val localVariableHeaders: MutableMap = mutableMapOf() + requiredBooleanGroup?.apply { localVariableHeaders["required_boolean_group"] = this.toString() } + booleanGroup?.apply { localVariableHeaders["boolean_group"] = this.toString() } val localVariableConfig = RequestConfig( RequestMethod.DELETE, "/fake", diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index 8dd12cf26ab..d0295348e3f 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -88,7 +88,8 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?) : Unit { val localVariableBody: kotlin.Any? = null val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf("api_key" to apiKey.toString()) + val localVariableHeaders: MutableMap = mutableMapOf() + apiKey?.apply { localVariableHeaders["api_key"] = this.toString() } val localVariableConfig = RequestConfig( RequestMethod.DELETE, "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt index 69b562becb0..9bd2790dc14 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt @@ -10,6 +10,7 @@ val Response.isInformational : Boolean get() = this.code in 100..199 /** * Provides an extension to evaluation whether the response is a 3xx code */ +@Suppress("EXTENSION_SHADOWED_BY_MEMBER") val Response.isRedirect : Boolean get() = this.code in 300..399 /** diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt index 697559b2ec1..9a45b67d9b1 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt @@ -1,14 +1,12 @@ package org.openapitools.client.infrastructure import com.squareup.moshi.Moshi -import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory import java.util.Date object Serializer { @JvmStatic val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(Date::class.java, Rfc3339DateJsonAdapter().nullSafe()) .add(OffsetDateTimeAdapter()) .add(LocalDateTimeAdapter()) .add(LocalDateAdapter()) diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/FormatTest.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/FormatTest.kt index 5a1fec435b1..d0bbef4836c 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/FormatTest.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/FormatTest.kt @@ -26,6 +26,7 @@ import java.io.Serializable * @param int64 * @param float * @param double + * @param decimal * @param string * @param binary * @param dateTime @@ -53,6 +54,8 @@ data class FormatTest ( val float: kotlin.Float? = null, @Json(name = "double") val double: kotlin.Double? = null, + @Json(name = "decimal") + val decimal: java.math.BigDecimal? = null, @Json(name = "string") val string: kotlin.String? = null, @Json(name = "binary") diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/List.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/List.kt index f16cdddc8c7..bb3f49c6984 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/List.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/List.kt @@ -17,12 +17,12 @@ import java.io.Serializable /** * - * @param `123minusList` + * @param `123list` */ data class List ( @Json(name = "123-list") - val `123minusList`: kotlin.String? = null + val `123list`: kotlin.String? = null ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/SpecialModelname.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/SpecialModelname.kt index c51eefb1ce4..a315761a8f8 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/SpecialModelname.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/SpecialModelname.kt @@ -17,12 +17,12 @@ import java.io.Serializable /** * - * @param dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket + * @param dollarSpecialPropertyName */ data class SpecialModelname ( @Json(name = "\$special[property.name]") - val dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket: kotlin.Long? = null + val dollarSpecialPropertyName: kotlin.Long? = null ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/.openapi-generator/FILES b/samples/openapi3/server/petstore/kotlin-springboot-reactive/.openapi-generator/FILES index 07fb739ffae..e48401e8ff4 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/.openapi-generator/FILES +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/.openapi-generator/FILES @@ -14,8 +14,6 @@ src/main/kotlin/org/openapitools/api/UserApi.kt src/main/kotlin/org/openapitools/api/UserApiService.kt src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt src/main/kotlin/org/openapitools/model/Category.kt -src/main/kotlin/org/openapitools/model/InlineObject.kt -src/main/kotlin/org/openapitools/model/InlineObject1.kt src/main/kotlin/org/openapitools/model/ModelApiResponse.kt src/main/kotlin/org/openapitools/model/Order.kt src/main/kotlin/org/openapitools/model/Pet.kt diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION b/samples/openapi3/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION index d99e7162d01..3fa3b389a57 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0-SNAPSHOT \ No newline at end of file +5.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApi.kt index b77d4eaed65..7f02e0938ab 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -13,14 +13,7 @@ import org.springframework.http.HttpStatus import org.springframework.http.MediaType import org.springframework.http.ResponseEntity -import org.springframework.web.bind.annotation.RequestBody -import org.springframework.web.bind.annotation.RequestPart -import org.springframework.web.bind.annotation.RequestParam -import org.springframework.web.bind.annotation.PathVariable -import org.springframework.web.bind.annotation.RequestHeader -import org.springframework.web.bind.annotation.RequestMethod -import org.springframework.web.bind.annotation.RequestMapping -import org.springframework.web.bind.annotation.RestController +import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired @@ -52,11 +45,11 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class),ApiResponse(code = 405, message = "Invalid input")]) - @RequestMapping( + @PostMapping( value = ["/pet"], - produces = ["application/xml", "application/json"], - consumes = ["application/json", "application/xml"], - method = [RequestMethod.POST]) + produces = ["application/xml", "application/json"], + consumes = ["application/json", "application/xml"] + ) suspend fun addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody pet: Pet ): ResponseEntity { return ResponseEntity(service.addPet(pet), HttpStatus.valueOf(200)) @@ -69,9 +62,9 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( value = [ApiResponse(code = 400, message = "Invalid pet value")]) - @RequestMapping( - value = ["/pet/{petId}"], - method = [RequestMethod.DELETE]) + @DeleteMapping( + value = ["/pet/{petId}"] + ) suspend fun deletePet(@ApiParam(value = "Pet id to delete", required=true) @PathVariable("petId") petId: kotlin.Long ,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) apiKey: kotlin.String? ): ResponseEntity { @@ -87,10 +80,10 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class, responseContainer = "List"),ApiResponse(code = 400, message = "Invalid status value")]) - @RequestMapping( + @GetMapping( value = ["/pet/findByStatus"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) + produces = ["application/xml", "application/json"] + ) fun findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) status: kotlin.collections.List ): ResponseEntity> { return ResponseEntity(service.findPetsByStatus(status), HttpStatus.valueOf(200)) @@ -105,10 +98,10 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class, responseContainer = "List"),ApiResponse(code = 400, message = "Invalid tag value")]) - @RequestMapping( + @GetMapping( value = ["/pet/findByTags"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) + produces = ["application/xml", "application/json"] + ) fun findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) tags: kotlin.collections.List ): ResponseEntity> { return ResponseEntity(service.findPetsByTags(tags), HttpStatus.valueOf(200)) @@ -122,10 +115,10 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "api_key")]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Pet not found")]) - @RequestMapping( + @GetMapping( value = ["/pet/{petId}"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) + produces = ["application/xml", "application/json"] + ) suspend fun getPetById(@ApiParam(value = "ID of pet to return", required=true) @PathVariable("petId") petId: kotlin.Long ): ResponseEntity { return ResponseEntity(service.getPetById(petId), HttpStatus.valueOf(200)) @@ -139,11 +132,11 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Pet not found"),ApiResponse(code = 405, message = "Validation exception")]) - @RequestMapping( + @PutMapping( value = ["/pet"], - produces = ["application/xml", "application/json"], - consumes = ["application/json", "application/xml"], - method = [RequestMethod.PUT]) + produces = ["application/xml", "application/json"], + consumes = ["application/json", "application/xml"] + ) suspend fun updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody pet: Pet ): ResponseEntity { return ResponseEntity(service.updatePet(pet), HttpStatus.valueOf(200)) @@ -156,10 +149,10 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( value = [ApiResponse(code = 405, message = "Invalid input")]) - @RequestMapping( + @PostMapping( value = ["/pet/{petId}"], - consumes = ["application/x-www-form-urlencoded"], - method = [RequestMethod.POST]) + consumes = ["application/x-www-form-urlencoded"] + ) suspend fun updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required=true) @PathVariable("petId") petId: kotlin.Long ,@ApiParam(value = "Updated name of the pet") @RequestParam(value="name", required=false) name: kotlin.String? ,@ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) status: kotlin.String? @@ -175,11 +168,11 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse::class)]) - @RequestMapping( + @PostMapping( value = ["/pet/{petId}/uploadImage"], - produces = ["application/json"], - consumes = ["multipart/form-data"], - method = [RequestMethod.POST]) + produces = ["application/json"], + consumes = ["multipart/form-data"] + ) suspend fun uploadFile(@ApiParam(value = "ID of pet to update", required=true) @PathVariable("petId") petId: kotlin.Long ,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) additionalMetadata: kotlin.String? ,@ApiParam(value = "file detail") @Valid @RequestPart("file") file: org.springframework.core.io.Resource? diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt index 528129abc42..acfb3f62ae0 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -12,14 +12,7 @@ import org.springframework.http.HttpStatus import org.springframework.http.MediaType import org.springframework.http.ResponseEntity -import org.springframework.web.bind.annotation.RequestBody -import org.springframework.web.bind.annotation.RequestPart -import org.springframework.web.bind.annotation.RequestParam -import org.springframework.web.bind.annotation.PathVariable -import org.springframework.web.bind.annotation.RequestHeader -import org.springframework.web.bind.annotation.RequestMethod -import org.springframework.web.bind.annotation.RequestMapping -import org.springframework.web.bind.annotation.RestController +import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired @@ -49,9 +42,9 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors") @ApiResponses( value = [ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Order not found")]) - @RequestMapping( - value = ["/store/order/{orderId}"], - method = [RequestMethod.DELETE]) + @DeleteMapping( + value = ["/store/order/{orderId}"] + ) suspend fun deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required=true) @PathVariable("orderId") orderId: kotlin.String ): ResponseEntity { return ResponseEntity(service.deleteOrder(orderId), HttpStatus.valueOf(400)) @@ -66,10 +59,10 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic authorizations = [Authorization(value = "api_key")]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = kotlin.collections.Map::class, responseContainer = "Map")]) - @RequestMapping( + @GetMapping( value = ["/store/inventory"], - produces = ["application/json"], - method = [RequestMethod.GET]) + produces = ["application/json"] + ) suspend fun getInventory(): ResponseEntity> { return ResponseEntity(service.getInventory(), HttpStatus.valueOf(200)) } @@ -81,10 +74,10 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic response = Order::class) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = Order::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Order not found")]) - @RequestMapping( + @GetMapping( value = ["/store/order/{orderId}"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) + produces = ["application/xml", "application/json"] + ) suspend fun getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required=true) @PathVariable("orderId") orderId: kotlin.Long ): ResponseEntity { return ResponseEntity(service.getOrderById(orderId), HttpStatus.valueOf(200)) @@ -97,11 +90,11 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic response = Order::class) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = Order::class),ApiResponse(code = 400, message = "Invalid Order")]) - @RequestMapping( + @PostMapping( value = ["/store/order"], - produces = ["application/xml", "application/json"], - consumes = ["application/json"], - method = [RequestMethod.POST]) + produces = ["application/xml", "application/json"], + consumes = ["application/json"] + ) suspend fun placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @Valid @RequestBody order: Order ): ResponseEntity { return ResponseEntity(service.placeOrder(order), HttpStatus.valueOf(200)) diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApi.kt index 479219327ad..ca309c95e91 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApi.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -12,14 +12,7 @@ import org.springframework.http.HttpStatus import org.springframework.http.MediaType import org.springframework.http.ResponseEntity -import org.springframework.web.bind.annotation.RequestBody -import org.springframework.web.bind.annotation.RequestPart -import org.springframework.web.bind.annotation.RequestParam -import org.springframework.web.bind.annotation.PathVariable -import org.springframework.web.bind.annotation.RequestHeader -import org.springframework.web.bind.annotation.RequestMethod -import org.springframework.web.bind.annotation.RequestMapping -import org.springframework.web.bind.annotation.RestController +import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired @@ -50,10 +43,10 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) authorizations = [Authorization(value = "api_key")]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation")]) - @RequestMapping( + @PostMapping( value = ["/user"], - consumes = ["application/json"], - method = [RequestMethod.POST]) + consumes = ["application/json"] + ) suspend fun createUser(@ApiParam(value = "Created user object" ,required=true ) @Valid @RequestBody user: User ): ResponseEntity { return ResponseEntity(service.createUser(user), HttpStatus.valueOf(200)) @@ -66,10 +59,10 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) authorizations = [Authorization(value = "api_key")]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation")]) - @RequestMapping( + @PostMapping( value = ["/user/createWithArray"], - consumes = ["application/json"], - method = [RequestMethod.POST]) + consumes = ["application/json"] + ) suspend fun createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody user: Flow ): ResponseEntity { return ResponseEntity(service.createUsersWithArrayInput(user), HttpStatus.valueOf(200)) @@ -82,10 +75,10 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) authorizations = [Authorization(value = "api_key")]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation")]) - @RequestMapping( + @PostMapping( value = ["/user/createWithList"], - consumes = ["application/json"], - method = [RequestMethod.POST]) + consumes = ["application/json"] + ) suspend fun createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody user: Flow ): ResponseEntity { return ResponseEntity(service.createUsersWithListInput(user), HttpStatus.valueOf(200)) @@ -98,9 +91,9 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) authorizations = [Authorization(value = "api_key")]) @ApiResponses( value = [ApiResponse(code = 400, message = "Invalid username supplied"),ApiResponse(code = 404, message = "User not found")]) - @RequestMapping( - value = ["/user/{username}"], - method = [RequestMethod.DELETE]) + @DeleteMapping( + value = ["/user/{username}"] + ) suspend fun deleteUser(@ApiParam(value = "The name that needs to be deleted", required=true) @PathVariable("username") username: kotlin.String ): ResponseEntity { return ResponseEntity(service.deleteUser(username), HttpStatus.valueOf(400)) @@ -113,10 +106,10 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) response = User::class) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = User::class),ApiResponse(code = 400, message = "Invalid username supplied"),ApiResponse(code = 404, message = "User not found")]) - @RequestMapping( + @GetMapping( value = ["/user/{username}"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) + produces = ["application/xml", "application/json"] + ) suspend fun getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required=true) @PathVariable("username") username: kotlin.String ): ResponseEntity { return ResponseEntity(service.getUserByName(username), HttpStatus.valueOf(200)) @@ -129,10 +122,10 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) response = kotlin.String::class) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = kotlin.String::class),ApiResponse(code = 400, message = "Invalid username/password supplied")]) - @RequestMapping( + @GetMapping( value = ["/user/login"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) + produces = ["application/xml", "application/json"] + ) suspend fun loginUser(@NotNull @Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) username: kotlin.String ,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) password: kotlin.String ): ResponseEntity { @@ -146,9 +139,9 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) authorizations = [Authorization(value = "api_key")]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation")]) - @RequestMapping( - value = ["/user/logout"], - method = [RequestMethod.GET]) + @GetMapping( + value = ["/user/logout"] + ) suspend fun logoutUser(): ResponseEntity { return ResponseEntity(service.logoutUser(), HttpStatus.valueOf(200)) } @@ -160,10 +153,10 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) authorizations = [Authorization(value = "api_key")]) @ApiResponses( value = [ApiResponse(code = 400, message = "Invalid user supplied"),ApiResponse(code = 404, message = "User not found")]) - @RequestMapping( + @PutMapping( value = ["/user/{username}"], - consumes = ["application/json"], - method = [RequestMethod.PUT]) + consumes = ["application/json"] + ) suspend fun updateUser(@ApiParam(value = "name that need to be deleted", required=true) @PathVariable("username") username: kotlin.String ,@ApiParam(value = "Updated user object" ,required=true ) @Valid @RequestBody user: User ): ResponseEntity { diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt index c62a3ec6c6e..42348e7084a 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt @@ -9,6 +9,7 @@ import javax.validation.constraints.Min import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size +import javax.validation.Valid import io.swagger.annotations.ApiModelProperty /** @@ -20,7 +21,7 @@ data class Category( @ApiModelProperty(example = "null", value = "") @field:JsonProperty("id") val id: kotlin.Long? = null, -@get:Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") + @get:Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiModelProperty(example = "null", value = "") @field:JsonProperty("name") val name: kotlin.String? = null ) { diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt index 6ac03ab610e..6ada956e84e 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt @@ -9,6 +9,7 @@ import javax.validation.constraints.Min import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size +import javax.validation.Valid import io.swagger.annotations.ApiModelProperty /** diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt index 83f4ba45421..2de2fa35642 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt @@ -10,6 +10,7 @@ import javax.validation.constraints.Min import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size +import javax.validation.Valid import io.swagger.annotations.ApiModelProperty /** @@ -39,7 +40,7 @@ data class Order( @field:JsonProperty("status") val status: Order.Status? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("complete") val complete: kotlin.Boolean? = null + @field:JsonProperty("complete") val complete: kotlin.Boolean? = false ) { /** diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt index de74ce56054..22bbe695c0d 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt @@ -12,6 +12,7 @@ import javax.validation.constraints.Min import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size +import javax.validation.Valid import io.swagger.annotations.ApiModelProperty /** @@ -25,20 +26,20 @@ import io.swagger.annotations.ApiModelProperty */ data class Pet( - @get:NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @field:JsonProperty("name") val name: kotlin.String, + @field:JsonProperty("name", required = true) val name: kotlin.String, - @get:NotNull @ApiModelProperty(example = "null", required = true, value = "") - @field:JsonProperty("photoUrls") val photoUrls: kotlin.collections.List, + @field:JsonProperty("photoUrls", required = true) val photoUrls: kotlin.collections.List, @ApiModelProperty(example = "null", value = "") @field:JsonProperty("id") val id: kotlin.Long? = null, + @field:Valid @ApiModelProperty(example = "null", value = "") @field:JsonProperty("category") val category: Category? = null, + @field:Valid @ApiModelProperty(example = "null", value = "") @field:JsonProperty("tags") val tags: kotlin.collections.List? = null, diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt index 7e7d1234984..ab8e8348498 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt @@ -9,6 +9,7 @@ import javax.validation.constraints.Min import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size +import javax.validation.Valid import io.swagger.annotations.ApiModelProperty /** diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt index dc58873346e..c083bd85dba 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt @@ -9,6 +9,7 @@ import javax.validation.constraints.Min import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size +import javax.validation.Valid import io.swagger.annotations.ApiModelProperty /** diff --git a/samples/openapi3/server/petstore/kotlin-springboot/.openapi-generator/FILES b/samples/openapi3/server/petstore/kotlin-springboot/.openapi-generator/FILES index 7a4e308c40d..612ea14bbdb 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/.openapi-generator/FILES +++ b/samples/openapi3/server/petstore/kotlin-springboot/.openapi-generator/FILES @@ -15,8 +15,6 @@ src/main/kotlin/org/openapitools/api/UserApi.kt src/main/kotlin/org/openapitools/api/UserApiService.kt src/main/kotlin/org/openapitools/api/UserApiServiceImpl.kt src/main/kotlin/org/openapitools/model/Category.kt -src/main/kotlin/org/openapitools/model/InlineObject.kt -src/main/kotlin/org/openapitools/model/InlineObject1.kt src/main/kotlin/org/openapitools/model/ModelApiResponse.kt src/main/kotlin/org/openapitools/model/Order.kt src/main/kotlin/org/openapitools/model/Pet.kt diff --git a/samples/openapi3/server/petstore/kotlin-springboot/.openapi-generator/VERSION b/samples/openapi3/server/petstore/kotlin-springboot/.openapi-generator/VERSION index d99e7162d01..3fa3b389a57 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/kotlin-springboot/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0-SNAPSHOT \ No newline at end of file +5.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt index 5b5ec9b8fae..a2d6231bcb2 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -13,14 +13,7 @@ import org.springframework.http.HttpStatus import org.springframework.http.MediaType import org.springframework.http.ResponseEntity -import org.springframework.web.bind.annotation.RequestBody -import org.springframework.web.bind.annotation.RequestPart -import org.springframework.web.bind.annotation.RequestParam -import org.springframework.web.bind.annotation.PathVariable -import org.springframework.web.bind.annotation.RequestHeader -import org.springframework.web.bind.annotation.RequestMethod -import org.springframework.web.bind.annotation.RequestMapping -import org.springframework.web.bind.annotation.RestController +import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired @@ -51,11 +44,11 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class),ApiResponse(code = 405, message = "Invalid input")]) - @RequestMapping( + @PostMapping( value = ["/pet"], - produces = ["application/xml", "application/json"], - consumes = ["application/json", "application/xml"], - method = [RequestMethod.POST]) + produces = ["application/xml", "application/json"], + consumes = ["application/json", "application/xml"] + ) fun addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody pet: Pet ): ResponseEntity { return ResponseEntity(service.addPet(pet), HttpStatus.valueOf(200)) @@ -68,9 +61,9 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( value = [ApiResponse(code = 400, message = "Invalid pet value")]) - @RequestMapping( - value = ["/pet/{petId}"], - method = [RequestMethod.DELETE]) + @DeleteMapping( + value = ["/pet/{petId}"] + ) fun deletePet(@ApiParam(value = "Pet id to delete", required=true) @PathVariable("petId") petId: kotlin.Long ,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) apiKey: kotlin.String? ): ResponseEntity { @@ -86,10 +79,10 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class, responseContainer = "List"),ApiResponse(code = 400, message = "Invalid status value")]) - @RequestMapping( + @GetMapping( value = ["/pet/findByStatus"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) + produces = ["application/xml", "application/json"] + ) fun findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) status: kotlin.collections.List ): ResponseEntity> { return ResponseEntity(service.findPetsByStatus(status), HttpStatus.valueOf(200)) @@ -104,10 +97,10 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class, responseContainer = "List"),ApiResponse(code = 400, message = "Invalid tag value")]) - @RequestMapping( + @GetMapping( value = ["/pet/findByTags"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) + produces = ["application/xml", "application/json"] + ) fun findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) tags: kotlin.collections.List ): ResponseEntity> { return ResponseEntity(service.findPetsByTags(tags), HttpStatus.valueOf(200)) @@ -121,10 +114,10 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "api_key")]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Pet not found")]) - @RequestMapping( + @GetMapping( value = ["/pet/{petId}"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) + produces = ["application/xml", "application/json"] + ) fun getPetById(@ApiParam(value = "ID of pet to return", required=true) @PathVariable("petId") petId: kotlin.Long ): ResponseEntity { return ResponseEntity(service.getPetById(petId), HttpStatus.valueOf(200)) @@ -138,11 +131,11 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Pet not found"),ApiResponse(code = 405, message = "Validation exception")]) - @RequestMapping( + @PutMapping( value = ["/pet"], - produces = ["application/xml", "application/json"], - consumes = ["application/json", "application/xml"], - method = [RequestMethod.PUT]) + produces = ["application/xml", "application/json"], + consumes = ["application/json", "application/xml"] + ) fun updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody pet: Pet ): ResponseEntity { return ResponseEntity(service.updatePet(pet), HttpStatus.valueOf(200)) @@ -155,10 +148,10 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( value = [ApiResponse(code = 405, message = "Invalid input")]) - @RequestMapping( + @PostMapping( value = ["/pet/{petId}"], - consumes = ["application/x-www-form-urlencoded"], - method = [RequestMethod.POST]) + consumes = ["application/x-www-form-urlencoded"] + ) fun updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required=true) @PathVariable("petId") petId: kotlin.Long ,@ApiParam(value = "Updated name of the pet") @RequestParam(value="name", required=false) name: kotlin.String? ,@ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) status: kotlin.String? @@ -174,11 +167,11 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse::class)]) - @RequestMapping( + @PostMapping( value = ["/pet/{petId}/uploadImage"], - produces = ["application/json"], - consumes = ["multipart/form-data"], - method = [RequestMethod.POST]) + produces = ["application/json"], + consumes = ["multipart/form-data"] + ) fun uploadFile(@ApiParam(value = "ID of pet to update", required=true) @PathVariable("petId") petId: kotlin.Long ,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) additionalMetadata: kotlin.String? ,@ApiParam(value = "file detail") @Valid @RequestPart("file") file: org.springframework.core.io.Resource? diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt index 1e9e28c7b9d..9199ce4e307 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -12,14 +12,7 @@ import org.springframework.http.HttpStatus import org.springframework.http.MediaType import org.springframework.http.ResponseEntity -import org.springframework.web.bind.annotation.RequestBody -import org.springframework.web.bind.annotation.RequestPart -import org.springframework.web.bind.annotation.RequestParam -import org.springframework.web.bind.annotation.PathVariable -import org.springframework.web.bind.annotation.RequestHeader -import org.springframework.web.bind.annotation.RequestMethod -import org.springframework.web.bind.annotation.RequestMapping -import org.springframework.web.bind.annotation.RestController +import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired @@ -48,9 +41,9 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors") @ApiResponses( value = [ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Order not found")]) - @RequestMapping( - value = ["/store/order/{orderId}"], - method = [RequestMethod.DELETE]) + @DeleteMapping( + value = ["/store/order/{orderId}"] + ) fun deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required=true) @PathVariable("orderId") orderId: kotlin.String ): ResponseEntity { return ResponseEntity(service.deleteOrder(orderId), HttpStatus.valueOf(400)) @@ -65,10 +58,10 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic authorizations = [Authorization(value = "api_key")]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = kotlin.collections.Map::class, responseContainer = "Map")]) - @RequestMapping( + @GetMapping( value = ["/store/inventory"], - produces = ["application/json"], - method = [RequestMethod.GET]) + produces = ["application/json"] + ) fun getInventory(): ResponseEntity> { return ResponseEntity(service.getInventory(), HttpStatus.valueOf(200)) } @@ -80,10 +73,10 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic response = Order::class) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = Order::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Order not found")]) - @RequestMapping( + @GetMapping( value = ["/store/order/{orderId}"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) + produces = ["application/xml", "application/json"] + ) fun getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required=true) @PathVariable("orderId") orderId: kotlin.Long ): ResponseEntity { return ResponseEntity(service.getOrderById(orderId), HttpStatus.valueOf(200)) @@ -96,11 +89,11 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic response = Order::class) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = Order::class),ApiResponse(code = 400, message = "Invalid Order")]) - @RequestMapping( + @PostMapping( value = ["/store/order"], - produces = ["application/xml", "application/json"], - consumes = ["application/json"], - method = [RequestMethod.POST]) + produces = ["application/xml", "application/json"], + consumes = ["application/json"] + ) fun placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @Valid @RequestBody order: Order ): ResponseEntity { return ResponseEntity(service.placeOrder(order), HttpStatus.valueOf(200)) diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt index 7a04f660f17..8fe16331f82 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -12,14 +12,7 @@ import org.springframework.http.HttpStatus import org.springframework.http.MediaType import org.springframework.http.ResponseEntity -import org.springframework.web.bind.annotation.RequestBody -import org.springframework.web.bind.annotation.RequestPart -import org.springframework.web.bind.annotation.RequestParam -import org.springframework.web.bind.annotation.PathVariable -import org.springframework.web.bind.annotation.RequestHeader -import org.springframework.web.bind.annotation.RequestMethod -import org.springframework.web.bind.annotation.RequestMapping -import org.springframework.web.bind.annotation.RestController +import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired @@ -49,10 +42,10 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) authorizations = [Authorization(value = "api_key")]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation")]) - @RequestMapping( + @PostMapping( value = ["/user"], - consumes = ["application/json"], - method = [RequestMethod.POST]) + consumes = ["application/json"] + ) fun createUser(@ApiParam(value = "Created user object" ,required=true ) @Valid @RequestBody user: User ): ResponseEntity { return ResponseEntity(service.createUser(user), HttpStatus.valueOf(200)) @@ -65,10 +58,10 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) authorizations = [Authorization(value = "api_key")]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation")]) - @RequestMapping( + @PostMapping( value = ["/user/createWithArray"], - consumes = ["application/json"], - method = [RequestMethod.POST]) + consumes = ["application/json"] + ) fun createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody user: kotlin.collections.List ): ResponseEntity { return ResponseEntity(service.createUsersWithArrayInput(user), HttpStatus.valueOf(200)) @@ -81,10 +74,10 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) authorizations = [Authorization(value = "api_key")]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation")]) - @RequestMapping( + @PostMapping( value = ["/user/createWithList"], - consumes = ["application/json"], - method = [RequestMethod.POST]) + consumes = ["application/json"] + ) fun createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody user: kotlin.collections.List ): ResponseEntity { return ResponseEntity(service.createUsersWithListInput(user), HttpStatus.valueOf(200)) @@ -97,9 +90,9 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) authorizations = [Authorization(value = "api_key")]) @ApiResponses( value = [ApiResponse(code = 400, message = "Invalid username supplied"),ApiResponse(code = 404, message = "User not found")]) - @RequestMapping( - value = ["/user/{username}"], - method = [RequestMethod.DELETE]) + @DeleteMapping( + value = ["/user/{username}"] + ) fun deleteUser(@ApiParam(value = "The name that needs to be deleted", required=true) @PathVariable("username") username: kotlin.String ): ResponseEntity { return ResponseEntity(service.deleteUser(username), HttpStatus.valueOf(400)) @@ -112,10 +105,10 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) response = User::class) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = User::class),ApiResponse(code = 400, message = "Invalid username supplied"),ApiResponse(code = 404, message = "User not found")]) - @RequestMapping( + @GetMapping( value = ["/user/{username}"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) + produces = ["application/xml", "application/json"] + ) fun getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required=true) @PathVariable("username") username: kotlin.String ): ResponseEntity { return ResponseEntity(service.getUserByName(username), HttpStatus.valueOf(200)) @@ -128,10 +121,10 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) response = kotlin.String::class) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = kotlin.String::class),ApiResponse(code = 400, message = "Invalid username/password supplied")]) - @RequestMapping( + @GetMapping( value = ["/user/login"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) + produces = ["application/xml", "application/json"] + ) fun loginUser(@NotNull @Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) username: kotlin.String ,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) password: kotlin.String ): ResponseEntity { @@ -145,9 +138,9 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) authorizations = [Authorization(value = "api_key")]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation")]) - @RequestMapping( - value = ["/user/logout"], - method = [RequestMethod.GET]) + @GetMapping( + value = ["/user/logout"] + ) fun logoutUser(): ResponseEntity { return ResponseEntity(service.logoutUser(), HttpStatus.valueOf(200)) } @@ -159,10 +152,10 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) authorizations = [Authorization(value = "api_key")]) @ApiResponses( value = [ApiResponse(code = 400, message = "Invalid user supplied"),ApiResponse(code = 404, message = "User not found")]) - @RequestMapping( + @PutMapping( value = ["/user/{username}"], - consumes = ["application/json"], - method = [RequestMethod.PUT]) + consumes = ["application/json"] + ) fun updateUser(@ApiParam(value = "name that need to be deleted", required=true) @PathVariable("username") username: kotlin.String ,@ApiParam(value = "Updated user object" ,required=true ) @Valid @RequestBody user: User ): ResponseEntity { diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt index c62a3ec6c6e..42348e7084a 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt @@ -9,6 +9,7 @@ import javax.validation.constraints.Min import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size +import javax.validation.Valid import io.swagger.annotations.ApiModelProperty /** @@ -20,7 +21,7 @@ data class Category( @ApiModelProperty(example = "null", value = "") @field:JsonProperty("id") val id: kotlin.Long? = null, -@get:Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") + @get:Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiModelProperty(example = "null", value = "") @field:JsonProperty("name") val name: kotlin.String? = null ) { diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt index 6ac03ab610e..6ada956e84e 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt @@ -9,6 +9,7 @@ import javax.validation.constraints.Min import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size +import javax.validation.Valid import io.swagger.annotations.ApiModelProperty /** diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt index 83f4ba45421..2de2fa35642 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt @@ -10,6 +10,7 @@ import javax.validation.constraints.Min import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size +import javax.validation.Valid import io.swagger.annotations.ApiModelProperty /** @@ -39,7 +40,7 @@ data class Order( @field:JsonProperty("status") val status: Order.Status? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("complete") val complete: kotlin.Boolean? = null + @field:JsonProperty("complete") val complete: kotlin.Boolean? = false ) { /** diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt index de74ce56054..22bbe695c0d 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt @@ -12,6 +12,7 @@ import javax.validation.constraints.Min import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size +import javax.validation.Valid import io.swagger.annotations.ApiModelProperty /** @@ -25,20 +26,20 @@ import io.swagger.annotations.ApiModelProperty */ data class Pet( - @get:NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @field:JsonProperty("name") val name: kotlin.String, + @field:JsonProperty("name", required = true) val name: kotlin.String, - @get:NotNull @ApiModelProperty(example = "null", required = true, value = "") - @field:JsonProperty("photoUrls") val photoUrls: kotlin.collections.List, + @field:JsonProperty("photoUrls", required = true) val photoUrls: kotlin.collections.List, @ApiModelProperty(example = "null", value = "") @field:JsonProperty("id") val id: kotlin.Long? = null, + @field:Valid @ApiModelProperty(example = "null", value = "") @field:JsonProperty("category") val category: Category? = null, + @field:Valid @ApiModelProperty(example = "null", value = "") @field:JsonProperty("tags") val tags: kotlin.collections.List? = null, diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt index 7e7d1234984..ab8e8348498 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt @@ -9,6 +9,7 @@ import javax.validation.constraints.Min import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size +import javax.validation.Valid import io.swagger.annotations.ApiModelProperty /** diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt index dc58873346e..c083bd85dba 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt @@ -9,6 +9,7 @@ import javax.validation.constraints.Min import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size +import javax.validation.Valid import io.swagger.annotations.ApiModelProperty /** diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Order.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Order.kt index dc79ef79e70..dd392773e96 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Order.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Order.kt @@ -26,7 +26,7 @@ data class Order ( val id: kotlin.Long? = null, val petId: kotlin.Long? = null, val quantity: kotlin.Int? = null, - val shipDate: java.time.LocalDateTime? = null, + val shipDate: java.time.OffsetDateTime? = null, /* Order Status */ val status: Order.Status? = null, val complete: kotlin.Boolean? = null diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION index d99e7162d01..3fa3b389a57 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0-SNAPSHOT \ No newline at end of file +5.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/PetApi.kt index b500f915568..9de503175ac 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -13,14 +13,7 @@ import org.springframework.http.HttpStatus import org.springframework.http.MediaType import org.springframework.http.ResponseEntity -import org.springframework.web.bind.annotation.RequestBody -import org.springframework.web.bind.annotation.RequestPart -import org.springframework.web.bind.annotation.RequestParam -import org.springframework.web.bind.annotation.PathVariable -import org.springframework.web.bind.annotation.RequestHeader -import org.springframework.web.bind.annotation.RequestMethod -import org.springframework.web.bind.annotation.RequestMapping -import org.springframework.web.bind.annotation.RestController +import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired @@ -39,7 +32,7 @@ import kotlin.collections.Map @RestController @Validated -@Api(value = "Pet", description = "The Pet API") +@Api(value = "pet", description = "The pet API") @RequestMapping("\${api.base-path:/v2}") class PetApiController(@Autowired(required = true) val service: PetApiService) { @@ -50,10 +43,10 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( value = [ApiResponse(code = 405, message = "Invalid input")]) - @RequestMapping( + @PostMapping( value = ["/pet"], - consumes = ["application/json", "application/xml"], - method = [RequestMethod.POST]) + consumes = ["application/json", "application/xml"] + ) fun addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody body: Pet ): ResponseEntity { return ResponseEntity(service.addPet(body), HttpStatus.valueOf(405)) @@ -66,9 +59,9 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( value = [ApiResponse(code = 400, message = "Invalid pet value")]) - @RequestMapping( - value = ["/pet/{petId}"], - method = [RequestMethod.DELETE]) + @DeleteMapping( + value = ["/pet/{petId}"] + ) fun deletePet(@ApiParam(value = "Pet id to delete", required=true) @PathVariable("petId") petId: kotlin.Long ,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) apiKey: kotlin.String? ): ResponseEntity { @@ -84,10 +77,10 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class, responseContainer = "List"),ApiResponse(code = 400, message = "Invalid status value")]) - @RequestMapping( + @GetMapping( value = ["/pet/findByStatus"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) + produces = ["application/xml", "application/json"] + ) fun findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) status: kotlin.collections.List ): ResponseEntity> { return ResponseEntity(service.findPetsByStatus(status), HttpStatus.valueOf(200)) @@ -102,10 +95,10 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class, responseContainer = "List"),ApiResponse(code = 400, message = "Invalid tag value")]) - @RequestMapping( + @GetMapping( value = ["/pet/findByTags"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) + produces = ["application/xml", "application/json"] + ) fun findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) tags: kotlin.collections.List ): ResponseEntity> { return ResponseEntity(service.findPetsByTags(tags), HttpStatus.valueOf(200)) @@ -119,10 +112,10 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "api_key")]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Pet not found")]) - @RequestMapping( + @GetMapping( value = ["/pet/{petId}"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) + produces = ["application/xml", "application/json"] + ) fun getPetById(@ApiParam(value = "ID of pet to return", required=true) @PathVariable("petId") petId: kotlin.Long ): ResponseEntity { return ResponseEntity(service.getPetById(petId), HttpStatus.valueOf(200)) @@ -135,10 +128,10 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( value = [ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Pet not found"),ApiResponse(code = 405, message = "Validation exception")]) - @RequestMapping( + @PutMapping( value = ["/pet"], - consumes = ["application/json", "application/xml"], - method = [RequestMethod.PUT]) + consumes = ["application/json", "application/xml"] + ) fun updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody body: Pet ): ResponseEntity { return ResponseEntity(service.updatePet(body), HttpStatus.valueOf(400)) @@ -151,10 +144,10 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( value = [ApiResponse(code = 405, message = "Invalid input")]) - @RequestMapping( + @PostMapping( value = ["/pet/{petId}"], - consumes = ["application/x-www-form-urlencoded"], - method = [RequestMethod.POST]) + consumes = ["application/x-www-form-urlencoded"] + ) fun updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required=true) @PathVariable("petId") petId: kotlin.Long ,@ApiParam(value = "Updated name of the pet") @RequestParam(value="name", required=false) name: kotlin.String? ,@ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) status: kotlin.String? @@ -170,11 +163,11 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse::class)]) - @RequestMapping( + @PostMapping( value = ["/pet/{petId}/uploadImage"], - produces = ["application/json"], - consumes = ["multipart/form-data"], - method = [RequestMethod.POST]) + produces = ["application/json"], + consumes = ["multipart/form-data"] + ) fun uploadFile(@ApiParam(value = "ID of pet to update", required=true) @PathVariable("petId") petId: kotlin.Long ,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) additionalMetadata: kotlin.String? ,@ApiParam(value = "file detail") @Valid @RequestPart("file") file: org.springframework.core.io.Resource? diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/StoreApi.kt index 71017e33a50..3b82141c4df 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/StoreApi.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -12,14 +12,7 @@ import org.springframework.http.HttpStatus import org.springframework.http.MediaType import org.springframework.http.ResponseEntity -import org.springframework.web.bind.annotation.RequestBody -import org.springframework.web.bind.annotation.RequestPart -import org.springframework.web.bind.annotation.RequestParam -import org.springframework.web.bind.annotation.PathVariable -import org.springframework.web.bind.annotation.RequestHeader -import org.springframework.web.bind.annotation.RequestMethod -import org.springframework.web.bind.annotation.RequestMapping -import org.springframework.web.bind.annotation.RestController +import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired @@ -38,7 +31,7 @@ import kotlin.collections.Map @RestController @Validated -@Api(value = "Store", description = "The Store API") +@Api(value = "store", description = "The store API") @RequestMapping("\${api.base-path:/v2}") class StoreApiController(@Autowired(required = true) val service: StoreApiService) { @@ -48,9 +41,9 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors") @ApiResponses( value = [ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Order not found")]) - @RequestMapping( - value = ["/store/order/{orderId}"], - method = [RequestMethod.DELETE]) + @DeleteMapping( + value = ["/store/order/{orderId}"] + ) fun deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required=true) @PathVariable("orderId") orderId: kotlin.String ): ResponseEntity { return ResponseEntity(service.deleteOrder(orderId), HttpStatus.valueOf(400)) @@ -65,10 +58,10 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic authorizations = [Authorization(value = "api_key")]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = kotlin.collections.Map::class, responseContainer = "Map")]) - @RequestMapping( + @GetMapping( value = ["/store/inventory"], - produces = ["application/json"], - method = [RequestMethod.GET]) + produces = ["application/json"] + ) fun getInventory(): ResponseEntity> { return ResponseEntity(service.getInventory(), HttpStatus.valueOf(200)) } @@ -80,10 +73,10 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic response = Order::class) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = Order::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Order not found")]) - @RequestMapping( + @GetMapping( value = ["/store/order/{orderId}"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) + produces = ["application/xml", "application/json"] + ) fun getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required=true) @PathVariable("orderId") orderId: kotlin.Long ): ResponseEntity { return ResponseEntity(service.getOrderById(orderId), HttpStatus.valueOf(200)) @@ -96,10 +89,10 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic response = Order::class) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = Order::class),ApiResponse(code = 400, message = "Invalid Order")]) - @RequestMapping( + @PostMapping( value = ["/store/order"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.POST]) + produces = ["application/xml", "application/json"] + ) fun placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @Valid @RequestBody body: Order ): ResponseEntity { return ResponseEntity(service.placeOrder(body), HttpStatus.valueOf(200)) diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/UserApi.kt index 1dbc304d88e..7071afde110 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/UserApi.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -12,14 +12,7 @@ import org.springframework.http.HttpStatus import org.springframework.http.MediaType import org.springframework.http.ResponseEntity -import org.springframework.web.bind.annotation.RequestBody -import org.springframework.web.bind.annotation.RequestPart -import org.springframework.web.bind.annotation.RequestParam -import org.springframework.web.bind.annotation.PathVariable -import org.springframework.web.bind.annotation.RequestHeader -import org.springframework.web.bind.annotation.RequestMethod -import org.springframework.web.bind.annotation.RequestMapping -import org.springframework.web.bind.annotation.RestController +import org.springframework.web.bind.annotation.* import org.springframework.validation.annotation.Validated import org.springframework.web.context.request.NativeWebRequest import org.springframework.beans.factory.annotation.Autowired @@ -38,7 +31,7 @@ import kotlin.collections.Map @RestController @Validated -@Api(value = "User", description = "The User API") +@Api(value = "user", description = "The user API") @RequestMapping("\${api.base-path:/v2}") class UserApiController(@Autowired(required = true) val service: UserApiService) { @@ -48,9 +41,9 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) notes = "This can only be done by the logged in user.") @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation")]) - @RequestMapping( - value = ["/user"], - method = [RequestMethod.POST]) + @PostMapping( + value = ["/user"] + ) fun createUser(@ApiParam(value = "Created user object" ,required=true ) @Valid @RequestBody body: User ): ResponseEntity { return ResponseEntity(service.createUser(body), HttpStatus.valueOf(200)) @@ -62,9 +55,9 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) notes = "") @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation")]) - @RequestMapping( - value = ["/user/createWithArray"], - method = [RequestMethod.POST]) + @PostMapping( + value = ["/user/createWithArray"] + ) fun createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody body: kotlin.collections.List ): ResponseEntity { return ResponseEntity(service.createUsersWithArrayInput(body), HttpStatus.valueOf(200)) @@ -76,9 +69,9 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) notes = "") @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation")]) - @RequestMapping( - value = ["/user/createWithList"], - method = [RequestMethod.POST]) + @PostMapping( + value = ["/user/createWithList"] + ) fun createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody body: kotlin.collections.List ): ResponseEntity { return ResponseEntity(service.createUsersWithListInput(body), HttpStatus.valueOf(200)) @@ -90,9 +83,9 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) notes = "This can only be done by the logged in user.") @ApiResponses( value = [ApiResponse(code = 400, message = "Invalid username supplied"),ApiResponse(code = 404, message = "User not found")]) - @RequestMapping( - value = ["/user/{username}"], - method = [RequestMethod.DELETE]) + @DeleteMapping( + value = ["/user/{username}"] + ) fun deleteUser(@ApiParam(value = "The name that needs to be deleted", required=true) @PathVariable("username") username: kotlin.String ): ResponseEntity { return ResponseEntity(service.deleteUser(username), HttpStatus.valueOf(400)) @@ -105,10 +98,10 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) response = User::class) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = User::class),ApiResponse(code = 400, message = "Invalid username supplied"),ApiResponse(code = 404, message = "User not found")]) - @RequestMapping( + @GetMapping( value = ["/user/{username}"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) + produces = ["application/xml", "application/json"] + ) fun getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required=true) @PathVariable("username") username: kotlin.String ): ResponseEntity { return ResponseEntity(service.getUserByName(username), HttpStatus.valueOf(200)) @@ -121,10 +114,10 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) response = kotlin.String::class) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = kotlin.String::class),ApiResponse(code = 400, message = "Invalid username/password supplied")]) - @RequestMapping( + @GetMapping( value = ["/user/login"], - produces = ["application/xml", "application/json"], - method = [RequestMethod.GET]) + produces = ["application/xml", "application/json"] + ) fun loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) username: kotlin.String ,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) password: kotlin.String ): ResponseEntity { @@ -137,9 +130,9 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) notes = "") @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation")]) - @RequestMapping( - value = ["/user/logout"], - method = [RequestMethod.GET]) + @GetMapping( + value = ["/user/logout"] + ) fun logoutUser(): ResponseEntity { return ResponseEntity(service.logoutUser(), HttpStatus.valueOf(200)) } @@ -150,9 +143,9 @@ class UserApiController(@Autowired(required = true) val service: UserApiService) notes = "This can only be done by the logged in user.") @ApiResponses( value = [ApiResponse(code = 400, message = "Invalid user supplied"),ApiResponse(code = 404, message = "User not found")]) - @RequestMapping( - value = ["/user/{username}"], - method = [RequestMethod.PUT]) + @PutMapping( + value = ["/user/{username}"] + ) fun updateUser(@ApiParam(value = "name that need to be deleted", required=true) @PathVariable("username") username: kotlin.String ,@ApiParam(value = "Updated user object" ,required=true ) @Valid @RequestBody body: User ): ResponseEntity { diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Category.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Category.kt index 4b26b45aa17..106585ec150 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Category.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Category.kt @@ -9,6 +9,7 @@ import javax.validation.constraints.Min import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size +import javax.validation.Valid import io.swagger.annotations.ApiModelProperty /** diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt index 20f2e157d47..9916aaf62e3 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt @@ -9,6 +9,7 @@ import javax.validation.constraints.Min import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size +import javax.validation.Valid import io.swagger.annotations.ApiModelProperty /** diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt index 39a980deede..2cfdd429793 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt @@ -10,6 +10,7 @@ import javax.validation.constraints.Min import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size +import javax.validation.Valid import io.swagger.annotations.ApiModelProperty /** @@ -39,7 +40,7 @@ data class Order( @field:JsonProperty("status") var status: Order.Status? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("complete") var complete: kotlin.Boolean? = null + @field:JsonProperty("complete") var complete: kotlin.Boolean? = false ) { /** diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt index 974d6647ac3..88d1eb64f41 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt @@ -12,6 +12,7 @@ import javax.validation.constraints.Min import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size +import javax.validation.Valid import io.swagger.annotations.ApiModelProperty /** @@ -25,20 +26,20 @@ import io.swagger.annotations.ApiModelProperty */ data class Pet( - @get:NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @field:JsonProperty("name") var name: kotlin.String, + @field:JsonProperty("name", required = true) var name: kotlin.String, - @get:NotNull @ApiModelProperty(example = "null", required = true, value = "") - @field:JsonProperty("photoUrls") var photoUrls: kotlin.collections.List, + @field:JsonProperty("photoUrls", required = true) var photoUrls: kotlin.collections.List, @ApiModelProperty(example = "null", value = "") @field:JsonProperty("id") var id: kotlin.Long? = null, + @field:Valid @ApiModelProperty(example = "null", value = "") @field:JsonProperty("category") var category: Category? = null, + @field:Valid @ApiModelProperty(example = "null", value = "") @field:JsonProperty("tags") var tags: kotlin.collections.List? = null, diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Tag.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Tag.kt index 817a4af7e41..77fc054dc91 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Tag.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Tag.kt @@ -9,6 +9,7 @@ import javax.validation.constraints.Min import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size +import javax.validation.Valid import io.swagger.annotations.ApiModelProperty /** diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/User.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/User.kt index 8995281f28d..58ba8f5177b 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/User.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/User.kt @@ -9,6 +9,7 @@ import javax.validation.constraints.Min import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size +import javax.validation.Valid import io.swagger.annotations.ApiModelProperty /** diff --git a/samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION b/samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION index d99e7162d01..3fa3b389a57 100644 --- a/samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0-SNAPSHOT \ No newline at end of file +5.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Order.kt b/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Order.kt index 2d806e9e2fc..f3dfdd42e31 100644 --- a/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Order.kt +++ b/samples/server/petstore/kotlin/vertx/src/main/kotlin/org/openapitools/server/api/model/Order.kt @@ -31,7 +31,7 @@ data class Order ( var id: kotlin.Long? = null, var petId: kotlin.Long? = null, var quantity: kotlin.Int? = null, - var shipDate: java.time.LocalDateTime? = null, + var shipDate: java.time.OffsetDateTime? = null, /* Order Status */ var status: Order.Status? = null, var complete: kotlin.Boolean? = null From 6fa586635b62bce9e930536e5765f22f0b9d18d1 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 3 Feb 2021 17:20:37 +0800 Subject: [PATCH 09/44] fix logo --- website/src/dynamic/users.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/dynamic/users.yml b/website/src/dynamic/users.yml index ee96702c9c9..c8c0cc81f45 100644 --- a/website/src/dynamic/users.yml +++ b/website/src/dynamic/users.yml @@ -425,7 +425,7 @@ pinned: false - caption: "viadee" - image: "img/companies/viadee.png" + image: "img/companies/viadee.jpg" infoLink: "https://www.viadee.de" pinned: false - From d7bdd7f490ce3b04b61ccca338940c2d72c0ac58 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 4 Feb 2021 09:17:45 +0800 Subject: [PATCH 10/44] Fix TS tests in Travis CI (#8607) * remove npm test * remove npm test * rearrange tests * move ts axios tests to circleci * Revert "move ts axios tests to circleci" This reverts commit 356f795617d50125c15acc815e68899ff0bd35fa. * add moduleResolution: node * update tsconfig.json * add axios installation * install builds/with-npm-version * update samples --- pom.xml | 3 +- .../builds/with-npm-version/pom.xml | 46 +++++++++++++++++++ .../tests/default/package-lock.json | 43 ++++------------- .../tests/default/tsconfig.json | 1 + .../builds/es6-target/pom.xml | 13 ------ .../builds/with-npm-version/pom.xml | 13 ------ 6 files changed, 57 insertions(+), 62 deletions(-) create mode 100644 samples/client/petstore/typescript-axios/builds/with-npm-version/pom.xml diff --git a/pom.xml b/pom.xml index c37fce53aa0..e7b5d046ec8 100644 --- a/pom.xml +++ b/pom.xml @@ -1181,6 +1181,8 @@ + samples/client/petstore/typescript-axios/builds/with-npm-version + samples/client/petstore/typescript-axios/tests/default samples/client/petstore/crystal samples/server/petstore/python-aiohttp @@ -1222,7 +1224,6 @@ samples/client/petstore/typescript-fetch/builds/es6-target samples/client/petstore/typescript-fetch/builds/with-npm-version samples/client/petstore/typescript-fetch/tests/default - samples/client/petstore/typescript-axios/tests/default samples/client/petstore/typescript-node/npm samples/client/petstore/typescript-rxjs/builds/with-npm-version diff --git a/samples/server/petstore/java-vertx/async/.openapi-generator-ignore b/samples/server/petstore/java-vertx/async/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a3..00000000000 --- a/samples/server/petstore/java-vertx/async/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/server/petstore/java-vertx/async/.openapi-generator/FILES b/samples/server/petstore/java-vertx/async/.openapi-generator/FILES deleted file mode 100644 index d863c5cf45a..00000000000 --- a/samples/server/petstore/java-vertx/async/.openapi-generator/FILES +++ /dev/null @@ -1,21 +0,0 @@ -README.md -pom.xml -src/main/java/org/openapitools/server/api/MainApiException.java -src/main/java/org/openapitools/server/api/MainApiVerticle.java -src/main/java/org/openapitools/server/api/model/Category.java -src/main/java/org/openapitools/server/api/model/ModelApiResponse.java -src/main/java/org/openapitools/server/api/model/Order.java -src/main/java/org/openapitools/server/api/model/Pet.java -src/main/java/org/openapitools/server/api/model/Tag.java -src/main/java/org/openapitools/server/api/model/User.java -src/main/java/org/openapitools/server/api/verticle/PetApi.java -src/main/java/org/openapitools/server/api/verticle/PetApiException.java -src/main/java/org/openapitools/server/api/verticle/PetApiVerticle.java -src/main/java/org/openapitools/server/api/verticle/StoreApi.java -src/main/java/org/openapitools/server/api/verticle/StoreApiException.java -src/main/java/org/openapitools/server/api/verticle/StoreApiVerticle.java -src/main/java/org/openapitools/server/api/verticle/UserApi.java -src/main/java/org/openapitools/server/api/verticle/UserApiException.java -src/main/java/org/openapitools/server/api/verticle/UserApiVerticle.java -src/main/resources/openapi.json -src/main/resources/vertx-default-jul-logging.properties diff --git a/samples/server/petstore/java-vertx/async/.openapi-generator/VERSION b/samples/server/petstore/java-vertx/async/.openapi-generator/VERSION deleted file mode 100644 index 3fa3b389a57..00000000000 --- a/samples/server/petstore/java-vertx/async/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/async/README.md b/samples/server/petstore/java-vertx/async/README.md deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/server/petstore/java-vertx/async/pom.xml b/samples/server/petstore/java-vertx/async/pom.xml deleted file mode 100644 index 217266e583e..00000000000 --- a/samples/server/petstore/java-vertx/async/pom.xml +++ /dev/null @@ -1,91 +0,0 @@ - - 4.0.0 - - org.openapitools - openapi-java-vertx-server - 1.0.0-SNAPSHOT - jar - - OpenAPI Petstore - - - UTF-8 - 1.8 - 4.13.1 - 3.4.1 - 3.8.1 - 1.4.0 - 2.3 - 2.7.4 - - - - - junit - junit - ${junit.version} - test - - - - io.vertx - vertx-unit - ${vertx.version} - test - - - - com.github.phiz71 - vertx-swagger-router - ${vertx-swagger-router.version} - - - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 - ${jackson-datatype-jsr310.version} - - - - - - - - maven-compiler-plugin - ${maven-compiler-plugin.version} - - ${java.version} - ${java.version} - - - - - org.apache.maven.plugins - maven-shade-plugin - ${maven-shade-plugin.version} - - - package - - shade - - - - - - io.vertx.core.Starter - org.openapitools.server.api.MainApiVerticle - - - - - ${project.build.directory}/${project.artifactId}-${project.version}-fat.jar - - - - - - - diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/MainApiException.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/MainApiException.java deleted file mode 100644 index 4aef710c011..00000000000 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/MainApiException.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.openapitools.server.api; - -public class MainApiException extends Exception { - private int statusCode; - private String statusMessage; - - public MainApiException(int statusCode, String statusMessage) { - super(); - this.statusCode = statusCode; - this.statusMessage = statusMessage; - } - - public int getStatusCode() { - return statusCode; - } - - public String getStatusMessage() { - return statusMessage; - } - - public static final MainApiException INTERNAL_SERVER_ERROR = new MainApiException(500, "Internal Server Error"); -} \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/MainApiVerticle.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/MainApiVerticle.java deleted file mode 100644 index 26381f058f1..00000000000 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/MainApiVerticle.java +++ /dev/null @@ -1,97 +0,0 @@ -package org.openapitools.server.api; - -import java.nio.charset.Charset; - -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; -import com.github.phiz71.vertx.swagger.router.OperationIdServiceIdResolver; -import com.github.phiz71.vertx.swagger.router.SwaggerRouter; - -import io.swagger.models.Swagger; -import io.swagger.parser.SwaggerParser; -import io.vertx.core.AbstractVerticle; -import io.vertx.core.Context; -import io.vertx.core.Future; -import io.vertx.core.file.FileSystem; -import io.vertx.core.json.Json; -import io.vertx.core.logging.Logger; -import io.vertx.core.logging.LoggerFactory; -import io.vertx.core.Vertx; -import io.vertx.ext.web.Router; - -public class MainApiVerticle extends AbstractVerticle { - static final Logger LOGGER = LoggerFactory.getLogger(MainApiVerticle.class); - - private int serverPort = 8080; - protected Router router; - - public int getServerPort() { - return serverPort; - } - - public void setServerPort(int serverPort) { - this.serverPort = serverPort; - } - - @Override - public void init(Vertx vertx, Context context) { - super.init(vertx, context); - router = Router.router(vertx); - } - - @Override - public void start(Future startFuture) throws Exception { - Json.mapper.registerModule(new JavaTimeModule()); - FileSystem vertxFileSystem = vertx.fileSystem(); - vertxFileSystem.readFile("openapi.json", readFile -> { - if (readFile.succeeded()) { - Swagger swagger = new SwaggerParser().parse(readFile.result().toString(Charset.forName("utf-8"))); - Router swaggerRouter = SwaggerRouter.swaggerRouter(router, swagger, vertx.eventBus(), new OperationIdServiceIdResolver()); - - deployVerticles(startFuture); - - vertx.createHttpServer() - .requestHandler(swaggerRouter::accept) - .listen(serverPort, h -> { - if (h.succeeded()) { - startFuture.complete(); - } else { - startFuture.fail(h.cause()); - } - }); - } else { - startFuture.fail(readFile.cause()); - } - }); - } - - public void deployVerticles(Future startFuture) { - - vertx.deployVerticle("org.openapitools.server.api.verticle.PetApiVerticle", res -> { - if (res.succeeded()) { - LOGGER.info("PetApiVerticle : Deployed"); - } else { - startFuture.fail(res.cause()); - LOGGER.error("PetApiVerticle : Deployment failed"); - } - }); - - vertx.deployVerticle("org.openapitools.server.api.verticle.StoreApiVerticle", res -> { - if (res.succeeded()) { - LOGGER.info("StoreApiVerticle : Deployed"); - } else { - startFuture.fail(res.cause()); - LOGGER.error("StoreApiVerticle : Deployment failed"); - } - }); - - vertx.deployVerticle("org.openapitools.server.api.verticle.UserApiVerticle", res -> { - if (res.succeeded()) { - LOGGER.info("UserApiVerticle : Deployed"); - } else { - startFuture.fail(res.cause()); - LOGGER.error("UserApiVerticle : Deployment failed"); - } - }); - - } -} diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Category.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Category.java deleted file mode 100644 index f05201c45ad..00000000000 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Category.java +++ /dev/null @@ -1,83 +0,0 @@ -package org.openapitools.server.api.model; - -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * A category for a pet - **/ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class Category { - - private Long id; - private String name; - - public Category () { - - } - - public Category (Long id, String name) { - this.id = id; - this.name = name; - } - - - @JsonProperty("id") - public Long getId() { - return id; - } - public void setId(Long id) { - this.id = id; - } - - - @JsonProperty("name") - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Category category = (Category) o; - return Objects.equals(id, category.id) && - Objects.equals(name, category.name); - } - - @Override - public int hashCode() { - return Objects.hash(id, name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Category {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/ModelApiResponse.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/ModelApiResponse.java deleted file mode 100644 index 934a6efdf96..00000000000 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/ModelApiResponse.java +++ /dev/null @@ -1,96 +0,0 @@ -package org.openapitools.server.api.model; - -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Describes the result of uploading an image resource - **/ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class ModelApiResponse { - - private Integer code; - private String type; - private String message; - - public ModelApiResponse () { - - } - - public ModelApiResponse (Integer code, String type, String message) { - this.code = code; - this.type = type; - this.message = message; - } - - - @JsonProperty("code") - public Integer getCode() { - return code; - } - public void setCode(Integer code) { - this.code = code; - } - - - @JsonProperty("type") - public String getType() { - return type; - } - public void setType(String type) { - this.type = type; - } - - - @JsonProperty("message") - public String getMessage() { - return message; - } - public void setMessage(String message) { - this.message = message; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelApiResponse _apiResponse = (ModelApiResponse) o; - return Objects.equals(code, _apiResponse.code) && - Objects.equals(type, _apiResponse.type) && - Objects.equals(message, _apiResponse.message); - } - - @Override - public int hashCode() { - return Objects.hash(code, type, message); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelApiResponse {\n"); - - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Order.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Order.java deleted file mode 100644 index 0d8d6714212..00000000000 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Order.java +++ /dev/null @@ -1,157 +0,0 @@ -package org.openapitools.server.api.model; - -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonValue; -import java.time.OffsetDateTime; - -/** - * An order for a pets from the pet store - **/ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class Order { - - private Long id; - private Long petId; - private Integer quantity; - private OffsetDateTime shipDate; - - - public enum StatusEnum { - PLACED("placed"), - APPROVED("approved"), - DELIVERED("delivered"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return value; - } - } - - private StatusEnum status; - private Boolean complete = false; - - public Order () { - - } - - public Order (Long id, Long petId, Integer quantity, OffsetDateTime shipDate, StatusEnum status, Boolean complete) { - this.id = id; - this.petId = petId; - this.quantity = quantity; - this.shipDate = shipDate; - this.status = status; - this.complete = complete; - } - - - @JsonProperty("id") - public Long getId() { - return id; - } - public void setId(Long id) { - this.id = id; - } - - - @JsonProperty("petId") - public Long getPetId() { - return petId; - } - public void setPetId(Long petId) { - this.petId = petId; - } - - - @JsonProperty("quantity") - public Integer getQuantity() { - return quantity; - } - public void setQuantity(Integer quantity) { - this.quantity = quantity; - } - - - @JsonProperty("shipDate") - public OffsetDateTime getShipDate() { - return shipDate; - } - public void setShipDate(OffsetDateTime shipDate) { - this.shipDate = shipDate; - } - - - @JsonProperty("status") - public StatusEnum getStatus() { - return status; - } - public void setStatus(StatusEnum status) { - this.status = status; - } - - - @JsonProperty("complete") - public Boolean getComplete() { - return complete; - } - public void setComplete(Boolean complete) { - this.complete = complete; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Order order = (Order) o; - return Objects.equals(id, order.id) && - Objects.equals(petId, order.petId) && - Objects.equals(quantity, order.quantity) && - Objects.equals(shipDate, order.shipDate) && - Objects.equals(status, order.status) && - Objects.equals(complete, order.complete); - } - - @Override - public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Order {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); - sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Pet.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Pet.java deleted file mode 100644 index cb9325acf5d..00000000000 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Pet.java +++ /dev/null @@ -1,160 +0,0 @@ -package org.openapitools.server.api.model; - -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.server.api.model.Category; -import org.openapitools.server.api.model.Tag; - -/** - * A pet for sale in the pet store - **/ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class Pet { - - private Long id; - private Category category; - private String name; - private List photoUrls = new ArrayList<>(); - private List tags = new ArrayList<>(); - - - public enum StatusEnum { - AVAILABLE("available"), - PENDING("pending"), - SOLD("sold"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return value; - } - } - - private StatusEnum status; - - public Pet () { - - } - - public Pet (Long id, Category category, String name, List photoUrls, List tags, StatusEnum status) { - this.id = id; - this.category = category; - this.name = name; - this.photoUrls = photoUrls; - this.tags = tags; - this.status = status; - } - - - @JsonProperty("id") - public Long getId() { - return id; - } - public void setId(Long id) { - this.id = id; - } - - - @JsonProperty("category") - public Category getCategory() { - return category; - } - public void setCategory(Category category) { - this.category = category; - } - - - @JsonProperty("name") - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - - - @JsonProperty("photoUrls") - public List getPhotoUrls() { - return photoUrls; - } - public void setPhotoUrls(List photoUrls) { - this.photoUrls = photoUrls; - } - - - @JsonProperty("tags") - public List getTags() { - return tags; - } - public void setTags(List tags) { - this.tags = tags; - } - - - @JsonProperty("status") - public StatusEnum getStatus() { - return status; - } - public void setStatus(StatusEnum status) { - this.status = status; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Pet pet = (Pet) o; - return Objects.equals(id, pet.id) && - Objects.equals(category, pet.category) && - Objects.equals(name, pet.name) && - Objects.equals(photoUrls, pet.photoUrls) && - Objects.equals(tags, pet.tags) && - Objects.equals(status, pet.status); - } - - @Override - public int hashCode() { - return Objects.hash(id, category, name, photoUrls, tags, status); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Pet {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" category: ").append(toIndentedString(category)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Tag.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Tag.java deleted file mode 100644 index 0389c2fbeea..00000000000 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/Tag.java +++ /dev/null @@ -1,83 +0,0 @@ -package org.openapitools.server.api.model; - -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * A tag for a pet - **/ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class Tag { - - private Long id; - private String name; - - public Tag () { - - } - - public Tag (Long id, String name) { - this.id = id; - this.name = name; - } - - - @JsonProperty("id") - public Long getId() { - return id; - } - public void setId(Long id) { - this.id = id; - } - - - @JsonProperty("name") - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Tag tag = (Tag) o; - return Objects.equals(id, tag.id) && - Objects.equals(name, tag.name); - } - - @Override - public int hashCode() { - return Objects.hash(id, name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Tag {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/User.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/User.java deleted file mode 100644 index 0e1e8755555..00000000000 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/model/User.java +++ /dev/null @@ -1,161 +0,0 @@ -package org.openapitools.server.api.model; - -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * A User who is purchasing from the pet store - **/ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class User { - - private Long id; - private String username; - private String firstName; - private String lastName; - private String email; - private String password; - private String phone; - private Integer userStatus; - - public User () { - - } - - public User (Long id, String username, String firstName, String lastName, String email, String password, String phone, Integer userStatus) { - this.id = id; - this.username = username; - this.firstName = firstName; - this.lastName = lastName; - this.email = email; - this.password = password; - this.phone = phone; - this.userStatus = userStatus; - } - - - @JsonProperty("id") - public Long getId() { - return id; - } - public void setId(Long id) { - this.id = id; - } - - - @JsonProperty("username") - public String getUsername() { - return username; - } - public void setUsername(String username) { - this.username = username; - } - - - @JsonProperty("firstName") - public String getFirstName() { - return firstName; - } - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - - @JsonProperty("lastName") - public String getLastName() { - return lastName; - } - public void setLastName(String lastName) { - this.lastName = lastName; - } - - - @JsonProperty("email") - public String getEmail() { - return email; - } - public void setEmail(String email) { - this.email = email; - } - - - @JsonProperty("password") - public String getPassword() { - return password; - } - public void setPassword(String password) { - this.password = password; - } - - - @JsonProperty("phone") - public String getPhone() { - return phone; - } - public void setPhone(String phone) { - this.phone = phone; - } - - - @JsonProperty("userStatus") - public Integer getUserStatus() { - return userStatus; - } - public void setUserStatus(Integer userStatus) { - this.userStatus = userStatus; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - User user = (User) o; - return Objects.equals(id, user.id) && - Objects.equals(username, user.username) && - Objects.equals(firstName, user.firstName) && - Objects.equals(lastName, user.lastName) && - Objects.equals(email, user.email) && - Objects.equals(password, user.password) && - Objects.equals(phone, user.phone) && - Objects.equals(userStatus, user.userStatus); - } - - @Override - public int hashCode() { - return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class User {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); - sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/PetApi.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/PetApi.java deleted file mode 100644 index 7ec2b40b8ff..00000000000 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/PetApi.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.openapitools.server.api.verticle; - -import java.io.File; -import org.openapitools.server.api.MainApiException; -import org.openapitools.server.api.model.ModelApiResponse; -import org.openapitools.server.api.model.Pet; - -import io.vertx.core.AsyncResult; -import io.vertx.core.Handler; - -import java.util.List; -import java.util.Map; - -public interface PetApi { - //addPet - void addPet(Pet body, Handler> handler); - - //deletePet - void deletePet(Long petId, String apiKey, Handler> handler); - - //findPetsByStatus - void findPetsByStatus(List status, Handler>> handler); - - //findPetsByTags - void findPetsByTags(List tags, Handler>> handler); - - //getPetById - void getPetById(Long petId, Handler> handler); - - //updatePet - void updatePet(Pet body, Handler> handler); - - //updatePetWithForm - void updatePetWithForm(Long petId, String name, String status, Handler> handler); - - //uploadFile - void uploadFile(Long petId, String additionalMetadata, File file, Handler> handler); - -} diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/PetApiException.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/PetApiException.java deleted file mode 100644 index d357d90ca1a..00000000000 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/PetApiException.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.openapitools.server.api.verticle; - -import java.io.File; -import org.openapitools.server.api.MainApiException; -import org.openapitools.server.api.model.ModelApiResponse; -import org.openapitools.server.api.model.Pet; - -public final class PetApiException extends MainApiException { - public PetApiException(int statusCode, String statusMessage) { - super(statusCode, statusMessage); - } - - public static final PetApiException Pet_addPet_405_Exception = new PetApiException(405, "Invalid input"); - public static final PetApiException Pet_deletePet_400_Exception = new PetApiException(400, "Invalid pet value"); - public static final PetApiException Pet_findPetsByStatus_200_Exception = new PetApiException(200, "successful operation"); - public static final PetApiException Pet_findPetsByStatus_400_Exception = new PetApiException(400, "Invalid status value"); - public static final PetApiException Pet_findPetsByTags_200_Exception = new PetApiException(200, "successful operation"); - public static final PetApiException Pet_findPetsByTags_400_Exception = new PetApiException(400, "Invalid tag value"); - public static final PetApiException Pet_getPetById_200_Exception = new PetApiException(200, "successful operation"); - public static final PetApiException Pet_getPetById_400_Exception = new PetApiException(400, "Invalid ID supplied"); - public static final PetApiException Pet_getPetById_404_Exception = new PetApiException(404, "Pet not found"); - public static final PetApiException Pet_updatePet_400_Exception = new PetApiException(400, "Invalid ID supplied"); - public static final PetApiException Pet_updatePet_404_Exception = new PetApiException(404, "Pet not found"); - public static final PetApiException Pet_updatePet_405_Exception = new PetApiException(405, "Validation exception"); - public static final PetApiException Pet_updatePetWithForm_405_Exception = new PetApiException(405, "Invalid input"); - public static final PetApiException Pet_uploadFile_200_Exception = new PetApiException(200, "successful operation"); - - -} \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/PetApiVerticle.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/PetApiVerticle.java deleted file mode 100644 index d1849cb43f1..00000000000 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/PetApiVerticle.java +++ /dev/null @@ -1,276 +0,0 @@ -package org.openapitools.server.api.verticle; - -import io.vertx.core.AbstractVerticle; -import io.vertx.core.eventbus.Message; -import io.vertx.core.json.Json; -import io.vertx.core.json.JsonArray; -import io.vertx.core.json.JsonObject; -import io.vertx.core.logging.Logger; -import io.vertx.core.logging.LoggerFactory; - -import java.io.File; -import org.openapitools.server.api.MainApiException; -import org.openapitools.server.api.model.ModelApiResponse; -import org.openapitools.server.api.model.Pet; - -import java.util.List; -import java.util.Map; - -public class PetApiVerticle extends AbstractVerticle { - static final Logger LOGGER = LoggerFactory.getLogger(PetApiVerticle.class); - - static final String ADDPET_SERVICE_ID = "addPet"; - static final String DELETEPET_SERVICE_ID = "deletePet"; - static final String FINDPETSBYSTATUS_SERVICE_ID = "findPetsByStatus"; - static final String FINDPETSBYTAGS_SERVICE_ID = "findPetsByTags"; - static final String GETPETBYID_SERVICE_ID = "getPetById"; - static final String UPDATEPET_SERVICE_ID = "updatePet"; - static final String UPDATEPETWITHFORM_SERVICE_ID = "updatePetWithForm"; - static final String UPLOADFILE_SERVICE_ID = "uploadFile"; - - final PetApi service; - - public PetApiVerticle() { - try { - Class serviceImplClass = getClass().getClassLoader().loadClass("org.openapitools.server.api.verticle.PetApiImpl"); - service = (PetApi)serviceImplClass.newInstance(); - } catch (Exception e) { - logUnexpectedError("PetApiVerticle constructor", e); - throw new RuntimeException(e); - } - } - - @Override - public void start() throws Exception { - - //Consumer for addPet - vertx.eventBus(). consumer(ADDPET_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "addPet"; - JsonObject bodyParam = message.body().getJsonObject("body"); - if (bodyParam == null) { - manageError(message, new MainApiException(400, "body is required"), serviceId); - return; - } - Pet body = Json.mapper.readValue(bodyParam.encode(), Pet.class); - service.addPet(body, result -> { - if (result.succeeded()) - message.reply(null); - else { - Throwable cause = result.cause(); - manageError(message, cause, "addPet"); - } - }); - } catch (Exception e) { - logUnexpectedError("addPet", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for deletePet - vertx.eventBus(). consumer(DELETEPET_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "deletePet"; - String petIdParam = message.body().getString("petId"); - if(petIdParam == null) { - manageError(message, new MainApiException(400, "petId is required"), serviceId); - return; - } - Long petId = Json.mapper.readValue(petIdParam, Long.class); - String apiKeyParam = message.body().getString("api_key"); - String apiKey = (apiKeyParam == null) ? null : apiKeyParam; - service.deletePet(petId, apiKey, result -> { - if (result.succeeded()) - message.reply(null); - else { - Throwable cause = result.cause(); - manageError(message, cause, "deletePet"); - } - }); - } catch (Exception e) { - logUnexpectedError("deletePet", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for findPetsByStatus - vertx.eventBus(). consumer(FINDPETSBYSTATUS_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "findPetsByStatus"; - JsonArray statusParam = message.body().getJsonArray("status"); - if(statusParam == null) { - manageError(message, new MainApiException(400, "status is required"), serviceId); - return; - } - List status = Json.mapper.readValue(statusParam.encode(), - Json.mapper.getTypeFactory().constructCollectionType(List.class, String.class)); - service.findPetsByStatus(status, result -> { - if (result.succeeded()) - message.reply(new JsonArray(Json.encode(result.result())).encodePrettily()); - else { - Throwable cause = result.cause(); - manageError(message, cause, "findPetsByStatus"); - } - }); - } catch (Exception e) { - logUnexpectedError("findPetsByStatus", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for findPetsByTags - vertx.eventBus(). consumer(FINDPETSBYTAGS_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "findPetsByTags"; - JsonArray tagsParam = message.body().getJsonArray("tags"); - if(tagsParam == null) { - manageError(message, new MainApiException(400, "tags is required"), serviceId); - return; - } - List tags = Json.mapper.readValue(tagsParam.encode(), - Json.mapper.getTypeFactory().constructCollectionType(List.class, String.class)); - service.findPetsByTags(tags, result -> { - if (result.succeeded()) - message.reply(new JsonArray(Json.encode(result.result())).encodePrettily()); - else { - Throwable cause = result.cause(); - manageError(message, cause, "findPetsByTags"); - } - }); - } catch (Exception e) { - logUnexpectedError("findPetsByTags", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for getPetById - vertx.eventBus(). consumer(GETPETBYID_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "getPetById"; - String petIdParam = message.body().getString("petId"); - if(petIdParam == null) { - manageError(message, new MainApiException(400, "petId is required"), serviceId); - return; - } - Long petId = Json.mapper.readValue(petIdParam, Long.class); - service.getPetById(petId, result -> { - if (result.succeeded()) - message.reply(new JsonObject(Json.encode(result.result())).encodePrettily()); - else { - Throwable cause = result.cause(); - manageError(message, cause, "getPetById"); - } - }); - } catch (Exception e) { - logUnexpectedError("getPetById", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for updatePet - vertx.eventBus(). consumer(UPDATEPET_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "updatePet"; - JsonObject bodyParam = message.body().getJsonObject("body"); - if (bodyParam == null) { - manageError(message, new MainApiException(400, "body is required"), serviceId); - return; - } - Pet body = Json.mapper.readValue(bodyParam.encode(), Pet.class); - service.updatePet(body, result -> { - if (result.succeeded()) - message.reply(null); - else { - Throwable cause = result.cause(); - manageError(message, cause, "updatePet"); - } - }); - } catch (Exception e) { - logUnexpectedError("updatePet", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for updatePetWithForm - vertx.eventBus(). consumer(UPDATEPETWITHFORM_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "updatePetWithForm"; - String petIdParam = message.body().getString("petId"); - if(petIdParam == null) { - manageError(message, new MainApiException(400, "petId is required"), serviceId); - return; - } - Long petId = Json.mapper.readValue(petIdParam, Long.class); - String nameParam = message.body().getString("name"); - String name = (nameParam == null) ? null : nameParam; - String statusParam = message.body().getString("status"); - String status = (statusParam == null) ? null : statusParam; - service.updatePetWithForm(petId, name, status, result -> { - if (result.succeeded()) - message.reply(null); - else { - Throwable cause = result.cause(); - manageError(message, cause, "updatePetWithForm"); - } - }); - } catch (Exception e) { - logUnexpectedError("updatePetWithForm", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for uploadFile - vertx.eventBus(). consumer(UPLOADFILE_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "uploadFile"; - String petIdParam = message.body().getString("petId"); - if(petIdParam == null) { - manageError(message, new MainApiException(400, "petId is required"), serviceId); - return; - } - Long petId = Json.mapper.readValue(petIdParam, Long.class); - String additionalMetadataParam = message.body().getString("additionalMetadata"); - String additionalMetadata = (additionalMetadataParam == null) ? null : additionalMetadataParam; - String fileParam = message.body().getString("file"); - File file = (fileParam == null) ? null : Json.mapper.readValue(fileParam, File.class); - service.uploadFile(petId, additionalMetadata, file, result -> { - if (result.succeeded()) - message.reply(new JsonObject(Json.encode(result.result())).encodePrettily()); - else { - Throwable cause = result.cause(); - manageError(message, cause, "uploadFile"); - } - }); - } catch (Exception e) { - logUnexpectedError("uploadFile", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - } - - private void manageError(Message message, Throwable cause, String serviceName) { - int code = MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(); - String statusMessage = MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage(); - if (cause instanceof MainApiException) { - code = ((MainApiException)cause).getStatusCode(); - statusMessage = ((MainApiException)cause).getStatusMessage(); - } else { - logUnexpectedError(serviceName, cause); - } - - message.fail(code, statusMessage); - } - - private void logUnexpectedError(String serviceName, Throwable cause) { - LOGGER.error("Unexpected error in "+ serviceName, cause); - } -} diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/StoreApi.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/StoreApi.java deleted file mode 100644 index 656978f999b..00000000000 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/StoreApi.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.openapitools.server.api.verticle; - -import org.openapitools.server.api.MainApiException; -import org.openapitools.server.api.model.Order; - -import io.vertx.core.AsyncResult; -import io.vertx.core.Handler; - -import java.util.List; -import java.util.Map; - -public interface StoreApi { - //deleteOrder - void deleteOrder(String orderId, Handler> handler); - - //getInventory - void getInventory(Handler>> handler); - - //getOrderById - void getOrderById(Long orderId, Handler> handler); - - //placeOrder - void placeOrder(Order body, Handler> handler); - -} diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/StoreApiException.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/StoreApiException.java deleted file mode 100644 index 7a7a7ea59fb..00000000000 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/StoreApiException.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.openapitools.server.api.verticle; - -import org.openapitools.server.api.MainApiException; -import org.openapitools.server.api.model.Order; - -public final class StoreApiException extends MainApiException { - public StoreApiException(int statusCode, String statusMessage) { - super(statusCode, statusMessage); - } - - public static final StoreApiException Store_deleteOrder_400_Exception = new StoreApiException(400, "Invalid ID supplied"); - public static final StoreApiException Store_deleteOrder_404_Exception = new StoreApiException(404, "Order not found"); - public static final StoreApiException Store_getInventory_200_Exception = new StoreApiException(200, "successful operation"); - public static final StoreApiException Store_getOrderById_200_Exception = new StoreApiException(200, "successful operation"); - public static final StoreApiException Store_getOrderById_400_Exception = new StoreApiException(400, "Invalid ID supplied"); - public static final StoreApiException Store_getOrderById_404_Exception = new StoreApiException(404, "Order not found"); - public static final StoreApiException Store_placeOrder_200_Exception = new StoreApiException(200, "successful operation"); - public static final StoreApiException Store_placeOrder_400_Exception = new StoreApiException(400, "Invalid Order"); - - -} \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/StoreApiVerticle.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/StoreApiVerticle.java deleted file mode 100644 index b8cb7b01f36..00000000000 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/StoreApiVerticle.java +++ /dev/null @@ -1,152 +0,0 @@ -package org.openapitools.server.api.verticle; - -import io.vertx.core.AbstractVerticle; -import io.vertx.core.eventbus.Message; -import io.vertx.core.json.Json; -import io.vertx.core.json.JsonArray; -import io.vertx.core.json.JsonObject; -import io.vertx.core.logging.Logger; -import io.vertx.core.logging.LoggerFactory; - -import org.openapitools.server.api.MainApiException; -import org.openapitools.server.api.model.Order; - -import java.util.List; -import java.util.Map; - -public class StoreApiVerticle extends AbstractVerticle { - static final Logger LOGGER = LoggerFactory.getLogger(StoreApiVerticle.class); - - static final String DELETEORDER_SERVICE_ID = "deleteOrder"; - static final String GETINVENTORY_SERVICE_ID = "getInventory"; - static final String GETORDERBYID_SERVICE_ID = "getOrderById"; - static final String PLACEORDER_SERVICE_ID = "placeOrder"; - - final StoreApi service; - - public StoreApiVerticle() { - try { - Class serviceImplClass = getClass().getClassLoader().loadClass("org.openapitools.server.api.verticle.StoreApiImpl"); - service = (StoreApi)serviceImplClass.newInstance(); - } catch (Exception e) { - logUnexpectedError("StoreApiVerticle constructor", e); - throw new RuntimeException(e); - } - } - - @Override - public void start() throws Exception { - - //Consumer for deleteOrder - vertx.eventBus(). consumer(DELETEORDER_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "deleteOrder"; - String orderIdParam = message.body().getString("orderId"); - if(orderIdParam == null) { - manageError(message, new MainApiException(400, "orderId is required"), serviceId); - return; - } - String orderId = orderIdParam; - service.deleteOrder(orderId, result -> { - if (result.succeeded()) - message.reply(null); - else { - Throwable cause = result.cause(); - manageError(message, cause, "deleteOrder"); - } - }); - } catch (Exception e) { - logUnexpectedError("deleteOrder", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for getInventory - vertx.eventBus(). consumer(GETINVENTORY_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "getInventory"; - service.getInventory(result -> { - if (result.succeeded()) - message.reply(new JsonObject(Json.encode(result.result())).encodePrettily()); - else { - Throwable cause = result.cause(); - manageError(message, cause, "getInventory"); - } - }); - } catch (Exception e) { - logUnexpectedError("getInventory", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for getOrderById - vertx.eventBus(). consumer(GETORDERBYID_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "getOrderById"; - String orderIdParam = message.body().getString("orderId"); - if(orderIdParam == null) { - manageError(message, new MainApiException(400, "orderId is required"), serviceId); - return; - } - Long orderId = Json.mapper.readValue(orderIdParam, Long.class); - service.getOrderById(orderId, result -> { - if (result.succeeded()) - message.reply(new JsonObject(Json.encode(result.result())).encodePrettily()); - else { - Throwable cause = result.cause(); - manageError(message, cause, "getOrderById"); - } - }); - } catch (Exception e) { - logUnexpectedError("getOrderById", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for placeOrder - vertx.eventBus(). consumer(PLACEORDER_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "placeOrder"; - JsonObject bodyParam = message.body().getJsonObject("body"); - if (bodyParam == null) { - manageError(message, new MainApiException(400, "body is required"), serviceId); - return; - } - Order body = Json.mapper.readValue(bodyParam.encode(), Order.class); - service.placeOrder(body, result -> { - if (result.succeeded()) - message.reply(new JsonObject(Json.encode(result.result())).encodePrettily()); - else { - Throwable cause = result.cause(); - manageError(message, cause, "placeOrder"); - } - }); - } catch (Exception e) { - logUnexpectedError("placeOrder", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - } - - private void manageError(Message message, Throwable cause, String serviceName) { - int code = MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(); - String statusMessage = MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage(); - if (cause instanceof MainApiException) { - code = ((MainApiException)cause).getStatusCode(); - statusMessage = ((MainApiException)cause).getStatusMessage(); - } else { - logUnexpectedError(serviceName, cause); - } - - message.fail(code, statusMessage); - } - - private void logUnexpectedError(String serviceName, Throwable cause) { - LOGGER.error("Unexpected error in "+ serviceName, cause); - } -} diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/UserApi.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/UserApi.java deleted file mode 100644 index 28f23b1501b..00000000000 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/UserApi.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.openapitools.server.api.verticle; - -import org.openapitools.server.api.MainApiException; -import org.openapitools.server.api.model.User; - -import io.vertx.core.AsyncResult; -import io.vertx.core.Handler; - -import java.util.List; -import java.util.Map; - -public interface UserApi { - //createUser - void createUser(User body, Handler> handler); - - //createUsersWithArrayInput - void createUsersWithArrayInput(List body, Handler> handler); - - //createUsersWithListInput - void createUsersWithListInput(List body, Handler> handler); - - //deleteUser - void deleteUser(String username, Handler> handler); - - //getUserByName - void getUserByName(String username, Handler> handler); - - //loginUser - void loginUser(String username, String password, Handler> handler); - - //logoutUser - void logoutUser(Handler> handler); - - //updateUser - void updateUser(String username, User body, Handler> handler); - -} diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/UserApiException.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/UserApiException.java deleted file mode 100644 index 3fdf14a842e..00000000000 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/UserApiException.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.openapitools.server.api.verticle; - -import org.openapitools.server.api.MainApiException; -import org.openapitools.server.api.model.User; - -public final class UserApiException extends MainApiException { - public UserApiException(int statusCode, String statusMessage) { - super(statusCode, statusMessage); - } - - public static final UserApiException User_deleteUser_400_Exception = new UserApiException(400, "Invalid username supplied"); - public static final UserApiException User_deleteUser_404_Exception = new UserApiException(404, "User not found"); - public static final UserApiException User_getUserByName_200_Exception = new UserApiException(200, "successful operation"); - public static final UserApiException User_getUserByName_400_Exception = new UserApiException(400, "Invalid username supplied"); - public static final UserApiException User_getUserByName_404_Exception = new UserApiException(404, "User not found"); - public static final UserApiException User_loginUser_200_Exception = new UserApiException(200, "successful operation"); - public static final UserApiException User_loginUser_400_Exception = new UserApiException(400, "Invalid username/password supplied"); - public static final UserApiException User_updateUser_400_Exception = new UserApiException(400, "Invalid user supplied"); - public static final UserApiException User_updateUser_404_Exception = new UserApiException(404, "User not found"); - - -} \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/UserApiVerticle.java b/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/UserApiVerticle.java deleted file mode 100644 index 61ac44f5584..00000000000 --- a/samples/server/petstore/java-vertx/async/src/main/java/org/openapitools/server/api/verticle/UserApiVerticle.java +++ /dev/null @@ -1,270 +0,0 @@ -package org.openapitools.server.api.verticle; - -import io.vertx.core.AbstractVerticle; -import io.vertx.core.eventbus.Message; -import io.vertx.core.json.Json; -import io.vertx.core.json.JsonArray; -import io.vertx.core.json.JsonObject; -import io.vertx.core.logging.Logger; -import io.vertx.core.logging.LoggerFactory; - -import org.openapitools.server.api.MainApiException; -import org.openapitools.server.api.model.User; - -import java.util.List; -import java.util.Map; - -public class UserApiVerticle extends AbstractVerticle { - static final Logger LOGGER = LoggerFactory.getLogger(UserApiVerticle.class); - - static final String CREATEUSER_SERVICE_ID = "createUser"; - static final String CREATEUSERSWITHARRAYINPUT_SERVICE_ID = "createUsersWithArrayInput"; - static final String CREATEUSERSWITHLISTINPUT_SERVICE_ID = "createUsersWithListInput"; - static final String DELETEUSER_SERVICE_ID = "deleteUser"; - static final String GETUSERBYNAME_SERVICE_ID = "getUserByName"; - static final String LOGINUSER_SERVICE_ID = "loginUser"; - static final String LOGOUTUSER_SERVICE_ID = "logoutUser"; - static final String UPDATEUSER_SERVICE_ID = "updateUser"; - - final UserApi service; - - public UserApiVerticle() { - try { - Class serviceImplClass = getClass().getClassLoader().loadClass("org.openapitools.server.api.verticle.UserApiImpl"); - service = (UserApi)serviceImplClass.newInstance(); - } catch (Exception e) { - logUnexpectedError("UserApiVerticle constructor", e); - throw new RuntimeException(e); - } - } - - @Override - public void start() throws Exception { - - //Consumer for createUser - vertx.eventBus(). consumer(CREATEUSER_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "createUser"; - JsonObject bodyParam = message.body().getJsonObject("body"); - if (bodyParam == null) { - manageError(message, new MainApiException(400, "body is required"), serviceId); - return; - } - User body = Json.mapper.readValue(bodyParam.encode(), User.class); - service.createUser(body, result -> { - if (result.succeeded()) - message.reply(null); - else { - Throwable cause = result.cause(); - manageError(message, cause, "createUser"); - } - }); - } catch (Exception e) { - logUnexpectedError("createUser", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for createUsersWithArrayInput - vertx.eventBus(). consumer(CREATEUSERSWITHARRAYINPUT_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "createUsersWithArrayInput"; - JsonArray bodyParam = message.body().getJsonArray("body"); - if(bodyParam == null) { - manageError(message, new MainApiException(400, "body is required"), serviceId); - return; - } - List body = Json.mapper.readValue(bodyParam.encode(), - Json.mapper.getTypeFactory().constructCollectionType(List.class, User.class)); - service.createUsersWithArrayInput(body, result -> { - if (result.succeeded()) - message.reply(null); - else { - Throwable cause = result.cause(); - manageError(message, cause, "createUsersWithArrayInput"); - } - }); - } catch (Exception e) { - logUnexpectedError("createUsersWithArrayInput", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for createUsersWithListInput - vertx.eventBus(). consumer(CREATEUSERSWITHLISTINPUT_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "createUsersWithListInput"; - JsonArray bodyParam = message.body().getJsonArray("body"); - if(bodyParam == null) { - manageError(message, new MainApiException(400, "body is required"), serviceId); - return; - } - List body = Json.mapper.readValue(bodyParam.encode(), - Json.mapper.getTypeFactory().constructCollectionType(List.class, User.class)); - service.createUsersWithListInput(body, result -> { - if (result.succeeded()) - message.reply(null); - else { - Throwable cause = result.cause(); - manageError(message, cause, "createUsersWithListInput"); - } - }); - } catch (Exception e) { - logUnexpectedError("createUsersWithListInput", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for deleteUser - vertx.eventBus(). consumer(DELETEUSER_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "deleteUser"; - String usernameParam = message.body().getString("username"); - if(usernameParam == null) { - manageError(message, new MainApiException(400, "username is required"), serviceId); - return; - } - String username = usernameParam; - service.deleteUser(username, result -> { - if (result.succeeded()) - message.reply(null); - else { - Throwable cause = result.cause(); - manageError(message, cause, "deleteUser"); - } - }); - } catch (Exception e) { - logUnexpectedError("deleteUser", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for getUserByName - vertx.eventBus(). consumer(GETUSERBYNAME_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "getUserByName"; - String usernameParam = message.body().getString("username"); - if(usernameParam == null) { - manageError(message, new MainApiException(400, "username is required"), serviceId); - return; - } - String username = usernameParam; - service.getUserByName(username, result -> { - if (result.succeeded()) - message.reply(new JsonObject(Json.encode(result.result())).encodePrettily()); - else { - Throwable cause = result.cause(); - manageError(message, cause, "getUserByName"); - } - }); - } catch (Exception e) { - logUnexpectedError("getUserByName", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for loginUser - vertx.eventBus(). consumer(LOGINUSER_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "loginUser"; - String usernameParam = message.body().getString("username"); - if(usernameParam == null) { - manageError(message, new MainApiException(400, "username is required"), serviceId); - return; - } - String username = usernameParam; - String passwordParam = message.body().getString("password"); - if(passwordParam == null) { - manageError(message, new MainApiException(400, "password is required"), serviceId); - return; - } - String password = passwordParam; - service.loginUser(username, password, result -> { - if (result.succeeded()) - message.reply(new JsonObject(Json.encode(result.result())).encodePrettily()); - else { - Throwable cause = result.cause(); - manageError(message, cause, "loginUser"); - } - }); - } catch (Exception e) { - logUnexpectedError("loginUser", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for logoutUser - vertx.eventBus(). consumer(LOGOUTUSER_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "logoutUser"; - service.logoutUser(result -> { - if (result.succeeded()) - message.reply(null); - else { - Throwable cause = result.cause(); - manageError(message, cause, "logoutUser"); - } - }); - } catch (Exception e) { - logUnexpectedError("logoutUser", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for updateUser - vertx.eventBus(). consumer(UPDATEUSER_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "updateUser"; - String usernameParam = message.body().getString("username"); - if(usernameParam == null) { - manageError(message, new MainApiException(400, "username is required"), serviceId); - return; - } - String username = usernameParam; - JsonObject bodyParam = message.body().getJsonObject("body"); - if (bodyParam == null) { - manageError(message, new MainApiException(400, "body is required"), serviceId); - return; - } - User body = Json.mapper.readValue(bodyParam.encode(), User.class); - service.updateUser(username, body, result -> { - if (result.succeeded()) - message.reply(null); - else { - Throwable cause = result.cause(); - manageError(message, cause, "updateUser"); - } - }); - } catch (Exception e) { - logUnexpectedError("updateUser", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - } - - private void manageError(Message message, Throwable cause, String serviceName) { - int code = MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(); - String statusMessage = MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage(); - if (cause instanceof MainApiException) { - code = ((MainApiException)cause).getStatusCode(); - statusMessage = ((MainApiException)cause).getStatusMessage(); - } else { - logUnexpectedError(serviceName, cause); - } - - message.fail(code, statusMessage); - } - - private void logUnexpectedError(String serviceName, Throwable cause) { - LOGGER.error("Unexpected error in "+ serviceName, cause); - } -} diff --git a/samples/server/petstore/java-vertx/async/src/main/resources/openapi.json b/samples/server/petstore/java-vertx/async/src/main/resources/openapi.json deleted file mode 100644 index c292bb5e95a..00000000000 --- a/samples/server/petstore/java-vertx/async/src/main/resources/openapi.json +++ /dev/null @@ -1,1082 +0,0 @@ -{ - "openapi" : "3.0.1", - "info" : { - "description" : "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", - "license" : { - "name" : "Apache-2.0", - "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" - }, - "title" : "OpenAPI Petstore", - "version" : "1.0.0" - }, - "servers" : [ { - "url" : "http://petstore.swagger.io/v2" - } ], - "tags" : [ { - "description" : "Everything about your Pets", - "name" : "pet" - }, { - "description" : "Access to Petstore orders", - "name" : "store" - }, { - "description" : "Operations about user", - "name" : "user" - } ], - "paths" : { - "/pet" : { - "post" : { - "operationId" : "addPet", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - } - }, - "description" : "Pet object that needs to be added to the store", - "required" : true - }, - "responses" : { - "405" : { - "content" : { }, - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "Add a new pet to the store", - "tags" : [ "pet" ], - "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", - "x-accepts" : "application/json", - "x-serviceid" : "addPet", - "x-serviceid-varname" : "ADDPET_SERVICE_ID" - }, - "put" : { - "operationId" : "updatePet", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - } - }, - "description" : "Pet object that needs to be added to the store", - "required" : true - }, - "responses" : { - "400" : { - "content" : { }, - "description" : "Invalid ID supplied" - }, - "404" : { - "content" : { }, - "description" : "Pet not found" - }, - "405" : { - "content" : { }, - "description" : "Validation exception" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "Update an existing pet", - "tags" : [ "pet" ], - "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", - "x-accepts" : "application/json", - "x-serviceid" : "updatePet", - "x-serviceid-varname" : "UPDATEPET_SERVICE_ID" - } - }, - "/pet/findByStatus" : { - "get" : { - "description" : "Multiple status values can be provided with comma separated strings", - "operationId" : "findPetsByStatus", - "parameters" : [ { - "description" : "Status values that need to be considered for filter", - "explode" : false, - "in" : "query", - "name" : "status", - "required" : true, - "schema" : { - "items" : { - "default" : "available", - "enum" : [ "available", "pending", "sold" ], - "type" : "string" - }, - "type" : "array" - }, - "style" : "form" - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/Pet" - }, - "type" : "array" - } - }, - "application/json" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/Pet" - }, - "type" : "array" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "content" : { }, - "description" : "Invalid status value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "Finds Pets by status", - "tags" : [ "pet" ], - "x-accepts" : "application/json", - "x-serviceid" : "findPetsByStatus", - "x-serviceid-varname" : "FINDPETSBYSTATUS_SERVICE_ID" - } - }, - "/pet/findByTags" : { - "get" : { - "deprecated" : true, - "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", - "operationId" : "findPetsByTags", - "parameters" : [ { - "description" : "Tags to filter by", - "explode" : false, - "in" : "query", - "name" : "tags", - "required" : true, - "schema" : { - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "style" : "form" - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/Pet" - }, - "type" : "array" - } - }, - "application/json" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/Pet" - }, - "type" : "array" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "content" : { }, - "description" : "Invalid tag value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "Finds Pets by tags", - "tags" : [ "pet" ], - "x-accepts" : "application/json", - "x-serviceid" : "findPetsByTags", - "x-serviceid-varname" : "FINDPETSBYTAGS_SERVICE_ID" - } - }, - "/pet/{petId}" : { - "delete" : { - "operationId" : "deletePet", - "parameters" : [ { - "in" : "header", - "name" : "api_key", - "schema" : { - "type" : "string" - } - }, { - "description" : "Pet id to delete", - "in" : "path", - "name" : "petId", - "required" : true, - "schema" : { - "format" : "int64", - "type" : "integer" - } - } ], - "responses" : { - "400" : { - "content" : { }, - "description" : "Invalid pet value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "Deletes a pet", - "tags" : [ "pet" ], - "x-accepts" : "application/json", - "x-serviceid" : "deletePet", - "x-serviceid-varname" : "DELETEPET_SERVICE_ID" - }, - "get" : { - "description" : "Returns a single pet", - "operationId" : "getPetById", - "parameters" : [ { - "description" : "ID of pet to return", - "in" : "path", - "name" : "petId", - "required" : true, - "schema" : { - "format" : "int64", - "type" : "integer" - } - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "content" : { }, - "description" : "Invalid ID supplied" - }, - "404" : { - "content" : { }, - "description" : "Pet not found" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Find pet by ID", - "tags" : [ "pet" ], - "x-accepts" : "application/json", - "x-serviceid" : "getPetById", - "x-serviceid-varname" : "GETPETBYID_SERVICE_ID" - }, - "post" : { - "operationId" : "updatePetWithForm", - "parameters" : [ { - "description" : "ID of pet that needs to be updated", - "in" : "path", - "name" : "petId", - "required" : true, - "schema" : { - "format" : "int64", - "type" : "integer" - } - } ], - "requestBody" : { - "content" : { - "application/x-www-form-urlencoded" : { - "schema" : { - "properties" : { - "name" : { - "description" : "Updated name of the pet", - "type" : "string" - }, - "status" : { - "description" : "Updated status of the pet", - "type" : "string" - } - } - } - } - } - }, - "responses" : { - "405" : { - "content" : { }, - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "Updates a pet in the store with form data", - "tags" : [ "pet" ], - "x-contentType" : "application/x-www-form-urlencoded", - "x-accepts" : "application/json", - "x-serviceid" : "updatePetWithForm", - "x-serviceid-varname" : "UPDATEPETWITHFORM_SERVICE_ID" - } - }, - "/pet/{petId}/uploadImage" : { - "post" : { - "operationId" : "uploadFile", - "parameters" : [ { - "description" : "ID of pet to update", - "in" : "path", - "name" : "petId", - "required" : true, - "schema" : { - "format" : "int64", - "type" : "integer" - } - } ], - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "properties" : { - "additionalMetadata" : { - "description" : "Additional data to pass to server", - "type" : "string" - }, - "file" : { - "description" : "file to upload", - "format" : "binary", - "type" : "string" - } - } - } - } - } - }, - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ApiResponse" - } - } - }, - "description" : "successful operation" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "uploads an image", - "tags" : [ "pet" ], - "x-contentType" : "multipart/form-data", - "x-accepts" : "application/json", - "x-serviceid" : "uploadFile", - "x-serviceid-varname" : "UPLOADFILE_SERVICE_ID" - } - }, - "/store/inventory" : { - "get" : { - "description" : "Returns a map of status codes to quantities", - "operationId" : "getInventory", - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "additionalProperties" : { - "format" : "int32", - "type" : "integer" - }, - "type" : "object" - } - } - }, - "description" : "successful operation" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Returns pet inventories by status", - "tags" : [ "store" ], - "x-accepts" : "application/json", - "x-serviceid" : "getInventory", - "x-serviceid-varname" : "GETINVENTORY_SERVICE_ID" - } - }, - "/store/order" : { - "post" : { - "operationId" : "placeOrder", - "requestBody" : { - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - } - }, - "description" : "order placed for purchasing the pet", - "required" : true - }, - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "content" : { }, - "description" : "Invalid Order" - } - }, - "summary" : "Place an order for a pet", - "tags" : [ "store" ], - "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", - "x-accepts" : "application/json", - "x-serviceid" : "placeOrder", - "x-serviceid-varname" : "PLACEORDER_SERVICE_ID" - } - }, - "/store/order/{orderId}" : { - "delete" : { - "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", - "operationId" : "deleteOrder", - "parameters" : [ { - "description" : "ID of the order that needs to be deleted", - "in" : "path", - "name" : "orderId", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "400" : { - "content" : { }, - "description" : "Invalid ID supplied" - }, - "404" : { - "content" : { }, - "description" : "Order not found" - } - }, - "summary" : "Delete purchase order by ID", - "tags" : [ "store" ], - "x-accepts" : "application/json", - "x-serviceid" : "deleteOrder", - "x-serviceid-varname" : "DELETEORDER_SERVICE_ID" - }, - "get" : { - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", - "operationId" : "getOrderById", - "parameters" : [ { - "description" : "ID of pet that needs to be fetched", - "in" : "path", - "name" : "orderId", - "required" : true, - "schema" : { - "format" : "int64", - "maximum" : 5, - "minimum" : 1, - "type" : "integer" - } - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "content" : { }, - "description" : "Invalid ID supplied" - }, - "404" : { - "content" : { }, - "description" : "Order not found" - } - }, - "summary" : "Find purchase order by ID", - "tags" : [ "store" ], - "x-accepts" : "application/json", - "x-serviceid" : "getOrderById", - "x-serviceid-varname" : "GETORDERBYID_SERVICE_ID" - } - }, - "/user" : { - "post" : { - "description" : "This can only be done by the logged in user.", - "operationId" : "createUser", - "requestBody" : { - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/User" - } - } - }, - "description" : "Created user object", - "required" : true - }, - "responses" : { - "default" : { - "content" : { }, - "description" : "successful operation" - } - }, - "summary" : "Create user", - "tags" : [ "user" ], - "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", - "x-accepts" : "application/json", - "x-serviceid" : "createUser", - "x-serviceid-varname" : "CREATEUSER_SERVICE_ID" - } - }, - "/user/createWithArray" : { - "post" : { - "operationId" : "createUsersWithArrayInput", - "requestBody" : { - "content" : { - "*/*" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/User" - }, - "type" : "array" - } - } - }, - "description" : "List of user object", - "required" : true - }, - "responses" : { - "default" : { - "content" : { }, - "description" : "successful operation" - } - }, - "summary" : "Creates list of users with given input array", - "tags" : [ "user" ], - "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", - "x-accepts" : "application/json", - "x-serviceid" : "createUsersWithArrayInput", - "x-serviceid-varname" : "CREATEUSERSWITHARRAYINPUT_SERVICE_ID" - } - }, - "/user/createWithList" : { - "post" : { - "operationId" : "createUsersWithListInput", - "requestBody" : { - "content" : { - "*/*" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/User" - }, - "type" : "array" - } - } - }, - "description" : "List of user object", - "required" : true - }, - "responses" : { - "default" : { - "content" : { }, - "description" : "successful operation" - } - }, - "summary" : "Creates list of users with given input array", - "tags" : [ "user" ], - "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", - "x-accepts" : "application/json", - "x-serviceid" : "createUsersWithListInput", - "x-serviceid-varname" : "CREATEUSERSWITHLISTINPUT_SERVICE_ID" - } - }, - "/user/login" : { - "get" : { - "operationId" : "loginUser", - "parameters" : [ { - "description" : "The user name for login", - "in" : "query", - "name" : "username", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "description" : "The password for login in clear text", - "in" : "query", - "name" : "password", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "type" : "string" - } - }, - "application/json" : { - "schema" : { - "type" : "string" - } - } - }, - "description" : "successful operation", - "headers" : { - "X-Rate-Limit" : { - "description" : "calls per hour allowed by the user", - "schema" : { - "format" : "int32", - "type" : "integer" - } - }, - "X-Expires-After" : { - "description" : "date in UTC when toekn expires", - "schema" : { - "format" : "date-time", - "type" : "string" - } - } - } - }, - "400" : { - "content" : { }, - "description" : "Invalid username/password supplied" - } - }, - "summary" : "Logs user into the system", - "tags" : [ "user" ], - "x-accepts" : "application/json", - "x-serviceid" : "loginUser", - "x-serviceid-varname" : "LOGINUSER_SERVICE_ID" - } - }, - "/user/logout" : { - "get" : { - "operationId" : "logoutUser", - "responses" : { - "default" : { - "content" : { }, - "description" : "successful operation" - } - }, - "summary" : "Logs out current logged in user session", - "tags" : [ "user" ], - "x-accepts" : "application/json", - "x-serviceid" : "logoutUser", - "x-serviceid-varname" : "LOGOUTUSER_SERVICE_ID" - } - }, - "/user/{username}" : { - "delete" : { - "description" : "This can only be done by the logged in user.", - "operationId" : "deleteUser", - "parameters" : [ { - "description" : "The name that needs to be deleted", - "in" : "path", - "name" : "username", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "400" : { - "content" : { }, - "description" : "Invalid username supplied" - }, - "404" : { - "content" : { }, - "description" : "User not found" - } - }, - "summary" : "Delete user", - "tags" : [ "user" ], - "x-accepts" : "application/json", - "x-serviceid" : "deleteUser", - "x-serviceid-varname" : "DELETEUSER_SERVICE_ID" - }, - "get" : { - "operationId" : "getUserByName", - "parameters" : [ { - "description" : "The name that needs to be fetched. Use user1 for testing.", - "in" : "path", - "name" : "username", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/User" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/User" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "content" : { }, - "description" : "Invalid username supplied" - }, - "404" : { - "content" : { }, - "description" : "User not found" - } - }, - "summary" : "Get user by user name", - "tags" : [ "user" ], - "x-accepts" : "application/json", - "x-serviceid" : "getUserByName", - "x-serviceid-varname" : "GETUSERBYNAME_SERVICE_ID" - }, - "put" : { - "description" : "This can only be done by the logged in user.", - "operationId" : "updateUser", - "parameters" : [ { - "description" : "name that need to be deleted", - "in" : "path", - "name" : "username", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "requestBody" : { - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/User" - } - } - }, - "description" : "Updated user object", - "required" : true - }, - "responses" : { - "400" : { - "content" : { }, - "description" : "Invalid user supplied" - }, - "404" : { - "content" : { }, - "description" : "User not found" - } - }, - "summary" : "Updated user", - "tags" : [ "user" ], - "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", - "x-accepts" : "application/json", - "x-serviceid" : "updateUser", - "x-serviceid-varname" : "UPDATEUSER_SERVICE_ID" - } - } - }, - "components" : { - "schemas" : { - "Order" : { - "description" : "An order for a pets from the pet store", - "example" : { - "petId" : 6, - "quantity" : 1, - "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "complete" : false, - "status" : "placed" - }, - "properties" : { - "id" : { - "format" : "int64", - "type" : "integer" - }, - "petId" : { - "format" : "int64", - "type" : "integer" - }, - "quantity" : { - "format" : "int32", - "type" : "integer" - }, - "shipDate" : { - "format" : "date-time", - "type" : "string" - }, - "status" : { - "description" : "Order Status", - "enum" : [ "placed", "approved", "delivered" ], - "type" : "string" - }, - "complete" : { - "default" : false, - "type" : "boolean" - } - }, - "title" : "Pet Order", - "type" : "object", - "xml" : { - "name" : "Order" - } - }, - "Category" : { - "description" : "A category for a pet", - "example" : { - "name" : "name", - "id" : 6 - }, - "properties" : { - "id" : { - "format" : "int64", - "type" : "integer" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet category", - "type" : "object", - "xml" : { - "name" : "Category" - } - }, - "User" : { - "description" : "A User who is purchasing from the pet store", - "example" : { - "firstName" : "firstName", - "lastName" : "lastName", - "password" : "password", - "userStatus" : 6, - "phone" : "phone", - "id" : 0, - "email" : "email", - "username" : "username" - }, - "properties" : { - "id" : { - "format" : "int64", - "type" : "integer" - }, - "username" : { - "type" : "string" - }, - "firstName" : { - "type" : "string" - }, - "lastName" : { - "type" : "string" - }, - "email" : { - "type" : "string" - }, - "password" : { - "type" : "string" - }, - "phone" : { - "type" : "string" - }, - "userStatus" : { - "description" : "User Status", - "format" : "int32", - "type" : "integer" - } - }, - "title" : "a User", - "type" : "object", - "xml" : { - "name" : "User" - } - }, - "Tag" : { - "description" : "A tag for a pet", - "example" : { - "name" : "name", - "id" : 1 - }, - "properties" : { - "id" : { - "format" : "int64", - "type" : "integer" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet Tag", - "type" : "object", - "xml" : { - "name" : "Tag" - } - }, - "Pet" : { - "description" : "A pet for sale in the pet store", - "example" : { - "photoUrls" : [ "photoUrls", "photoUrls" ], - "name" : "doggie", - "id" : 0, - "category" : { - "name" : "name", - "id" : 6 - }, - "tags" : [ { - "name" : "name", - "id" : 1 - }, { - "name" : "name", - "id" : 1 - } ], - "status" : "available" - }, - "properties" : { - "id" : { - "format" : "int64", - "type" : "integer" - }, - "category" : { - "$ref" : "#/components/schemas/Category" - }, - "name" : { - "example" : "doggie", - "type" : "string" - }, - "photoUrls" : { - "items" : { - "type" : "string" - }, - "type" : "array", - "xml" : { - "name" : "photoUrl", - "wrapped" : true - } - }, - "tags" : { - "items" : { - "$ref" : "#/components/schemas/Tag" - }, - "type" : "array", - "xml" : { - "name" : "tag", - "wrapped" : true - } - }, - "status" : { - "description" : "pet status in the store", - "enum" : [ "available", "pending", "sold" ], - "type" : "string" - } - }, - "required" : [ "name", "photoUrls" ], - "title" : "a Pet", - "type" : "object", - "xml" : { - "name" : "Pet" - } - }, - "ApiResponse" : { - "description" : "Describes the result of uploading an image resource", - "example" : { - "code" : 0, - "type" : "type", - "message" : "message" - }, - "properties" : { - "code" : { - "format" : "int32", - "type" : "integer" - }, - "type" : { - "type" : "string" - }, - "message" : { - "type" : "string" - } - }, - "title" : "An uploaded response", - "type" : "object" - } - }, - "securitySchemes" : { - "petstore_auth" : { - "flows" : { - "implicit" : { - "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", - "scopes" : { - "write:pets" : "modify pets in your account", - "read:pets" : "read your pets" - } - } - }, - "type" : "oauth2" - }, - "api_key" : { - "in" : "header", - "name" : "api_key", - "type" : "apiKey" - } - } - }, - "x-original-swagger-version" : "2.0" -} \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/async/src/main/resources/vertx-default-jul-logging.properties b/samples/server/petstore/java-vertx/async/src/main/resources/vertx-default-jul-logging.properties deleted file mode 100644 index 706d6d9b2f4..00000000000 --- a/samples/server/petstore/java-vertx/async/src/main/resources/vertx-default-jul-logging.properties +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright 2014 Red Hat, Inc. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# and Apache License v2.0 which accompanies this distribution. -# -# The Eclipse Public License is available at -# http://www.eclipse.org/legal/epl-v10.html -# -# The Apache License v2.0 is available at -# http://www.opensource.org/licenses/apache2.0.php -# -# You may elect to redistribute this code under either of these licenses. -# -handlers=java.util.logging.ConsoleHandler,java.util.logging.FileHandler -java.util.logging.SimpleFormatter.format=%5$s %6$s\n -java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter -java.util.logging.ConsoleHandler.level=FINEST -java.util.logging.FileHandler.level=INFO -java.util.logging.FileHandler.formatter=io.vertx.core.logging.VertxLoggerFormatter - -# Put the log in the system temporary directory -java.util.logging.FileHandler.pattern=vertx.log - -.level=INFO -io.vertx.ext.web.level=FINEST -io.vertx.level=INFO -com.hazelcast.level=INFO -io.netty.util.internal.PlatformDependent.level=SEVERE \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/rx/.openapi-generator-ignore b/samples/server/petstore/java-vertx/rx/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a3..00000000000 --- a/samples/server/petstore/java-vertx/rx/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/server/petstore/java-vertx/rx/.openapi-generator/FILES b/samples/server/petstore/java-vertx/rx/.openapi-generator/FILES deleted file mode 100644 index d863c5cf45a..00000000000 --- a/samples/server/petstore/java-vertx/rx/.openapi-generator/FILES +++ /dev/null @@ -1,21 +0,0 @@ -README.md -pom.xml -src/main/java/org/openapitools/server/api/MainApiException.java -src/main/java/org/openapitools/server/api/MainApiVerticle.java -src/main/java/org/openapitools/server/api/model/Category.java -src/main/java/org/openapitools/server/api/model/ModelApiResponse.java -src/main/java/org/openapitools/server/api/model/Order.java -src/main/java/org/openapitools/server/api/model/Pet.java -src/main/java/org/openapitools/server/api/model/Tag.java -src/main/java/org/openapitools/server/api/model/User.java -src/main/java/org/openapitools/server/api/verticle/PetApi.java -src/main/java/org/openapitools/server/api/verticle/PetApiException.java -src/main/java/org/openapitools/server/api/verticle/PetApiVerticle.java -src/main/java/org/openapitools/server/api/verticle/StoreApi.java -src/main/java/org/openapitools/server/api/verticle/StoreApiException.java -src/main/java/org/openapitools/server/api/verticle/StoreApiVerticle.java -src/main/java/org/openapitools/server/api/verticle/UserApi.java -src/main/java/org/openapitools/server/api/verticle/UserApiException.java -src/main/java/org/openapitools/server/api/verticle/UserApiVerticle.java -src/main/resources/openapi.json -src/main/resources/vertx-default-jul-logging.properties diff --git a/samples/server/petstore/java-vertx/rx/.openapi-generator/VERSION b/samples/server/petstore/java-vertx/rx/.openapi-generator/VERSION deleted file mode 100644 index 3fa3b389a57..00000000000 --- a/samples/server/petstore/java-vertx/rx/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/rx/README.md b/samples/server/petstore/java-vertx/rx/README.md deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/server/petstore/java-vertx/rx/pom.xml b/samples/server/petstore/java-vertx/rx/pom.xml deleted file mode 100644 index 2b575c68e75..00000000000 --- a/samples/server/petstore/java-vertx/rx/pom.xml +++ /dev/null @@ -1,91 +0,0 @@ - - 4.0.0 - - org.openapitools - java-vertx-rx-server - 1.0.0-SNAPSHOT - jar - - OpenAPI Petstore - - - UTF-8 - 1.8 - 4.13.1 - 3.4.1 - 3.8.1 - 1.4.0 - 2.3 - 2.7.4 - - - - - junit - junit - ${junit.version} - test - - - - io.vertx - vertx-unit - ${vertx.version} - test - - - - com.github.phiz71 - vertx-swagger-router - ${vertx-swagger-router.version} - - - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 - ${jackson-datatype-jsr310.version} - - - - - - - - maven-compiler-plugin - ${maven-compiler-plugin.version} - - ${java.version} - ${java.version} - - - - - org.apache.maven.plugins - maven-shade-plugin - ${maven-shade-plugin.version} - - - package - - shade - - - - - - io.vertx.core.Starter - org.openapitools.server.api.MainApiVerticle - - - - - ${project.build.directory}/${project.artifactId}-${project.version}-fat.jar - - - - - - - diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/MainApiException.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/MainApiException.java deleted file mode 100644 index 4aef710c011..00000000000 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/MainApiException.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.openapitools.server.api; - -public class MainApiException extends Exception { - private int statusCode; - private String statusMessage; - - public MainApiException(int statusCode, String statusMessage) { - super(); - this.statusCode = statusCode; - this.statusMessage = statusMessage; - } - - public int getStatusCode() { - return statusCode; - } - - public String getStatusMessage() { - return statusMessage; - } - - public static final MainApiException INTERNAL_SERVER_ERROR = new MainApiException(500, "Internal Server Error"); -} \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/MainApiVerticle.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/MainApiVerticle.java deleted file mode 100644 index 26381f058f1..00000000000 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/MainApiVerticle.java +++ /dev/null @@ -1,97 +0,0 @@ -package org.openapitools.server.api; - -import java.nio.charset.Charset; - -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; -import com.github.phiz71.vertx.swagger.router.OperationIdServiceIdResolver; -import com.github.phiz71.vertx.swagger.router.SwaggerRouter; - -import io.swagger.models.Swagger; -import io.swagger.parser.SwaggerParser; -import io.vertx.core.AbstractVerticle; -import io.vertx.core.Context; -import io.vertx.core.Future; -import io.vertx.core.file.FileSystem; -import io.vertx.core.json.Json; -import io.vertx.core.logging.Logger; -import io.vertx.core.logging.LoggerFactory; -import io.vertx.core.Vertx; -import io.vertx.ext.web.Router; - -public class MainApiVerticle extends AbstractVerticle { - static final Logger LOGGER = LoggerFactory.getLogger(MainApiVerticle.class); - - private int serverPort = 8080; - protected Router router; - - public int getServerPort() { - return serverPort; - } - - public void setServerPort(int serverPort) { - this.serverPort = serverPort; - } - - @Override - public void init(Vertx vertx, Context context) { - super.init(vertx, context); - router = Router.router(vertx); - } - - @Override - public void start(Future startFuture) throws Exception { - Json.mapper.registerModule(new JavaTimeModule()); - FileSystem vertxFileSystem = vertx.fileSystem(); - vertxFileSystem.readFile("openapi.json", readFile -> { - if (readFile.succeeded()) { - Swagger swagger = new SwaggerParser().parse(readFile.result().toString(Charset.forName("utf-8"))); - Router swaggerRouter = SwaggerRouter.swaggerRouter(router, swagger, vertx.eventBus(), new OperationIdServiceIdResolver()); - - deployVerticles(startFuture); - - vertx.createHttpServer() - .requestHandler(swaggerRouter::accept) - .listen(serverPort, h -> { - if (h.succeeded()) { - startFuture.complete(); - } else { - startFuture.fail(h.cause()); - } - }); - } else { - startFuture.fail(readFile.cause()); - } - }); - } - - public void deployVerticles(Future startFuture) { - - vertx.deployVerticle("org.openapitools.server.api.verticle.PetApiVerticle", res -> { - if (res.succeeded()) { - LOGGER.info("PetApiVerticle : Deployed"); - } else { - startFuture.fail(res.cause()); - LOGGER.error("PetApiVerticle : Deployment failed"); - } - }); - - vertx.deployVerticle("org.openapitools.server.api.verticle.StoreApiVerticle", res -> { - if (res.succeeded()) { - LOGGER.info("StoreApiVerticle : Deployed"); - } else { - startFuture.fail(res.cause()); - LOGGER.error("StoreApiVerticle : Deployment failed"); - } - }); - - vertx.deployVerticle("org.openapitools.server.api.verticle.UserApiVerticle", res -> { - if (res.succeeded()) { - LOGGER.info("UserApiVerticle : Deployed"); - } else { - startFuture.fail(res.cause()); - LOGGER.error("UserApiVerticle : Deployment failed"); - } - }); - - } -} diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Category.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Category.java deleted file mode 100644 index f05201c45ad..00000000000 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Category.java +++ /dev/null @@ -1,83 +0,0 @@ -package org.openapitools.server.api.model; - -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * A category for a pet - **/ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class Category { - - private Long id; - private String name; - - public Category () { - - } - - public Category (Long id, String name) { - this.id = id; - this.name = name; - } - - - @JsonProperty("id") - public Long getId() { - return id; - } - public void setId(Long id) { - this.id = id; - } - - - @JsonProperty("name") - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Category category = (Category) o; - return Objects.equals(id, category.id) && - Objects.equals(name, category.name); - } - - @Override - public int hashCode() { - return Objects.hash(id, name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Category {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/ModelApiResponse.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/ModelApiResponse.java deleted file mode 100644 index 934a6efdf96..00000000000 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/ModelApiResponse.java +++ /dev/null @@ -1,96 +0,0 @@ -package org.openapitools.server.api.model; - -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Describes the result of uploading an image resource - **/ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class ModelApiResponse { - - private Integer code; - private String type; - private String message; - - public ModelApiResponse () { - - } - - public ModelApiResponse (Integer code, String type, String message) { - this.code = code; - this.type = type; - this.message = message; - } - - - @JsonProperty("code") - public Integer getCode() { - return code; - } - public void setCode(Integer code) { - this.code = code; - } - - - @JsonProperty("type") - public String getType() { - return type; - } - public void setType(String type) { - this.type = type; - } - - - @JsonProperty("message") - public String getMessage() { - return message; - } - public void setMessage(String message) { - this.message = message; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelApiResponse _apiResponse = (ModelApiResponse) o; - return Objects.equals(code, _apiResponse.code) && - Objects.equals(type, _apiResponse.type) && - Objects.equals(message, _apiResponse.message); - } - - @Override - public int hashCode() { - return Objects.hash(code, type, message); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelApiResponse {\n"); - - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Order.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Order.java deleted file mode 100644 index 0d8d6714212..00000000000 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Order.java +++ /dev/null @@ -1,157 +0,0 @@ -package org.openapitools.server.api.model; - -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonValue; -import java.time.OffsetDateTime; - -/** - * An order for a pets from the pet store - **/ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class Order { - - private Long id; - private Long petId; - private Integer quantity; - private OffsetDateTime shipDate; - - - public enum StatusEnum { - PLACED("placed"), - APPROVED("approved"), - DELIVERED("delivered"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return value; - } - } - - private StatusEnum status; - private Boolean complete = false; - - public Order () { - - } - - public Order (Long id, Long petId, Integer quantity, OffsetDateTime shipDate, StatusEnum status, Boolean complete) { - this.id = id; - this.petId = petId; - this.quantity = quantity; - this.shipDate = shipDate; - this.status = status; - this.complete = complete; - } - - - @JsonProperty("id") - public Long getId() { - return id; - } - public void setId(Long id) { - this.id = id; - } - - - @JsonProperty("petId") - public Long getPetId() { - return petId; - } - public void setPetId(Long petId) { - this.petId = petId; - } - - - @JsonProperty("quantity") - public Integer getQuantity() { - return quantity; - } - public void setQuantity(Integer quantity) { - this.quantity = quantity; - } - - - @JsonProperty("shipDate") - public OffsetDateTime getShipDate() { - return shipDate; - } - public void setShipDate(OffsetDateTime shipDate) { - this.shipDate = shipDate; - } - - - @JsonProperty("status") - public StatusEnum getStatus() { - return status; - } - public void setStatus(StatusEnum status) { - this.status = status; - } - - - @JsonProperty("complete") - public Boolean getComplete() { - return complete; - } - public void setComplete(Boolean complete) { - this.complete = complete; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Order order = (Order) o; - return Objects.equals(id, order.id) && - Objects.equals(petId, order.petId) && - Objects.equals(quantity, order.quantity) && - Objects.equals(shipDate, order.shipDate) && - Objects.equals(status, order.status) && - Objects.equals(complete, order.complete); - } - - @Override - public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Order {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); - sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Pet.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Pet.java deleted file mode 100644 index cb9325acf5d..00000000000 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Pet.java +++ /dev/null @@ -1,160 +0,0 @@ -package org.openapitools.server.api.model; - -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.server.api.model.Category; -import org.openapitools.server.api.model.Tag; - -/** - * A pet for sale in the pet store - **/ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class Pet { - - private Long id; - private Category category; - private String name; - private List photoUrls = new ArrayList<>(); - private List tags = new ArrayList<>(); - - - public enum StatusEnum { - AVAILABLE("available"), - PENDING("pending"), - SOLD("sold"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return value; - } - } - - private StatusEnum status; - - public Pet () { - - } - - public Pet (Long id, Category category, String name, List photoUrls, List tags, StatusEnum status) { - this.id = id; - this.category = category; - this.name = name; - this.photoUrls = photoUrls; - this.tags = tags; - this.status = status; - } - - - @JsonProperty("id") - public Long getId() { - return id; - } - public void setId(Long id) { - this.id = id; - } - - - @JsonProperty("category") - public Category getCategory() { - return category; - } - public void setCategory(Category category) { - this.category = category; - } - - - @JsonProperty("name") - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - - - @JsonProperty("photoUrls") - public List getPhotoUrls() { - return photoUrls; - } - public void setPhotoUrls(List photoUrls) { - this.photoUrls = photoUrls; - } - - - @JsonProperty("tags") - public List getTags() { - return tags; - } - public void setTags(List tags) { - this.tags = tags; - } - - - @JsonProperty("status") - public StatusEnum getStatus() { - return status; - } - public void setStatus(StatusEnum status) { - this.status = status; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Pet pet = (Pet) o; - return Objects.equals(id, pet.id) && - Objects.equals(category, pet.category) && - Objects.equals(name, pet.name) && - Objects.equals(photoUrls, pet.photoUrls) && - Objects.equals(tags, pet.tags) && - Objects.equals(status, pet.status); - } - - @Override - public int hashCode() { - return Objects.hash(id, category, name, photoUrls, tags, status); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Pet {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" category: ").append(toIndentedString(category)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Tag.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Tag.java deleted file mode 100644 index 0389c2fbeea..00000000000 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/Tag.java +++ /dev/null @@ -1,83 +0,0 @@ -package org.openapitools.server.api.model; - -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * A tag for a pet - **/ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class Tag { - - private Long id; - private String name; - - public Tag () { - - } - - public Tag (Long id, String name) { - this.id = id; - this.name = name; - } - - - @JsonProperty("id") - public Long getId() { - return id; - } - public void setId(Long id) { - this.id = id; - } - - - @JsonProperty("name") - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Tag tag = (Tag) o; - return Objects.equals(id, tag.id) && - Objects.equals(name, tag.name); - } - - @Override - public int hashCode() { - return Objects.hash(id, name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Tag {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/User.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/User.java deleted file mode 100644 index 0e1e8755555..00000000000 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/model/User.java +++ /dev/null @@ -1,161 +0,0 @@ -package org.openapitools.server.api.model; - -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * A User who is purchasing from the pet store - **/ -@JsonInclude(JsonInclude.Include.NON_NULL) -public class User { - - private Long id; - private String username; - private String firstName; - private String lastName; - private String email; - private String password; - private String phone; - private Integer userStatus; - - public User () { - - } - - public User (Long id, String username, String firstName, String lastName, String email, String password, String phone, Integer userStatus) { - this.id = id; - this.username = username; - this.firstName = firstName; - this.lastName = lastName; - this.email = email; - this.password = password; - this.phone = phone; - this.userStatus = userStatus; - } - - - @JsonProperty("id") - public Long getId() { - return id; - } - public void setId(Long id) { - this.id = id; - } - - - @JsonProperty("username") - public String getUsername() { - return username; - } - public void setUsername(String username) { - this.username = username; - } - - - @JsonProperty("firstName") - public String getFirstName() { - return firstName; - } - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - - @JsonProperty("lastName") - public String getLastName() { - return lastName; - } - public void setLastName(String lastName) { - this.lastName = lastName; - } - - - @JsonProperty("email") - public String getEmail() { - return email; - } - public void setEmail(String email) { - this.email = email; - } - - - @JsonProperty("password") - public String getPassword() { - return password; - } - public void setPassword(String password) { - this.password = password; - } - - - @JsonProperty("phone") - public String getPhone() { - return phone; - } - public void setPhone(String phone) { - this.phone = phone; - } - - - @JsonProperty("userStatus") - public Integer getUserStatus() { - return userStatus; - } - public void setUserStatus(Integer userStatus) { - this.userStatus = userStatus; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - User user = (User) o; - return Objects.equals(id, user.id) && - Objects.equals(username, user.username) && - Objects.equals(firstName, user.firstName) && - Objects.equals(lastName, user.lastName) && - Objects.equals(email, user.email) && - Objects.equals(password, user.password) && - Objects.equals(phone, user.phone) && - Objects.equals(userStatus, user.userStatus); - } - - @Override - public int hashCode() { - return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class User {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); - sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/PetApi.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/PetApi.java deleted file mode 100644 index ae86f9bee70..00000000000 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/PetApi.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.openapitools.server.api.verticle; - -import java.io.File; -import org.openapitools.server.api.MainApiException; -import org.openapitools.server.api.model.ModelApiResponse; -import org.openapitools.server.api.model.Pet; - -import rx.Completable; -import rx.Single; - -import java.util.List; -import java.util.Map; - -public interface PetApi { - //addPet - public Completable addPet(Pet body); - - //deletePet - public Completable deletePet(Long petId,String apiKey); - - //findPetsByStatus - public Single> findPetsByStatus(List status); - - //findPetsByTags - public Single> findPetsByTags(List tags); - - //getPetById - public Single getPetById(Long petId); - - //updatePet - public Completable updatePet(Pet body); - - //updatePetWithForm - public Completable updatePetWithForm(Long petId,String name,String status); - - //uploadFile - public Single uploadFile(Long petId,String additionalMetadata,File file); - -} diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/PetApiException.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/PetApiException.java deleted file mode 100644 index d357d90ca1a..00000000000 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/PetApiException.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.openapitools.server.api.verticle; - -import java.io.File; -import org.openapitools.server.api.MainApiException; -import org.openapitools.server.api.model.ModelApiResponse; -import org.openapitools.server.api.model.Pet; - -public final class PetApiException extends MainApiException { - public PetApiException(int statusCode, String statusMessage) { - super(statusCode, statusMessage); - } - - public static final PetApiException Pet_addPet_405_Exception = new PetApiException(405, "Invalid input"); - public static final PetApiException Pet_deletePet_400_Exception = new PetApiException(400, "Invalid pet value"); - public static final PetApiException Pet_findPetsByStatus_200_Exception = new PetApiException(200, "successful operation"); - public static final PetApiException Pet_findPetsByStatus_400_Exception = new PetApiException(400, "Invalid status value"); - public static final PetApiException Pet_findPetsByTags_200_Exception = new PetApiException(200, "successful operation"); - public static final PetApiException Pet_findPetsByTags_400_Exception = new PetApiException(400, "Invalid tag value"); - public static final PetApiException Pet_getPetById_200_Exception = new PetApiException(200, "successful operation"); - public static final PetApiException Pet_getPetById_400_Exception = new PetApiException(400, "Invalid ID supplied"); - public static final PetApiException Pet_getPetById_404_Exception = new PetApiException(404, "Pet not found"); - public static final PetApiException Pet_updatePet_400_Exception = new PetApiException(400, "Invalid ID supplied"); - public static final PetApiException Pet_updatePet_404_Exception = new PetApiException(404, "Pet not found"); - public static final PetApiException Pet_updatePet_405_Exception = new PetApiException(405, "Validation exception"); - public static final PetApiException Pet_updatePetWithForm_405_Exception = new PetApiException(405, "Invalid input"); - public static final PetApiException Pet_uploadFile_200_Exception = new PetApiException(200, "successful operation"); - - -} \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/PetApiVerticle.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/PetApiVerticle.java deleted file mode 100644 index 2d5cfdb068b..00000000000 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/PetApiVerticle.java +++ /dev/null @@ -1,268 +0,0 @@ -package org.openapitools.server.api.verticle; - -import io.vertx.core.AbstractVerticle; -import io.vertx.core.eventbus.Message; -import io.vertx.core.json.Json; -import io.vertx.core.json.JsonArray; -import io.vertx.core.json.JsonObject; -import io.vertx.core.logging.Logger; -import io.vertx.core.logging.LoggerFactory; - -import java.io.File; -import org.openapitools.server.api.MainApiException; -import org.openapitools.server.api.model.ModelApiResponse; -import org.openapitools.server.api.model.Pet; - -import java.util.List; -import java.util.Map; - -public class PetApiVerticle extends AbstractVerticle { - static final Logger LOGGER = LoggerFactory.getLogger(PetApiVerticle.class); - - static final String ADDPET_SERVICE_ID = "addPet"; - static final String DELETEPET_SERVICE_ID = "deletePet"; - static final String FINDPETSBYSTATUS_SERVICE_ID = "findPetsByStatus"; - static final String FINDPETSBYTAGS_SERVICE_ID = "findPetsByTags"; - static final String GETPETBYID_SERVICE_ID = "getPetById"; - static final String UPDATEPET_SERVICE_ID = "updatePet"; - static final String UPDATEPETWITHFORM_SERVICE_ID = "updatePetWithForm"; - static final String UPLOADFILE_SERVICE_ID = "uploadFile"; - - final PetApi service; - - public PetApiVerticle() { - try { - Class serviceImplClass = getClass().getClassLoader().loadClass("org.openapitools.server.api.verticle.PetApiImpl"); - service = (PetApi)serviceImplClass.newInstance(); - } catch (Exception e) { - logUnexpectedError("PetApiVerticle constructor", e); - throw new RuntimeException(e); - } - } - - @Override - public void start() throws Exception { - - //Consumer for addPet - vertx.eventBus(). consumer(ADDPET_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "addPet"; - JsonObject bodyParam = message.body().getJsonObject("body"); - if (bodyParam == null) { - manageError(message, new MainApiException(400, "body is required"), serviceId); - return; - } - Pet body = Json.mapper.readValue(bodyParam.encode(), Pet.class); - service.addPet(body).subscribe( - () -> { - message.reply(null); - }, - error -> { - manageError(message, error, "addPet"); - }); - } catch (Exception e) { - logUnexpectedError("addPet", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for deletePet - vertx.eventBus(). consumer(DELETEPET_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "deletePet"; - String petIdParam = message.body().getString("petId"); - if(petIdParam == null) { - manageError(message, new MainApiException(400, "petId is required"), serviceId); - return; - } - Long petId = Json.mapper.readValue(petIdParam, Long.class); - String apiKeyParam = message.body().getString("api_key"); - String apiKey = (apiKeyParam == null) ? null : apiKeyParam; - service.deletePet(petId, apiKey).subscribe( - () -> { - message.reply(null); - }, - error -> { - manageError(message, error, "deletePet"); - }); - } catch (Exception e) { - logUnexpectedError("deletePet", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for findPetsByStatus - vertx.eventBus(). consumer(FINDPETSBYSTATUS_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "findPetsByStatus"; - JsonArray statusParam = message.body().getJsonArray("status"); - if(statusParam == null) { - manageError(message, new MainApiException(400, "status is required"), serviceId); - return; - } - List status = Json.mapper.readValue(statusParam.encode(), - Json.mapper.getTypeFactory().constructCollectionType(List.class, String.class)); - service.findPetsByStatus(status).subscribe( - result -> { - message.reply(new JsonArray(Json.encode(result)).encodePrettily()); - }, - error -> { - manageError(message, error, "findPetsByStatus"); - }); - } catch (Exception e) { - logUnexpectedError("findPetsByStatus", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for findPetsByTags - vertx.eventBus(). consumer(FINDPETSBYTAGS_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "findPetsByTags"; - JsonArray tagsParam = message.body().getJsonArray("tags"); - if(tagsParam == null) { - manageError(message, new MainApiException(400, "tags is required"), serviceId); - return; - } - List tags = Json.mapper.readValue(tagsParam.encode(), - Json.mapper.getTypeFactory().constructCollectionType(List.class, String.class)); - service.findPetsByTags(tags).subscribe( - result -> { - message.reply(new JsonArray(Json.encode(result)).encodePrettily()); - }, - error -> { - manageError(message, error, "findPetsByTags"); - }); - } catch (Exception e) { - logUnexpectedError("findPetsByTags", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for getPetById - vertx.eventBus(). consumer(GETPETBYID_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "getPetById"; - String petIdParam = message.body().getString("petId"); - if(petIdParam == null) { - manageError(message, new MainApiException(400, "petId is required"), serviceId); - return; - } - Long petId = Json.mapper.readValue(petIdParam, Long.class); - service.getPetById(petId).subscribe( - result -> { - message.reply(new JsonObject(Json.encode(result)).encodePrettily()); - }, - error -> { - manageError(message, error, "getPetById"); - }); - } catch (Exception e) { - logUnexpectedError("getPetById", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for updatePet - vertx.eventBus(). consumer(UPDATEPET_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "updatePet"; - JsonObject bodyParam = message.body().getJsonObject("body"); - if (bodyParam == null) { - manageError(message, new MainApiException(400, "body is required"), serviceId); - return; - } - Pet body = Json.mapper.readValue(bodyParam.encode(), Pet.class); - service.updatePet(body).subscribe( - () -> { - message.reply(null); - }, - error -> { - manageError(message, error, "updatePet"); - }); - } catch (Exception e) { - logUnexpectedError("updatePet", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for updatePetWithForm - vertx.eventBus(). consumer(UPDATEPETWITHFORM_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "updatePetWithForm"; - String petIdParam = message.body().getString("petId"); - if(petIdParam == null) { - manageError(message, new MainApiException(400, "petId is required"), serviceId); - return; - } - Long petId = Json.mapper.readValue(petIdParam, Long.class); - String nameParam = message.body().getString("name"); - String name = (nameParam == null) ? null : nameParam; - String statusParam = message.body().getString("status"); - String status = (statusParam == null) ? null : statusParam; - service.updatePetWithForm(petId, name, status).subscribe( - () -> { - message.reply(null); - }, - error -> { - manageError(message, error, "updatePetWithForm"); - }); - } catch (Exception e) { - logUnexpectedError("updatePetWithForm", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for uploadFile - vertx.eventBus(). consumer(UPLOADFILE_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "uploadFile"; - String petIdParam = message.body().getString("petId"); - if(petIdParam == null) { - manageError(message, new MainApiException(400, "petId is required"), serviceId); - return; - } - Long petId = Json.mapper.readValue(petIdParam, Long.class); - String additionalMetadataParam = message.body().getString("additionalMetadata"); - String additionalMetadata = (additionalMetadataParam == null) ? null : additionalMetadataParam; - String fileParam = message.body().getString("file"); - File file = (fileParam == null) ? null : Json.mapper.readValue(fileParam, File.class); - service.uploadFile(petId, additionalMetadata, file).subscribe( - result -> { - message.reply(new JsonObject(Json.encode(result)).encodePrettily()); - }, - error -> { - manageError(message, error, "uploadFile"); - }); - } catch (Exception e) { - logUnexpectedError("uploadFile", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - } - - private void manageError(Message message, Throwable cause, String serviceName) { - int code = MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(); - String statusMessage = MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage(); - if (cause instanceof MainApiException) { - code = ((MainApiException)cause).getStatusCode(); - statusMessage = ((MainApiException)cause).getStatusMessage(); - } else { - logUnexpectedError(serviceName, cause); - } - - message.fail(code, statusMessage); - } - - private void logUnexpectedError(String serviceName, Throwable cause) { - LOGGER.error("Unexpected error in "+ serviceName, cause); - } -} diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/StoreApi.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/StoreApi.java deleted file mode 100644 index 8f9c735708b..00000000000 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/StoreApi.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.openapitools.server.api.verticle; - -import org.openapitools.server.api.MainApiException; -import org.openapitools.server.api.model.Order; - -import rx.Completable; -import rx.Single; - -import java.util.List; -import java.util.Map; - -public interface StoreApi { - //deleteOrder - public Completable deleteOrder(String orderId); - - //getInventory - public Single> getInventory(); - - //getOrderById - public Single getOrderById(Long orderId); - - //placeOrder - public Single placeOrder(Order body); - -} diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/StoreApiException.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/StoreApiException.java deleted file mode 100644 index 7a7a7ea59fb..00000000000 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/StoreApiException.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.openapitools.server.api.verticle; - -import org.openapitools.server.api.MainApiException; -import org.openapitools.server.api.model.Order; - -public final class StoreApiException extends MainApiException { - public StoreApiException(int statusCode, String statusMessage) { - super(statusCode, statusMessage); - } - - public static final StoreApiException Store_deleteOrder_400_Exception = new StoreApiException(400, "Invalid ID supplied"); - public static final StoreApiException Store_deleteOrder_404_Exception = new StoreApiException(404, "Order not found"); - public static final StoreApiException Store_getInventory_200_Exception = new StoreApiException(200, "successful operation"); - public static final StoreApiException Store_getOrderById_200_Exception = new StoreApiException(200, "successful operation"); - public static final StoreApiException Store_getOrderById_400_Exception = new StoreApiException(400, "Invalid ID supplied"); - public static final StoreApiException Store_getOrderById_404_Exception = new StoreApiException(404, "Order not found"); - public static final StoreApiException Store_placeOrder_200_Exception = new StoreApiException(200, "successful operation"); - public static final StoreApiException Store_placeOrder_400_Exception = new StoreApiException(400, "Invalid Order"); - - -} \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/StoreApiVerticle.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/StoreApiVerticle.java deleted file mode 100644 index f8b2d9ce0aa..00000000000 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/StoreApiVerticle.java +++ /dev/null @@ -1,148 +0,0 @@ -package org.openapitools.server.api.verticle; - -import io.vertx.core.AbstractVerticle; -import io.vertx.core.eventbus.Message; -import io.vertx.core.json.Json; -import io.vertx.core.json.JsonArray; -import io.vertx.core.json.JsonObject; -import io.vertx.core.logging.Logger; -import io.vertx.core.logging.LoggerFactory; - -import org.openapitools.server.api.MainApiException; -import org.openapitools.server.api.model.Order; - -import java.util.List; -import java.util.Map; - -public class StoreApiVerticle extends AbstractVerticle { - static final Logger LOGGER = LoggerFactory.getLogger(StoreApiVerticle.class); - - static final String DELETEORDER_SERVICE_ID = "deleteOrder"; - static final String GETINVENTORY_SERVICE_ID = "getInventory"; - static final String GETORDERBYID_SERVICE_ID = "getOrderById"; - static final String PLACEORDER_SERVICE_ID = "placeOrder"; - - final StoreApi service; - - public StoreApiVerticle() { - try { - Class serviceImplClass = getClass().getClassLoader().loadClass("org.openapitools.server.api.verticle.StoreApiImpl"); - service = (StoreApi)serviceImplClass.newInstance(); - } catch (Exception e) { - logUnexpectedError("StoreApiVerticle constructor", e); - throw new RuntimeException(e); - } - } - - @Override - public void start() throws Exception { - - //Consumer for deleteOrder - vertx.eventBus(). consumer(DELETEORDER_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "deleteOrder"; - String orderIdParam = message.body().getString("orderId"); - if(orderIdParam == null) { - manageError(message, new MainApiException(400, "orderId is required"), serviceId); - return; - } - String orderId = orderIdParam; - service.deleteOrder(orderId).subscribe( - () -> { - message.reply(null); - }, - error -> { - manageError(message, error, "deleteOrder"); - }); - } catch (Exception e) { - logUnexpectedError("deleteOrder", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for getInventory - vertx.eventBus(). consumer(GETINVENTORY_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "getInventory"; - service.getInventory().subscribe( - result -> { - message.reply(new JsonObject(Json.encode(result)).encodePrettily()); - }, - error -> { - manageError(message, error, "getInventory"); - }); - } catch (Exception e) { - logUnexpectedError("getInventory", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for getOrderById - vertx.eventBus(). consumer(GETORDERBYID_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "getOrderById"; - String orderIdParam = message.body().getString("orderId"); - if(orderIdParam == null) { - manageError(message, new MainApiException(400, "orderId is required"), serviceId); - return; - } - Long orderId = Json.mapper.readValue(orderIdParam, Long.class); - service.getOrderById(orderId).subscribe( - result -> { - message.reply(new JsonObject(Json.encode(result)).encodePrettily()); - }, - error -> { - manageError(message, error, "getOrderById"); - }); - } catch (Exception e) { - logUnexpectedError("getOrderById", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for placeOrder - vertx.eventBus(). consumer(PLACEORDER_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "placeOrder"; - JsonObject bodyParam = message.body().getJsonObject("body"); - if (bodyParam == null) { - manageError(message, new MainApiException(400, "body is required"), serviceId); - return; - } - Order body = Json.mapper.readValue(bodyParam.encode(), Order.class); - service.placeOrder(body).subscribe( - result -> { - message.reply(new JsonObject(Json.encode(result)).encodePrettily()); - }, - error -> { - manageError(message, error, "placeOrder"); - }); - } catch (Exception e) { - logUnexpectedError("placeOrder", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - } - - private void manageError(Message message, Throwable cause, String serviceName) { - int code = MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(); - String statusMessage = MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage(); - if (cause instanceof MainApiException) { - code = ((MainApiException)cause).getStatusCode(); - statusMessage = ((MainApiException)cause).getStatusMessage(); - } else { - logUnexpectedError(serviceName, cause); - } - - message.fail(code, statusMessage); - } - - private void logUnexpectedError(String serviceName, Throwable cause) { - LOGGER.error("Unexpected error in "+ serviceName, cause); - } -} diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/UserApi.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/UserApi.java deleted file mode 100644 index cc6be61055c..00000000000 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/UserApi.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.openapitools.server.api.verticle; - -import org.openapitools.server.api.MainApiException; -import org.openapitools.server.api.model.User; - -import rx.Completable; -import rx.Single; - -import java.util.List; -import java.util.Map; - -public interface UserApi { - //createUser - public Completable createUser(User body); - - //createUsersWithArrayInput - public Completable createUsersWithArrayInput(List body); - - //createUsersWithListInput - public Completable createUsersWithListInput(List body); - - //deleteUser - public Completable deleteUser(String username); - - //getUserByName - public Single getUserByName(String username); - - //loginUser - public Single loginUser(String username,String password); - - //logoutUser - public Completable logoutUser(); - - //updateUser - public Completable updateUser(String username,User body); - -} diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/UserApiException.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/UserApiException.java deleted file mode 100644 index 3fdf14a842e..00000000000 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/UserApiException.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.openapitools.server.api.verticle; - -import org.openapitools.server.api.MainApiException; -import org.openapitools.server.api.model.User; - -public final class UserApiException extends MainApiException { - public UserApiException(int statusCode, String statusMessage) { - super(statusCode, statusMessage); - } - - public static final UserApiException User_deleteUser_400_Exception = new UserApiException(400, "Invalid username supplied"); - public static final UserApiException User_deleteUser_404_Exception = new UserApiException(404, "User not found"); - public static final UserApiException User_getUserByName_200_Exception = new UserApiException(200, "successful operation"); - public static final UserApiException User_getUserByName_400_Exception = new UserApiException(400, "Invalid username supplied"); - public static final UserApiException User_getUserByName_404_Exception = new UserApiException(404, "User not found"); - public static final UserApiException User_loginUser_200_Exception = new UserApiException(200, "successful operation"); - public static final UserApiException User_loginUser_400_Exception = new UserApiException(400, "Invalid username/password supplied"); - public static final UserApiException User_updateUser_400_Exception = new UserApiException(400, "Invalid user supplied"); - public static final UserApiException User_updateUser_404_Exception = new UserApiException(404, "User not found"); - - -} \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/UserApiVerticle.java b/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/UserApiVerticle.java deleted file mode 100644 index 756b31863fa..00000000000 --- a/samples/server/petstore/java-vertx/rx/src/main/java/org/openapitools/server/api/verticle/UserApiVerticle.java +++ /dev/null @@ -1,262 +0,0 @@ -package org.openapitools.server.api.verticle; - -import io.vertx.core.AbstractVerticle; -import io.vertx.core.eventbus.Message; -import io.vertx.core.json.Json; -import io.vertx.core.json.JsonArray; -import io.vertx.core.json.JsonObject; -import io.vertx.core.logging.Logger; -import io.vertx.core.logging.LoggerFactory; - -import org.openapitools.server.api.MainApiException; -import org.openapitools.server.api.model.User; - -import java.util.List; -import java.util.Map; - -public class UserApiVerticle extends AbstractVerticle { - static final Logger LOGGER = LoggerFactory.getLogger(UserApiVerticle.class); - - static final String CREATEUSER_SERVICE_ID = "createUser"; - static final String CREATEUSERSWITHARRAYINPUT_SERVICE_ID = "createUsersWithArrayInput"; - static final String CREATEUSERSWITHLISTINPUT_SERVICE_ID = "createUsersWithListInput"; - static final String DELETEUSER_SERVICE_ID = "deleteUser"; - static final String GETUSERBYNAME_SERVICE_ID = "getUserByName"; - static final String LOGINUSER_SERVICE_ID = "loginUser"; - static final String LOGOUTUSER_SERVICE_ID = "logoutUser"; - static final String UPDATEUSER_SERVICE_ID = "updateUser"; - - final UserApi service; - - public UserApiVerticle() { - try { - Class serviceImplClass = getClass().getClassLoader().loadClass("org.openapitools.server.api.verticle.UserApiImpl"); - service = (UserApi)serviceImplClass.newInstance(); - } catch (Exception e) { - logUnexpectedError("UserApiVerticle constructor", e); - throw new RuntimeException(e); - } - } - - @Override - public void start() throws Exception { - - //Consumer for createUser - vertx.eventBus(). consumer(CREATEUSER_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "createUser"; - JsonObject bodyParam = message.body().getJsonObject("body"); - if (bodyParam == null) { - manageError(message, new MainApiException(400, "body is required"), serviceId); - return; - } - User body = Json.mapper.readValue(bodyParam.encode(), User.class); - service.createUser(body).subscribe( - () -> { - message.reply(null); - }, - error -> { - manageError(message, error, "createUser"); - }); - } catch (Exception e) { - logUnexpectedError("createUser", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for createUsersWithArrayInput - vertx.eventBus(). consumer(CREATEUSERSWITHARRAYINPUT_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "createUsersWithArrayInput"; - JsonArray bodyParam = message.body().getJsonArray("body"); - if(bodyParam == null) { - manageError(message, new MainApiException(400, "body is required"), serviceId); - return; - } - List body = Json.mapper.readValue(bodyParam.encode(), - Json.mapper.getTypeFactory().constructCollectionType(List.class, User.class)); - service.createUsersWithArrayInput(body).subscribe( - () -> { - message.reply(null); - }, - error -> { - manageError(message, error, "createUsersWithArrayInput"); - }); - } catch (Exception e) { - logUnexpectedError("createUsersWithArrayInput", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for createUsersWithListInput - vertx.eventBus(). consumer(CREATEUSERSWITHLISTINPUT_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "createUsersWithListInput"; - JsonArray bodyParam = message.body().getJsonArray("body"); - if(bodyParam == null) { - manageError(message, new MainApiException(400, "body is required"), serviceId); - return; - } - List body = Json.mapper.readValue(bodyParam.encode(), - Json.mapper.getTypeFactory().constructCollectionType(List.class, User.class)); - service.createUsersWithListInput(body).subscribe( - () -> { - message.reply(null); - }, - error -> { - manageError(message, error, "createUsersWithListInput"); - }); - } catch (Exception e) { - logUnexpectedError("createUsersWithListInput", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for deleteUser - vertx.eventBus(). consumer(DELETEUSER_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "deleteUser"; - String usernameParam = message.body().getString("username"); - if(usernameParam == null) { - manageError(message, new MainApiException(400, "username is required"), serviceId); - return; - } - String username = usernameParam; - service.deleteUser(username).subscribe( - () -> { - message.reply(null); - }, - error -> { - manageError(message, error, "deleteUser"); - }); - } catch (Exception e) { - logUnexpectedError("deleteUser", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for getUserByName - vertx.eventBus(). consumer(GETUSERBYNAME_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "getUserByName"; - String usernameParam = message.body().getString("username"); - if(usernameParam == null) { - manageError(message, new MainApiException(400, "username is required"), serviceId); - return; - } - String username = usernameParam; - service.getUserByName(username).subscribe( - result -> { - message.reply(new JsonObject(Json.encode(result)).encodePrettily()); - }, - error -> { - manageError(message, error, "getUserByName"); - }); - } catch (Exception e) { - logUnexpectedError("getUserByName", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for loginUser - vertx.eventBus(). consumer(LOGINUSER_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "loginUser"; - String usernameParam = message.body().getString("username"); - if(usernameParam == null) { - manageError(message, new MainApiException(400, "username is required"), serviceId); - return; - } - String username = usernameParam; - String passwordParam = message.body().getString("password"); - if(passwordParam == null) { - manageError(message, new MainApiException(400, "password is required"), serviceId); - return; - } - String password = passwordParam; - service.loginUser(username, password).subscribe( - result -> { - message.reply(new JsonObject(Json.encode(result)).encodePrettily()); - }, - error -> { - manageError(message, error, "loginUser"); - }); - } catch (Exception e) { - logUnexpectedError("loginUser", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for logoutUser - vertx.eventBus(). consumer(LOGOUTUSER_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "logoutUser"; - service.logoutUser().subscribe( - () -> { - message.reply(null); - }, - error -> { - manageError(message, error, "logoutUser"); - }); - } catch (Exception e) { - logUnexpectedError("logoutUser", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - //Consumer for updateUser - vertx.eventBus(). consumer(UPDATEUSER_SERVICE_ID).handler(message -> { - try { - // Workaround for #allParams section clearing the vendorExtensions map - String serviceId = "updateUser"; - String usernameParam = message.body().getString("username"); - if(usernameParam == null) { - manageError(message, new MainApiException(400, "username is required"), serviceId); - return; - } - String username = usernameParam; - JsonObject bodyParam = message.body().getJsonObject("body"); - if (bodyParam == null) { - manageError(message, new MainApiException(400, "body is required"), serviceId); - return; - } - User body = Json.mapper.readValue(bodyParam.encode(), User.class); - service.updateUser(username, body).subscribe( - () -> { - message.reply(null); - }, - error -> { - manageError(message, error, "updateUser"); - }); - } catch (Exception e) { - logUnexpectedError("updateUser", e); - message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage()); - } - }); - - } - - private void manageError(Message message, Throwable cause, String serviceName) { - int code = MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(); - String statusMessage = MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage(); - if (cause instanceof MainApiException) { - code = ((MainApiException)cause).getStatusCode(); - statusMessage = ((MainApiException)cause).getStatusMessage(); - } else { - logUnexpectedError(serviceName, cause); - } - - message.fail(code, statusMessage); - } - - private void logUnexpectedError(String serviceName, Throwable cause) { - LOGGER.error("Unexpected error in "+ serviceName, cause); - } -} diff --git a/samples/server/petstore/java-vertx/rx/src/main/resources/openapi.json b/samples/server/petstore/java-vertx/rx/src/main/resources/openapi.json deleted file mode 100644 index c292bb5e95a..00000000000 --- a/samples/server/petstore/java-vertx/rx/src/main/resources/openapi.json +++ /dev/null @@ -1,1082 +0,0 @@ -{ - "openapi" : "3.0.1", - "info" : { - "description" : "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", - "license" : { - "name" : "Apache-2.0", - "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" - }, - "title" : "OpenAPI Petstore", - "version" : "1.0.0" - }, - "servers" : [ { - "url" : "http://petstore.swagger.io/v2" - } ], - "tags" : [ { - "description" : "Everything about your Pets", - "name" : "pet" - }, { - "description" : "Access to Petstore orders", - "name" : "store" - }, { - "description" : "Operations about user", - "name" : "user" - } ], - "paths" : { - "/pet" : { - "post" : { - "operationId" : "addPet", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - } - }, - "description" : "Pet object that needs to be added to the store", - "required" : true - }, - "responses" : { - "405" : { - "content" : { }, - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "Add a new pet to the store", - "tags" : [ "pet" ], - "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", - "x-accepts" : "application/json", - "x-serviceid" : "addPet", - "x-serviceid-varname" : "ADDPET_SERVICE_ID" - }, - "put" : { - "operationId" : "updatePet", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - } - }, - "description" : "Pet object that needs to be added to the store", - "required" : true - }, - "responses" : { - "400" : { - "content" : { }, - "description" : "Invalid ID supplied" - }, - "404" : { - "content" : { }, - "description" : "Pet not found" - }, - "405" : { - "content" : { }, - "description" : "Validation exception" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "Update an existing pet", - "tags" : [ "pet" ], - "x-codegen-request-body-name" : "body", - "x-contentType" : "application/json", - "x-accepts" : "application/json", - "x-serviceid" : "updatePet", - "x-serviceid-varname" : "UPDATEPET_SERVICE_ID" - } - }, - "/pet/findByStatus" : { - "get" : { - "description" : "Multiple status values can be provided with comma separated strings", - "operationId" : "findPetsByStatus", - "parameters" : [ { - "description" : "Status values that need to be considered for filter", - "explode" : false, - "in" : "query", - "name" : "status", - "required" : true, - "schema" : { - "items" : { - "default" : "available", - "enum" : [ "available", "pending", "sold" ], - "type" : "string" - }, - "type" : "array" - }, - "style" : "form" - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/Pet" - }, - "type" : "array" - } - }, - "application/json" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/Pet" - }, - "type" : "array" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "content" : { }, - "description" : "Invalid status value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "Finds Pets by status", - "tags" : [ "pet" ], - "x-accepts" : "application/json", - "x-serviceid" : "findPetsByStatus", - "x-serviceid-varname" : "FINDPETSBYSTATUS_SERVICE_ID" - } - }, - "/pet/findByTags" : { - "get" : { - "deprecated" : true, - "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", - "operationId" : "findPetsByTags", - "parameters" : [ { - "description" : "Tags to filter by", - "explode" : false, - "in" : "query", - "name" : "tags", - "required" : true, - "schema" : { - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "style" : "form" - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/Pet" - }, - "type" : "array" - } - }, - "application/json" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/Pet" - }, - "type" : "array" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "content" : { }, - "description" : "Invalid tag value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "Finds Pets by tags", - "tags" : [ "pet" ], - "x-accepts" : "application/json", - "x-serviceid" : "findPetsByTags", - "x-serviceid-varname" : "FINDPETSBYTAGS_SERVICE_ID" - } - }, - "/pet/{petId}" : { - "delete" : { - "operationId" : "deletePet", - "parameters" : [ { - "in" : "header", - "name" : "api_key", - "schema" : { - "type" : "string" - } - }, { - "description" : "Pet id to delete", - "in" : "path", - "name" : "petId", - "required" : true, - "schema" : { - "format" : "int64", - "type" : "integer" - } - } ], - "responses" : { - "400" : { - "content" : { }, - "description" : "Invalid pet value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "Deletes a pet", - "tags" : [ "pet" ], - "x-accepts" : "application/json", - "x-serviceid" : "deletePet", - "x-serviceid-varname" : "DELETEPET_SERVICE_ID" - }, - "get" : { - "description" : "Returns a single pet", - "operationId" : "getPetById", - "parameters" : [ { - "description" : "ID of pet to return", - "in" : "path", - "name" : "petId", - "required" : true, - "schema" : { - "format" : "int64", - "type" : "integer" - } - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "content" : { }, - "description" : "Invalid ID supplied" - }, - "404" : { - "content" : { }, - "description" : "Pet not found" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Find pet by ID", - "tags" : [ "pet" ], - "x-accepts" : "application/json", - "x-serviceid" : "getPetById", - "x-serviceid-varname" : "GETPETBYID_SERVICE_ID" - }, - "post" : { - "operationId" : "updatePetWithForm", - "parameters" : [ { - "description" : "ID of pet that needs to be updated", - "in" : "path", - "name" : "petId", - "required" : true, - "schema" : { - "format" : "int64", - "type" : "integer" - } - } ], - "requestBody" : { - "content" : { - "application/x-www-form-urlencoded" : { - "schema" : { - "properties" : { - "name" : { - "description" : "Updated name of the pet", - "type" : "string" - }, - "status" : { - "description" : "Updated status of the pet", - "type" : "string" - } - } - } - } - } - }, - "responses" : { - "405" : { - "content" : { }, - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "Updates a pet in the store with form data", - "tags" : [ "pet" ], - "x-contentType" : "application/x-www-form-urlencoded", - "x-accepts" : "application/json", - "x-serviceid" : "updatePetWithForm", - "x-serviceid-varname" : "UPDATEPETWITHFORM_SERVICE_ID" - } - }, - "/pet/{petId}/uploadImage" : { - "post" : { - "operationId" : "uploadFile", - "parameters" : [ { - "description" : "ID of pet to update", - "in" : "path", - "name" : "petId", - "required" : true, - "schema" : { - "format" : "int64", - "type" : "integer" - } - } ], - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "properties" : { - "additionalMetadata" : { - "description" : "Additional data to pass to server", - "type" : "string" - }, - "file" : { - "description" : "file to upload", - "format" : "binary", - "type" : "string" - } - } - } - } - } - }, - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ApiResponse" - } - } - }, - "description" : "successful operation" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "summary" : "uploads an image", - "tags" : [ "pet" ], - "x-contentType" : "multipart/form-data", - "x-accepts" : "application/json", - "x-serviceid" : "uploadFile", - "x-serviceid-varname" : "UPLOADFILE_SERVICE_ID" - } - }, - "/store/inventory" : { - "get" : { - "description" : "Returns a map of status codes to quantities", - "operationId" : "getInventory", - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "additionalProperties" : { - "format" : "int32", - "type" : "integer" - }, - "type" : "object" - } - } - }, - "description" : "successful operation" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "summary" : "Returns pet inventories by status", - "tags" : [ "store" ], - "x-accepts" : "application/json", - "x-serviceid" : "getInventory", - "x-serviceid-varname" : "GETINVENTORY_SERVICE_ID" - } - }, - "/store/order" : { - "post" : { - "operationId" : "placeOrder", - "requestBody" : { - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - } - }, - "description" : "order placed for purchasing the pet", - "required" : true - }, - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "content" : { }, - "description" : "Invalid Order" - } - }, - "summary" : "Place an order for a pet", - "tags" : [ "store" ], - "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", - "x-accepts" : "application/json", - "x-serviceid" : "placeOrder", - "x-serviceid-varname" : "PLACEORDER_SERVICE_ID" - } - }, - "/store/order/{orderId}" : { - "delete" : { - "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", - "operationId" : "deleteOrder", - "parameters" : [ { - "description" : "ID of the order that needs to be deleted", - "in" : "path", - "name" : "orderId", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "400" : { - "content" : { }, - "description" : "Invalid ID supplied" - }, - "404" : { - "content" : { }, - "description" : "Order not found" - } - }, - "summary" : "Delete purchase order by ID", - "tags" : [ "store" ], - "x-accepts" : "application/json", - "x-serviceid" : "deleteOrder", - "x-serviceid-varname" : "DELETEORDER_SERVICE_ID" - }, - "get" : { - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", - "operationId" : "getOrderById", - "parameters" : [ { - "description" : "ID of pet that needs to be fetched", - "in" : "path", - "name" : "orderId", - "required" : true, - "schema" : { - "format" : "int64", - "maximum" : 5, - "minimum" : 1, - "type" : "integer" - } - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "content" : { }, - "description" : "Invalid ID supplied" - }, - "404" : { - "content" : { }, - "description" : "Order not found" - } - }, - "summary" : "Find purchase order by ID", - "tags" : [ "store" ], - "x-accepts" : "application/json", - "x-serviceid" : "getOrderById", - "x-serviceid-varname" : "GETORDERBYID_SERVICE_ID" - } - }, - "/user" : { - "post" : { - "description" : "This can only be done by the logged in user.", - "operationId" : "createUser", - "requestBody" : { - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/User" - } - } - }, - "description" : "Created user object", - "required" : true - }, - "responses" : { - "default" : { - "content" : { }, - "description" : "successful operation" - } - }, - "summary" : "Create user", - "tags" : [ "user" ], - "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", - "x-accepts" : "application/json", - "x-serviceid" : "createUser", - "x-serviceid-varname" : "CREATEUSER_SERVICE_ID" - } - }, - "/user/createWithArray" : { - "post" : { - "operationId" : "createUsersWithArrayInput", - "requestBody" : { - "content" : { - "*/*" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/User" - }, - "type" : "array" - } - } - }, - "description" : "List of user object", - "required" : true - }, - "responses" : { - "default" : { - "content" : { }, - "description" : "successful operation" - } - }, - "summary" : "Creates list of users with given input array", - "tags" : [ "user" ], - "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", - "x-accepts" : "application/json", - "x-serviceid" : "createUsersWithArrayInput", - "x-serviceid-varname" : "CREATEUSERSWITHARRAYINPUT_SERVICE_ID" - } - }, - "/user/createWithList" : { - "post" : { - "operationId" : "createUsersWithListInput", - "requestBody" : { - "content" : { - "*/*" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/User" - }, - "type" : "array" - } - } - }, - "description" : "List of user object", - "required" : true - }, - "responses" : { - "default" : { - "content" : { }, - "description" : "successful operation" - } - }, - "summary" : "Creates list of users with given input array", - "tags" : [ "user" ], - "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", - "x-accepts" : "application/json", - "x-serviceid" : "createUsersWithListInput", - "x-serviceid-varname" : "CREATEUSERSWITHLISTINPUT_SERVICE_ID" - } - }, - "/user/login" : { - "get" : { - "operationId" : "loginUser", - "parameters" : [ { - "description" : "The user name for login", - "in" : "query", - "name" : "username", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "description" : "The password for login in clear text", - "in" : "query", - "name" : "password", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "type" : "string" - } - }, - "application/json" : { - "schema" : { - "type" : "string" - } - } - }, - "description" : "successful operation", - "headers" : { - "X-Rate-Limit" : { - "description" : "calls per hour allowed by the user", - "schema" : { - "format" : "int32", - "type" : "integer" - } - }, - "X-Expires-After" : { - "description" : "date in UTC when toekn expires", - "schema" : { - "format" : "date-time", - "type" : "string" - } - } - } - }, - "400" : { - "content" : { }, - "description" : "Invalid username/password supplied" - } - }, - "summary" : "Logs user into the system", - "tags" : [ "user" ], - "x-accepts" : "application/json", - "x-serviceid" : "loginUser", - "x-serviceid-varname" : "LOGINUSER_SERVICE_ID" - } - }, - "/user/logout" : { - "get" : { - "operationId" : "logoutUser", - "responses" : { - "default" : { - "content" : { }, - "description" : "successful operation" - } - }, - "summary" : "Logs out current logged in user session", - "tags" : [ "user" ], - "x-accepts" : "application/json", - "x-serviceid" : "logoutUser", - "x-serviceid-varname" : "LOGOUTUSER_SERVICE_ID" - } - }, - "/user/{username}" : { - "delete" : { - "description" : "This can only be done by the logged in user.", - "operationId" : "deleteUser", - "parameters" : [ { - "description" : "The name that needs to be deleted", - "in" : "path", - "name" : "username", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "400" : { - "content" : { }, - "description" : "Invalid username supplied" - }, - "404" : { - "content" : { }, - "description" : "User not found" - } - }, - "summary" : "Delete user", - "tags" : [ "user" ], - "x-accepts" : "application/json", - "x-serviceid" : "deleteUser", - "x-serviceid-varname" : "DELETEUSER_SERVICE_ID" - }, - "get" : { - "operationId" : "getUserByName", - "parameters" : [ { - "description" : "The name that needs to be fetched. Use user1 for testing.", - "in" : "path", - "name" : "username", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/User" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/User" - } - } - }, - "description" : "successful operation" - }, - "400" : { - "content" : { }, - "description" : "Invalid username supplied" - }, - "404" : { - "content" : { }, - "description" : "User not found" - } - }, - "summary" : "Get user by user name", - "tags" : [ "user" ], - "x-accepts" : "application/json", - "x-serviceid" : "getUserByName", - "x-serviceid-varname" : "GETUSERBYNAME_SERVICE_ID" - }, - "put" : { - "description" : "This can only be done by the logged in user.", - "operationId" : "updateUser", - "parameters" : [ { - "description" : "name that need to be deleted", - "in" : "path", - "name" : "username", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "requestBody" : { - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/User" - } - } - }, - "description" : "Updated user object", - "required" : true - }, - "responses" : { - "400" : { - "content" : { }, - "description" : "Invalid user supplied" - }, - "404" : { - "content" : { }, - "description" : "User not found" - } - }, - "summary" : "Updated user", - "tags" : [ "user" ], - "x-codegen-request-body-name" : "body", - "x-contentType" : "*/*", - "x-accepts" : "application/json", - "x-serviceid" : "updateUser", - "x-serviceid-varname" : "UPDATEUSER_SERVICE_ID" - } - } - }, - "components" : { - "schemas" : { - "Order" : { - "description" : "An order for a pets from the pet store", - "example" : { - "petId" : 6, - "quantity" : 1, - "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "complete" : false, - "status" : "placed" - }, - "properties" : { - "id" : { - "format" : "int64", - "type" : "integer" - }, - "petId" : { - "format" : "int64", - "type" : "integer" - }, - "quantity" : { - "format" : "int32", - "type" : "integer" - }, - "shipDate" : { - "format" : "date-time", - "type" : "string" - }, - "status" : { - "description" : "Order Status", - "enum" : [ "placed", "approved", "delivered" ], - "type" : "string" - }, - "complete" : { - "default" : false, - "type" : "boolean" - } - }, - "title" : "Pet Order", - "type" : "object", - "xml" : { - "name" : "Order" - } - }, - "Category" : { - "description" : "A category for a pet", - "example" : { - "name" : "name", - "id" : 6 - }, - "properties" : { - "id" : { - "format" : "int64", - "type" : "integer" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet category", - "type" : "object", - "xml" : { - "name" : "Category" - } - }, - "User" : { - "description" : "A User who is purchasing from the pet store", - "example" : { - "firstName" : "firstName", - "lastName" : "lastName", - "password" : "password", - "userStatus" : 6, - "phone" : "phone", - "id" : 0, - "email" : "email", - "username" : "username" - }, - "properties" : { - "id" : { - "format" : "int64", - "type" : "integer" - }, - "username" : { - "type" : "string" - }, - "firstName" : { - "type" : "string" - }, - "lastName" : { - "type" : "string" - }, - "email" : { - "type" : "string" - }, - "password" : { - "type" : "string" - }, - "phone" : { - "type" : "string" - }, - "userStatus" : { - "description" : "User Status", - "format" : "int32", - "type" : "integer" - } - }, - "title" : "a User", - "type" : "object", - "xml" : { - "name" : "User" - } - }, - "Tag" : { - "description" : "A tag for a pet", - "example" : { - "name" : "name", - "id" : 1 - }, - "properties" : { - "id" : { - "format" : "int64", - "type" : "integer" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet Tag", - "type" : "object", - "xml" : { - "name" : "Tag" - } - }, - "Pet" : { - "description" : "A pet for sale in the pet store", - "example" : { - "photoUrls" : [ "photoUrls", "photoUrls" ], - "name" : "doggie", - "id" : 0, - "category" : { - "name" : "name", - "id" : 6 - }, - "tags" : [ { - "name" : "name", - "id" : 1 - }, { - "name" : "name", - "id" : 1 - } ], - "status" : "available" - }, - "properties" : { - "id" : { - "format" : "int64", - "type" : "integer" - }, - "category" : { - "$ref" : "#/components/schemas/Category" - }, - "name" : { - "example" : "doggie", - "type" : "string" - }, - "photoUrls" : { - "items" : { - "type" : "string" - }, - "type" : "array", - "xml" : { - "name" : "photoUrl", - "wrapped" : true - } - }, - "tags" : { - "items" : { - "$ref" : "#/components/schemas/Tag" - }, - "type" : "array", - "xml" : { - "name" : "tag", - "wrapped" : true - } - }, - "status" : { - "description" : "pet status in the store", - "enum" : [ "available", "pending", "sold" ], - "type" : "string" - } - }, - "required" : [ "name", "photoUrls" ], - "title" : "a Pet", - "type" : "object", - "xml" : { - "name" : "Pet" - } - }, - "ApiResponse" : { - "description" : "Describes the result of uploading an image resource", - "example" : { - "code" : 0, - "type" : "type", - "message" : "message" - }, - "properties" : { - "code" : { - "format" : "int32", - "type" : "integer" - }, - "type" : { - "type" : "string" - }, - "message" : { - "type" : "string" - } - }, - "title" : "An uploaded response", - "type" : "object" - } - }, - "securitySchemes" : { - "petstore_auth" : { - "flows" : { - "implicit" : { - "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", - "scopes" : { - "write:pets" : "modify pets in your account", - "read:pets" : "read your pets" - } - } - }, - "type" : "oauth2" - }, - "api_key" : { - "in" : "header", - "name" : "api_key", - "type" : "apiKey" - } - } - }, - "x-original-swagger-version" : "2.0" -} \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/rx/src/main/resources/vertx-default-jul-logging.properties b/samples/server/petstore/java-vertx/rx/src/main/resources/vertx-default-jul-logging.properties deleted file mode 100644 index 706d6d9b2f4..00000000000 --- a/samples/server/petstore/java-vertx/rx/src/main/resources/vertx-default-jul-logging.properties +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright 2014 Red Hat, Inc. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# and Apache License v2.0 which accompanies this distribution. -# -# The Eclipse Public License is available at -# http://www.eclipse.org/legal/epl-v10.html -# -# The Apache License v2.0 is available at -# http://www.opensource.org/licenses/apache2.0.php -# -# You may elect to redistribute this code under either of these licenses. -# -handlers=java.util.logging.ConsoleHandler,java.util.logging.FileHandler -java.util.logging.SimpleFormatter.format=%5$s %6$s\n -java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter -java.util.logging.ConsoleHandler.level=FINEST -java.util.logging.FileHandler.level=INFO -java.util.logging.FileHandler.formatter=io.vertx.core.logging.VertxLoggerFormatter - -# Put the log in the system temporary directory -java.util.logging.FileHandler.pattern=vertx.log - -.level=INFO -io.vertx.ext.web.level=FINEST -io.vertx.level=INFO -com.hazelcast.level=INFO -io.netty.util.internal.PlatformDependent.level=SEVERE \ No newline at end of file From c33b5a66e79bd34ddf7bd09d1a1cafa8d5098e3d Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 5 Feb 2021 19:45:10 +0800 Subject: [PATCH 16/44] minor fixes to ts nestjs generator (#8622) --- ...typescript-nestjs-v6-provided-in-root.yaml | 1 + .../typescript-nestjs/api.service.mustache | 11 ++++---- .../builds/default/api/pet.service.ts | 25 ++++++++----------- .../builds/default/api/store.service.ts | 8 ++---- .../builds/default/api/user.service.ts | 12 ++------- 5 files changed, 22 insertions(+), 35 deletions(-) diff --git a/bin/configs/typescript-nestjs-v6-provided-in-root.yaml b/bin/configs/typescript-nestjs-v6-provided-in-root.yaml index 4fb999ef170..d5ca0d52431 100644 --- a/bin/configs/typescript-nestjs-v6-provided-in-root.yaml +++ b/bin/configs/typescript-nestjs-v6-provided-in-root.yaml @@ -1,6 +1,7 @@ generatorName: typescript-nestjs outputDir: samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/typescript-nestjs additionalProperties: nestVersion: 6.0.0 "npmName": "@openapitools/typescript-nestjs-petstore" diff --git a/modules/openapi-generator/src/main/resources/typescript-nestjs/api.service.mustache b/modules/openapi-generator/src/main/resources/typescript-nestjs/api.service.mustache index 3bc043bddb1..7e1fc2514b6 100644 --- a/modules/openapi-generator/src/main/resources/typescript-nestjs/api.service.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-nestjs/api.service.mustache @@ -107,7 +107,7 @@ export class {{classname}} { {{/isListContainer}} {{^isListContainer}} if ({{paramName}} !== undefined && {{paramName}} !== null) { - headers['{{baseName}}'] String({{paramName}}); + headers['{{baseName}}'] = String({{paramName}}); } {{/isListContainer}} {{/headerParams}} @@ -147,7 +147,7 @@ export class {{classname}} { // to determine the Accept header let httpHeaderAccepts: string[] = [ {{#produces}} - '{{{mediaType}}}'{{#hasMore}},{{/hasMore}} + '{{{mediaType}}}'{{^-last}},{{/-last}} {{/produces}} ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); @@ -158,7 +158,7 @@ export class {{classname}} { // to determine the Content-Type header const consumes: string[] = [ {{#consumes}} - '{{{mediaType}}}'{{#hasMore}},{{/hasMore}} + '{{{mediaType}}}'{{^-last}},{{/-last}} {{/consumes}} ]; {{#bodyParam}} @@ -167,8 +167,8 @@ export class {{classname}} { headers['Content-Type'] = httpContentTypeSelected; } {{/bodyParam}} - {{#hasFormParams}} + const canConsumeForm = this.canConsumeForm(consumes); let formParams: { append(param: string, value: any): void; }; @@ -176,6 +176,7 @@ export class {{classname}} { let convertFormParamsToString = false; {{#formParams}} {{#isFile}} + // use FormData to transmit files using content-type "multipart/form-data" // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data useForm = canConsumeForm; @@ -186,8 +187,8 @@ export class {{classname}} { } else { // formParams = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); } - {{#formParams}} + {{#isListContainer}} if ({{paramName}}) { {{#isCollectionFormatMulti}} diff --git a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/pet.service.ts index 554608d8f0d..7662f505df7 100644 --- a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/pet.service.ts @@ -67,7 +67,7 @@ export class PetService { // to determine the Accept header let httpHeaderAccepts: string[] = [ - 'application/xml' + 'application/xml', 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); @@ -77,14 +77,13 @@ export class PetService { // to determine the Content-Type header const consumes: string[] = [ - 'application/json' + 'application/json', 'application/xml' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected != undefined) { headers['Content-Type'] = httpContentTypeSelected; } - return this.httpClient.post(`${this.basePath}/pet`, pet, { @@ -111,7 +110,7 @@ export class PetService { let headers = this.defaultHeaders; if (apiKey !== undefined && apiKey !== null) { - headers['api_key'] String(apiKey); + headers['api_key'] = String(apiKey); } // authentication (petstore_auth) required @@ -133,7 +132,6 @@ export class PetService { // to determine the Content-Type header const consumes: string[] = [ ]; - return this.httpClient.delete(`${this.basePath}/pet/${encodeURIComponent(String(petId))}`, { withCredentials: this.configuration.withCredentials, @@ -172,7 +170,7 @@ export class PetService { // to determine the Accept header let httpHeaderAccepts: string[] = [ - 'application/xml' + 'application/xml', 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); @@ -183,7 +181,6 @@ export class PetService { // to determine the Content-Type header const consumes: string[] = [ ]; - return this.httpClient.get>(`${this.basePath}/pet/findByStatus`, { params: queryParameters, @@ -223,7 +220,7 @@ export class PetService { // to determine the Accept header let httpHeaderAccepts: string[] = [ - 'application/xml' + 'application/xml', 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); @@ -234,7 +231,6 @@ export class PetService { // to determine the Content-Type header const consumes: string[] = [ ]; - return this.httpClient.get>(`${this.basePath}/pet/findByTags`, { params: queryParameters, @@ -266,7 +262,7 @@ export class PetService { // to determine the Accept header let httpHeaderAccepts: string[] = [ - 'application/xml' + 'application/xml', 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); @@ -277,7 +273,6 @@ export class PetService { // to determine the Content-Type header const consumes: string[] = [ ]; - return this.httpClient.get(`${this.basePath}/pet/${encodeURIComponent(String(petId))}`, { withCredentials: this.configuration.withCredentials, @@ -311,7 +306,7 @@ export class PetService { // to determine the Accept header let httpHeaderAccepts: string[] = [ - 'application/xml' + 'application/xml', 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); @@ -321,14 +316,13 @@ export class PetService { // to determine the Content-Type header const consumes: string[] = [ - 'application/json' + 'application/json', 'application/xml' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected != undefined) { headers['Content-Type'] = httpContentTypeSelected; } - return this.httpClient.put(`${this.basePath}/pet`, pet, { @@ -392,6 +386,7 @@ export class PetService { if (name !== undefined) { formParams.append('name', name); } + if (status !== undefined) { formParams.append('status', status); } @@ -451,6 +446,7 @@ export class PetService { let formParams: { append(param: string, value: any): void; }; let useForm = false; let convertFormParamsToString = false; + // use FormData to transmit files using content-type "multipart/form-data" // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data useForm = canConsumeForm; @@ -463,6 +459,7 @@ export class PetService { if (additionalMetadata !== undefined) { formParams.append('additionalMetadata', additionalMetadata); } + if (file !== undefined) { formParams.append('file', file); } diff --git a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/store.service.ts index 2d5a23a5662..fd616d69018 100644 --- a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/store.service.ts @@ -67,7 +67,6 @@ export class StoreService { // to determine the Content-Type header const consumes: string[] = [ ]; - return this.httpClient.delete(`${this.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { withCredentials: this.configuration.withCredentials, @@ -103,7 +102,6 @@ export class StoreService { // to determine the Content-Type header const consumes: string[] = [ ]; - return this.httpClient.get<{ [key: string]: number; }>(`${this.basePath}/store/inventory`, { withCredentials: this.configuration.withCredentials, @@ -129,7 +127,7 @@ export class StoreService { // to determine the Accept header let httpHeaderAccepts: string[] = [ - 'application/xml' + 'application/xml', 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); @@ -140,7 +138,6 @@ export class StoreService { // to determine the Content-Type header const consumes: string[] = [ ]; - return this.httpClient.get(`${this.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { withCredentials: this.configuration.withCredentials, @@ -166,7 +163,7 @@ export class StoreService { // to determine the Accept header let httpHeaderAccepts: string[] = [ - 'application/xml' + 'application/xml', 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); @@ -182,7 +179,6 @@ export class StoreService { if (httpContentTypeSelected != undefined) { headers['Content-Type'] = httpContentTypeSelected; } - return this.httpClient.post(`${this.basePath}/store/order`, order, { diff --git a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/user.service.ts index e2d7034ec8d..c4fc9fcf79a 100644 --- a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/user.service.ts @@ -77,7 +77,6 @@ export class UserService { if (httpContentTypeSelected != undefined) { headers['Content-Type'] = httpContentTypeSelected; } - return this.httpClient.post(`${this.basePath}/user`, user, { @@ -123,7 +122,6 @@ export class UserService { if (httpContentTypeSelected != undefined) { headers['Content-Type'] = httpContentTypeSelected; } - return this.httpClient.post(`${this.basePath}/user/createWithArray`, user, { @@ -169,7 +167,6 @@ export class UserService { if (httpContentTypeSelected != undefined) { headers['Content-Type'] = httpContentTypeSelected; } - return this.httpClient.post(`${this.basePath}/user/createWithList`, user, { @@ -210,7 +207,6 @@ export class UserService { // to determine the Content-Type header const consumes: string[] = [ ]; - return this.httpClient.delete(`${this.basePath}/user/${encodeURIComponent(String(username))}`, { withCredentials: this.configuration.withCredentials, @@ -236,7 +232,7 @@ export class UserService { // to determine the Accept header let httpHeaderAccepts: string[] = [ - 'application/xml' + 'application/xml', 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); @@ -247,7 +243,6 @@ export class UserService { // to determine the Content-Type header const consumes: string[] = [ ]; - return this.httpClient.get(`${this.basePath}/user/${encodeURIComponent(String(username))}`, { withCredentials: this.configuration.withCredentials, @@ -286,7 +281,7 @@ export class UserService { // to determine the Accept header let httpHeaderAccepts: string[] = [ - 'application/xml' + 'application/xml', 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); @@ -297,7 +292,6 @@ export class UserService { // to determine the Content-Type header const consumes: string[] = [ ]; - return this.httpClient.get(`${this.basePath}/user/login`, { params: queryParameters, @@ -333,7 +327,6 @@ export class UserService { // to determine the Content-Type header const consumes: string[] = [ ]; - return this.httpClient.get(`${this.basePath}/user/logout`, { withCredentials: this.configuration.withCredentials, @@ -383,7 +376,6 @@ export class UserService { if (httpContentTypeSelected != undefined) { headers['Content-Type'] = httpContentTypeSelected; } - return this.httpClient.put(`${this.basePath}/user/${encodeURIComponent(String(username))}`, user, { From 4c3820f66f0da0e358640fdb678f4b456e2940d2 Mon Sep 17 00:00:00 2001 From: Ryan Cloherty Date: Fri, 5 Feb 2021 10:54:56 -0500 Subject: [PATCH 17/44] Fixed incorrect link (#8626) The link to the Gradle plugin linked to the Maven plugin. I've pointed the link in the right direction. --- docs/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration.md b/docs/configuration.md index 1fa33922ce8..aa7d1b5c9b2 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -21,7 +21,7 @@ Our tooling supports the following types of configuration: ## Tool-specific Declarations -The READMEs for the [CLI](https://openapi-generator.tech/docs/usage#generate), [Gradle Plugin](https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator-maven-plugin), [Maven Plugin](https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator-maven-plugin), and [SBT Plugin](https://github.com/OpenAPITools/sbt-openapi-generator/blob/master/README.md) may have top-level or tooling specific options which appear to duplicate 'config options' or 'global properties'. Each may also expose user-facing properties slightly differently from the other tools. This may occur due to: +The READMEs for the [CLI](https://openapi-generator.tech/docs/usage#generate), [Gradle Plugin](https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator-gradle-plugin), [Maven Plugin](https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator-maven-plugin), and [SBT Plugin](https://github.com/OpenAPITools/sbt-openapi-generator/blob/master/README.md) may have top-level or tooling specific options which appear to duplicate 'config options' or 'global properties'. Each may also expose user-facing properties slightly differently from the other tools. This may occur due to: * Conventions used by the underlying tooling * Limitations in underlying frameworks which define how properties must be declared From 90e25f6f4ce778576927ad57bee2c026e288ce87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDilvinas=20Urbonas?= Date: Fri, 5 Feb 2021 23:09:53 +0200 Subject: [PATCH 18/44] [BUG][Python] init access token for python client configuration (#7469) * fix: init access token for python client configuration * fix: remove duplicate initializations for access_token --- .../main/resources/python/configuration.mustache | 14 ++------------ .../python-asyncio/petstore_api/configuration.py | 5 ++--- .../python-tornado/petstore_api/configuration.py | 5 ++--- .../petstore/python/petstore_api/configuration.py | 5 ++--- .../petstore/python/petstore_api/configuration.py | 5 ++--- 5 files changed, 10 insertions(+), 24 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/configuration.mustache b/modules/openapi-generator/src/main/resources/python/configuration.mustache index 2f698db3fec..9ab0a840899 100644 --- a/modules/openapi-generator/src/main/resources/python/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/python/configuration.mustache @@ -163,6 +163,7 @@ conf = {{{packageName}}}.Configuration( def __init__(self, host=None, api_key=None, api_key_prefix=None, + access_token=None, username=None, password=None, discard_unknown_keys=False, disabled_client_side_validations="", @@ -190,6 +191,7 @@ conf = {{{packageName}}}.Configuration( """Temp file folder for downloading files """ # Authentication Settings + self.access_token = access_token self.api_key = {} if api_key: self.api_key = api_key @@ -218,18 +220,6 @@ conf = {{{packageName}}}.Configuration( """The HTTP signing configuration """ {{/hasHttpSignatureMethods}} -{{#hasOAuthMethods}} - self.access_token = None - """access token for OAuth/Bearer - """ -{{/hasOAuthMethods}} -{{^hasOAuthMethods}} -{{#hasBearerMethods}} - self.access_token = None - """access token for OAuth/Bearer - """ -{{/hasBearerMethods}} -{{/hasOAuthMethods}} self.logger = {} """Logging Settings """ diff --git a/samples/client/petstore/python-asyncio/petstore_api/configuration.py b/samples/client/petstore/python-asyncio/petstore_api/configuration.py index 16afbfa7278..d954e9f08eb 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/configuration.py +++ b/samples/client/petstore/python-asyncio/petstore_api/configuration.py @@ -122,6 +122,7 @@ conf = petstore_api.Configuration( def __init__(self, host=None, api_key=None, api_key_prefix=None, + access_token=None, username=None, password=None, discard_unknown_keys=False, disabled_client_side_validations="", @@ -146,6 +147,7 @@ conf = petstore_api.Configuration( """Temp file folder for downloading files """ # Authentication Settings + self.access_token = access_token self.api_key = {} if api_key: self.api_key = api_key @@ -167,9 +169,6 @@ conf = petstore_api.Configuration( """ self.discard_unknown_keys = discard_unknown_keys self.disabled_client_side_validations = disabled_client_side_validations - self.access_token = None - """access token for OAuth/Bearer - """ self.logger = {} """Logging Settings """ diff --git a/samples/client/petstore/python-tornado/petstore_api/configuration.py b/samples/client/petstore/python-tornado/petstore_api/configuration.py index d5fc19dc02f..43bd4f48ed2 100644 --- a/samples/client/petstore/python-tornado/petstore_api/configuration.py +++ b/samples/client/petstore/python-tornado/petstore_api/configuration.py @@ -123,6 +123,7 @@ conf = petstore_api.Configuration( def __init__(self, host=None, api_key=None, api_key_prefix=None, + access_token=None, username=None, password=None, discard_unknown_keys=False, disabled_client_side_validations="", @@ -147,6 +148,7 @@ conf = petstore_api.Configuration( """Temp file folder for downloading files """ # Authentication Settings + self.access_token = access_token self.api_key = {} if api_key: self.api_key = api_key @@ -168,9 +170,6 @@ conf = petstore_api.Configuration( """ self.discard_unknown_keys = discard_unknown_keys self.disabled_client_side_validations = disabled_client_side_validations - self.access_token = None - """access token for OAuth/Bearer - """ self.logger = {} """Logging Settings """ diff --git a/samples/client/petstore/python/petstore_api/configuration.py b/samples/client/petstore/python/petstore_api/configuration.py index 96969fe2325..ccd984b7f5f 100644 --- a/samples/client/petstore/python/petstore_api/configuration.py +++ b/samples/client/petstore/python/petstore_api/configuration.py @@ -118,6 +118,7 @@ conf = petstore_api.Configuration( def __init__(self, host=None, api_key=None, api_key_prefix=None, + access_token=None, username=None, password=None, discard_unknown_keys=False, disabled_client_side_validations="", @@ -142,6 +143,7 @@ conf = petstore_api.Configuration( """Temp file folder for downloading files """ # Authentication Settings + self.access_token = access_token self.api_key = {} if api_key: self.api_key = api_key @@ -163,9 +165,6 @@ conf = petstore_api.Configuration( """ self.discard_unknown_keys = discard_unknown_keys self.disabled_client_side_validations = disabled_client_side_validations - self.access_token = None - """access token for OAuth/Bearer - """ self.logger = {} """Logging Settings """ diff --git a/samples/openapi3/client/petstore/python/petstore_api/configuration.py b/samples/openapi3/client/petstore/python/petstore_api/configuration.py index a12d2c73331..99b40326211 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/configuration.py +++ b/samples/openapi3/client/petstore/python/petstore_api/configuration.py @@ -159,6 +159,7 @@ conf = petstore_api.Configuration( def __init__(self, host=None, api_key=None, api_key_prefix=None, + access_token=None, username=None, password=None, discard_unknown_keys=False, disabled_client_side_validations="", @@ -184,6 +185,7 @@ conf = petstore_api.Configuration( """Temp file folder for downloading files """ # Authentication Settings + self.access_token = access_token self.api_key = {} if api_key: self.api_key = api_key @@ -210,9 +212,6 @@ conf = petstore_api.Configuration( self.signing_info = signing_info """The HTTP signing configuration """ - self.access_token = None - """access token for OAuth/Bearer - """ self.logger = {} """Logging Settings """ From 21d7330aeacb62a9886d4e031351f86efdf24154 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 6 Feb 2021 14:55:43 +0800 Subject: [PATCH 19/44] update samples --- .../petstore/python-asyncio/petstore_api/configuration.py | 5 +++-- .../petstore/python-tornado/petstore_api/configuration.py | 5 +++-- .../x-auth-id-alias/python/x_auth_id_alias/configuration.py | 2 ++ .../dynamic-servers/python/dynamic_servers/configuration.py | 2 ++ 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/samples/client/petstore/python-asyncio/petstore_api/configuration.py b/samples/client/petstore/python-asyncio/petstore_api/configuration.py index d954e9f08eb..16afbfa7278 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/configuration.py +++ b/samples/client/petstore/python-asyncio/petstore_api/configuration.py @@ -122,7 +122,6 @@ conf = petstore_api.Configuration( def __init__(self, host=None, api_key=None, api_key_prefix=None, - access_token=None, username=None, password=None, discard_unknown_keys=False, disabled_client_side_validations="", @@ -147,7 +146,6 @@ conf = petstore_api.Configuration( """Temp file folder for downloading files """ # Authentication Settings - self.access_token = access_token self.api_key = {} if api_key: self.api_key = api_key @@ -169,6 +167,9 @@ conf = petstore_api.Configuration( """ self.discard_unknown_keys = discard_unknown_keys self.disabled_client_side_validations = disabled_client_side_validations + self.access_token = None + """access token for OAuth/Bearer + """ self.logger = {} """Logging Settings """ diff --git a/samples/client/petstore/python-tornado/petstore_api/configuration.py b/samples/client/petstore/python-tornado/petstore_api/configuration.py index 43bd4f48ed2..d5fc19dc02f 100644 --- a/samples/client/petstore/python-tornado/petstore_api/configuration.py +++ b/samples/client/petstore/python-tornado/petstore_api/configuration.py @@ -123,7 +123,6 @@ conf = petstore_api.Configuration( def __init__(self, host=None, api_key=None, api_key_prefix=None, - access_token=None, username=None, password=None, discard_unknown_keys=False, disabled_client_side_validations="", @@ -148,7 +147,6 @@ conf = petstore_api.Configuration( """Temp file folder for downloading files """ # Authentication Settings - self.access_token = access_token self.api_key = {} if api_key: self.api_key = api_key @@ -170,6 +168,9 @@ conf = petstore_api.Configuration( """ self.discard_unknown_keys = discard_unknown_keys self.disabled_client_side_validations = disabled_client_side_validations + self.access_token = None + """access token for OAuth/Bearer + """ self.logger = {} """Logging Settings """ diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/configuration.py b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/configuration.py index 656eb781185..c71b06a8aa2 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/configuration.py +++ b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/configuration.py @@ -102,6 +102,7 @@ conf = x_auth_id_alias.Configuration( def __init__(self, host=None, api_key=None, api_key_prefix=None, + access_token=None, username=None, password=None, discard_unknown_keys=False, disabled_client_side_validations="", @@ -126,6 +127,7 @@ conf = x_auth_id_alias.Configuration( """Temp file folder for downloading files """ # Authentication Settings + self.access_token = access_token self.api_key = {} if api_key: self.api_key = api_key diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/configuration.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/configuration.py index bd674fc5907..d826515c081 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/configuration.py +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/configuration.py @@ -82,6 +82,7 @@ class Configuration(object): def __init__(self, host=None, api_key=None, api_key_prefix=None, + access_token=None, username=None, password=None, discard_unknown_keys=False, disabled_client_side_validations="", @@ -106,6 +107,7 @@ class Configuration(object): """Temp file folder for downloading files """ # Authentication Settings + self.access_token = access_token self.api_key = {} if api_key: self.api_key = api_key From c7fcb39a2d66c6748f07dc8d258625885facf649 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 6 Feb 2021 16:37:22 +0800 Subject: [PATCH 20/44] Prepare v5.0.1 release (#8627) * release 5.0.1 * update samples --- modules/openapi-generator-cli/pom.xml | 2 +- modules/openapi-generator-core/pom.xml | 2 +- modules/openapi-generator-gradle-plugin/gradle.properties | 2 +- modules/openapi-generator-gradle-plugin/pom.xml | 2 +- .../openapi-generator-maven-plugin/examples/java-client.xml | 2 +- .../examples/multi-module/java-client/pom.xml | 2 +- .../examples/non-java-invalid-spec.xml | 2 +- modules/openapi-generator-maven-plugin/examples/non-java.xml | 2 +- modules/openapi-generator-maven-plugin/pom.xml | 2 +- modules/openapi-generator-online/pom.xml | 2 +- modules/openapi-generator/pom.xml | 2 +- pom.xml | 2 +- samples/client/petstore/R/.openapi-generator/VERSION | 2 +- samples/client/petstore/apex/.openapi-generator/VERSION | 2 +- samples/client/petstore/cpp-qt5/.openapi-generator/VERSION | 2 +- .../petstore/cpp-restsdk/client/.openapi-generator/VERSION | 2 +- samples/client/petstore/cpp-restsdk/client/ApiClient.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/ApiClient.h | 2 +- .../client/petstore/cpp-restsdk/client/ApiConfiguration.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h | 2 +- samples/client/petstore/cpp-restsdk/client/ApiException.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/ApiException.h | 2 +- samples/client/petstore/cpp-restsdk/client/HttpContent.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/HttpContent.h | 2 +- samples/client/petstore/cpp-restsdk/client/IHttpBody.h | 2 +- samples/client/petstore/cpp-restsdk/client/JsonBody.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/JsonBody.h | 2 +- samples/client/petstore/cpp-restsdk/client/ModelBase.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/ModelBase.h | 2 +- .../client/petstore/cpp-restsdk/client/MultipartFormData.cpp | 2 +- .../client/petstore/cpp-restsdk/client/MultipartFormData.h | 2 +- samples/client/petstore/cpp-restsdk/client/Object.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/Object.h | 2 +- samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/api/PetApi.h | 2 +- samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/api/StoreApi.h | 2 +- samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/api/UserApi.h | 2 +- .../client/petstore/cpp-restsdk/client/model/ApiResponse.cpp | 2 +- .../client/petstore/cpp-restsdk/client/model/ApiResponse.h | 2 +- samples/client/petstore/cpp-restsdk/client/model/Category.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/model/Category.h | 2 +- samples/client/petstore/cpp-restsdk/client/model/Order.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/model/Order.h | 2 +- samples/client/petstore/cpp-restsdk/client/model/Pet.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/model/Pet.h | 2 +- samples/client/petstore/cpp-restsdk/client/model/Tag.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/model/Tag.h | 2 +- samples/client/petstore/cpp-restsdk/client/model/User.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/model/User.h | 2 +- samples/client/petstore/crystal/.openapi-generator/VERSION | 2 +- samples/client/petstore/crystal/.travis.yml | 2 +- samples/client/petstore/crystal/spec/spec_helper.cr | 2 +- samples/client/petstore/crystal/src/petstore.cr | 2 +- samples/client/petstore/crystal/src/petstore/api/pet_api.cr | 2 +- samples/client/petstore/crystal/src/petstore/api/store_api.cr | 2 +- samples/client/petstore/crystal/src/petstore/api/user_api.cr | 2 +- samples/client/petstore/crystal/src/petstore/api_client.cr | 2 +- samples/client/petstore/crystal/src/petstore/api_error.cr | 2 +- samples/client/petstore/crystal/src/petstore/configuration.cr | 2 +- .../petstore/crystal/src/petstore/models/api_response.cr | 2 +- .../client/petstore/crystal/src/petstore/models/category.cr | 2 +- samples/client/petstore/crystal/src/petstore/models/order.cr | 2 +- samples/client/petstore/crystal/src/petstore/models/pet.cr | 2 +- samples/client/petstore/crystal/src/petstore/models/tag.cr | 2 +- samples/client/petstore/crystal/src/petstore/models/user.cr | 2 +- .../OpenAPIClient-net47/.openapi-generator/VERSION | 2 +- .../OpenAPIClient-net5.0/.openapi-generator/VERSION | 2 +- .../csharp-netcore/OpenAPIClient/.openapi-generator/VERSION | 2 +- .../OpenAPIClientCore/.openapi-generator/VERSION | 2 +- .../petstore/csharp/OpenAPIClient/.openapi-generator/VERSION | 2 +- .../dart-dio/petstore_client_lib/.openapi-generator/VERSION | 2 +- .../flutter_petstore/openapi/.openapi-generator/VERSION | 2 +- .../flutter_proto_petstore/openapi/.openapi-generator/VERSION | 2 +- .../petstore/dart-jaguar/openapi/.openapi-generator/VERSION | 2 +- .../dart-jaguar/openapi_proto/.openapi-generator/VERSION | 2 +- .../dart2/petstore_client_lib/.openapi-generator/VERSION | 2 +- samples/client/petstore/elixir/.openapi-generator/VERSION | 2 +- .../client/petstore/go/go-petstore/.openapi-generator/VERSION | 2 +- samples/client/petstore/groovy/.openapi-generator/VERSION | 2 +- .../petstore/haskell-http-client/.openapi-generator/VERSION | 2 +- .../java/feign-no-nullable/.openapi-generator/VERSION | 2 +- samples/client/petstore/java/feign/.openapi-generator/VERSION | 2 +- .../java/google-api-client/.openapi-generator/VERSION | 2 +- .../client/petstore/java/jersey1/.openapi-generator/VERSION | 2 +- .../jersey2-java8-localdatetime/.openapi-generator/VERSION | 2 +- .../petstore/java/jersey2-java8/.openapi-generator/VERSION | 2 +- .../java/microprofile-rest-client/.openapi-generator/VERSION | 2 +- .../petstore/java/native-async/.openapi-generator/VERSION | 2 +- .../client/petstore/java/native/.openapi-generator/VERSION | 2 +- .../okhttp-gson-dynamicOperations/.openapi-generator/VERSION | 2 +- .../okhttp-gson-parcelableModel/.openapi-generator/VERSION | 2 +- .../petstore/java/okhttp-gson/.openapi-generator/VERSION | 2 +- .../java/rest-assured-jackson/.openapi-generator/VERSION | 2 +- .../petstore/java/rest-assured/.openapi-generator/VERSION | 2 +- .../client/petstore/java/resteasy/.openapi-generator/VERSION | 2 +- .../java/resttemplate-withXml/.openapi-generator/VERSION | 2 +- .../petstore/java/resttemplate/.openapi-generator/VERSION | 2 +- .../petstore/java/retrofit2-play26/.openapi-generator/VERSION | 2 +- .../client/petstore/java/retrofit2/.openapi-generator/VERSION | 2 +- .../petstore/java/retrofit2rx2/.openapi-generator/VERSION | 2 +- .../petstore/java/retrofit2rx3/.openapi-generator/VERSION | 2 +- .../java/vertx-no-nullable/.openapi-generator/VERSION | 2 +- samples/client/petstore/java/vertx/.openapi-generator/VERSION | 2 +- .../client/petstore/java/webclient/.openapi-generator/VERSION | 2 +- .../client/petstore/javascript-es6/.openapi-generator/VERSION | 2 +- .../javascript-promise-es6/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-gson/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-jackson/.openapi-generator/VERSION | 2 +- .../kotlin-json-request-string/.openapi-generator/VERSION | 2 +- .../kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-moshi-codegen/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-multiplatform/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-nonpublic/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-nullable/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-okhttp3/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-retrofit2/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-string/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-threetenbp/.openapi-generator/VERSION | 2 +- samples/client/petstore/kotlin/.openapi-generator/VERSION | 2 +- samples/client/petstore/lua/.openapi-generator/VERSION | 2 +- samples/client/petstore/nim/.openapi-generator/VERSION | 2 +- .../client/petstore/objc/core-data/.openapi-generator/VERSION | 2 +- .../client/petstore/objc/default/.openapi-generator/VERSION | 2 +- samples/client/petstore/perl/.openapi-generator/VERSION | 2 +- .../petstore/php/OpenAPIClient-php/.openapi-generator/VERSION | 2 +- .../petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php | 2 +- .../php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/ApiException.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Configuration.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/HeaderSelector.php | 2 +- .../OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Animal.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php | 2 +- .../OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Capitalization.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Category.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Client.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/File.php | 2 +- .../php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php | 2 +- .../php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php | 2 +- .../php/OpenAPIClient-php/lib/Model/HealthCheckResult.php | 2 +- .../php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/MapTest.php | 2 +- .../lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Model200Response.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ModelInterface.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ModelList.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Name.php | 2 +- .../php/OpenAPIClient-php/lib/Model/NullableClass.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Order.php | 2 +- .../php/OpenAPIClient-php/lib/Model/OuterComposite.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php | 2 +- .../php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php | 2 +- .../php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php | 2 +- .../lib/Model/OuterEnumIntegerDefaultValue.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php | 2 +- .../php/OpenAPIClient-php/lib/Model/SpecialModelName.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/User.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php | 2 +- samples/client/petstore/powershell/.openapi-generator/VERSION | 2 +- .../client/petstore/python-asyncio/.openapi-generator/VERSION | 2 +- .../client/petstore/python-legacy/.openapi-generator/VERSION | 2 +- .../client/petstore/python-tornado/.openapi-generator/VERSION | 2 +- samples/client/petstore/python/.openapi-generator/VERSION | 2 +- .../client/petstore/ruby-faraday/.openapi-generator/VERSION | 2 +- samples/client/petstore/ruby-faraday/lib/petstore.rb | 2 +- .../ruby-faraday/lib/petstore/api/another_fake_api.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/api/default_api.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb | 2 +- .../lib/petstore/api/fake_classname_tags123_api.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/api/store_api.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/api/user_api.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/api_client.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/api_error.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/configuration.rb | 2 +- .../lib/petstore/models/additional_properties_class.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/animal.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/api_response.rb | 2 +- .../lib/petstore/models/array_of_array_of_number_only.rb | 2 +- .../ruby-faraday/lib/petstore/models/array_of_number_only.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/array_test.rb | 2 +- .../ruby-faraday/lib/petstore/models/capitalization.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/cat.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/category.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/class_model.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/client.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/dog.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/enum_class.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/enum_test.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/file.rb | 2 +- .../lib/petstore/models/file_schema_test_class.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/foo.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/format_test.rb | 2 +- .../ruby-faraday/lib/petstore/models/has_only_read_only.rb | 2 +- .../ruby-faraday/lib/petstore/models/health_check_result.rb | 2 +- .../lib/petstore/models/inline_response_default.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/list.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/map_test.rb | 2 +- .../mixed_properties_and_additional_properties_class.rb | 2 +- .../ruby-faraday/lib/petstore/models/model200_response.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/model_return.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/name.rb | 2 +- .../ruby-faraday/lib/petstore/models/nullable_class.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/number_only.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/order.rb | 2 +- .../ruby-faraday/lib/petstore/models/outer_composite.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/outer_enum.rb | 2 +- .../lib/petstore/models/outer_enum_default_value.rb | 2 +- .../ruby-faraday/lib/petstore/models/outer_enum_integer.rb | 2 +- .../lib/petstore/models/outer_enum_integer_default_value.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/pet.rb | 2 +- .../ruby-faraday/lib/petstore/models/read_only_first.rb | 2 +- .../ruby-faraday/lib/petstore/models/special_model_name.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/tag.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/user.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/version.rb | 2 +- samples/client/petstore/ruby-faraday/petstore.gemspec | 2 +- samples/client/petstore/ruby-faraday/spec/api_client_spec.rb | 2 +- .../client/petstore/ruby-faraday/spec/configuration_spec.rb | 2 +- samples/client/petstore/ruby-faraday/spec/spec_helper.rb | 2 +- samples/client/petstore/ruby/.openapi-generator/VERSION | 2 +- samples/client/petstore/ruby/lib/petstore.rb | 2 +- .../client/petstore/ruby/lib/petstore/api/another_fake_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/default_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/fake_api.rb | 2 +- .../ruby/lib/petstore/api/fake_classname_tags123_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/pet_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/store_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/user_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api_client.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api_error.rb | 2 +- samples/client/petstore/ruby/lib/petstore/configuration.rb | 2 +- .../ruby/lib/petstore/models/additional_properties_class.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/animal.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/api_response.rb | 2 +- .../ruby/lib/petstore/models/array_of_array_of_number_only.rb | 2 +- .../petstore/ruby/lib/petstore/models/array_of_number_only.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/array_test.rb | 2 +- .../petstore/ruby/lib/petstore/models/capitalization.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/cat.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/cat_all_of.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/category.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/class_model.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/client.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/dog.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/dog_all_of.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/enum_arrays.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/enum_class.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/enum_test.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/file.rb | 2 +- .../ruby/lib/petstore/models/file_schema_test_class.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/foo.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/format_test.rb | 2 +- .../petstore/ruby/lib/petstore/models/has_only_read_only.rb | 2 +- .../petstore/ruby/lib/petstore/models/health_check_result.rb | 2 +- .../ruby/lib/petstore/models/inline_response_default.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/list.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/map_test.rb | 2 +- .../mixed_properties_and_additional_properties_class.rb | 2 +- .../petstore/ruby/lib/petstore/models/model200_response.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/model_return.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/name.rb | 2 +- .../petstore/ruby/lib/petstore/models/nullable_class.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/number_only.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/order.rb | 2 +- .../petstore/ruby/lib/petstore/models/outer_composite.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/outer_enum.rb | 2 +- .../ruby/lib/petstore/models/outer_enum_default_value.rb | 2 +- .../petstore/ruby/lib/petstore/models/outer_enum_integer.rb | 2 +- .../lib/petstore/models/outer_enum_integer_default_value.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/pet.rb | 2 +- .../petstore/ruby/lib/petstore/models/read_only_first.rb | 2 +- .../petstore/ruby/lib/petstore/models/special_model_name.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/tag.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/user.rb | 2 +- samples/client/petstore/ruby/lib/petstore/version.rb | 2 +- samples/client/petstore/ruby/petstore.gemspec | 2 +- samples/client/petstore/ruby/spec/api_client_spec.rb | 2 +- samples/client/petstore/ruby/spec/configuration_spec.rb | 2 +- samples/client/petstore/ruby/spec/spec_helper.rb | 2 +- .../petstore/rust/hyper/petstore/.openapi-generator/VERSION | 2 +- .../rust/reqwest/petstore-async/.openapi-generator/VERSION | 2 +- .../petstore/rust/reqwest/petstore/.openapi-generator/VERSION | 2 +- samples/client/petstore/scala-akka/.openapi-generator/VERSION | 2 +- samples/client/petstore/scala-sttp/.openapi-generator/VERSION | 2 +- .../petstore/spring-cloud-async/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../spring-cloud-no-nullable/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../spring-cloud-spring-pageable/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../client/petstore/spring-cloud/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../client/petstore/spring-stubs/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../swift5/alamofireLibrary/.openapi-generator/VERSION | 2 +- .../petstore/swift5/combineLibrary/.openapi-generator/VERSION | 2 +- .../client/petstore/swift5/default/.openapi-generator/VERSION | 2 +- .../petstore/swift5/deprecated/.openapi-generator/VERSION | 2 +- .../petstore/swift5/nonPublicApi/.openapi-generator/VERSION | 2 +- .../petstore/swift5/objcCompatible/.openapi-generator/VERSION | 2 +- .../swift5/promisekitLibrary/.openapi-generator/VERSION | 2 +- .../swift5/readonlyProperties/.openapi-generator/VERSION | 2 +- .../petstore/swift5/resultLibrary/.openapi-generator/VERSION | 2 +- .../petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION | 2 +- .../swift5/urlsessionLibrary/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../single-request-parameter/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../with-prefixed-module-name/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../typescript-aurelia/default/.openapi-generator/VERSION | 2 +- .../builds/composed-schemas/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/es6-target/.openapi-generator/VERSION | 2 +- .../builds/with-complex-headers/.openapi-generator/VERSION | 2 +- .../builds/with-interfaces/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/.openapi-generator/VERSION | 2 +- .../with-single-request-parameters/.openapi-generator/VERSION | 2 +- .../builds/default-v3.0/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../typescript-fetch/builds/enum/.openapi-generator/VERSION | 2 +- .../builds/es6-target/.openapi-generator/VERSION | 2 +- .../builds/multiple-parameters/.openapi-generator/VERSION | 2 +- .../prefix-parameter-interfaces/.openapi-generator/VERSION | 2 +- .../builds/typescript-three-plus/.openapi-generator/VERSION | 2 +- .../builds/with-interfaces/.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/.openapi-generator/VERSION | 2 +- .../builds/without-runtime-checks/.openapi-generator/VERSION | 2 +- .../petstore/typescript-inversify/.openapi-generator/VERSION | 2 +- .../typescript-jquery/default/.openapi-generator/VERSION | 2 +- .../petstore/typescript-jquery/npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../typescript-node/default/.openapi-generator/VERSION | 2 +- .../petstore/typescript-node/npm/.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/.openapi-generator/VERSION | 2 +- .../typescript-rxjs/builds/default/.openapi-generator/VERSION | 2 +- .../builds/es6-target/.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/.openapi-generator/VERSION | 2 +- .../with-progress-subscriber/.openapi-generator/VERSION | 2 +- .../petstore/protobuf-schema/.openapi-generator/VERSION | 2 +- samples/meta-codegen/lib/pom.xml | 4 +++- samples/openapi3/client/elm/.openapi-generator/VERSION | 2 +- .../go-experimental/.openapi-generator/VERSION | 2 +- .../java/jersey2-java8/.openapi-generator/VERSION | 2 +- .../x-auth-id-alias/python/.openapi-generator/VERSION | 2 +- .../x-auth-id-alias/ruby-client/.openapi-generator/VERSION | 2 +- .../x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb | 2 +- .../ruby-client/lib/x_auth_id_alias/api/usage_api.rb | 2 +- .../ruby-client/lib/x_auth_id_alias/api_client.rb | 2 +- .../ruby-client/lib/x_auth_id_alias/api_error.rb | 2 +- .../ruby-client/lib/x_auth_id_alias/configuration.rb | 2 +- .../ruby-client/lib/x_auth_id_alias/version.rb | 2 +- .../x-auth-id-alias/ruby-client/spec/api_client_spec.rb | 2 +- .../x-auth-id-alias/ruby-client/spec/configuration_spec.rb | 2 +- .../x-auth-id-alias/ruby-client/spec/spec_helper.rb | 2 +- .../x-auth-id-alias/ruby-client/x_auth_id_alias.gemspec | 2 +- .../dynamic-servers/python/.openapi-generator/VERSION | 2 +- .../features/dynamic-servers/ruby/.openapi-generator/VERSION | 2 +- .../features/dynamic-servers/ruby/dynamic_servers.gemspec | 2 +- .../features/dynamic-servers/ruby/lib/dynamic_servers.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/api_client.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/api_error.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/configuration.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/version.rb | 2 +- .../features/dynamic-servers/ruby/spec/api_client_spec.rb | 2 +- .../features/dynamic-servers/ruby/spec/configuration_spec.rb | 2 +- .../client/features/dynamic-servers/ruby/spec/spec_helper.rb | 2 +- .../ruby-client/.openapi-generator/VERSION | 2 +- .../generate-alias-as-model/ruby-client/lib/petstore.rb | 2 +- .../ruby-client/lib/petstore/api/usage_api.rb | 2 +- .../ruby-client/lib/petstore/api_client.rb | 2 +- .../ruby-client/lib/petstore/api_error.rb | 2 +- .../ruby-client/lib/petstore/configuration.rb | 2 +- .../ruby-client/lib/petstore/models/array_alias.rb | 2 +- .../ruby-client/lib/petstore/models/map_alias.rb | 2 +- .../ruby-client/lib/petstore/version.rb | 2 +- .../generate-alias-as-model/ruby-client/petstore.gemspec | 2 +- .../ruby-client/spec/api_client_spec.rb | 2 +- .../ruby-client/spec/configuration_spec.rb | 2 +- .../generate-alias-as-model/ruby-client/spec/spec_helper.rb | 2 +- .../dart-dio/petstore_client_lib/.openapi-generator/VERSION | 2 +- .../petstore_client_lib_fake/.openapi-generator/VERSION | 2 +- .../dart2/petstore_client_lib/.openapi-generator/VERSION | 2 +- .../dart2/petstore_client_lib_fake/.openapi-generator/VERSION | 2 +- .../client/petstore/go/go-petstore/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../petstore/java/jersey2-java8/.openapi-generator/VERSION | 2 +- .../client/petstore/java/native/.openapi-generator/VERSION | 2 +- .../client/petstore/python-legacy/.openapi-generator/VERSION | 2 +- .../client/petstore/python/.openapi-generator/VERSION | 2 +- .../typescript/builds/default/.openapi-generator/VERSION | 2 +- .../typescript/builds/deno/.openapi-generator/VERSION | 2 +- .../typescript/builds/inversify/.openapi-generator/VERSION | 2 +- .../typescript/builds/jquery/.openapi-generator/VERSION | 2 +- .../builds/object_params/.openapi-generator/VERSION | 2 +- samples/schema/petstore/ktorm/.openapi-generator/VERSION | 2 +- samples/schema/petstore/mysql/.openapi-generator/VERSION | 2 +- .../server/petstore/aspnetcore-3.0/.openapi-generator/VERSION | 2 +- .../server/petstore/aspnetcore-3.1/.openapi-generator/VERSION | 2 +- samples/server/petstore/aspnetcore/.openapi-generator/VERSION | 2 +- .../cpp-qt5-qhttpengine-server/.openapi-generator/VERSION | 2 +- .../server/petstore/go-api-server/.openapi-generator/VERSION | 2 +- .../petstore/go-gin-api-server/.openapi-generator/VERSION | 2 +- samples/server/petstore/java-msf4j/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../java-play-framework-async/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../petstore/java-play-framework/.openapi-generator/VERSION | 2 +- .../server/petstore/java-undertow/.openapi-generator/VERSION | 2 +- .../server/petstore/java-vertx-web/.openapi-generator/VERSION | 2 +- .../jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION | 2 +- .../server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION | 2 +- .../jaxrs-cxf-non-spring-app/.openapi-generator/VERSION | 2 +- samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-datelib-j8/.openapi-generator/VERSION | 2 +- .../server/petstore/jaxrs-jersey/.openapi-generator/VERSION | 2 +- .../jaxrs-resteasy/default/.openapi-generator/VERSION | 2 +- .../jaxrs-resteasy/eap-java8/.openapi-generator/VERSION | 2 +- .../jaxrs-resteasy/eap-joda/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-spec-interface/.openapi-generator/VERSION | 2 +- samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION | 2 +- .../server/petstore/jaxrs/jersey1/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION | 2 +- .../server/petstore/jaxrs/jersey2/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-server/ktor/.openapi-generator/VERSION | 2 +- samples/server/petstore/kotlin-server/ktor/README.md | 2 +- .../kotlin-springboot-delegate/.openapi-generator/VERSION | 2 +- .../src/main/kotlin/org/openapitools/api/PetApi.kt | 2 +- .../src/main/kotlin/org/openapitools/api/StoreApi.kt | 2 +- .../src/main/kotlin/org/openapitools/api/UserApi.kt | 2 +- .../kotlin-springboot-reactive/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-springboot/.openapi-generator/VERSION | 2 +- .../server/petstore/php-laravel/.openapi-generator/VERSION | 2 +- samples/server/petstore/php-lumen/.openapi-generator/VERSION | 2 +- .../server/petstore/php-mezzio-ph/.openapi-generator/VERSION | 2 +- samples/server/petstore/php-slim4/.openapi-generator/VERSION | 2 +- .../php-symfony/SymfonyBundle-php/.openapi-generator/VERSION | 2 +- .../python-aiohttp-srclayout/.openapi-generator/VERSION | 2 +- .../server/petstore/python-aiohttp/.openapi-generator/VERSION | 2 +- .../petstore/python-blueplanet/.openapi-generator/VERSION | 2 +- .../server/petstore/python-flask/.openapi-generator/VERSION | 2 +- .../output/multipart-v3/.openapi-generator/VERSION | 2 +- .../output/no-example-v3/.openapi-generator/VERSION | 2 +- .../rust-server/output/openapi-v3/.openapi-generator/VERSION | 2 +- .../rust-server/output/ops-v3/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../output/ping-bearer-auth/.openapi-generator/VERSION | 2 +- .../output/rust-server-test/.openapi-generator/VERSION | 2 +- .../petstore/spring-mvc-j8-async/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../spring-mvc-j8-localdatetime/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../spring-mvc-no-nullable/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../spring-mvc-spring-pageable/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- samples/server/petstore/spring-mvc/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../spring-mvc/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-beanvalidation/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-delegate-j8/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-delegate/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-implicitHeaders/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-reactive/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-spring-pageable/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-useoptional/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-virtualan/.openapi-generator/VERSION | 2 +- .../java/org/openapitools/virtualan/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/virtualan/api/FakeApi.java | 2 +- .../org/openapitools/virtualan/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/virtualan/api/PetApi.java | 2 +- .../main/java/org/openapitools/virtualan/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/virtualan/api/UserApi.java | 2 +- samples/server/petstore/springboot/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../springboot/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- 638 files changed, 640 insertions(+), 638 deletions(-) diff --git a/modules/openapi-generator-cli/pom.xml b/modules/openapi-generator-cli/pom.xml index e359fbf3112..0b82beabdc3 100644 --- a/modules/openapi-generator-cli/pom.xml +++ b/modules/openapi-generator-cli/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 5.0.1-SNAPSHOT + 5.0.1 ../.. diff --git a/modules/openapi-generator-core/pom.xml b/modules/openapi-generator-core/pom.xml index f41fc23667d..d6cf58b889a 100644 --- a/modules/openapi-generator-core/pom.xml +++ b/modules/openapi-generator-core/pom.xml @@ -6,7 +6,7 @@ openapi-generator-project org.openapitools - 5.0.1-SNAPSHOT + 5.0.1 ../.. diff --git a/modules/openapi-generator-gradle-plugin/gradle.properties b/modules/openapi-generator-gradle-plugin/gradle.properties index 8632e3781e9..73da51d6a48 100644 --- a/modules/openapi-generator-gradle-plugin/gradle.properties +++ b/modules/openapi-generator-gradle-plugin/gradle.properties @@ -1,5 +1,5 @@ # RELEASE_VERSION -openApiGeneratorVersion=5.0.1-SNAPSHOT +openApiGeneratorVersion=5.0.1 # /RELEASE_VERSION # BEGIN placeholders diff --git a/modules/openapi-generator-gradle-plugin/pom.xml b/modules/openapi-generator-gradle-plugin/pom.xml index 03f2765b7f6..447f7040986 100644 --- a/modules/openapi-generator-gradle-plugin/pom.xml +++ b/modules/openapi-generator-gradle-plugin/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 5.0.1-SNAPSHOT + 5.0.1 ../.. diff --git a/modules/openapi-generator-maven-plugin/examples/java-client.xml b/modules/openapi-generator-maven-plugin/examples/java-client.xml index 93d4ae6d472..b9f6aa6fe62 100644 --- a/modules/openapi-generator-maven-plugin/examples/java-client.xml +++ b/modules/openapi-generator-maven-plugin/examples/java-client.xml @@ -13,7 +13,7 @@ org.openapitools openapi-generator-maven-plugin - 5.0.1-SNAPSHOT + 5.0.1 diff --git a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml index e3b0f025332..3471f8f83d7 100644 --- a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml +++ b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml @@ -19,7 +19,7 @@ org.openapitools openapi-generator-maven-plugin - 5.0.1-SNAPSHOT + 5.0.1 diff --git a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml index 8c847c800a3..e859b5bef32 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml @@ -13,7 +13,7 @@ org.openapitools openapi-generator-maven-plugin - 5.0.1-SNAPSHOT + 5.0.1 diff --git a/modules/openapi-generator-maven-plugin/examples/non-java.xml b/modules/openapi-generator-maven-plugin/examples/non-java.xml index 7305e7f995c..a6fbadaa626 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java.xml @@ -13,7 +13,7 @@ org.openapitools openapi-generator-maven-plugin - 5.0.1-SNAPSHOT + 5.0.1 diff --git a/modules/openapi-generator-maven-plugin/pom.xml b/modules/openapi-generator-maven-plugin/pom.xml index db0dd86d083..81232c10ec5 100644 --- a/modules/openapi-generator-maven-plugin/pom.xml +++ b/modules/openapi-generator-maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.openapitools openapi-generator-project - 5.0.1-SNAPSHOT + 5.0.1 ../.. diff --git a/modules/openapi-generator-online/pom.xml b/modules/openapi-generator-online/pom.xml index 3083774963c..4f108895547 100644 --- a/modules/openapi-generator-online/pom.xml +++ b/modules/openapi-generator-online/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 5.0.1-SNAPSHOT + 5.0.1 ../.. diff --git a/modules/openapi-generator/pom.xml b/modules/openapi-generator/pom.xml index ba2396b7893..4f9500db196 100644 --- a/modules/openapi-generator/pom.xml +++ b/modules/openapi-generator/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 5.0.1-SNAPSHOT + 5.0.1 ../.. diff --git a/pom.xml b/pom.xml index 3276b5fd713..5c88bee2b61 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ pom openapi-generator-project - 5.0.1-SNAPSHOT + 5.0.1 https://github.com/openapitools/openapi-generator diff --git a/samples/client/petstore/R/.openapi-generator/VERSION b/samples/client/petstore/R/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/R/.openapi-generator/VERSION +++ b/samples/client/petstore/R/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/apex/.openapi-generator/VERSION b/samples/client/petstore/apex/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/apex/.openapi-generator/VERSION +++ b/samples/client/petstore/apex/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION b/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION b/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp b/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp index 574f7fb2aad..c9c1eda5b78 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiClient.h b/samples/client/petstore/cpp-restsdk/client/ApiClient.h index a918ff8fb6a..9c087851aca 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiClient.h +++ b/samples/client/petstore/cpp-restsdk/client/ApiClient.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp index 4033ed07297..d24da92a020 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h index b47aaebf538..51f158a1d62 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h +++ b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiException.cpp b/samples/client/petstore/cpp-restsdk/client/ApiException.cpp index cb82cf54de1..055f8417786 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiException.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ApiException.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ApiException.h b/samples/client/petstore/cpp-restsdk/client/ApiException.h index 2e28dcb54df..291a36b1990 100644 --- a/samples/client/petstore/cpp-restsdk/client/ApiException.h +++ b/samples/client/petstore/cpp-restsdk/client/ApiException.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp b/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp index 86c86df8ff9..df6cbaa33f2 100644 --- a/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp +++ b/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/HttpContent.h b/samples/client/petstore/cpp-restsdk/client/HttpContent.h index 7f3614fe660..0580599a29d 100644 --- a/samples/client/petstore/cpp-restsdk/client/HttpContent.h +++ b/samples/client/petstore/cpp-restsdk/client/HttpContent.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/IHttpBody.h b/samples/client/petstore/cpp-restsdk/client/IHttpBody.h index d62f5df1ae5..6e26c8bc371 100644 --- a/samples/client/petstore/cpp-restsdk/client/IHttpBody.h +++ b/samples/client/petstore/cpp-restsdk/client/IHttpBody.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp b/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp index 9c11d4482be..16189a032f4 100644 --- a/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp +++ b/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/JsonBody.h b/samples/client/petstore/cpp-restsdk/client/JsonBody.h index 29e913017a9..475b9dc2d5f 100644 --- a/samples/client/petstore/cpp-restsdk/client/JsonBody.h +++ b/samples/client/petstore/cpp-restsdk/client/JsonBody.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp b/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp index cdd00421c97..81d3b50267d 100644 --- a/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp +++ b/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/ModelBase.h b/samples/client/petstore/cpp-restsdk/client/ModelBase.h index 9399698b9d2..2943f2b04bb 100644 --- a/samples/client/petstore/cpp-restsdk/client/ModelBase.h +++ b/samples/client/petstore/cpp-restsdk/client/ModelBase.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp index e63f733991a..ebcd00d7d53 100644 --- a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp +++ b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h index e8ec78267b6..e910dfb987d 100644 --- a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h +++ b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/Object.cpp b/samples/client/petstore/cpp-restsdk/client/Object.cpp index 09d74600232..8cfc19420db 100644 --- a/samples/client/petstore/cpp-restsdk/client/Object.cpp +++ b/samples/client/petstore/cpp-restsdk/client/Object.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/Object.h b/samples/client/petstore/cpp-restsdk/client/Object.h index 49696839cec..bec4f3d9b6b 100644 --- a/samples/client/petstore/cpp-restsdk/client/Object.h +++ b/samples/client/petstore/cpp-restsdk/client/Object.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp index 7fe2491320a..a329e056b8b 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp +++ b/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/PetApi.h b/samples/client/petstore/cpp-restsdk/client/api/PetApi.h index 0ae848804da..06f1cac580f 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/PetApi.h +++ b/samples/client/petstore/cpp-restsdk/client/api/PetApi.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp index 76c8c9a5be9..e2e949f3866 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp +++ b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h index ce51ba4e2b8..27f587aa187 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h +++ b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp index 3e66b54b8f4..ab8a9cc71b7 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp +++ b/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/api/UserApi.h b/samples/client/petstore/cpp-restsdk/client/api/UserApi.h index b10d7f78934..d1aa4fa5fd8 100644 --- a/samples/client/petstore/cpp-restsdk/client/api/UserApi.h +++ b/samples/client/petstore/cpp-restsdk/client/api/UserApi.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp index c0de8a1d1a6..9ddaca57cf9 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h index dcbfbf3b1ce..5cf9a422650 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h +++ b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Category.cpp b/samples/client/petstore/cpp-restsdk/client/model/Category.cpp index 8e2e7bf009b..d963d635bed 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Category.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Category.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Category.h b/samples/client/petstore/cpp-restsdk/client/model/Category.h index 080a8c52692..4df0db39c55 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Category.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Category.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Order.cpp b/samples/client/petstore/cpp-restsdk/client/model/Order.cpp index dffcf98ab09..08b21314b96 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Order.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Order.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Order.h b/samples/client/petstore/cpp-restsdk/client/model/Order.h index 524c5157042..c120ffe536c 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Order.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Order.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp b/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp index 0f8aeb29448..618085e56a3 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Pet.h b/samples/client/petstore/cpp-restsdk/client/model/Pet.h index d41199897d2..6028d18e0cf 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Pet.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Pet.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp b/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp index 2f6b6b18e45..c7ad5c35a1e 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/Tag.h b/samples/client/petstore/cpp-restsdk/client/model/Tag.h index cde78c44719..a8bd27525e9 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/Tag.h +++ b/samples/client/petstore/cpp-restsdk/client/model/Tag.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/User.cpp b/samples/client/petstore/cpp-restsdk/client/model/User.cpp index 041436f9447..82397c994b1 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/User.cpp +++ b/samples/client/petstore/cpp-restsdk/client/model/User.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/model/User.h b/samples/client/petstore/cpp-restsdk/client/model/User.h index b22509e4cfa..dcb7b92dd24 100644 --- a/samples/client/petstore/cpp-restsdk/client/model/User.h +++ b/samples/client/petstore/cpp-restsdk/client/model/User.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 5.0.1. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/crystal/.openapi-generator/VERSION b/samples/client/petstore/crystal/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/crystal/.openapi-generator/VERSION +++ b/samples/client/petstore/crystal/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/crystal/.travis.yml b/samples/client/petstore/crystal/.travis.yml index c81e9f2a6e3..961d92fb73a 100644 --- a/samples/client/petstore/crystal/.travis.yml +++ b/samples/client/petstore/crystal/.travis.yml @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.0.1-SNAPSHOT +#OpenAPI Generator version: 5.0.1 # language: crystal diff --git a/samples/client/petstore/crystal/spec/spec_helper.cr b/samples/client/petstore/crystal/spec/spec_helper.cr index 1cafe029c9d..d880153114e 100644 --- a/samples/client/petstore/crystal/spec/spec_helper.cr +++ b/samples/client/petstore/crystal/spec/spec_helper.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.0.1-SNAPSHOT +#OpenAPI Generator version: 5.0.1 # # load modules diff --git a/samples/client/petstore/crystal/src/petstore.cr b/samples/client/petstore/crystal/src/petstore.cr index 551e69efe96..fdc678d8e43 100644 --- a/samples/client/petstore/crystal/src/petstore.cr +++ b/samples/client/petstore/crystal/src/petstore.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.0.1-SNAPSHOT +#OpenAPI Generator version: 5.0.1 # # Dependencies diff --git a/samples/client/petstore/crystal/src/petstore/api/pet_api.cr b/samples/client/petstore/crystal/src/petstore/api/pet_api.cr index a263fc37db1..8eb177f4359 100644 --- a/samples/client/petstore/crystal/src/petstore/api/pet_api.cr +++ b/samples/client/petstore/crystal/src/petstore/api/pet_api.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.0.1-SNAPSHOT +#OpenAPI Generator version: 5.0.1 # require "uri" diff --git a/samples/client/petstore/crystal/src/petstore/api/store_api.cr b/samples/client/petstore/crystal/src/petstore/api/store_api.cr index adfb59de419..9f2ec77f36d 100644 --- a/samples/client/petstore/crystal/src/petstore/api/store_api.cr +++ b/samples/client/petstore/crystal/src/petstore/api/store_api.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.0.1-SNAPSHOT +#OpenAPI Generator version: 5.0.1 # require "uri" diff --git a/samples/client/petstore/crystal/src/petstore/api/user_api.cr b/samples/client/petstore/crystal/src/petstore/api/user_api.cr index db3832b3c1e..dc36a6ffeb4 100644 --- a/samples/client/petstore/crystal/src/petstore/api/user_api.cr +++ b/samples/client/petstore/crystal/src/petstore/api/user_api.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.0.1-SNAPSHOT +#OpenAPI Generator version: 5.0.1 # require "uri" diff --git a/samples/client/petstore/crystal/src/petstore/api_client.cr b/samples/client/petstore/crystal/src/petstore/api_client.cr index d78cb31fc63..76a43881661 100644 --- a/samples/client/petstore/crystal/src/petstore/api_client.cr +++ b/samples/client/petstore/crystal/src/petstore/api_client.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.0.1-SNAPSHOT +#OpenAPI Generator version: 5.0.1 # require "json" diff --git a/samples/client/petstore/crystal/src/petstore/api_error.cr b/samples/client/petstore/crystal/src/petstore/api_error.cr index 4ae71b2b108..54af613e860 100644 --- a/samples/client/petstore/crystal/src/petstore/api_error.cr +++ b/samples/client/petstore/crystal/src/petstore/api_error.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.0.1-SNAPSHOT +#OpenAPI Generator version: 5.0.1 # module Petstore diff --git a/samples/client/petstore/crystal/src/petstore/configuration.cr b/samples/client/petstore/crystal/src/petstore/configuration.cr index cbd2c642c0e..cb59803059b 100644 --- a/samples/client/petstore/crystal/src/petstore/configuration.cr +++ b/samples/client/petstore/crystal/src/petstore/configuration.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.0.1-SNAPSHOT +#OpenAPI Generator version: 5.0.1 # require "log" diff --git a/samples/client/petstore/crystal/src/petstore/models/api_response.cr b/samples/client/petstore/crystal/src/petstore/models/api_response.cr index f177d75d9d2..1bdeee9852f 100644 --- a/samples/client/petstore/crystal/src/petstore/models/api_response.cr +++ b/samples/client/petstore/crystal/src/petstore/models/api_response.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.0.1-SNAPSHOT +#OpenAPI Generator version: 5.0.1 # require "time" diff --git a/samples/client/petstore/crystal/src/petstore/models/category.cr b/samples/client/petstore/crystal/src/petstore/models/category.cr index 9bd40aadf7e..714da121941 100644 --- a/samples/client/petstore/crystal/src/petstore/models/category.cr +++ b/samples/client/petstore/crystal/src/petstore/models/category.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.0.1-SNAPSHOT +#OpenAPI Generator version: 5.0.1 # require "time" diff --git a/samples/client/petstore/crystal/src/petstore/models/order.cr b/samples/client/petstore/crystal/src/petstore/models/order.cr index e88c5428a6b..058e077b171 100644 --- a/samples/client/petstore/crystal/src/petstore/models/order.cr +++ b/samples/client/petstore/crystal/src/petstore/models/order.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.0.1-SNAPSHOT +#OpenAPI Generator version: 5.0.1 # require "time" diff --git a/samples/client/petstore/crystal/src/petstore/models/pet.cr b/samples/client/petstore/crystal/src/petstore/models/pet.cr index 6b6a19ef363..10fccdbfbb2 100644 --- a/samples/client/petstore/crystal/src/petstore/models/pet.cr +++ b/samples/client/petstore/crystal/src/petstore/models/pet.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.0.1-SNAPSHOT +#OpenAPI Generator version: 5.0.1 # require "time" diff --git a/samples/client/petstore/crystal/src/petstore/models/tag.cr b/samples/client/petstore/crystal/src/petstore/models/tag.cr index 8c85fbcd3c2..fb4f02469f6 100644 --- a/samples/client/petstore/crystal/src/petstore/models/tag.cr +++ b/samples/client/petstore/crystal/src/petstore/models/tag.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.0.1-SNAPSHOT +#OpenAPI Generator version: 5.0.1 # require "time" diff --git a/samples/client/petstore/crystal/src/petstore/models/user.cr b/samples/client/petstore/crystal/src/petstore/models/user.cr index 75b75c3f800..2f0db77a1c8 100644 --- a/samples/client/petstore/crystal/src/petstore/models/user.cr +++ b/samples/client/petstore/crystal/src/petstore/models/user.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 5.0.1-SNAPSHOT +#OpenAPI Generator version: 5.0.1 # require "time" diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION b/samples/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION +++ b/samples/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/.openapi-generator/VERSION b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/.openapi-generator/VERSION +++ b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/.openapi-generator/VERSION b/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/.openapi-generator/VERSION +++ b/samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/dart-jaguar/openapi/.openapi-generator/VERSION b/samples/client/petstore/dart-jaguar/openapi/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/dart-jaguar/openapi/.openapi-generator/VERSION +++ b/samples/client/petstore/dart-jaguar/openapi/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/dart-jaguar/openapi_proto/.openapi-generator/VERSION b/samples/client/petstore/dart-jaguar/openapi_proto/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/dart-jaguar/openapi_proto/.openapi-generator/VERSION +++ b/samples/client/petstore/dart-jaguar/openapi_proto/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION b/samples/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION +++ b/samples/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/elixir/.openapi-generator/VERSION b/samples/client/petstore/elixir/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/elixir/.openapi-generator/VERSION +++ b/samples/client/petstore/elixir/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION b/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/groovy/.openapi-generator/VERSION b/samples/client/petstore/groovy/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/groovy/.openapi-generator/VERSION +++ b/samples/client/petstore/groovy/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION +++ b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION b/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/java/feign/.openapi-generator/VERSION b/samples/client/petstore/java/feign/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/java/feign/.openapi-generator/VERSION +++ b/samples/client/petstore/java/feign/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION b/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION +++ b/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/java/jersey1/.openapi-generator/VERSION b/samples/client/petstore/java/jersey1/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/java/jersey1/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey1/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION b/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION +++ b/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/java/native-async/.openapi-generator/VERSION b/samples/client/petstore/java/native-async/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/java/native-async/.openapi-generator/VERSION +++ b/samples/client/petstore/java/native-async/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/java/native/.openapi-generator/VERSION b/samples/client/petstore/java/native/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/java/native/.openapi-generator/VERSION +++ b/samples/client/petstore/java/native/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION b/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION +++ b/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION b/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION +++ b/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/java/resteasy/.openapi-generator/VERSION b/samples/client/petstore/java/resteasy/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/java/resteasy/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resteasy/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION b/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION b/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/java/vertx/.openapi-generator/VERSION b/samples/client/petstore/java/vertx/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/java/vertx/.openapi-generator/VERSION +++ b/samples/client/petstore/java/vertx/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/java/webclient/.openapi-generator/VERSION b/samples/client/petstore/java/webclient/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/java/webclient/.openapi-generator/VERSION +++ b/samples/client/petstore/java/webclient/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION b/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/kotlin/.openapi-generator/VERSION b/samples/client/petstore/kotlin/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/kotlin/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/lua/.openapi-generator/VERSION b/samples/client/petstore/lua/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/lua/.openapi-generator/VERSION +++ b/samples/client/petstore/lua/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/nim/.openapi-generator/VERSION b/samples/client/petstore/nim/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/nim/.openapi-generator/VERSION +++ b/samples/client/petstore/nim/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/objc/core-data/.openapi-generator/VERSION b/samples/client/petstore/objc/core-data/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/objc/core-data/.openapi-generator/VERSION +++ b/samples/client/petstore/objc/core-data/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/objc/default/.openapi-generator/VERSION b/samples/client/petstore/objc/default/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/objc/default/.openapi-generator/VERSION +++ b/samples/client/petstore/objc/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/perl/.openapi-generator/VERSION b/samples/client/petstore/perl/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/perl/.openapi-generator/VERSION +++ b/samples/client/petstore/perl/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION +++ b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php index 3ca58770e80..d6ae9be6dce 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php index 965bf4c67ce..dbfb2af43de 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php index 36ac8c380ca..95d8d3ecd5a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php index 7a17eafddf2..59837f8c810 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php index cd71a0bf1bf..3e6837023b7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php index b3ed61437d3..e9f8bc59537 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php index 6be54e1a2d7..7acdf4b9c23 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php index b2e49b47ee3..9a9fa92cf8d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php index a22322e7b03..bd53c28a5ce 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php index 73fb1c179af..bc8bdd73c81 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php index b9fd22b198d..9d93a96bd7d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php index c74cec66c60..39c82f813bd 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php index ef8946cdd6c..29ae479d535 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php index ee28c54f20a..b67f6667e96 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php index 54a64883536..0de9aa2e86b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php index 15cff363af1..cc7bcffacd7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php index 2738ca6a74c..9fa98f1ff6d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php index f66748c5b5c..0ebabb04f1a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php index d806f479792..06ad76a9bd5 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php index cf5024314f1..5d8875f0d78 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php index 5d33f01bdb7..405da0fe6fd 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php index 21dff0b6094..518100ecdb6 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php index 847adc92975..70263dae4d4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php index 42587602234..ceba715eb35 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php index 147e7351087..6d20f9f8fbd 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php index 5b809645689..f04b6c50f92 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php index 2eda1174da4..bb48d3273a3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php index 92eec4875a8..a0489b9d184 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php index d623394585b..13e07ad5e38 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php index afd08cb1123..8beb66b78b2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php index 0b093c1fd53..38366f66ccf 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php index 59136120120..faa3291b996 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php index 476297da8c0..7fc81e6ad6e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php index dfc438879de..8047f9cb42a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php index fc93c85398c..79c08b0a666 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php index fc90fe8d0cc..1db0060f4c1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php index 6674caaae70..c386020c500 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php index f4dcd429423..f71c8fd51bf 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php index 8edb8267bf6..842e0c02970 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php index be01082ff63..27f9815e91c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php index 755307f39a6..bf15be00536 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php index c91c11d8b95..0db52d0e378 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php index 31072135dc2..78a8d535c38 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php index 5a00ee88322..9c9add36ba4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php index 9bef0c0496c..9b2cf704aea 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php index 275200558d4..36b98fa4bd6 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php index 696e4bbb47e..7766d821d5b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php index 31408d1ab31..0049e78142b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php index a9a2cb21108..271d4f1642f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php index 9ce26953114..a175dc28847 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php index c1f6b21e8eb..efccc7aff12 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php index a5e4e0764b3..3a2baf381de 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php index aa7d543ecc5..2d2fd155c5e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php index f0eecf6bb8f..33e6392f106 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php index 9419b635d59..a6e8df33146 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 1.0.0 * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.1-SNAPSHOT + * OpenAPI Generator version: 5.0.1 */ /** diff --git a/samples/client/petstore/powershell/.openapi-generator/VERSION b/samples/client/petstore/powershell/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/powershell/.openapi-generator/VERSION +++ b/samples/client/petstore/powershell/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION +++ b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/python-legacy/.openapi-generator/VERSION b/samples/client/petstore/python-legacy/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/python-legacy/.openapi-generator/VERSION +++ b/samples/client/petstore/python-legacy/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/python-tornado/.openapi-generator/VERSION b/samples/client/petstore/python-tornado/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/python-tornado/.openapi-generator/VERSION +++ b/samples/client/petstore/python-tornado/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/python/.openapi-generator/VERSION b/samples/client/petstore/python/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/python/.openapi-generator/VERSION +++ b/samples/client/petstore/python/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION b/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION +++ b/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/ruby-faraday/lib/petstore.rb b/samples/client/petstore/ruby-faraday/lib/petstore.rb index d12ff44e87c..b9e9ba20dae 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb index 4c129aefd96..3f7c6c817fa 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb index a6641555bc2..96c4737bb97 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb index d1bf3ebee82..c10ef9576a3 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb index 0a69ee66dbe..63ffb6feec5 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb index 2fb35fe0f29..990b2f7dfa0 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/store_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/store_api.rb index 4ac33ff4a45..a53589104ba 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/store_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/store_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb index 6bc639a1d8b..845214ccfa7 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb index ebf4dd9bdf0..f2e42a71d95 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb index 422fac3c089..c6bb8cf3881 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb index 88c35970698..fb6a3335292 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb index ccc2ab1374d..e87b43cbcad 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb index 2e2f23cb42d..ec63474529a 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb index ca5de075689..d0ffcd1548c 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb index 7ecb71f6510..11e7ee3b1c4 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb index d420a3db503..fd3568964fe 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb index 054ec25714c..4f9a50ac4e7 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb index 51356605260..3bb6e0e29d7 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb index d0be5f3bacb..69b922db9b5 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb index 6e700248449..2ee626f0133 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb index de5d3352a41..fa860b9101e 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb index 5ff9e74bee7..fc2cffe5206 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb index d1e106c13bf..a8a6a675d74 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb index 540af0e8a01..b57e9546dd5 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb index 9033b35cf0e..39de476a29d 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb index 088cf370c24..44b8eac63fa 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb index 6343047ace8..03d8403df32 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb index 318844d295d..ecd0bbcc4d6 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb index 76d047443f9..056d45366ea 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb index 7e0e0e51a70..8544cbf186e 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb index 933d47ca459..f59f3ac9d1e 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb index 5e86bcad4a9..f328e875c92 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb index b88b29128b2..3399fb00298 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb index 83fba18d8a9..815d96b797f 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb index 85b081c5919..f0b0cfb3826 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb index b94abca21d3..65a0e6c5fe4 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb index 288b8bfe754..ee62792e8bb 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb index afc0cb0a09c..dee613fb840 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb index 47616059ade..afd1f9731f6 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb index a5c3437a4db..fa78b1a1046 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb index b8364af505a..8135a38c52e 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb index 6764a2cc89e..19ef1d36b78 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb index 0a7a34f579f..bcdc03a1169 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb index 767e45386cf..90dabf212c9 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb index 409225f0059..2be6a479dca 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb index d2d69117f19..cb39491aa6e 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb index da565cfa05e..a1fc04d42db 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb index 06937256d8e..bb6a422bcd6 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb index c83546057d2..719699b03f1 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb index 8eaf66b6405..12bc4d6f51c 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb index ebaba179f71..5557d89e8d7 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb index e0ab453151d..fe6ed23ce19 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb index cdacd34c7c5..3646a16ea16 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb index bc73cdd5db4..1171115f4df 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/version.rb b/samples/client/petstore/ruby-faraday/lib/petstore/version.rb index 2ca2e6b97a0..f0848475201 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/version.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/petstore.gemspec b/samples/client/petstore/ruby-faraday/petstore.gemspec index 96169903f6c..58719ef6bc0 100644 --- a/samples/client/petstore/ruby-faraday/petstore.gemspec +++ b/samples/client/petstore/ruby-faraday/petstore.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb b/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb index f812accb6b1..0216dc054ee 100644 --- a/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb b/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb index 679bb46811a..6990a47533d 100644 --- a/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby-faraday/spec/spec_helper.rb b/samples/client/petstore/ruby-faraday/spec/spec_helper.rb index fe3416f0486..752477f3622 100644 --- a/samples/client/petstore/ruby-faraday/spec/spec_helper.rb +++ b/samples/client/petstore/ruby-faraday/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/.openapi-generator/VERSION b/samples/client/petstore/ruby/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/ruby/.openapi-generator/VERSION +++ b/samples/client/petstore/ruby/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/ruby/lib/petstore.rb b/samples/client/petstore/ruby/lib/petstore.rb index d12ff44e87c..b9e9ba20dae 100644 --- a/samples/client/petstore/ruby/lib/petstore.rb +++ b/samples/client/petstore/ruby/lib/petstore.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb index 4c129aefd96..3f7c6c817fa 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/default_api.rb b/samples/client/petstore/ruby/lib/petstore/api/default_api.rb index a6641555bc2..96c4737bb97 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/default_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/default_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb index d1bf3ebee82..c10ef9576a3 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb index 0a69ee66dbe..63ffb6feec5 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb index 35dcea6e0c0..c095c347466 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb index 8b8e0ee9ea9..317814a245b 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb index 8e1e6a3a847..5d325157fc5 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api_client.rb b/samples/client/petstore/ruby/lib/petstore/api_client.rb index 507e477dc7d..48f7ec976a1 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/api_error.rb b/samples/client/petstore/ruby/lib/petstore/api_error.rb index 422fac3c089..c6bb8cf3881 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/configuration.rb b/samples/client/petstore/ruby/lib/petstore/configuration.rb index fccde677a36..032363b7d64 100644 --- a/samples/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb index ccc2ab1374d..e87b43cbcad 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/animal.rb b/samples/client/petstore/ruby/lib/petstore/models/animal.rb index 2e2f23cb42d..ec63474529a 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/animal.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/animal.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb index ca5de075689..d0ffcd1548c 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb index 7ecb71f6510..11e7ee3b1c4 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb index d420a3db503..fd3568964fe 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb index 054ec25714c..4f9a50ac4e7 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb index 51356605260..3bb6e0e29d7 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat.rb b/samples/client/petstore/ruby/lib/petstore/models/cat.rb index d0be5f3bacb..69b922db9b5 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/cat.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb b/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb index 6e700248449..2ee626f0133 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/category.rb b/samples/client/petstore/ruby/lib/petstore/models/category.rb index de5d3352a41..fa860b9101e 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/category.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/category.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb index 5ff9e74bee7..fc2cffe5206 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/client.rb b/samples/client/petstore/ruby/lib/petstore/models/client.rb index d1e106c13bf..a8a6a675d74 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/client.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog.rb b/samples/client/petstore/ruby/lib/petstore/models/dog.rb index 540af0e8a01..b57e9546dd5 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/dog.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb b/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb index 9033b35cf0e..39de476a29d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb index 088cf370c24..44b8eac63fa 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb index 6343047ace8..03d8403df32 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb index 318844d295d..ecd0bbcc4d6 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/file.rb b/samples/client/petstore/ruby/lib/petstore/models/file.rb index 76d047443f9..056d45366ea 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/file.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/file.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb b/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb index 7e0e0e51a70..8544cbf186e 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/foo.rb b/samples/client/petstore/ruby/lib/petstore/models/foo.rb index 933d47ca459..f59f3ac9d1e 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/foo.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/foo.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb index 5e86bcad4a9..f328e875c92 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb index b88b29128b2..3399fb00298 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb b/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb index 83fba18d8a9..815d96b797f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb b/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb index 85b081c5919..f0b0cfb3826 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/list.rb b/samples/client/petstore/ruby/lib/petstore/models/list.rb index b94abca21d3..65a0e6c5fe4 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/list.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/list.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb index 288b8bfe754..ee62792e8bb 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb index afc0cb0a09c..dee613fb840 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb index 47616059ade..afd1f9731f6 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb index a5c3437a4db..fa78b1a1046 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/name.rb b/samples/client/petstore/ruby/lib/petstore/models/name.rb index b8364af505a..8135a38c52e 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb b/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb index 6764a2cc89e..19ef1d36b78 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb index 0a7a34f579f..bcdc03a1169 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/order.rb b/samples/client/petstore/ruby/lib/petstore/models/order.rb index 767e45386cf..90dabf212c9 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/order.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/order.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb index 409225f0059..2be6a479dca 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb index d2d69117f19..cb39491aa6e 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb index da565cfa05e..a1fc04d42db 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb index 06937256d8e..bb6a422bcd6 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb index c83546057d2..719699b03f1 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/pet.rb b/samples/client/petstore/ruby/lib/petstore/models/pet.rb index 8eaf66b6405..12bc4d6f51c 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/pet.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb index ebaba179f71..5557d89e8d7 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb index e0ab453151d..fe6ed23ce19 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/tag.rb b/samples/client/petstore/ruby/lib/petstore/models/tag.rb index cdacd34c7c5..3646a16ea16 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/tag.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/tag.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/user.rb b/samples/client/petstore/ruby/lib/petstore/models/user.rb index bc73cdd5db4..1171115f4df 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/user.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/user.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/lib/petstore/version.rb b/samples/client/petstore/ruby/lib/petstore/version.rb index 2ca2e6b97a0..f0848475201 100644 --- a/samples/client/petstore/ruby/lib/petstore/version.rb +++ b/samples/client/petstore/ruby/lib/petstore/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/petstore.gemspec b/samples/client/petstore/ruby/petstore.gemspec index d55199e7a30..ddee70ebf7c 100644 --- a/samples/client/petstore/ruby/petstore.gemspec +++ b/samples/client/petstore/ruby/petstore.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/spec/api_client_spec.rb b/samples/client/petstore/ruby/spec/api_client_spec.rb index 72af1e8bee5..69e9b0554d9 100644 --- a/samples/client/petstore/ruby/spec/api_client_spec.rb +++ b/samples/client/petstore/ruby/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/spec/configuration_spec.rb b/samples/client/petstore/ruby/spec/configuration_spec.rb index 679bb46811a..6990a47533d 100644 --- a/samples/client/petstore/ruby/spec/configuration_spec.rb +++ b/samples/client/petstore/ruby/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/ruby/spec/spec_helper.rb b/samples/client/petstore/ruby/spec/spec_helper.rb index fe3416f0486..752477f3622 100644 --- a/samples/client/petstore/ruby/spec/spec_helper.rb +++ b/samples/client/petstore/ruby/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION b/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/scala-akka/.openapi-generator/VERSION b/samples/client/petstore/scala-akka/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/scala-akka/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-akka/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/scala-sttp/.openapi-generator/VERSION b/samples/client/petstore/scala-sttp/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/scala-sttp/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-sttp/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java index 584510a41a3..f29e41a0ba8 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java index 1f20deb2212..696a3b9c0a0 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java index 4e94ceae0a3..961d517d1ed 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-no-nullable/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-no-nullable/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/spring-cloud-no-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/PetApi.java index 7ad0a081067..34477400ded 100644 --- a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index 7b944a29666..af28bf3353e 100644 --- a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/UserApi.java index e12dbb59731..d1a318848e3 100644 --- a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 87cb1896b25..6028dd913b5 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index 0b3d31e95cc..8e4b6aa8648 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index e57c65c8167..f81f33211df 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/spring-cloud/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index 7ad0a081067..34477400ded 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index 7b944a29666..af28bf3353e 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index e12dbb59731..d1a318848e3 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/.openapi-generator/VERSION b/samples/client/petstore/spring-stubs/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/spring-stubs/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-stubs/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index 250e25dea10..2968711524f 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java index ef50bba52ac..fa2109b765e 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java index ca589ff573c..acf7214b91a 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/swift5/default/.openapi-generator/VERSION b/samples/client/petstore/swift5/default/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/swift5/default/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION b/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION b/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION b/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION b/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION b/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION +++ b/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/meta-codegen/lib/pom.xml b/samples/meta-codegen/lib/pom.xml index 4e5340c4d3f..af931fcc6aa 100644 --- a/samples/meta-codegen/lib/pom.xml +++ b/samples/meta-codegen/lib/pom.xml @@ -121,7 +121,9 @@ UTF-8 - 5.0.1-SNAPSHOT + + 5.0.1 + 1.0.0 4.8.1 diff --git a/samples/openapi3/client/elm/.openapi-generator/VERSION b/samples/openapi3/client/elm/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/openapi3/client/elm/.openapi-generator/VERSION +++ b/samples/openapi3/client/elm/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION +++ b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION +++ b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.openapi-generator/VERSION +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb index d6f15e07842..4499f595d9a 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api/usage_api.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api/usage_api.rb index dd2e559b118..4d3a052fd12 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api/usage_api.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api/usage_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb index 139bf5eb779..db4a263564e 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_error.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_error.rb index 08ff5e86520..68c51a663c7 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_error.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb index b2dc6bfef65..1056799d3c3 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb index f427b102c22..269b9421eac 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb index ed1139f8dfa..7c6f8fe9c77 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/configuration_spec.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/configuration_spec.rb index c287861dd40..8f4a0954700 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/configuration_spec.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb index 7cacc73a72a..925ef253dd5 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/x_auth_id_alias.gemspec b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/x_auth_id_alias.gemspec index 10d468d7757..79875006b74 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/x_auth_id_alias.gemspec +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/x_auth_id_alias.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION b/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION b/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION +++ b/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec b/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec index 819bb560590..44d8cf2f398 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec +++ b/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb index c57950ab613..f10aad3ef13 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb index 6c11d4b5757..f31cf148055 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb index 4504d878188..0bdeb12cc9b 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_error.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_error.rb index 5474ff9a674..6040c0cb370 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_error.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb index 46deb12617e..93dfd50bb1e 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb index 0351493546c..e10edecb8c0 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb b/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb index 6974ff5b2f3..d994fa6fda2 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb b/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb index cbbdaac18d1..9c903f72455 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb b/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb index 5eec3e85e99..5ccb306b02f 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb index 7cfa1a628af..4d151542ff0 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb index 360ae897cba..a78eab87ea6 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb index f88d96182a1..5ab5151bf87 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_error.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_error.rb index 668d71a2d89..a16382e312d 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_error.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb index effc08965ac..db1199b0ec9 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb index b74a8c39911..c32915b6d42 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb index de2289c4df9..b9060a22f66 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb index 04fce6c2415..d4436a7af55 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/petstore.gemspec b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/petstore.gemspec index 241cc8ab543..ff334989e47 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/petstore.gemspec +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/petstore.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb index aebefcad0f0..936eaa19626 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb index 4971822a84f..74809baa586 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb index 99c6a67ae25..a84ec0a00cf 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.1-SNAPSHOT +OpenAPI Generator version: 5.0.1 =end diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION b/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION b/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/java/native/.openapi-generator/VERSION b/samples/openapi3/client/petstore/java/native/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/openapi3/client/petstore/java/native/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/java/native/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100755 --- a/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/schema/petstore/ktorm/.openapi-generator/VERSION b/samples/schema/petstore/ktorm/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/schema/petstore/ktorm/.openapi-generator/VERSION +++ b/samples/schema/petstore/ktorm/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/schema/petstore/mysql/.openapi-generator/VERSION b/samples/schema/petstore/mysql/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/schema/petstore/mysql/.openapi-generator/VERSION +++ b/samples/schema/petstore/mysql/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/cpp-qt5-qhttpengine-server/.openapi-generator/VERSION b/samples/server/petstore/cpp-qt5-qhttpengine-server/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/cpp-qt5-qhttpengine-server/.openapi-generator/VERSION +++ b/samples/server/petstore/cpp-qt5-qhttpengine-server/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/go-api-server/.openapi-generator/VERSION b/samples/server/petstore/go-api-server/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/go-api-server/.openapi-generator/VERSION +++ b/samples/server/petstore/go-api-server/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION b/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION +++ b/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/java-msf4j/.openapi-generator/VERSION b/samples/server/petstore/java-msf4j/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/java-msf4j/.openapi-generator/VERSION +++ b/samples/server/petstore/java-msf4j/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/java-play-framework/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/java-undertow/.openapi-generator/VERSION b/samples/server/petstore/java-undertow/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/java-undertow/.openapi-generator/VERSION +++ b/samples/server/petstore/java-undertow/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION b/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION +++ b/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/ktor/README.md b/samples/server/petstore/kotlin-server/ktor/README.md index 910e47e6dcf..dcc593e5698 100644 --- a/samples/server/petstore/kotlin-server/ktor/README.md +++ b/samples/server/petstore/kotlin-server/ktor/README.md @@ -2,7 +2,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. -Generated by OpenAPI Generator 5.0.1-SNAPSHOT. +Generated by OpenAPI Generator 5.0.1. ## Requires diff --git a/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt index 103e8652a75..b4126e49a98 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt index 455423f0716..3dc18f4d893 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt index 61afd21e984..8b0f9b07d99 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/php-laravel/.openapi-generator/VERSION b/samples/server/petstore/php-laravel/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/php-laravel/.openapi-generator/VERSION +++ b/samples/server/petstore/php-laravel/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/php-lumen/.openapi-generator/VERSION b/samples/server/petstore/php-lumen/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/php-lumen/.openapi-generator/VERSION +++ b/samples/server/petstore/php-lumen/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION b/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION +++ b/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/php-slim4/.openapi-generator/VERSION b/samples/server/petstore/php-slim4/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/php-slim4/.openapi-generator/VERSION +++ b/samples/server/petstore/php-slim4/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION b/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION b/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION +++ b/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION b/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION +++ b/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION b/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION +++ b/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/python-flask/.openapi-generator/VERSION b/samples/server/petstore/python-flask/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/python-flask/.openapi-generator/VERSION +++ b/samples/server/petstore/python-flask/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java index da56a77b599..a5825b6e556 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java index b45caa2de8e..24be0958102 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index a1234ff3aca..6be360e6905 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java index 2022ab2a0f5..c0ac7d55748 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java index 12352fa31bc..9f2205da1c9 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java index 702ae2570f8..e89e2cfc180 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java index 301f52aa109..3cd5207a9b7 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java index d2f155857b0..94bd62c2d21 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index c0c707430e9..3cb9077e473 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java index 25342e235ba..cc0a3c04f90 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java index 013d137460b..dbba3f3ffdc 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java index ac0b6b997e7..23c38ed10ea 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 301f52aa109..3cd5207a9b7 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index bdcecfe3cf7..64915b7d1d7 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index c0c707430e9..3cb9077e473 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java index 25342e235ba..cc0a3c04f90 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index 013d137460b..dbba3f3ffdc 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java index ac0b6b997e7..23c38ed10ea 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 301f52aa109..3cd5207a9b7 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java index 0754d72af3e..f3e67143466 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index c0c707430e9..3cb9077e473 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 25cbb63b4b2..f85f5878161 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index 013d137460b..dbba3f3ffdc 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index ac0b6b997e7..23c38ed10ea 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/spring-mvc/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-mvc/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java index 301f52aa109..3cd5207a9b7 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java index bdcecfe3cf7..64915b7d1d7 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index c0c707430e9..3cb9077e473 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java index 25342e235ba..cc0a3c04f90 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java index 013d137460b..dbba3f3ffdc 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java index ac0b6b997e7..23c38ed10ea 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION b/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index f72ae4b1c7b..f7198669b52 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index 4a596e2b11a..b6f7216afe8 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 452dd62ed81..7ba4be9c305 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java index d23969a22e3..e9c15516d6c 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index fb05cf630e2..90fd8d073e6 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java index bdefaf5d2a2..77c9346b6e5 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java index 301f52aa109..3cd5207a9b7 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java index bdcecfe3cf7..64915b7d1d7 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index c0c707430e9..3cb9077e473 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java index 25342e235ba..cc0a3c04f90 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java index 013d137460b..dbba3f3ffdc 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java index ac0b6b997e7..23c38ed10ea 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 9c01f75afe0..8ceffefe75b 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java index 2da2b847c2f..c08daf4a82e 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 47091b78bf5..0ddb11e22c2 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java index e029a994226..42f132e7782 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java index 6f52e8390f9..8266454a540 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java index 3c6ec85cb48..a6fea044bbc 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION b/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java index 9c01f75afe0..8ceffefe75b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index 2da2b847c2f..c08daf4a82e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 47091b78bf5..0ddb11e22c2 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index e029a994226..42f132e7782 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java index 6f52e8390f9..8266454a540 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index 3c6ec85cb48..a6fea044bbc 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index 2bfabe63f56..9db4ebc1fb3 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index 09f4e18f0a7..d26237a0f09 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index c3c43737d8d..1d658ced555 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index 0c0fc1c0abd..3dc68410a68 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java index ee0ffbf54db..f7992987a2e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index 13c7b9adad9..0d1ffa9abcd 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION b/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java index b1bf904ac3c..026c164e3d8 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index 04dbac05437..1452a5352b2 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 750062667dd..3eaf1a35959 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index f353848fd24..f3fa47ff417 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java index dc91d119f24..19df1f00e9c 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index c021abe0325..b0e09e4cc6a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index f72ae4b1c7b..f7198669b52 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java index e297f0c42d4..58c4f29aee4 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 452dd62ed81..7ba4be9c305 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java index 847cfb9e946..a971dda02ae 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java index fb05cf630e2..90fd8d073e6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java index bdefaf5d2a2..77c9346b6e5 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java index 9c01f75afe0..8ceffefe75b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java index 3e24b587f50..d7e64bd2731 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 47091b78bf5..0ddb11e22c2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java index 68bfd694342..5baf8c7cef7 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java index 6f52e8390f9..8266454a540 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java index 3c6ec85cb48..a6fea044bbc 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index f72ae4b1c7b..f7198669b52 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java index e297f0c42d4..58c4f29aee4 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 452dd62ed81..7ba4be9c305 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java index 847cfb9e946..a971dda02ae 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java index fb05cf630e2..90fd8d073e6 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java index bdefaf5d2a2..77c9346b6e5 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 301f52aa109..3cd5207a9b7 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java index 0754d72af3e..f3e67143466 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index c0c707430e9..3cb9077e473 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 25cbb63b4b2..f85f5878161 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index 013d137460b..dbba3f3ffdc 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index ac0b6b997e7..23c38ed10ea 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION b/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java index 301f52aa109..3cd5207a9b7 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index e796709266c..6ee26dfbf46 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index c0c707430e9..3cb9077e473 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index b7daac32011..edd1b7b962a 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java index 013d137460b..dbba3f3ffdc 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index ac0b6b997e7..23c38ed10ea 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION b/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java index 991b7d3ec9d..115f5d03385 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java index ba9a9d5cc22..6a3e4626326 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java index 6d7720baa59..a951ebc2816 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java index 1130fa691a9..4276e2a26a9 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java index 14b2eb595d5..b141693adfd 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java index 54b295a0c7a..b4c1c11f6c1 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/.openapi-generator/VERSION b/samples/server/petstore/springboot/.openapi-generator/VERSION index 3fa3b389a57..32f3eaad0d9 100644 --- a/samples/server/petstore/springboot/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.0.1 \ No newline at end of file diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java index 301f52aa109..3cd5207a9b7 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java index bdcecfe3cf7..64915b7d1d7 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index c0c707430e9..3cb9077e473 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index 25342e235ba..cc0a3c04f90 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java index 013d137460b..dbba3f3ffdc 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index ac0b6b997e7..23c38ed10ea 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.0.1). * https://openapi-generator.tech * Do not edit the class manually. */ From 07a4c7b5bf90997687ebf09e1f6c01bf19839978 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 6 Feb 2021 17:58:59 +0800 Subject: [PATCH 21/44] fix meta-codegen pom.xml --- samples/meta-codegen/lib/pom.xml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/samples/meta-codegen/lib/pom.xml b/samples/meta-codegen/lib/pom.xml index 0a42138424f..9515be11c8c 100644 --- a/samples/meta-codegen/lib/pom.xml +++ b/samples/meta-codegen/lib/pom.xml @@ -121,13 +121,9 @@ UTF-8 -<<<<<<< HEAD - 5.1.0-SNAPSHOT -======= - 5.0.1 + 5.1.0-SNAPSHOT ->>>>>>> origin/master 1.0.0 4.8.1 From 8025e5fe7b6e91a08a9d0bc16fa62bcc509129ab Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 6 Feb 2021 18:52:09 +0800 Subject: [PATCH 22/44] update readme --- README.md | 23 ++++++------------- docs/installation.md | 8 +++---- .../README.adoc | 4 ++-- .../samples/local-spec/README.md | 2 +- .../openapi-generator-maven-plugin/README.md | 2 +- 5 files changed, 15 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 32e3c99e535..023df5f4e1a 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@
-[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`5.0.1`): +[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`5.1.0`): [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/master.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator) [![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator) [![Run Status](https://api.shippable.com/projects/5af6bf74e790f4070084a115/badge?branch=master)](https://app.shippable.com/github/OpenAPITools/openapi-generator) @@ -18,14 +18,6 @@ [![Bitrise](https://img.shields.io/bitrise/4a2b10a819d12b67/master?label=bitrise%3A%20Swift+4,5&token=859FMDR8QHwabCzwvZK6vQ)](https://app.bitrise.io/app/4a2b10a819d12b67) [![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/openapitools/openapi-generator/Check%20Supported%20Java%20Versions/master?label=Check%20Supported%20Java%20Versions&logo=github&logoColor=green)](https://github.com/OpenAPITools/openapi-generator/actions?query=workflow%3A%22Check+Supported+Java+Versions%22) -[5.1.x](https://github.com/OpenAPITools/openapi-generator/tree/5.1.x) (`5.1.x`): -[![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/5.1.x.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator) -[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator/tree/5.1.x.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator) -[![Run Status](https://api.shippable.com/projects/5af6bf74e790f4070084a115/badge?branch=5.1.x)](https://app.shippable.com/github/OpenAPITools/openapi-generator) -[![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=5.1.x&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu) -[![JDK11 Build](https://cloud.drone.io/api/badges/OpenAPITools/openapi-generator/status.svg?ref=refs/heads/5.1.x)](https://cloud.drone.io/OpenAPITools/openapi-generator) -[![Bitrise](https://img.shields.io/bitrise/4a2b10a819d12b67/5.1.x?label=bitrise%3A%20Swift+4,5&token=859FMDR8QHwabCzwvZK6vQ)](https://app.bitrise.io/app/4a2b10a819d12b67) - [6.0.x](https://github.com/OpenAPITools/openapi-generator/tree/6.0.x) (`6.0.x`): [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/6.0.x.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator) [![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator/tree/6.0.x.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator) @@ -121,8 +113,7 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20 | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- | | 6.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/6.0.0-SNAPSHOT/) | Nov/Dec 2021 | Minor release with breaking changes (no fallback) | | 5.1.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.1.0-SNAPSHOT/) | Mar/Apr 2021 | Minor release with breaking changes (with fallback) | -| 5.0.1 (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.0.1-SNAPSHOT/) | Jan/Feb 2021 | Patch release with enhancements, bug fixes, etc | -| [5.0.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.0.0) (latest stable release) | 21.12.2020 | Major release with breaking changes (no fallback) | +| [5.0.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.0.1) (latest stable release) | 06.02.2021 | Patch release with enhancements, bug fixes, etc | | [4.3.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.3.1) | 06.05.2020 | Patch release (enhancements, bug fixes, etc) | OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0 @@ -179,16 +170,16 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository. If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum): -JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.0.0/openapi-generator-cli-5.0.0.jar` +JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.0.1/openapi-generator-cli-5.0.1.jar` For **Mac/Linux** users: ```sh -wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.0.0/openapi-generator-cli-5.0.0.jar -O openapi-generator-cli.jar +wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.0.1/openapi-generator-cli-5.0.1.jar -O openapi-generator-cli.jar ``` For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g. ``` -Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.0.0/openapi-generator-cli-5.0.0.jar +Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.0.1/openapi-generator-cli-5.0.1.jar ``` After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage. @@ -413,7 +404,7 @@ openapi-generator-cli version To use a specific version of "openapi-generator-cli" ```sh -openapi-generator-cli version-manager set 5.0.0 +openapi-generator-cli version-manager set 5.0.1 ``` Or install it as dev-dependency: @@ -437,7 +428,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat (if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php -o c:\temp\php_api_client`) -You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.0.0/openapi-generator-cli-5.0.0.jar) +You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.0.1/openapi-generator-cli-5.0.1.jar) To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate` diff --git a/docs/installation.md b/docs/installation.md index 3eafc49080f..77db575d663 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -22,7 +22,7 @@ npm install @openapitools/openapi-generator-cli -g To install a specific version of the tool, pass the version during installation: ```bash -openapi-generator-cli version-manager set 4.3.1 +openapi-generator-cli version-manager set 5.0.1 ``` To install the tool as a dev dependency in your current project: @@ -80,18 +80,18 @@ docker run --rm \ If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum): -JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.3.1/openapi-generator-cli-4.3.1.jar` +JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.0.1/openapi-generator-cli-5.0.1.jar` For **Mac/Linux** users: ```bash -wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.3.1/openapi-generator-cli-4.3.1.jar -O openapi-generator-cli.jar +wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.0.1/openapi-generator-cli-5.0.1.jar -O openapi-generator-cli.jar ``` For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g. ```powershell -Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.3.1/openapi-generator-cli-4.3.1.jar +Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.0.1/openapi-generator-cli-5.0.1.jar ``` diff --git a/modules/openapi-generator-gradle-plugin/README.adoc b/modules/openapi-generator-gradle-plugin/README.adoc index 5590516dc1d..310fd681dc7 100644 --- a/modules/openapi-generator-gradle-plugin/README.adoc +++ b/modules/openapi-generator-gradle-plugin/README.adoc @@ -97,7 +97,7 @@ task validateGoodSpec(type: org.openapitools.generator.gradle.plugin.tasks.Valid [source,group] ---- plugins { - id "org.openapi.generator" version "5.0.0" + id "org.openapi.generator" version "5.0.1" } ---- @@ -113,7 +113,7 @@ buildscript { // url "https://plugins.gradle.org/m2/" } dependencies { - classpath "org.openapitools:openapi-generator-gradle-plugin:5.0.0" + classpath "org.openapitools:openapi-generator-gradle-plugin:5.0.1" } } diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md b/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md index fcc990ab3d9..8e771002b13 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md @@ -18,5 +18,5 @@ gradle generateGoWithInvalidSpec # expected outcome: BUILD FAILED The samples can be tested against other versions of the plugin using the `openApiGeneratorVersion` property. For example: ```bash -gradle -PopenApiGeneratorVersion=5.0.0 openApiValidate +gradle -PopenApiGeneratorVersion=5.0.1 openApiValidate ``` diff --git a/modules/openapi-generator-maven-plugin/README.md b/modules/openapi-generator-maven-plugin/README.md index af03067ba5b..f740dbf340e 100644 --- a/modules/openapi-generator-maven-plugin/README.md +++ b/modules/openapi-generator-maven-plugin/README.md @@ -12,7 +12,7 @@ Add to your `build->plugins` section (default phase is `generate-sources` phase) org.openapitools openapi-generator-maven-plugin - 5.0.0 + 5.0.1 From 64097ea1399abdbf8bd3a971aaffa45b27a6e04d Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 6 Feb 2021 20:17:58 +0800 Subject: [PATCH 23/44] remove release tag --- samples/meta-codegen/lib/pom.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/samples/meta-codegen/lib/pom.xml b/samples/meta-codegen/lib/pom.xml index 9515be11c8c..8b0799d9488 100644 --- a/samples/meta-codegen/lib/pom.xml +++ b/samples/meta-codegen/lib/pom.xml @@ -121,9 +121,7 @@ UTF-8 - 5.1.0-SNAPSHOT - 1.0.0 4.8.1 From c5ddf463c4e0fbf85a713d0477a4db77e96c6f96 Mon Sep 17 00:00:00 2001 From: Benjamin Klatt Date: Mon, 8 Feb 2021 03:33:57 +0100 Subject: [PATCH 24/44] FIX #8583 [BUG][JAVA] AbstractOpenApiSchema package (#8635) Fixed package declaration in AbstractOpenApiSchema.mustache template --- .../Java/libraries/native/AbstractOpenApiSchema.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/AbstractOpenApiSchema.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/AbstractOpenApiSchema.mustache index 5b2198dedb5..d7d9ee9e740 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/AbstractOpenApiSchema.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/AbstractOpenApiSchema.mustache @@ -1,6 +1,6 @@ {{>licenseInfo}} -package {{invokerPackage}}.model; +package {{modelPackage}}; import {{invokerPackage}}.ApiException; import java.util.Objects; From a06af89be98210c260912ed362f966615d2e8e40 Mon Sep 17 00:00:00 2001 From: Stephane Carrez Date: Mon, 8 Feb 2021 04:20:15 +0100 Subject: [PATCH 25/44] Fix #8640: [BUG] [Ada] Server skeleton does not compile when an operation has no parameter (#8641) - add missing 'use Swagger.Streams;' clause - add Style_Checks pragma to fix style compilation warnings in generated Ada code - fix spurious spaces in licence headers that cause Ada style compilation warning - update the default GNAT project config --- .../main/resources/Ada/client-body.mustache | 2 ++ .../main/resources/Ada/client-spec.mustache | 1 + .../src/main/resources/Ada/config.gpr | 35 ++++++++----------- .../main/resources/Ada/licenseInfo.mustache | 2 +- .../main/resources/Ada/model-body.mustache | 3 ++ .../main/resources/Ada/model-spec.mustache | 1 + .../Ada/server-skeleton-body.mustache | 7 +++- .../Ada/server-skeleton-spec.mustache | 4 +++ .../main/resources/Ada/server-spec.mustache | 1 + 9 files changed, 34 insertions(+), 22 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Ada/client-body.mustache b/modules/openapi-generator/src/main/resources/Ada/client-body.mustache index 1ae60a71fde..71b3e314a95 100644 --- a/modules/openapi-generator/src/main/resources/Ada/client-body.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/client-body.mustache @@ -1,6 +1,8 @@ {{>licenseInfo}} +pragma Warnings (Off, "*is not referenced"); with Swagger.Streams; package body {{package}}.Clients is + pragma Style_Checks ("-mr"); {{#apiInfo}} {{#apis}} {{#operations}} diff --git a/modules/openapi-generator/src/main/resources/Ada/client-spec.mustache b/modules/openapi-generator/src/main/resources/Ada/client-spec.mustache index 9d41b9671f3..46559f0dcad 100644 --- a/modules/openapi-generator/src/main/resources/Ada/client-spec.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/client-spec.mustache @@ -4,6 +4,7 @@ with {{package}}.Models; with Swagger.Clients; package {{package}}.Clients is + pragma Style_Checks ("-mr"); type Client_Type is new Swagger.Clients.Client_Type with null record; diff --git a/modules/openapi-generator/src/main/resources/Ada/config.gpr b/modules/openapi-generator/src/main/resources/Ada/config.gpr index e2f60ea1b6a..e46b6311ef5 100644 --- a/modules/openapi-generator/src/main/resources/Ada/config.gpr +++ b/modules/openapi-generator/src/main/resources/Ada/config.gpr @@ -3,17 +3,16 @@ abstract project Config is type Yes_No is ("yes", "no"); - type Library_Type_Type is ("relocatable", "static"); + type Library_Type_Type is ("relocatable", "static", "static-pic"); - type Mode_Type is ("distrib", "debug", "optimize", "profile"); - Mode : Mode_Type := external ("MODE", "debug"); + type Build_Type is ("distrib", "debug", "optimize", "profile", "coverage"); + Mode : Build_Type := external ("BUILD", "debug"); - Coverage : Yes_No := External ("COVERAGE", "no"); Processors := External ("PROCESSORS", "1"); package Builder is case Mode is - when "debug" => + when "debug" => for Default_Switches ("Ada") use ("-g", "-j" & Processors); when others => for Default_Switches ("Ada") use ("-g", "-O2", "-j" & Processors); @@ -29,7 +28,12 @@ abstract project Config is when "debug" => for Default_Switches ("Ada") use defaults & warnings - & ("-gnata", "-gnatVaMI", "-gnaty3abcefhiklmnprstxM99"); + & ("-gnata", "-gnatVaMI", "-gnaty3abcefhiklmnprstxM127"); + + when "coverage" => + for Default_Switches ("Ada") use defaults & warnings + & ("-gnata", "-gnatVaMI", "-gnaty3abcefhiklmnprstxM127", + "-fprofile-arcs", "-ftest-coverage"); when "optimize" => for Default_Switches ("Ada") use defaults & warnings @@ -37,13 +41,7 @@ abstract project Config is when "profile" => for Default_Switches ("Ada") use defaults & warnings & ("-pg"); - end case; - case Coverage is - when "yes" => - for Default_Switches ("ada") use Compiler'Default_Switches ("Ada") & - ("-fprofile-arcs", "-ftest-coverage"); - when others => end case; end compiler; @@ -69,18 +67,15 @@ abstract project Config is when "optimize" => for Default_Switches ("Ada") use ("-Wl,--gc-sections"); + when "coverage" => + for Default_Switches ("ada") use ("-fprofile-arcs"); + when others => null; end case; - case Coverage is - when "yes" => - for Default_Switches ("ada") use Linker'Default_Switches ("ada") & - ("-fprofile-arcs"); - when others => - end case; - end linker; - + end linker; + package Ide is for VCS_Kind use "git"; end Ide; diff --git a/modules/openapi-generator/src/main/resources/Ada/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/Ada/licenseInfo.mustache index 3508727b17c..df913f4d712 100644 --- a/modules/openapi-generator/src/main/resources/Ada/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/licenseInfo.mustache @@ -2,7 +2,7 @@ -- {{{appDescription}}} -- -- {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} --- {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} +--{{#infoEmail}} Contact: {{{infoEmail}}}{{/infoEmail}} -- -- NOTE: This package is auto generated by OpenAPI-Generator {{{generatorVersion}}}. -- https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/Ada/model-body.mustache b/modules/openapi-generator/src/main/resources/Ada/model-body.mustache index 4c744def310..fafae8dbf8a 100644 --- a/modules/openapi-generator/src/main/resources/Ada/model-body.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/model-body.mustache @@ -1,6 +1,9 @@ {{>licenseInfo}} package body {{package}}.Models is + pragma Style_Checks ("-mr"); + + pragma Warnings (Off, "*use clause for package*"); use Swagger.Streams; diff --git a/modules/openapi-generator/src/main/resources/Ada/model-spec.mustache b/modules/openapi-generator/src/main/resources/Ada/model-spec.mustache index a29428e2df7..3852b0767e4 100644 --- a/modules/openapi-generator/src/main/resources/Ada/model-spec.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/model-spec.mustache @@ -4,6 +4,7 @@ with Swagger.Streams; with Ada.Containers.Vectors; package {{package}}.Models is + pragma Style_Checks ("-mr"); {{#orderedModels}}{{#model}}{{^isArray}} {{#title}} -- ------------------------------ diff --git a/modules/openapi-generator/src/main/resources/Ada/server-skeleton-body.mustache b/modules/openapi-generator/src/main/resources/Ada/server-skeleton-body.mustache index d332d31d217..b24ba9815da 100644 --- a/modules/openapi-generator/src/main/resources/Ada/server-skeleton-body.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/server-skeleton-body.mustache @@ -1,7 +1,12 @@ {{>licenseInfo}} +pragma Warnings (Off, "*is not referenced"); with Swagger.Streams; with Swagger.Servers.Operation; package body {{package}}.Skeletons is + pragma Style_Checks ("-mr"); + pragma Warnings (Off, "*use clause for package*"); + + use Swagger.Streams; package body Skeleton is @@ -58,7 +63,7 @@ package body {{package}}.Skeletons is {{#hasParams}} {{#hasBodyParam}} Swagger.Servers.Read (Req, Input); - {{#bodyParams}}{{#vendorExtensions.x-is-model-type}} +{{#bodyParams}}{{#vendorExtensions.x-is-model-type}} {{package}}.Models.Deserialize (Input, "{{baseName}}", {{paramName}});{{/vendorExtensions.x-is-model-type}}{{^vendorExtensions.x-is-model-type}}{{#isFile}} -- TODO: Serialize (Input.Stream, "{{basename}}", {{paramName}});{{/isFile}}{{^isFile}}{{^isLong}} Deserialize (Input, "{{baseName}}", {{paramName}});{{/isLong}}{{#isLong}} diff --git a/modules/openapi-generator/src/main/resources/Ada/server-skeleton-spec.mustache b/modules/openapi-generator/src/main/resources/Ada/server-skeleton-spec.mustache index 20a1a18f273..d266f3b3dd2 100644 --- a/modules/openapi-generator/src/main/resources/Ada/server-skeleton-spec.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/server-skeleton-spec.mustache @@ -1,10 +1,14 @@ {{>licenseInfo}} {{#imports}}with {{import}}; {{/imports}} +pragma Warnings (Off, "*is not referenced"); +pragma Warnings (Off, "*no entities of*are referenced"); with Swagger.Servers; with {{package}}.Models; with Security.Permissions; package {{package}}.Skeletons is + pragma Style_Checks ("-mr"); + pragma Warnings (Off, "*use clause for package*"); use {{package}}.Models; type Server_Type is limited interface; {{#authMethods}}{{#scopes}} diff --git a/modules/openapi-generator/src/main/resources/Ada/server-spec.mustache b/modules/openapi-generator/src/main/resources/Ada/server-spec.mustache index 3344038a792..7b08b6cd046 100644 --- a/modules/openapi-generator/src/main/resources/Ada/server-spec.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/server-spec.mustache @@ -15,6 +15,7 @@ with Swagger.Servers; with {{package}}.Models; with {{package}}.Skeletons; package {{package}}.Servers is + pragma Warnings (Off, "*use clause for package*"); use {{package}}.Models; type Server_Type is limited new {{package}}.Skeletons.Server_Type with null record; From ef9e8b71817fa9f4e3a1f77bdaec80784ce43960 Mon Sep 17 00:00:00 2001 From: cal Date: Mon, 8 Feb 2021 04:50:21 +0100 Subject: [PATCH 26/44] refactor: erefactor/AutoRefactor - Annotation (#8544) AutoRefactor cleanup 'AnnotationCleanUp' applied by erefactor: Simplifies annotation uses: - empty parentheses will be removed from annotations, - single members named "value" will be removed from annotations and only the value will be left. For AutoRefactor see https://github.com/JnRouvignac/AutoRefactor For erefactor see https://github.com/cal101/erefactor --- .../org/openapitools/codegen/api/TemplatingGenerator.java | 2 +- .../codegen/online/configuration/HomeController.java | 2 +- .../codegen/languages/FsharpFunctionsServerCodegen.java | 2 +- .../codegen/languages/FsharpGiraffeServerCodegen.java | 2 +- .../codegen/java/jaxrs/JavaJAXRSCXFExtServerCodegenTest.java | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/TemplatingGenerator.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/TemplatingGenerator.java index 30927307e96..86f306a790b 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/TemplatingGenerator.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/TemplatingGenerator.java @@ -24,7 +24,7 @@ package org.openapitools.codegen.api; * * @deprecated as of 5.0, replaced by {@link TemplatingExecutor}. */ -@Deprecated() +@Deprecated public interface TemplatingGenerator extends TemplatingExecutor { } diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/HomeController.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/HomeController.java index 4d38f5aa116..e1e10377ca6 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/HomeController.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/HomeController.java @@ -25,7 +25,7 @@ import org.springframework.web.bind.annotation.RequestMapping; */ @Controller public class HomeController { - @RequestMapping(value = "/") + @RequestMapping("/") public String index() { return "redirect:index.html"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpFunctionsServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpFunctionsServerCodegen.java index 9d30ab7434d..4d732dbea8c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpFunctionsServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpFunctionsServerCodegen.java @@ -155,7 +155,7 @@ public class FsharpFunctionsServerCodegen extends AbstractFSharpCodegen { return outputFolder + File.separator + sourceFolder + File.separator + "impl"; } - @Override() + @Override public String toModelImport(String name) { return packageName + "." + modelPackage() + "." + name; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpGiraffeServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpGiraffeServerCodegen.java index 9985f428bff..d8d4f7fa3df 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpGiraffeServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpGiraffeServerCodegen.java @@ -229,7 +229,7 @@ public class FsharpGiraffeServerCodegen extends AbstractFSharpCodegen { return outputFolder + File.separator + sourceFolder + File.separator + "impl"; } - @Override() + @Override public String toModelImport(String name) { return packageName + "." + modelPackage() + "." + name; } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSCXFExtServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSCXFExtServerCodegenTest.java index 03b472b2212..0c040954612 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSCXFExtServerCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSCXFExtServerCodegenTest.java @@ -368,7 +368,7 @@ public class JavaJAXRSCXFExtServerCodegenTest extends JavaJaxrsBaseTest { assertEquals(testerCodegen.getTestDataControlFile(), new File(curdir, "my/test-data-control.json")); } - @Test() + @Test public void testGenerateOperationBodyWithCodedTestData() throws Exception { File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); output.deleteOnExit(); @@ -412,7 +412,7 @@ public class JavaJAXRSCXFExtServerCodegenTest extends JavaJaxrsBaseTest { checkFile(Paths.get(outputPath + "/test-data-control.json"), false); } - @Test() + @Test public void testGenerateOperationBodyWithJsonTestData() throws Exception { File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); output.deleteOnExit(); From 75b987104bcaa2f775010721579acb95e51a0b3e Mon Sep 17 00:00:00 2001 From: Troy P Date: Sun, 7 Feb 2021 21:27:59 -0800 Subject: [PATCH 27/44] [JS] the replace statement in parseDate is too greedy (#8632) (#8633) * updated the regex used in the String.replace for parseDate() to more precisely target ISO-8601 * added the replace function call to the ES6 mustache file --- .../src/main/resources/Javascript/ApiClient.mustache | 2 +- .../src/main/resources/Javascript/es6/ApiClient.mustache | 2 +- samples/client/petstore/javascript-es6/src/ApiClient.js | 2 +- samples/client/petstore/javascript-promise-es6/src/ApiClient.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Javascript/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Javascript/ApiClient.mustache index 3c1751b70a5..49f0c1f17e0 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/ApiClient.mustache @@ -576,7 +576,7 @@ */ {{/emitJSDoc}} exports.parseDate = function(str) { if (isNaN(str)) { - return new Date(str.replace(/T/i, ' ')); + return new Date(str.replace(/(\d)(T)(\d)/i, '$1 $3')); } return new Date(+str); }; diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Javascript/es6/ApiClient.mustache index a226cfc08aa..35325e5276d 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/es6/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/es6/ApiClient.mustache @@ -556,7 +556,7 @@ class ApiClient { */{{/emitJSDoc}} static parseDate(str) { if (isNaN(str)) { - return new Date(str); + return new Date(str.replace(/(\d)(T)(\d)/i, '$1 $3')); } return new Date(+str); } diff --git a/samples/client/petstore/javascript-es6/src/ApiClient.js b/samples/client/petstore/javascript-es6/src/ApiClient.js index dffe9dda22f..e21c4712f59 100644 --- a/samples/client/petstore/javascript-es6/src/ApiClient.js +++ b/samples/client/petstore/javascript-es6/src/ApiClient.js @@ -512,7 +512,7 @@ class ApiClient { */ static parseDate(str) { if (isNaN(str)) { - return new Date(str); + return new Date(str.replace(/(\d)(T)(\d)/i, '$1 $3')); } return new Date(+str); } diff --git a/samples/client/petstore/javascript-promise-es6/src/ApiClient.js b/samples/client/petstore/javascript-promise-es6/src/ApiClient.js index c1143615624..49869fffe92 100644 --- a/samples/client/petstore/javascript-promise-es6/src/ApiClient.js +++ b/samples/client/petstore/javascript-promise-es6/src/ApiClient.js @@ -513,7 +513,7 @@ class ApiClient { */ static parseDate(str) { if (isNaN(str)) { - return new Date(str); + return new Date(str.replace(/(\d)(T)(\d)/i, '$1 $3')); } return new Date(+str); } From d57aa95b801756f414de6ccf3284ee012b3ad780 Mon Sep 17 00:00:00 2001 From: kalinjul <63105571+kalinjul@users.noreply.github.com> Date: Mon, 8 Feb 2021 06:31:21 +0100 Subject: [PATCH 28/44] Replace deprecated import for kotlin Parcelize annotation (#8590) * replace deprecated import * update kotlin version to 1.4.20, add kotlin-parcelize plugin * update samples to gradle 6.8.1 * Revert "update samples to gradle 6.8.1" This reverts commit 2f9bbe804f370eaf7a8d83edf51b7b2e2ccf74c3. * Revert "update kotlin version to 1.4.20, add kotlin-parcelize plugin" This reverts commit 5063141c0c91205538e8bda59671d4a9b31da2ff. * Add kotlin-parcelize plugin for kotlin-client --- .../src/main/resources/kotlin-client/build.gradle.mustache | 3 +++ .../src/main/resources/kotlin-client/data_class.mustache | 2 +- .../src/main/resources/kotlin-server/data_class.mustache | 2 +- .../src/main/resources/kotlin-vertx-server/data_class.mustache | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache index a81f05ba352..43730dc02e6 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache @@ -33,6 +33,9 @@ apply plugin: 'kotlin' {{#moshiCodeGen}} apply plugin: 'kotlin-kapt' {{/moshiCodeGen}} +{{#parcelizeModels}} +apply plugin: 'kotlin-parcelize' +{{/parcelizeModels}} repositories { maven { url "https://repo1.maven.org/maven2" } diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache index 3cf85565431..2dd048a74f5 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache @@ -17,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo {{/jackson}} {{#parcelizeModels}} import android.os.Parcelable -import kotlinx.android.parcel.Parcelize +import kotlinx.parcelize.Parcelize {{/parcelizeModels}} {{/multiplatform}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/data_class.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/data_class.mustache index 6c251cee2a6..d9e9d591b7b 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/data_class.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/data_class.mustache @@ -1,6 +1,6 @@ {{#parcelizeModels}} import android.os.Parcelable -import kotlinx.android.parcel.Parcelize +import kotlinx.parcelize.Parcelize {{/parcelizeModels}} {{#serializableModel}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/data_class.mustache b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/data_class.mustache index 74aa6aa1f26..67a6a37c7e0 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/data_class.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/data_class.mustache @@ -1,7 +1,7 @@ {{#parcelizeModels}} import android.os.Parcelable -import kotlinx.android.parcel.Parcelize +import kotlinx.parcelize.Parcelize {{/parcelizeModels}} import com.google.gson.annotations.SerializedName import com.fasterxml.jackson.annotation.JsonIgnoreProperties From d4c76df79f3dffef3ea22a1cd0cb8da5ab96e106 Mon Sep 17 00:00:00 2001 From: Jamie Gaskins Date: Mon, 8 Feb 2021 06:02:55 -0500 Subject: [PATCH 29/44] Fix syntax errors and method calls in code generated by Crystal client generator (#8644) * Fix string interpolation * Fix syntax error and s/include\?/includes\?/ * Fix more `.include?` and `.key?` calls * update samples Co-authored-by: William Cheng --- .../src/main/resources/crystal/api.mustache | 6 +++--- .../src/main/resources/crystal/api_client.mustache | 2 +- .../resources/crystal/api_client_faraday_partial.mustache | 2 +- .../resources/crystal/api_client_typhoeus_partial.mustache | 2 +- .../src/main/resources/crystal/base_object.mustache | 4 ++-- .../src/main/resources/crystal/configuration.mustache | 6 +++--- .../main/resources/crystal/partial_model_generic.mustache | 4 ++-- .../main/resources/crystal/partial_oneof_module.mustache | 2 +- samples/client/petstore/crystal/src/petstore/api_client.cr | 2 +- .../client/petstore/crystal/src/petstore/configuration.cr | 6 +++--- .../petstore/crystal/src/petstore/models/api_response.cr | 4 ++-- .../client/petstore/crystal/src/petstore/models/category.cr | 4 ++-- .../client/petstore/crystal/src/petstore/models/order.cr | 6 +++--- samples/client/petstore/crystal/src/petstore/models/pet.cr | 6 +++--- samples/client/petstore/crystal/src/petstore/models/tag.cr | 4 ++-- samples/client/petstore/crystal/src/petstore/models/user.cr | 4 ++-- 16 files changed, 32 insertions(+), 32 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/crystal/api.mustache b/modules/openapi-generator/src/main/resources/crystal/api.mustache index 550f017c4c6..8b8daabb5f3 100644 --- a/modules/openapi-generator/src/main/resources/crystal/api.mustache +++ b/modules/openapi-generator/src/main/resources/crystal/api.mustache @@ -55,7 +55,7 @@ module {{moduleName}} {{^isContainer}} # verify enum value allowable_values = [{{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}}] - if @api_client.config.client_side_validation && !allowable_values.include?({{{paramName}}}) + if @api_client.config.client_side_validation && !allowable_values.includes?({{{paramName}}}) raise ArgumentError.new("invalid value for \"{{{paramName}}}\", must be one of #{allowable_values}") end {{/isContainer}} @@ -66,13 +66,13 @@ module {{moduleName}} {{#isEnum}} {{#collectionFormat}} allowable_values = [{{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}}] - if @api_client.config.client_side_validation && {{{paramName}}} && {{{paramName}}}.all? { |item| allowable_values.include?(item) } + if @api_client.config.client_side_validation && {{{paramName}}} && {{{paramName}}}.all? { |item| allowable_values.includes?(item) } raise ArgumentError.new("invalid value for \"{{{paramName}}}\", must include one of #{allowable_values}") end {{/collectionFormat}} {{^collectionFormat}} allowable_values = [{{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}}] - if @api_client.config.client_side_validation && {{{paramName}}} && !allowable_values.include?({{{paramName}}}]) + if @api_client.config.client_side_validation && {{{paramName}}} && !allowable_values.includes?({{{paramName}}}) raise ArgumentError.new("invalid value for \"{{{paramName}}}\", must be one of #{allowable_values}") end {{/collectionFormat}} diff --git a/modules/openapi-generator/src/main/resources/crystal/api_client.mustache b/modules/openapi-generator/src/main/resources/crystal/api_client.mustache index 5352175b00e..6831e51bae0 100644 --- a/modules/openapi-generator/src/main/resources/crystal/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/crystal/api_client.mustache @@ -342,7 +342,7 @@ module {{moduleName}} :verbose => @config.debugging } - if [:post, :patch, :put, :delete].include?(http_method) + if [:post, :patch, :put, :delete].includes?(http_method) req_body = build_request_body(header_params, form_params, opts[:body]) req_opts.update body: req_body if @config.debugging diff --git a/modules/openapi-generator/src/main/resources/crystal/api_client_faraday_partial.mustache b/modules/openapi-generator/src/main/resources/crystal/api_client_faraday_partial.mustache index dfef217e037..d1782b5e348 100644 --- a/modules/openapi-generator/src/main/resources/crystal/api_client_faraday_partial.mustache +++ b/modules/openapi-generator/src/main/resources/crystal/api_client_faraday_partial.mustache @@ -81,7 +81,7 @@ :verbose => @config.debugging } - if [:post, :patch, :put, :delete].include?(http_method) + if [:post, :patch, :put, :delete].includes?(http_method) req_body = build_request_body(header_params, form_params, opts[:body]) req_opts.update body: req_body if @config.debugging diff --git a/modules/openapi-generator/src/main/resources/crystal/api_client_typhoeus_partial.mustache b/modules/openapi-generator/src/main/resources/crystal/api_client_typhoeus_partial.mustache index d8e95e77461..e076e92c9fd 100644 --- a/modules/openapi-generator/src/main/resources/crystal/api_client_typhoeus_partial.mustache +++ b/modules/openapi-generator/src/main/resources/crystal/api_client_typhoeus_partial.mustache @@ -73,7 +73,7 @@ # set custom cert, if provided req_opts[:cainfo] = @config.ssl_ca_cert if @config.ssl_ca_cert - if [:post, :patch, :put, :delete].include?(http_method) + if [:post, :patch, :put, :delete].includes?(http_method) req_body = build_request_body(header_params, form_params, opts[:body]) req_opts.update body: req_body if @config.debugging diff --git a/modules/openapi-generator/src/main/resources/crystal/base_object.mustache b/modules/openapi-generator/src/main/resources/crystal/base_object.mustache index c7abd09b36b..22dafd41120 100644 --- a/modules/openapi-generator/src/main/resources/crystal/base_object.mustache +++ b/modules/openapi-generator/src/main/resources/crystal/base_object.mustache @@ -14,7 +14,7 @@ super(attributes) {{/parent}} self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + if !attributes[self.class.attribute_map[key]]? && self.class.openapi_nullable.includes?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute @@ -92,7 +92,7 @@ self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) + is_nullable = self.class.openapi_nullable.includes?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end diff --git a/modules/openapi-generator/src/main/resources/crystal/configuration.mustache b/modules/openapi-generator/src/main/resources/crystal/configuration.mustache index a3a815fc042..7111ba75e75 100644 --- a/modules/openapi-generator/src/main/resources/crystal/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/crystal/configuration.mustache @@ -334,12 +334,12 @@ module {{moduleName}} server = servers[index] url = server[:url] - return url unless server.key? :variables + return url unless server.has_key? :variables # go through variable and assign a value server[:variables].each do |name, variable| - if variables.key?(name) - if (!server[:variables][name].key?(:enum_values) || server[:variables][name][:enum_values].include?(variables[name])) + if variables.has_key?(name) + if (!server[:variables][name].has_key?(:enum_values) || server[:variables][name][:enum_values].includes?(variables[name])) url.gsub! "{" + name.to_s + "}", variables[name] else raise ArgumentError.new("The variable `#{name}` in the server URL has invalid value #{variables[name]}. Must be #{server[:variables][name][:enum_values]}.") diff --git a/modules/openapi-generator/src/main/resources/crystal/partial_model_generic.mustache b/modules/openapi-generator/src/main/resources/crystal/partial_model_generic.mustache index 18f00b1d529..c36181c48dc 100644 --- a/modules/openapi-generator/src/main/resources/crystal/partial_model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/crystal/partial_model_generic.mustache @@ -30,7 +30,7 @@ end def valid?(value) - !value || allowable_values.include?(value) + !value || allowable_values.includes?(value) end end @@ -225,7 +225,7 @@ {{/isNullable}} {{#maxLength}} if {{^required}}!{{{name}}}.nil? && {{/required}}{{{name}}}.to_s.length > {{{maxLength}}} - raise ArgumentError.new("invalid value for "{{{name}}}", the character length must be smaller than or equal to {{{maxLength}}}.") + raise ArgumentError.new("invalid value for \"{{{name}}}\", the character length must be smaller than or equal to {{{maxLength}}}.") end {{/maxLength}} diff --git a/modules/openapi-generator/src/main/resources/crystal/partial_oneof_module.mustache b/modules/openapi-generator/src/main/resources/crystal/partial_oneof_module.mustache index 14dc1635bb7..18c0a0cffdb 100644 --- a/modules/openapi-generator/src/main/resources/crystal/partial_oneof_module.mustache +++ b/modules/openapi-generator/src/main/resources/crystal/partial_oneof_module.mustache @@ -75,7 +75,7 @@ end end - openapi_one_of.include?(:AnyType) ? data : nil + openapi_one_of.includes?(:AnyType) ? data : nil {{/discriminator}} end {{^discriminator}} diff --git a/samples/client/petstore/crystal/src/petstore/api_client.cr b/samples/client/petstore/crystal/src/petstore/api_client.cr index b768948f758..4a87147e84d 100644 --- a/samples/client/petstore/crystal/src/petstore/api_client.cr +++ b/samples/client/petstore/crystal/src/petstore/api_client.cr @@ -350,7 +350,7 @@ module Petstore :verbose => @config.debugging } - if [:post, :patch, :put, :delete].include?(http_method) + if [:post, :patch, :put, :delete].includes?(http_method) req_body = build_request_body(header_params, form_params, opts[:body]) req_opts.update body: req_body if @config.debugging diff --git a/samples/client/petstore/crystal/src/petstore/configuration.cr b/samples/client/petstore/crystal/src/petstore/configuration.cr index 380963045b2..ca837b43ed7 100644 --- a/samples/client/petstore/crystal/src/petstore/configuration.cr +++ b/samples/client/petstore/crystal/src/petstore/configuration.cr @@ -249,12 +249,12 @@ module Petstore server = servers[index] url = server[:url] - return url unless server.key? :variables + return url unless server.has_key? :variables # go through variable and assign a value server[:variables].each do |name, variable| - if variables.key?(name) - if (!server[:variables][name].key?(:enum_values) || server[:variables][name][:enum_values].include?(variables[name])) + if variables.has_key?(name) + if (!server[:variables][name].has_key?(:enum_values) || server[:variables][name][:enum_values].includes?(variables[name])) url.gsub! "{" + name.to_s + "}", variables[name] else raise ArgumentError.new("The variable `#{name}` in the server URL has invalid value #{variables[name]}. Must be #{server[:variables][name][:enum_values]}.") diff --git a/samples/client/petstore/crystal/src/petstore/models/api_response.cr b/samples/client/petstore/crystal/src/petstore/models/api_response.cr index f6e71542f7e..60c0a64d975 100644 --- a/samples/client/petstore/crystal/src/petstore/models/api_response.cr +++ b/samples/client/petstore/crystal/src/petstore/models/api_response.cr @@ -78,7 +78,7 @@ module Petstore def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + if !attributes[self.class.attribute_map[key]]? && self.class.openapi_nullable.includes?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute @@ -156,7 +156,7 @@ module Petstore self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) + is_nullable = self.class.openapi_nullable.includes?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end diff --git a/samples/client/petstore/crystal/src/petstore/models/category.cr b/samples/client/petstore/crystal/src/petstore/models/category.cr index 0fab536acb3..33c9acd68cf 100644 --- a/samples/client/petstore/crystal/src/petstore/models/category.cr +++ b/samples/client/petstore/crystal/src/petstore/models/category.cr @@ -90,7 +90,7 @@ module Petstore def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + if !attributes[self.class.attribute_map[key]]? && self.class.openapi_nullable.includes?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute @@ -168,7 +168,7 @@ module Petstore self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) + is_nullable = self.class.openapi_nullable.includes?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end diff --git a/samples/client/petstore/crystal/src/petstore/models/order.cr b/samples/client/petstore/crystal/src/petstore/models/order.cr index 634d33fdae7..0e036a735c3 100644 --- a/samples/client/petstore/crystal/src/petstore/models/order.cr +++ b/samples/client/petstore/crystal/src/petstore/models/order.cr @@ -57,7 +57,7 @@ module Petstore end def valid?(value) - !value || allowable_values.include?(value) + !value || allowable_values.includes?(value) end end @@ -129,7 +129,7 @@ module Petstore def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + if !attributes[self.class.attribute_map[key]]? && self.class.openapi_nullable.includes?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute @@ -207,7 +207,7 @@ module Petstore self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) + is_nullable = self.class.openapi_nullable.includes?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end diff --git a/samples/client/petstore/crystal/src/petstore/models/pet.cr b/samples/client/petstore/crystal/src/petstore/models/pet.cr index d4431c6aa1e..460ca48c902 100644 --- a/samples/client/petstore/crystal/src/petstore/models/pet.cr +++ b/samples/client/petstore/crystal/src/petstore/models/pet.cr @@ -57,7 +57,7 @@ module Petstore end def valid?(value) - !value || allowable_values.include?(value) + !value || allowable_values.includes?(value) end end @@ -139,7 +139,7 @@ module Petstore def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + if !attributes[self.class.attribute_map[key]]? && self.class.openapi_nullable.includes?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute @@ -217,7 +217,7 @@ module Petstore self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) + is_nullable = self.class.openapi_nullable.includes?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end diff --git a/samples/client/petstore/crystal/src/petstore/models/tag.cr b/samples/client/petstore/crystal/src/petstore/models/tag.cr index fa2968a9035..d377ddcdf74 100644 --- a/samples/client/petstore/crystal/src/petstore/models/tag.cr +++ b/samples/client/petstore/crystal/src/petstore/models/tag.cr @@ -73,7 +73,7 @@ module Petstore def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + if !attributes[self.class.attribute_map[key]]? && self.class.openapi_nullable.includes?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute @@ -151,7 +151,7 @@ module Petstore self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) + is_nullable = self.class.openapi_nullable.includes?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end diff --git a/samples/client/petstore/crystal/src/petstore/models/user.cr b/samples/client/petstore/crystal/src/petstore/models/user.cr index d3922e82394..5794e52d4f0 100644 --- a/samples/client/petstore/crystal/src/petstore/models/user.cr +++ b/samples/client/petstore/crystal/src/petstore/models/user.cr @@ -104,7 +104,7 @@ module Petstore def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + if !attributes[self.class.attribute_map[key]]? && self.class.openapi_nullable.includes?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute @@ -182,7 +182,7 @@ module Petstore self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) + is_nullable = self.class.openapi_nullable.includes?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end From e4b31b76011810517589257525eeb36c1fa8887f Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 8 Feb 2021 19:06:19 +0800 Subject: [PATCH 30/44] add sponsorship message in swift5 generator (#8643) --- .../codegen/languages/Swift5ClientCodegen.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java index 796a005260f..a5967578311 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java @@ -1107,4 +1107,16 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig example += ")"; return example; } + + @Override + public void postProcess() { + System.out.println("################################################################################"); + System.out.println("# Thanks for using OpenAPI Generator. #"); + System.out.println("# Please consider donation to help us maintain this project \uD83D\uDE4F #"); + System.out.println("# https://opencollective.com/openapi_generator/donate #"); + System.out.println("# #"); + System.out.println("# swift5 generator is contributed by Bruno Coelho (https://github.com/4brunu). #"); + System.out.println("# Please support his work directly via https://paypal.com/paypalme/4brunu \uD83D\uDE4F #"); + System.out.println("################################################################################"); + } } From 1bff357958a61c4c13f843eb9a55bd8a8508fd7f Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 8 Feb 2021 19:22:09 +0800 Subject: [PATCH 31/44] Fix HTTP Signing authentication in C# .net 5 client (#8645) * fix issues with http signing in .net 5 * add new files * remove comment from yaml --- .../csharp-netcore-OpenAPIClient-net50.yaml | 4 +- .../HttpSigningConfiguration.mustache | 17 +- .../Client/HttpSigningConfiguration.cs | 17 +- .../.openapi-generator/FILES | 145 + .../OpenAPIClient-net5.0/README.md | 131 +- .../docs/AdditionalPropertiesClass.md | 16 + .../OpenAPIClient-net5.0/docs/Animal.md | 10 + .../docs/AnotherFakeApi.md | 79 + .../OpenAPIClient-net5.0/docs/ApiResponse.md | 1 - .../OpenAPIClient-net5.0/docs/Apple.md | 10 + .../OpenAPIClient-net5.0/docs/AppleReq.md | 10 + .../docs/ArrayOfArrayOfNumberOnly.md | 9 + .../docs/ArrayOfNumberOnly.md | 9 + .../OpenAPIClient-net5.0/docs/ArrayTest.md | 11 + .../OpenAPIClient-net5.0/docs/Banana.md | 9 + .../OpenAPIClient-net5.0/docs/BananaReq.md | 10 + .../OpenAPIClient-net5.0/docs/BasquePig.md | 9 + .../docs/Capitalization.md | 14 + .../OpenAPIClient-net5.0/docs/Cat.md | 11 + .../OpenAPIClient-net5.0/docs/CatAllOf.md | 9 + .../OpenAPIClient-net5.0/docs/Category.md | 3 +- .../OpenAPIClient-net5.0/docs/ChildCat.md | 10 + .../docs/ChildCatAllOf.md | 10 + .../OpenAPIClient-net5.0/docs/ClassModel.md | 10 + .../docs/ComplexQuadrilateral.md | 10 + .../OpenAPIClient-net5.0/docs/DanishPig.md | 9 + .../OpenAPIClient-net5.0/docs/DefaultApi.md | 72 + .../OpenAPIClient-net5.0/docs/Dog.md | 11 + .../OpenAPIClient-net5.0/docs/DogAllOf.md | 9 + .../OpenAPIClient-net5.0/docs/Drawing.md | 12 + .../OpenAPIClient-net5.0/docs/EnumArrays.md | 10 + .../OpenAPIClient-net5.0/docs/EnumClass.md | 8 + .../OpenAPIClient-net5.0/docs/EnumTest.md | 16 + .../docs/EquilateralTriangle.md | 10 + .../OpenAPIClient-net5.0/docs/FakeApi.md | 1111 +++++++ .../docs/FakeClassnameTags123Api.md | 84 + .../OpenAPIClient-net5.0/docs/File.md | 10 + .../docs/FileSchemaTestClass.md | 10 + .../OpenAPIClient-net5.0/docs/Foo.md | 9 + .../OpenAPIClient-net5.0/docs/FormatTest.md | 24 + .../OpenAPIClient-net5.0/docs/Fruit.md | 12 + .../OpenAPIClient-net5.0/docs/FruitReq.md | 12 + .../OpenAPIClient-net5.0/docs/GmFruit.md | 12 + .../docs/GrandparentAnimal.md | 9 + .../docs/HasOnlyReadOnly.md | 10 + .../docs/HealthCheckResult.md | 10 + .../docs/InlineResponseDefault.md | 9 + .../docs/IsoscelesTriangle.md | 10 + .../OpenAPIClient-net5.0/docs/List.md | 9 + .../OpenAPIClient-net5.0/docs/Mammal.md | 12 + .../OpenAPIClient-net5.0/docs/MapTest.md | 12 + ...dPropertiesAndAdditionalPropertiesClass.md | 11 + .../docs/Model200Response.md | 11 + .../OpenAPIClient-net5.0/docs/ModelClient.md | 9 + .../OpenAPIClient-net5.0/docs/Name.md | 13 + .../docs/NullableClass.md | 20 + .../docs/NullableShape.md | 11 + .../OpenAPIClient-net5.0/docs/NumberOnly.md | 9 + .../OpenAPIClient-net5.0/docs/Order.md | 1 - .../docs/OuterComposite.md | 11 + .../OpenAPIClient-net5.0/docs/OuterEnum.md | 8 + .../docs/OuterEnumDefaultValue.md | 8 + .../docs/OuterEnumInteger.md | 8 + .../docs/OuterEnumIntegerDefaultValue.md | 8 + .../OpenAPIClient-net5.0/docs/ParentPet.md | 9 + .../OpenAPIClient-net5.0/docs/Pet.md | 1 - .../OpenAPIClient-net5.0/docs/PetApi.md | 122 +- .../OpenAPIClient-net5.0/docs/Pig.md | 9 + .../docs/Quadrilateral.md | 10 + .../docs/QuadrilateralInterface.md | 9 + .../docs/ReadOnlyFirst.md | 10 + .../OpenAPIClient-net5.0/docs/Return.md | 10 + .../docs/ScaleneTriangle.md | 10 + .../OpenAPIClient-net5.0/docs/Shape.md | 10 + .../docs/ShapeInterface.md | 9 + .../OpenAPIClient-net5.0/docs/ShapeOrNull.md | 11 + .../docs/SimpleQuadrilateral.md | 10 + .../docs/SpecialModelName.md | 9 + .../OpenAPIClient-net5.0/docs/StoreApi.md | 14 +- .../OpenAPIClient-net5.0/docs/Tag.md | 1 - .../OpenAPIClient-net5.0/docs/Triangle.md | 10 + .../docs/TriangleInterface.md | 9 + .../OpenAPIClient-net5.0/docs/User.md | 5 +- .../OpenAPIClient-net5.0/docs/UserApi.md | 62 +- .../OpenAPIClient-net5.0/docs/Whale.md | 11 + .../OpenAPIClient-net5.0/docs/Zebra.md | 10 + .../Api/AnotherFakeApiTests.cs | 69 + .../Api/DefaultApiTests.cs | 68 + .../Org.OpenAPITools.Test/Api/FakeApiTests.cs | 258 ++ .../Api/FakeClassnameTags123ApiTests.cs | 69 + .../Model/AdditionalPropertiesClassTests.cs | 126 + .../Model/AnimalTests.cs | 96 + .../Model/AppleReqTests.cs | 78 + .../Org.OpenAPITools.Test/Model/AppleTests.cs | 78 + .../Model/ArrayOfArrayOfNumberOnlyTests.cs | 70 + .../Model/ArrayOfNumberOnlyTests.cs | 70 + .../Model/ArrayTestTests.cs | 86 + .../Model/BananaReqTests.cs | 78 + .../Model/BananaTests.cs | 70 + .../Model/BasquePigTests.cs | 70 + .../Model/CapitalizationTests.cs | 110 + .../Model/CatAllOfTests.cs | 70 + .../Org.OpenAPITools.Test/Model/CatTests.cs | 70 + .../Model/ChildCatAllOfTests.cs | 78 + .../Model/ChildCatTests.cs | 78 + .../Model/ClassModelTests.cs | 70 + .../Model/ComplexQuadrilateralTests.cs | 78 + .../Model/DanishPigTests.cs | 70 + .../Model/DogAllOfTests.cs | 70 + .../Org.OpenAPITools.Test/Model/DogTests.cs | 70 + .../Model/DrawingTests.cs | 94 + .../Model/EnumArraysTests.cs | 78 + .../Model/EnumClassTests.cs | 62 + .../Model/EnumTestTests.cs | 126 + .../Model/EquilateralTriangleTests.cs | 78 + .../Model/FileSchemaTestClassTests.cs | 78 + .../Org.OpenAPITools.Test/Model/FileTests.cs | 70 + .../Org.OpenAPITools.Test/Model/FooTests.cs | 70 + .../Model/FormatTestTests.cs | 190 ++ .../Model/FruitReqTests.cs | 94 + .../Org.OpenAPITools.Test/Model/FruitTests.cs | 94 + .../Model/GmFruitTests.cs | 94 + .../Model/GrandparentAnimalTests.cs | 88 + .../Model/HasOnlyReadOnlyTests.cs | 78 + .../Model/HealthCheckResultTests.cs | 70 + .../Model/InlineResponseDefaultTests.cs | 70 + .../Model/IsoscelesTriangleTests.cs | 78 + .../Org.OpenAPITools.Test/Model/ListTests.cs | 70 + .../Model/MammalTests.cs | 94 + .../Model/MapTestTests.cs | 94 + ...ertiesAndAdditionalPropertiesClassTests.cs | 86 + .../Model/Model200ResponseTests.cs | 78 + .../Model/ModelClientTests.cs | 70 + .../Org.OpenAPITools.Test/Model/NameTests.cs | 94 + .../Model/NullableClassTests.cs | 158 + .../Model/NullableShapeTests.cs | 78 + .../Model/NumberOnlyTests.cs | 70 + .../Model/OuterCompositeTests.cs | 86 + .../Model/OuterEnumDefaultValueTests.cs | 62 + .../OuterEnumIntegerDefaultValueTests.cs | 62 + .../Model/OuterEnumIntegerTests.cs | 62 + .../Model/OuterEnumTests.cs | 62 + .../Model/ParentPetTests.cs | 71 + .../Org.OpenAPITools.Test/Model/PigTests.cs | 70 + .../Model/QuadrilateralInterfaceTests.cs | 70 + .../Model/QuadrilateralTests.cs | 78 + .../Model/ReadOnlyFirstTests.cs | 78 + .../Model/ReturnTests.cs | 70 + .../Model/ScaleneTriangleTests.cs | 78 + .../Model/ShapeInterfaceTests.cs | 70 + .../Model/ShapeOrNullTests.cs | 78 + .../Org.OpenAPITools.Test/Model/ShapeTests.cs | 78 + .../Model/SimpleQuadrilateralTests.cs | 78 + .../Model/SpecialModelNameTests.cs | 70 + .../Model/TriangleInterfaceTests.cs | 70 + .../Model/TriangleTests.cs | 78 + .../Org.OpenAPITools.Test/Model/WhaleTests.cs | 86 + .../Org.OpenAPITools.Test/Model/ZebraTests.cs | 78 + .../Org.OpenAPITools/Api/AnotherFakeApi.cs | 320 ++ .../src/Org.OpenAPITools/Api/DefaultApi.cs | 297 ++ .../src/Org.OpenAPITools/Api/FakeApi.cs | 2951 +++++++++++++++++ .../Api/FakeClassnameTags123Api.cs | 330 ++ .../src/Org.OpenAPITools/Api/PetApi.cs | 418 ++- .../src/Org.OpenAPITools/Api/StoreApi.cs | 18 +- .../src/Org.OpenAPITools/Api/UserApi.cs | 62 +- .../src/Org.OpenAPITools/Client/ApiClient.cs | 2 +- .../Org.OpenAPITools/Client/ApiException.cs | 2 +- .../Org.OpenAPITools/Client/ApiResponse.cs | 2 +- .../Org.OpenAPITools/Client/ClientUtils.cs | 2 +- .../Org.OpenAPITools/Client/Configuration.cs | 82 +- .../Client/ExceptionFactory.cs | 2 +- .../Client/GlobalConfiguration.cs | 2 +- .../src/Org.OpenAPITools/Client/HttpMethod.cs | 2 +- .../Client/HttpSigningConfiguration.cs | 732 ++++ .../Org.OpenAPITools/Client/IApiAccessor.cs | 2 +- .../Client/IAsynchronousClient.cs | 2 +- .../Client/IReadableConfiguration.cs | 7 +- .../Client/ISynchronousClient.cs | 2 +- .../src/Org.OpenAPITools/Client/Multimap.cs | 2 +- .../Client/OpenAPIDateConverter.cs | 2 +- .../Org.OpenAPITools/Client/RequestOptions.cs | 2 +- .../Model/AbstractOpenAPISchema.cs | 2 +- .../Model/AdditionalPropertiesClass.cs | 206 ++ .../src/Org.OpenAPITools/Model/Animal.cs | 163 + .../src/Org.OpenAPITools/Model/ApiResponse.cs | 4 +- .../src/Org.OpenAPITools/Model/Apple.cs | 153 + .../src/Org.OpenAPITools/Model/AppleReq.cs | 134 + .../Model/ArrayOfArrayOfNumberOnly.cs | 128 + .../Model/ArrayOfNumberOnly.cs | 128 + .../src/Org.OpenAPITools/Model/ArrayTest.cs | 150 + .../src/Org.OpenAPITools/Model/Banana.cs | 127 + .../src/Org.OpenAPITools/Model/BananaReq.cs | 132 + .../src/Org.OpenAPITools/Model/BasquePig.cs | 137 + .../Org.OpenAPITools/Model/Capitalization.cs | 184 + .../src/Org.OpenAPITools/Model/Cat.cs | 151 + .../src/Org.OpenAPITools/Model/CatAllOf.cs | 127 + .../src/Org.OpenAPITools/Model/Category.cs | 30 +- .../src/Org.OpenAPITools/Model/ChildCat.cs | 173 + .../Org.OpenAPITools/Model/ChildCatAllOf.cs | 151 + .../src/Org.OpenAPITools/Model/ClassModel.cs | 128 + .../Model/ComplexQuadrilateral.cs | 149 + .../src/Org.OpenAPITools/Model/DanishPig.cs | 137 + .../src/Org.OpenAPITools/Model/Dog.cs | 152 + .../src/Org.OpenAPITools/Model/DogAllOf.cs | 128 + .../src/Org.OpenAPITools/Model/Drawing.cs | 152 + .../src/Org.OpenAPITools/Model/EnumArrays.cs | 176 + .../src/Org.OpenAPITools/Model/EnumClass.cs | 57 + .../src/Org.OpenAPITools/Model/EnumTest.cs | 286 ++ .../Model/EquilateralTriangle.cs | 149 + .../src/Org.OpenAPITools/Model/File.cs | 129 + .../Model/FileSchemaTestClass.cs | 139 + .../src/Org.OpenAPITools/Model/Foo.cs | 129 + .../src/Org.OpenAPITools/Model/FormatTest.cs | 392 +++ .../src/Org.OpenAPITools/Model/Fruit.cs | 285 ++ .../src/Org.OpenAPITools/Model/FruitReq.cs | 294 ++ .../src/Org.OpenAPITools/Model/GmFruit.cs | 263 ++ .../Model/GrandparentAnimal.cs | 151 + .../Org.OpenAPITools/Model/HasOnlyReadOnly.cs | 154 + .../Model/HealthCheckResult.cs | 128 + .../Model/InlineResponseDefault.cs | 128 + .../Model/IsoscelesTriangle.cs | 136 + .../src/Org.OpenAPITools/Model/List.cs | 128 + .../src/Org.OpenAPITools/Model/Mammal.cs | 362 ++ .../src/Org.OpenAPITools/Model/MapTest.cs | 180 + ...dPropertiesAndAdditionalPropertiesClass.cs | 150 + .../Model/Model200Response.cs | 138 + .../src/Org.OpenAPITools/Model/ModelClient.cs | 128 + .../src/Org.OpenAPITools/Model/Name.cs | 180 + .../Org.OpenAPITools/Model/NullableClass.cs | 241 ++ .../Org.OpenAPITools/Model/NullableShape.cs | 320 ++ .../src/Org.OpenAPITools/Model/NumberOnly.cs | 127 + .../src/Org.OpenAPITools/Model/Order.cs | 4 +- .../Org.OpenAPITools/Model/OuterComposite.cs | 148 + .../src/Org.OpenAPITools/Model/OuterEnum.cs | 57 + .../Model/OuterEnumDefaultValue.cs | 57 + .../Model/OuterEnumInteger.cs | 57 + .../Model/OuterEnumIntegerDefaultValue.cs | 57 + .../src/Org.OpenAPITools/Model/ParentPet.cs | 141 + .../src/Org.OpenAPITools/Model/Pet.cs | 4 +- .../src/Org.OpenAPITools/Model/Pig.cs | 311 ++ .../Org.OpenAPITools/Model/Quadrilateral.cs | 311 ++ .../Model/QuadrilateralInterface.cs | 137 + .../Org.OpenAPITools/Model/ReadOnlyFirst.cs | 146 + .../src/Org.OpenAPITools/Model/Return.cs | 127 + .../Org.OpenAPITools/Model/ScaleneTriangle.cs | 149 + .../src/Org.OpenAPITools/Model/Shape.cs | 311 ++ .../Org.OpenAPITools/Model/ShapeInterface.cs | 137 + .../src/Org.OpenAPITools/Model/ShapeOrNull.cs | 320 ++ .../Model/SimpleQuadrilateral.cs | 149 + .../Model/SpecialModelName.cs | 127 + .../src/Org.OpenAPITools/Model/Tag.cs | 4 +- .../src/Org.OpenAPITools/Model/Triangle.cs | 362 ++ .../Model/TriangleInterface.cs | 137 + .../src/Org.OpenAPITools/Model/User.cs | 54 +- .../src/Org.OpenAPITools/Model/Whale.cs | 157 + .../src/Org.OpenAPITools/Model/Zebra.cs | 173 + .../Client/HttpSigningConfiguration.cs | 17 +- .../Client/HttpSigningConfiguration.cs | 17 +- 258 files changed, 25287 insertions(+), 277 deletions(-) create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/AdditionalPropertiesClass.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Animal.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/AnotherFakeApi.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Apple.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/AppleReq.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ArrayOfArrayOfNumberOnly.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ArrayOfNumberOnly.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ArrayTest.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Banana.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/BananaReq.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/BasquePig.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Capitalization.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Cat.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/CatAllOf.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ChildCat.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ChildCatAllOf.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ClassModel.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ComplexQuadrilateral.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/DanishPig.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/DefaultApi.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Dog.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/DogAllOf.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Drawing.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/EnumArrays.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/EnumClass.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/EnumTest.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/EquilateralTriangle.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeApi.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeClassnameTags123Api.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/File.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FileSchemaTestClass.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Foo.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FormatTest.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Fruit.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FruitReq.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/GmFruit.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/GrandparentAnimal.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/HasOnlyReadOnly.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/HealthCheckResult.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/InlineResponseDefault.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/IsoscelesTriangle.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/List.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Mammal.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/MapTest.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/MixedPropertiesAndAdditionalPropertiesClass.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Model200Response.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ModelClient.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Name.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/NullableClass.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/NullableShape.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/NumberOnly.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/OuterComposite.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/OuterEnum.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/OuterEnumDefaultValue.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/OuterEnumInteger.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/OuterEnumIntegerDefaultValue.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ParentPet.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Pig.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Quadrilateral.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/QuadrilateralInterface.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ReadOnlyFirst.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Return.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ScaleneTriangle.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Shape.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ShapeInterface.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ShapeOrNull.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/SimpleQuadrilateral.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/SpecialModelName.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Triangle.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/TriangleInterface.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Whale.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Zebra.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/AnimalTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/AppleReqTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/AppleTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/BananaReqTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/BananaTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/BasquePigTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/CatTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ChildCatAllOfTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/DanishPigTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/DogTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/DrawingTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/FileTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/FooTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/FruitTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/GrandparentAnimalTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/HealthCheckResultTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/InlineResponseDefaultTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ListTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/MammalTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/MapTestTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/NameTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/NullableClassTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/OuterEnumDefaultValueTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerDefaultValueTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ParentPetTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/PigTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/QuadrilateralInterfaceTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ReturnTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ShapeInterfaceTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ShapeTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/TriangleInterfaceTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/TriangleTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/WhaleTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ZebraTests.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/DefaultApi.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/FakeApi.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Animal.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Apple.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/AppleReq.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ArrayTest.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Banana.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/BananaReq.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/BasquePig.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Capitalization.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Cat.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/CatAllOf.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ChildCat.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ChildCatAllOf.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ClassModel.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/DanishPig.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Dog.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/DogAllOf.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Drawing.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/EnumArrays.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/EnumClass.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/EnumTest.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/EquilateralTriangle.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/File.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Foo.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/FormatTest.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Fruit.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/FruitReq.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/GmFruit.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/GrandparentAnimal.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/HealthCheckResult.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/InlineResponseDefault.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/List.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Mammal.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/MapTest.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Model200Response.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ModelClient.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Name.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/NullableClass.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/NullableShape.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/NumberOnly.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/OuterComposite.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/OuterEnum.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/OuterEnumInteger.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ParentPet.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Pig.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Quadrilateral.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Return.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ScaleneTriangle.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Shape.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ShapeInterface.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ShapeOrNull.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/SpecialModelName.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Triangle.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/TriangleInterface.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Whale.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Zebra.cs diff --git a/bin/configs/csharp-netcore-OpenAPIClient-net50.yaml b/bin/configs/csharp-netcore-OpenAPIClient-net50.yaml index 88194beae34..d9320b7b96a 100644 --- a/bin/configs/csharp-netcore-OpenAPIClient-net50.yaml +++ b/bin/configs/csharp-netcore-OpenAPIClient-net50.yaml @@ -1,9 +1,7 @@ # for .net standard generatorName: csharp-netcore outputDir: samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0 -# TODO switch to http signature spec after fixing compilation issues -#inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml -inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml templateDir: modules/openapi-generator/src/main/resources/csharp-netcore additionalProperties: packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/HttpSigningConfiguration.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/HttpSigningConfiguration.mustache index b621c92d6bf..4ddd16be310 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/HttpSigningConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/HttpSigningConfiguration.mustache @@ -329,9 +329,22 @@ namespace {{packageName}}.Client #if (NETCOREAPP3_0 || NETCOREAPP3_1 || NET5_0) var byteCount = 0; - if (configuration.KeyPassPhrase != null) + if (KeyPassPhrase != null) { - ecdsa.ImportEncryptedPkcs8PrivateKey(keyPassPhrase, keyBytes, out byteCount); + IntPtr unmanagedString = IntPtr.Zero; + try + { + // convert secure string to byte array + unmanagedString = Marshal.SecureStringToGlobalAllocUnicode(KeyPassPhrase); + ecdsa.ImportEncryptedPkcs8PrivateKey(Encoding.UTF8.GetBytes(Marshal.PtrToStringUni(unmanagedString)), keyBytes, out byteCount); + } + finally + { + if (unmanagedString != IntPtr.Zero) + { + Marshal.ZeroFreeBSTR(unmanagedString); + } + } } else { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs index 584900d1a30..ba5fdee34d1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs @@ -329,9 +329,22 @@ namespace Org.OpenAPITools.Client #if (NETCOREAPP3_0 || NETCOREAPP3_1 || NET5_0) var byteCount = 0; - if (configuration.KeyPassPhrase != null) + if (KeyPassPhrase != null) { - ecdsa.ImportEncryptedPkcs8PrivateKey(keyPassPhrase, keyBytes, out byteCount); + IntPtr unmanagedString = IntPtr.Zero; + try + { + // convert secure string to byte array + unmanagedString = Marshal.SecureStringToGlobalAllocUnicode(KeyPassPhrase); + ecdsa.ImportEncryptedPkcs8PrivateKey(Encoding.UTF8.GetBytes(Marshal.PtrToStringUni(unmanagedString)), keyBytes, out byteCount); + } + finally + { + if (unmanagedString != IntPtr.Zero) + { + Marshal.ZeroFreeBSTR(unmanagedString); + } + } } else { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/FILES index 60d0f82fefd..d258eb64b2f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/FILES @@ -2,17 +2,93 @@ Org.OpenAPITools.sln README.md appveyor.yml +docs/AdditionalPropertiesClass.md +docs/Animal.md +docs/AnotherFakeApi.md docs/ApiResponse.md +docs/Apple.md +docs/AppleReq.md +docs/ArrayOfArrayOfNumberOnly.md +docs/ArrayOfNumberOnly.md +docs/ArrayTest.md +docs/Banana.md +docs/BananaReq.md +docs/BasquePig.md +docs/Capitalization.md +docs/Cat.md +docs/CatAllOf.md docs/Category.md +docs/ChildCat.md +docs/ChildCatAllOf.md +docs/ClassModel.md +docs/ComplexQuadrilateral.md +docs/DanishPig.md +docs/DefaultApi.md +docs/Dog.md +docs/DogAllOf.md +docs/Drawing.md +docs/EnumArrays.md +docs/EnumClass.md +docs/EnumTest.md +docs/EquilateralTriangle.md +docs/FakeApi.md +docs/FakeClassnameTags123Api.md +docs/File.md +docs/FileSchemaTestClass.md +docs/Foo.md +docs/FormatTest.md +docs/Fruit.md +docs/FruitReq.md +docs/GmFruit.md +docs/GrandparentAnimal.md +docs/HasOnlyReadOnly.md +docs/HealthCheckResult.md +docs/InlineResponseDefault.md +docs/IsoscelesTriangle.md +docs/List.md +docs/Mammal.md +docs/MapTest.md +docs/MixedPropertiesAndAdditionalPropertiesClass.md +docs/Model200Response.md +docs/ModelClient.md +docs/Name.md +docs/NullableClass.md +docs/NullableShape.md +docs/NumberOnly.md docs/Order.md +docs/OuterComposite.md +docs/OuterEnum.md +docs/OuterEnumDefaultValue.md +docs/OuterEnumInteger.md +docs/OuterEnumIntegerDefaultValue.md +docs/ParentPet.md docs/Pet.md docs/PetApi.md +docs/Pig.md +docs/Quadrilateral.md +docs/QuadrilateralInterface.md +docs/ReadOnlyFirst.md +docs/Return.md +docs/ScaleneTriangle.md +docs/Shape.md +docs/ShapeInterface.md +docs/ShapeOrNull.md +docs/SimpleQuadrilateral.md +docs/SpecialModelName.md docs/StoreApi.md docs/Tag.md +docs/Triangle.md +docs/TriangleInterface.md docs/User.md docs/UserApi.md +docs/Whale.md +docs/Zebra.md git_push.sh src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +src/Org.OpenAPITools/Api/AnotherFakeApi.cs +src/Org.OpenAPITools/Api/DefaultApi.cs +src/Org.OpenAPITools/Api/FakeApi.cs +src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs src/Org.OpenAPITools/Api/PetApi.cs src/Org.OpenAPITools/Api/StoreApi.cs src/Org.OpenAPITools/Api/UserApi.cs @@ -24,6 +100,7 @@ src/Org.OpenAPITools/Client/Configuration.cs src/Org.OpenAPITools/Client/ExceptionFactory.cs src/Org.OpenAPITools/Client/GlobalConfiguration.cs src/Org.OpenAPITools/Client/HttpMethod.cs +src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs src/Org.OpenAPITools/Client/IApiAccessor.cs src/Org.OpenAPITools/Client/IAsynchronousClient.cs src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -33,10 +110,78 @@ src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs src/Org.OpenAPITools/Client/RequestOptions.cs src/Org.OpenAPITools/Client/RetryConfiguration.cs src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs +src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +src/Org.OpenAPITools/Model/Animal.cs src/Org.OpenAPITools/Model/ApiResponse.cs +src/Org.OpenAPITools/Model/Apple.cs +src/Org.OpenAPITools/Model/AppleReq.cs +src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +src/Org.OpenAPITools/Model/ArrayTest.cs +src/Org.OpenAPITools/Model/Banana.cs +src/Org.OpenAPITools/Model/BananaReq.cs +src/Org.OpenAPITools/Model/BasquePig.cs +src/Org.OpenAPITools/Model/Capitalization.cs +src/Org.OpenAPITools/Model/Cat.cs +src/Org.OpenAPITools/Model/CatAllOf.cs src/Org.OpenAPITools/Model/Category.cs +src/Org.OpenAPITools/Model/ChildCat.cs +src/Org.OpenAPITools/Model/ChildCatAllOf.cs +src/Org.OpenAPITools/Model/ClassModel.cs +src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +src/Org.OpenAPITools/Model/DanishPig.cs +src/Org.OpenAPITools/Model/Dog.cs +src/Org.OpenAPITools/Model/DogAllOf.cs +src/Org.OpenAPITools/Model/Drawing.cs +src/Org.OpenAPITools/Model/EnumArrays.cs +src/Org.OpenAPITools/Model/EnumClass.cs +src/Org.OpenAPITools/Model/EnumTest.cs +src/Org.OpenAPITools/Model/EquilateralTriangle.cs +src/Org.OpenAPITools/Model/File.cs +src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +src/Org.OpenAPITools/Model/Foo.cs +src/Org.OpenAPITools/Model/FormatTest.cs +src/Org.OpenAPITools/Model/Fruit.cs +src/Org.OpenAPITools/Model/FruitReq.cs +src/Org.OpenAPITools/Model/GmFruit.cs +src/Org.OpenAPITools/Model/GrandparentAnimal.cs +src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +src/Org.OpenAPITools/Model/HealthCheckResult.cs +src/Org.OpenAPITools/Model/InlineResponseDefault.cs +src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +src/Org.OpenAPITools/Model/List.cs +src/Org.OpenAPITools/Model/Mammal.cs +src/Org.OpenAPITools/Model/MapTest.cs +src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +src/Org.OpenAPITools/Model/Model200Response.cs +src/Org.OpenAPITools/Model/ModelClient.cs +src/Org.OpenAPITools/Model/Name.cs +src/Org.OpenAPITools/Model/NullableClass.cs +src/Org.OpenAPITools/Model/NullableShape.cs +src/Org.OpenAPITools/Model/NumberOnly.cs src/Org.OpenAPITools/Model/Order.cs +src/Org.OpenAPITools/Model/OuterComposite.cs +src/Org.OpenAPITools/Model/OuterEnum.cs +src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs +src/Org.OpenAPITools/Model/OuterEnumInteger.cs +src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs +src/Org.OpenAPITools/Model/ParentPet.cs src/Org.OpenAPITools/Model/Pet.cs +src/Org.OpenAPITools/Model/Pig.cs +src/Org.OpenAPITools/Model/Quadrilateral.cs +src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +src/Org.OpenAPITools/Model/Return.cs +src/Org.OpenAPITools/Model/ScaleneTriangle.cs +src/Org.OpenAPITools/Model/Shape.cs +src/Org.OpenAPITools/Model/ShapeInterface.cs +src/Org.OpenAPITools/Model/ShapeOrNull.cs +src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +src/Org.OpenAPITools/Model/SpecialModelName.cs src/Org.OpenAPITools/Model/Tag.cs +src/Org.OpenAPITools/Model/Triangle.cs +src/Org.OpenAPITools/Model/TriangleInterface.cs src/Org.OpenAPITools/Model/User.cs +src/Org.OpenAPITools/Model/Whale.cs +src/Org.OpenAPITools/Model/Zebra.cs src/Org.OpenAPITools/Org.OpenAPITools.csproj diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/README.md index fe99cf17868..cd422fe287d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/README.md @@ -1,6 +1,6 @@ # Org.OpenAPITools - the C# library for the OpenAPI Petstore -This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: @@ -85,22 +85,19 @@ namespace Example { Configuration config = new Configuration(); - config.BasePath = "http://petstore.swagger.io/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - config.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(config); - var pet = new Pet(); // Pet | Pet object that needs to be added to the store + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new AnotherFakeApi(config); + var modelClient = new ModelClient(); // ModelClient | client model try { - // Add a new pet to the store - Pet result = apiInstance.AddPet(pet); + // To test special tags + ModelClient result = apiInstance.Call123TestSpecialTags(modelClient); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling PetApi.AddPet: " + e.Message ); + Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -113,10 +110,28 @@ namespace Example ## Documentation for API Endpoints -All URIs are relative to *http://petstore.swagger.io/v2* +All URIs are relative to *http://petstore.swagger.io:80/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*AnotherFakeApi* | [**Call123TestSpecialTags**](docs/AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags +*DefaultApi* | [**FooGet**](docs/DefaultApi.md#fooget) | **GET** /foo | +*FakeApi* | [**FakeHealthGet**](docs/FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint +*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | +*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | +*FakeApi* | [**GetArrayOfEnums**](docs/FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums +*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters +*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-paramters | +*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case *PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store *PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet *PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status @@ -125,9 +140,10 @@ Class | Method | HTTP request | Description *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID *StoreApi* | [**PlaceOrder**](docs/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet *UserApi* | [**CreateUser**](docs/UserApi.md#createuser) | **POST** /user | Create user *UserApi* | [**CreateUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array @@ -142,12 +158,80 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [Model.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [Model.Animal](docs/Animal.md) - [Model.ApiResponse](docs/ApiResponse.md) + - [Model.Apple](docs/Apple.md) + - [Model.AppleReq](docs/AppleReq.md) + - [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) + - [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) + - [Model.ArrayTest](docs/ArrayTest.md) + - [Model.Banana](docs/Banana.md) + - [Model.BananaReq](docs/BananaReq.md) + - [Model.BasquePig](docs/BasquePig.md) + - [Model.Capitalization](docs/Capitalization.md) + - [Model.Cat](docs/Cat.md) + - [Model.CatAllOf](docs/CatAllOf.md) - [Model.Category](docs/Category.md) + - [Model.ChildCat](docs/ChildCat.md) + - [Model.ChildCatAllOf](docs/ChildCatAllOf.md) + - [Model.ClassModel](docs/ClassModel.md) + - [Model.ComplexQuadrilateral](docs/ComplexQuadrilateral.md) + - [Model.DanishPig](docs/DanishPig.md) + - [Model.Dog](docs/Dog.md) + - [Model.DogAllOf](docs/DogAllOf.md) + - [Model.Drawing](docs/Drawing.md) + - [Model.EnumArrays](docs/EnumArrays.md) + - [Model.EnumClass](docs/EnumClass.md) + - [Model.EnumTest](docs/EnumTest.md) + - [Model.EquilateralTriangle](docs/EquilateralTriangle.md) + - [Model.File](docs/File.md) + - [Model.FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [Model.Foo](docs/Foo.md) + - [Model.FormatTest](docs/FormatTest.md) + - [Model.Fruit](docs/Fruit.md) + - [Model.FruitReq](docs/FruitReq.md) + - [Model.GmFruit](docs/GmFruit.md) + - [Model.GrandparentAnimal](docs/GrandparentAnimal.md) + - [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [Model.HealthCheckResult](docs/HealthCheckResult.md) + - [Model.InlineResponseDefault](docs/InlineResponseDefault.md) + - [Model.IsoscelesTriangle](docs/IsoscelesTriangle.md) + - [Model.List](docs/List.md) + - [Model.Mammal](docs/Mammal.md) + - [Model.MapTest](docs/MapTest.md) + - [Model.MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) + - [Model.Model200Response](docs/Model200Response.md) + - [Model.ModelClient](docs/ModelClient.md) + - [Model.Name](docs/Name.md) + - [Model.NullableClass](docs/NullableClass.md) + - [Model.NullableShape](docs/NullableShape.md) + - [Model.NumberOnly](docs/NumberOnly.md) - [Model.Order](docs/Order.md) + - [Model.OuterComposite](docs/OuterComposite.md) + - [Model.OuterEnum](docs/OuterEnum.md) + - [Model.OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md) + - [Model.OuterEnumInteger](docs/OuterEnumInteger.md) + - [Model.OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) + - [Model.ParentPet](docs/ParentPet.md) - [Model.Pet](docs/Pet.md) + - [Model.Pig](docs/Pig.md) + - [Model.Quadrilateral](docs/Quadrilateral.md) + - [Model.QuadrilateralInterface](docs/QuadrilateralInterface.md) + - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [Model.Return](docs/Return.md) + - [Model.ScaleneTriangle](docs/ScaleneTriangle.md) + - [Model.Shape](docs/Shape.md) + - [Model.ShapeInterface](docs/ShapeInterface.md) + - [Model.ShapeOrNull](docs/ShapeOrNull.md) + - [Model.SimpleQuadrilateral](docs/SimpleQuadrilateral.md) + - [Model.SpecialModelName](docs/SpecialModelName.md) - [Model.Tag](docs/Tag.md) + - [Model.Triangle](docs/Triangle.md) + - [Model.TriangleInterface](docs/TriangleInterface.md) - [Model.User](docs/User.md) + - [Model.Whale](docs/Whale.md) + - [Model.Zebra](docs/Zebra.md) @@ -160,6 +244,27 @@ Class | Method | HTTP request | Description - **API key parameter name**: api_key - **Location**: HTTP header + +### api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + + +### bearer_test + +- **Type**: Bearer Authentication + + +### http_basic_test + +- **Type**: HTTP basic authentication + + +### http_signature_test + + ### petstore_auth diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/AdditionalPropertiesClass.md new file mode 100644 index 00000000000..fbcf3be947a --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/AdditionalPropertiesClass.md @@ -0,0 +1,16 @@ +# Org.OpenAPITools.Model.AdditionalPropertiesClass +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MapProperty** | **Dictionary<string, string>** | | [optional] +**MapOfMapProperty** | **Dictionary<string, Dictionary<string, string>>** | | [optional] +**Anytype1** | **Object** | | [optional] +**MapWithUndeclaredPropertiesAnytype1** | **Object** | | [optional] +**MapWithUndeclaredPropertiesAnytype2** | **Object** | | [optional] +**MapWithUndeclaredPropertiesAnytype3** | **Dictionary<string, Object>** | | [optional] +**EmptyMap** | **Object** | an object with no declared properties and no undeclared properties, hence it's an empty map. | [optional] +**MapWithUndeclaredPropertiesString** | **Dictionary<string, string>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Animal.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Animal.md new file mode 100644 index 00000000000..a97ce49b801 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Animal.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.Animal +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClassName** | **string** | | +**Color** | **string** | | [optional] [default to "red"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/AnotherFakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/AnotherFakeApi.md new file mode 100644 index 00000000000..494fe14c5e6 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/AnotherFakeApi.md @@ -0,0 +1,79 @@ +# Org.OpenAPITools.Api.AnotherFakeApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**Call123TestSpecialTags**](AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags + + + +# **Call123TestSpecialTags** +> ModelClient Call123TestSpecialTags (ModelClient modelClient) + +To test special tags + +To test special tags and operation ID starting with number + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class Call123TestSpecialTagsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new AnotherFakeApi(config); + var modelClient = new ModelClient(); // ModelClient | client model + + try + { + // To test special tags + ModelClient result = apiInstance.Call123TestSpecialTags(modelClient); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **modelClient** | [**ModelClient**](ModelClient.md)| client model | + +### Return type + +[**ModelClient**](ModelClient.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ApiResponse.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ApiResponse.md index f00988a69e4..1ac0bfc8acd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ApiResponse.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ApiResponse.md @@ -1,5 +1,4 @@ # Org.OpenAPITools.Model.ApiResponse -Describes the result of uploading an image resource ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Apple.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Apple.md new file mode 100644 index 00000000000..1b3949b9f21 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Apple.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.Apple +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Cultivar** | **string** | | [optional] +**Origin** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/AppleReq.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/AppleReq.md new file mode 100644 index 00000000000..1a3f09548e8 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/AppleReq.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.AppleReq +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Cultivar** | **string** | | +**Mealy** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ArrayOfArrayOfNumberOnly.md new file mode 100644 index 00000000000..a4acb4dfa7c --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ArrayOfArrayOfNumberOnly.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.ArrayOfArrayOfNumberOnly +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ArrayArrayNumber** | **List<List<decimal>>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ArrayOfNumberOnly.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ArrayOfNumberOnly.md new file mode 100644 index 00000000000..c61636e3585 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ArrayOfNumberOnly.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.ArrayOfNumberOnly +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ArrayNumber** | **List<decimal>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ArrayTest.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ArrayTest.md new file mode 100644 index 00000000000..a5e9e5c244c --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ArrayTest.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.ArrayTest +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ArrayOfString** | **List<string>** | | [optional] +**ArrayArrayOfInteger** | **List<List<long>>** | | [optional] +**ArrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Banana.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Banana.md new file mode 100644 index 00000000000..74aa8a86b74 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Banana.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.Banana +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LengthCm** | **decimal** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/BananaReq.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/BananaReq.md new file mode 100644 index 00000000000..10ea538f590 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/BananaReq.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.BananaReq +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LengthCm** | **decimal** | | +**Sweet** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/BasquePig.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/BasquePig.md new file mode 100644 index 00000000000..36c2df9673a --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/BasquePig.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.BasquePig +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClassName** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Capitalization.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Capitalization.md new file mode 100644 index 00000000000..74c1ab66db2 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Capitalization.md @@ -0,0 +1,14 @@ +# Org.OpenAPITools.Model.Capitalization +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SmallCamel** | **string** | | [optional] +**CapitalCamel** | **string** | | [optional] +**SmallSnake** | **string** | | [optional] +**CapitalSnake** | **string** | | [optional] +**SCAETHFlowPoints** | **string** | | [optional] +**ATT_NAME** | **string** | Name of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Cat.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Cat.md new file mode 100644 index 00000000000..8975864ba12 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Cat.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.Cat +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClassName** | **string** | | +**Color** | **string** | | [optional] [default to "red"] +**Declawed** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/CatAllOf.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/CatAllOf.md new file mode 100644 index 00000000000..e6f320ac0de --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/CatAllOf.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.CatAllOf +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Declawed** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Category.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Category.md index 1cf7b04e32a..f7b8d4ebf74 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Category.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Category.md @@ -1,11 +1,10 @@ # Org.OpenAPITools.Model.Category -A category for a pet ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | **long** | | [optional] -**Name** | **string** | | [optional] +**Name** | **string** | | [default to "default-name"] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ChildCat.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ChildCat.md new file mode 100644 index 00000000000..ff376beebad --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ChildCat.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.ChildCat +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | [optional] +**PetType** | **string** | | [default to PetTypeEnum.ChildCat] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ChildCatAllOf.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ChildCatAllOf.md new file mode 100644 index 00000000000..18044560aa8 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ChildCatAllOf.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.ChildCatAllOf +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | [optional] +**PetType** | **string** | | [optional] [default to PetTypeEnum.ChildCat] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ClassModel.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ClassModel.md new file mode 100644 index 00000000000..51e52f4b735 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ClassModel.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.ClassModel +Model for testing model with \"_class\" property +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Class** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ComplexQuadrilateral.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ComplexQuadrilateral.md new file mode 100644 index 00000000000..46da47c5124 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ComplexQuadrilateral.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.ComplexQuadrilateral +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShapeType** | **string** | | +**QuadrilateralType** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/DanishPig.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/DanishPig.md new file mode 100644 index 00000000000..53f6a754270 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/DanishPig.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.DanishPig +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClassName** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/DefaultApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/DefaultApi.md new file mode 100644 index 00000000000..d2447d2e0ac --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/DefaultApi.md @@ -0,0 +1,72 @@ +# Org.OpenAPITools.Api.DefaultApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**FooGet**](DefaultApi.md#fooget) | **GET** /foo | + + + +# **FooGet** +> InlineResponseDefault FooGet () + + + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class FooGetExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new DefaultApi(config); + + try + { + InlineResponseDefault result = apiInstance.FooGet(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DefaultApi.FooGet: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**InlineResponseDefault**](InlineResponseDefault.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Dog.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Dog.md new file mode 100644 index 00000000000..aa5df1a927a --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Dog.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.Dog +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClassName** | **string** | | +**Color** | **string** | | [optional] [default to "red"] +**Breed** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/DogAllOf.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/DogAllOf.md new file mode 100644 index 00000000000..ef32aeb7148 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/DogAllOf.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.DogAllOf +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Breed** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Drawing.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Drawing.md new file mode 100644 index 00000000000..cdb1654356f --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Drawing.md @@ -0,0 +1,12 @@ +# Org.OpenAPITools.Model.Drawing +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MainShape** | [**Shape**](Shape.md) | | [optional] +**ShapeOrNull** | [**ShapeOrNull**](ShapeOrNull.md) | | [optional] +**NullableShape** | [**NullableShape**](NullableShape.md) | | [optional] +**Shapes** | [**List<Shape>**](Shape.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/EnumArrays.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/EnumArrays.md new file mode 100644 index 00000000000..2dfe0e22388 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/EnumArrays.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.EnumArrays +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JustSymbol** | **string** | | [optional] +**ArrayEnum** | **List<string>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/EnumClass.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/EnumClass.md new file mode 100644 index 00000000000..4fb1eae9c06 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/EnumClass.md @@ -0,0 +1,8 @@ +# Org.OpenAPITools.Model.EnumClass +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/EnumTest.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/EnumTest.md new file mode 100644 index 00000000000..5a6544a5172 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/EnumTest.md @@ -0,0 +1,16 @@ +# Org.OpenAPITools.Model.EnumTest +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EnumString** | **string** | | [optional] +**EnumStringRequired** | **string** | | +**EnumInteger** | **int** | | [optional] +**EnumNumber** | **double** | | [optional] +**OuterEnum** | **OuterEnum** | | [optional] +**OuterEnumInteger** | **OuterEnumInteger** | | [optional] +**OuterEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] +**OuterEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/EquilateralTriangle.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/EquilateralTriangle.md new file mode 100644 index 00000000000..9899d7c5db5 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/EquilateralTriangle.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.EquilateralTriangle +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShapeType** | **string** | | +**TriangleType** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeApi.md new file mode 100644 index 00000000000..7f5e0f57cab --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeApi.md @@ -0,0 +1,1111 @@ +# Org.OpenAPITools.Api.FakeApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**FakeHealthGet**](FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint +[**FakeOuterBooleanSerialize**](FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +[**FakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +[**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | +[**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | +[**GetArrayOfEnums**](FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums +[**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +[**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +[**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters +[**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +[**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +[**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +[**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-paramters | + + + +# **FakeHealthGet** +> HealthCheckResult FakeHealthGet () + +Health check endpoint + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class FakeHealthGetExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); + + try + { + // Health check endpoint + HealthCheckResult result = apiInstance.FakeHealthGet(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling FakeApi.FakeHealthGet: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**HealthCheckResult**](HealthCheckResult.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The instance started successfully | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **FakeOuterBooleanSerialize** +> bool FakeOuterBooleanSerialize (bool? body = null) + + + +Test serialization of outer boolean types + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class FakeOuterBooleanSerializeExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); + var body = true; // bool? | Input boolean as post body (optional) + + try + { + bool result = apiInstance.FakeOuterBooleanSerialize(body); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling FakeApi.FakeOuterBooleanSerialize: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **bool?**| Input boolean as post body | [optional] + +### Return type + +**bool** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output boolean | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **FakeOuterCompositeSerialize** +> OuterComposite FakeOuterCompositeSerialize (OuterComposite outerComposite = null) + + + +Test serialization of object with outer number type + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class FakeOuterCompositeSerializeExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); + var outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body (optional) + + try + { + OuterComposite result = apiInstance.FakeOuterCompositeSerialize(outerComposite); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling FakeApi.FakeOuterCompositeSerialize: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] + +### Return type + +[**OuterComposite**](OuterComposite.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output composite | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **FakeOuterNumberSerialize** +> decimal FakeOuterNumberSerialize (decimal? body = null) + + + +Test serialization of outer number types + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class FakeOuterNumberSerializeExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); + var body = 8.14; // decimal? | Input number as post body (optional) + + try + { + decimal result = apiInstance.FakeOuterNumberSerialize(body); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling FakeApi.FakeOuterNumberSerialize: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **decimal?**| Input number as post body | [optional] + +### Return type + +**decimal** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output number | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **FakeOuterStringSerialize** +> string FakeOuterStringSerialize (string body = null) + + + +Test serialization of outer string types + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class FakeOuterStringSerializeExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); + var body = body_example; // string | Input string as post body (optional) + + try + { + string result = apiInstance.FakeOuterStringSerialize(body); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling FakeApi.FakeOuterStringSerialize: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **string**| Input string as post body | [optional] + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output string | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetArrayOfEnums** +> List<OuterEnum> GetArrayOfEnums () + +Array of Enums + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class GetArrayOfEnumsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); + + try + { + // Array of Enums + List result = apiInstance.GetArrayOfEnums(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling FakeApi.GetArrayOfEnums: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List<OuterEnum>**](OuterEnum.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Got named array of enums | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **TestBodyWithFileSchema** +> void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass) + + + +For this test, the body for this request much reference a schema named `File`. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class TestBodyWithFileSchemaExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); + var fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass | + + try + { + apiInstance.TestBodyWithFileSchema(fileSchemaTestClass); + } + catch (ApiException e) + { + Debug.Print("Exception when calling FakeApi.TestBodyWithFileSchema: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **TestBodyWithQueryParams** +> void TestBodyWithQueryParams (string query, User user) + + + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class TestBodyWithQueryParamsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); + var query = query_example; // string | + var user = new User(); // User | + + try + { + apiInstance.TestBodyWithQueryParams(query, user); + } + catch (ApiException e) + { + Debug.Print("Exception when calling FakeApi.TestBodyWithQueryParams: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **string**| | + **user** | [**User**](User.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **TestClientModel** +> ModelClient TestClientModel (ModelClient modelClient) + +To test \"client\" model + +To test \"client\" model + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class TestClientModelExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); + var modelClient = new ModelClient(); // ModelClient | client model + + try + { + // To test \"client\" model + ModelClient result = apiInstance.TestClientModel(modelClient); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling FakeApi.TestClientModel: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **modelClient** | [**ModelClient**](ModelClient.md)| client model | + +### Return type + +[**ModelClient**](ModelClient.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **TestEndpointParameters** +> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class TestEndpointParametersExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + // Configure HTTP basic authorization: http_basic_test + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; + + var apiInstance = new FakeApi(config); + var number = 8.14; // decimal | None + var _double = 1.2D; // double | None + var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None + var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None + var integer = 56; // int? | None (optional) + var int32 = 56; // int? | None (optional) + var int64 = 789; // long? | None (optional) + var _float = 3.4F; // float? | None (optional) + var _string = _string_example; // string | None (optional) + var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional) + var date = 2013-10-20; // DateTime? | None (optional) + var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") + var password = password_example; // string | None (optional) + var callback = callback_example; // string | None (optional) + + try + { + // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); + } + catch (ApiException e) + { + Debug.Print("Exception when calling FakeApi.TestEndpointParameters: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **number** | **decimal**| None | + **_double** | **double**| None | + **patternWithoutDelimiter** | **string**| None | + **_byte** | **byte[]**| None | + **integer** | **int?**| None | [optional] + **int32** | **int?**| None | [optional] + **int64** | **long?**| None | [optional] + **_float** | **float?**| None | [optional] + **_string** | **string**| None | [optional] + **binary** | **System.IO.Stream****System.IO.Stream**| None | [optional] + **date** | **DateTime?**| None | [optional] + **dateTime** | **DateTime?**| None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] + **password** | **string**| None | [optional] + **callback** | **string**| None | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[http_basic_test](../README.md#http_basic_test) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid username supplied | - | +| **404** | User not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **TestEnumParameters** +> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) + +To test enum parameters + +To test enum parameters + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class TestEnumParametersExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); + var enumHeaderStringArray = enumHeaderStringArray_example; // List | Header parameter enum test (string array) (optional) + var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) + var enumQueryStringArray = enumQueryStringArray_example; // List | Query parameter enum test (string array) (optional) + var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) + var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) + var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) + var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) + + try + { + // To test enum parameters + apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + } + catch (ApiException e) + { + Debug.Print("Exception when calling FakeApi.TestEnumParameters: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enumHeaderStringArray** | **List<string>**| Header parameter enum test (string array) | [optional] + **enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg] + **enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional] + **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] + **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] + **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] + **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] + **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Invalid request | - | +| **404** | Not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **TestGroupParameters** +> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class TestGroupParametersExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + // Configure Bearer token for authorization: bearer_test + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new FakeApi(config); + var requiredStringGroup = 56; // int | Required String in group parameters + var requiredBooleanGroup = true; // bool | Required Boolean in group parameters + var requiredInt64Group = 789; // long | Required Integer in group parameters + var stringGroup = 56; // int? | String in group parameters (optional) + var booleanGroup = true; // bool? | Boolean in group parameters (optional) + var int64Group = 789; // long? | Integer in group parameters (optional) + + try + { + // Fake endpoint to test group parameters (optional) + apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } + catch (ApiException e) + { + Debug.Print("Exception when calling FakeApi.TestGroupParameters: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requiredStringGroup** | **int**| Required String in group parameters | + **requiredBooleanGroup** | **bool**| Required Boolean in group parameters | + **requiredInt64Group** | **long**| Required Integer in group parameters | + **stringGroup** | **int?**| String in group parameters | [optional] + **booleanGroup** | **bool?**| Boolean in group parameters | [optional] + **int64Group** | **long?**| Integer in group parameters | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[bearer_test](../README.md#bearer_test) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **400** | Someting wrong | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **TestInlineAdditionalProperties** +> void TestInlineAdditionalProperties (Dictionary requestBody) + +test inline additionalProperties + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class TestInlineAdditionalPropertiesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); + var requestBody = new Dictionary(); // Dictionary | request body + + try + { + // test inline additionalProperties + apiInstance.TestInlineAdditionalProperties(requestBody); + } + catch (ApiException e) + { + Debug.Print("Exception when calling FakeApi.TestInlineAdditionalProperties: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requestBody** | [**Dictionary<string, string>**](string.md)| request body | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **TestJsonFormData** +> void TestJsonFormData (string param, string param2) + +test json serialization of form data + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class TestJsonFormDataExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); + var param = param_example; // string | field1 + var param2 = param2_example; // string | field2 + + try + { + // test json serialization of form data + apiInstance.TestJsonFormData(param, param2); + } + catch (ApiException e) + { + Debug.Print("Exception when calling FakeApi.TestJsonFormData: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | **string**| field1 | + **param2** | **string**| field2 | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **TestQueryParameterCollectionFormat** +> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context) + + + +To test the collection format in query parameters + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class TestQueryParameterCollectionFormatExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); + var pipe = new List(); // List | + var ioutil = new List(); // List | + var http = new List(); // List | + var url = new List(); // List | + var context = new List(); // List | + + try + { + apiInstance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + } + catch (ApiException e) + { + Debug.Print("Exception when calling FakeApi.TestQueryParameterCollectionFormat: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pipe** | [**List<string>**](string.md)| | + **ioutil** | [**List<string>**](string.md)| | + **http** | [**List<string>**](string.md)| | + **url** | [**List<string>**](string.md)| | + **context** | [**List<string>**](string.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeClassnameTags123Api.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeClassnameTags123Api.md new file mode 100644 index 00000000000..2a148644cc5 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeClassnameTags123Api.md @@ -0,0 +1,84 @@ +# Org.OpenAPITools.Api.FakeClassnameTags123Api + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**TestClassname**](FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case + + + +# **TestClassname** +> ModelClient TestClassname (ModelClient modelClient) + +To test class name in snake case + +To test class name in snake case + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class TestClassnameExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + // Configure API key authorization: api_key_query + config.AddApiKey("api_key_query", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("api_key_query", "Bearer"); + + var apiInstance = new FakeClassnameTags123Api(config); + var modelClient = new ModelClient(); // ModelClient | client model + + try + { + // To test class name in snake case + ModelClient result = apiInstance.TestClassname(modelClient); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling FakeClassnameTags123Api.TestClassname: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **modelClient** | [**ModelClient**](ModelClient.md)| client model | + +### Return type + +[**ModelClient**](ModelClient.md) + +### Authorization + +[api_key_query](../README.md#api_key_query) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/File.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/File.md new file mode 100644 index 00000000000..11192666c4f --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/File.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.File +Must be named `File` for test. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SourceURI** | **string** | Test capitalization | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FileSchemaTestClass.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FileSchemaTestClass.md new file mode 100644 index 00000000000..244164accbe --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FileSchemaTestClass.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.FileSchemaTestClass +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**File** | [**File**](File.md) | | [optional] +**Files** | [**List<File>**](File.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Foo.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Foo.md new file mode 100644 index 00000000000..fd84dc2038c --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Foo.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.Foo +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Bar** | **string** | | [optional] [default to "bar"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FormatTest.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FormatTest.md new file mode 100644 index 00000000000..3efa07e3b46 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FormatTest.md @@ -0,0 +1,24 @@ +# Org.OpenAPITools.Model.FormatTest +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Integer** | **int** | | [optional] +**Int32** | **int** | | [optional] +**Int64** | **long** | | [optional] +**Number** | **decimal** | | +**Float** | **float** | | [optional] +**Double** | **double** | | [optional] +**Decimal** | **decimal** | | [optional] +**String** | **string** | | [optional] +**Byte** | **byte[]** | | +**Binary** | **System.IO.Stream** | | [optional] +**Date** | **DateTime** | | +**DateTime** | **DateTime** | | [optional] +**Uuid** | **Guid** | | [optional] +**Password** | **string** | | +**PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional] +**PatternWithDigitsAndDelimiter** | **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Fruit.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Fruit.md new file mode 100644 index 00000000000..ab12d86b7c3 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Fruit.md @@ -0,0 +1,12 @@ +# Org.OpenAPITools.Model.Fruit +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Color** | **string** | | [optional] +**Cultivar** | **string** | | [optional] +**Origin** | **string** | | [optional] +**LengthCm** | **decimal** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FruitReq.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FruitReq.md new file mode 100644 index 00000000000..06120314fb6 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FruitReq.md @@ -0,0 +1,12 @@ +# Org.OpenAPITools.Model.FruitReq +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Cultivar** | **string** | | +**Mealy** | **bool** | | [optional] +**LengthCm** | **decimal** | | +**Sweet** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/GmFruit.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/GmFruit.md new file mode 100644 index 00000000000..2cdabaa6ec6 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/GmFruit.md @@ -0,0 +1,12 @@ +# Org.OpenAPITools.Model.GmFruit +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Color** | **string** | | [optional] +**Cultivar** | **string** | | [optional] +**Origin** | **string** | | [optional] +**LengthCm** | **decimal** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/GrandparentAnimal.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/GrandparentAnimal.md new file mode 100644 index 00000000000..2879f720f42 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/GrandparentAnimal.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.GrandparentAnimal +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PetType** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/HasOnlyReadOnly.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/HasOnlyReadOnly.md new file mode 100644 index 00000000000..4a5d17ea887 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/HasOnlyReadOnly.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.HasOnlyReadOnly +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Bar** | **string** | | [optional] [readonly] +**Foo** | **string** | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/HealthCheckResult.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/HealthCheckResult.md new file mode 100644 index 00000000000..44c5cd47b65 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/HealthCheckResult.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.HealthCheckResult +Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NullableMessage** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/InlineResponseDefault.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/InlineResponseDefault.md new file mode 100644 index 00000000000..8c96fb62ac8 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/InlineResponseDefault.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.InlineResponseDefault +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**String** | [**Foo**](Foo.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/IsoscelesTriangle.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/IsoscelesTriangle.md new file mode 100644 index 00000000000..d4ac347e2e5 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/IsoscelesTriangle.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.IsoscelesTriangle +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShapeType** | **string** | | +**TriangleType** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/List.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/List.md new file mode 100644 index 00000000000..484c2a0992c --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/List.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.List +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_123List** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Mammal.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Mammal.md new file mode 100644 index 00000000000..b3f243cc6e2 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Mammal.md @@ -0,0 +1,12 @@ +# Org.OpenAPITools.Model.Mammal +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**HasBaleen** | **bool** | | [optional] +**HasTeeth** | **bool** | | [optional] +**ClassName** | **string** | | +**Type** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/MapTest.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/MapTest.md new file mode 100644 index 00000000000..b2e30bde4c3 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/MapTest.md @@ -0,0 +1,12 @@ +# Org.OpenAPITools.Model.MapTest +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MapMapOfString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] +**MapOfEnumString** | **Dictionary<string, string>** | | [optional] +**DirectMap** | **Dictionary<string, bool>** | | [optional] +**IndirectMap** | **Dictionary<string, bool>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 00000000000..9aa858ade8d --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.MixedPropertiesAndAdditionalPropertiesClass +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uuid** | **Guid** | | [optional] +**DateTime** | **DateTime** | | [optional] +**Map** | [**Dictionary<string, Animal>**](Animal.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Model200Response.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Model200Response.md new file mode 100644 index 00000000000..668f456c690 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Model200Response.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.Model200Response +Model for testing model name starting with number +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **int** | | [optional] +**Class** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ModelClient.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ModelClient.md new file mode 100644 index 00000000000..ecc7b60ce55 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ModelClient.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.ModelClient +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**__Client** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Name.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Name.md new file mode 100644 index 00000000000..c75e5d034e5 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Name.md @@ -0,0 +1,13 @@ +# Org.OpenAPITools.Model.Name +Model for testing model name same as property name +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_Name** | **int** | | +**SnakeCase** | **int** | | [optional] [readonly] +**Property** | **string** | | [optional] +**_123Number** | **int** | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/NullableClass.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/NullableClass.md new file mode 100644 index 00000000000..0ca2455a4ab --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/NullableClass.md @@ -0,0 +1,20 @@ +# Org.OpenAPITools.Model.NullableClass +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IntegerProp** | **int?** | | [optional] +**NumberProp** | **decimal?** | | [optional] +**BooleanProp** | **bool?** | | [optional] +**StringProp** | **string** | | [optional] +**DateProp** | **DateTime?** | | [optional] +**DatetimeProp** | **DateTime?** | | [optional] +**ArrayNullableProp** | **List<Object>** | | [optional] +**ArrayAndItemsNullableProp** | **List<Object>** | | [optional] +**ArrayItemsNullable** | **List<Object>** | | [optional] +**ObjectNullableProp** | **Dictionary<string, Object>** | | [optional] +**ObjectAndItemsNullableProp** | **Dictionary<string, Object>** | | [optional] +**ObjectItemsNullable** | **Dictionary<string, Object>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/NullableShape.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/NullableShape.md new file mode 100644 index 00000000000..4fe318e4a16 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/NullableShape.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.NullableShape +The value may be a shape or the 'null' value. The 'nullable' attribute was introduced in OAS schema >= 3.0 and has been deprecated in OAS schema >= 3.1. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShapeType** | **string** | | +**QuadrilateralType** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/NumberOnly.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/NumberOnly.md new file mode 100644 index 00000000000..a2ca39cc52b --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/NumberOnly.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.NumberOnly +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JustNumber** | **decimal** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Order.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Order.md index 65388ca7b69..13eb4a56bd5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Order.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Order.md @@ -1,5 +1,4 @@ # Org.OpenAPITools.Model.Order -An order for a pets from the pet store ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/OuterComposite.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/OuterComposite.md new file mode 100644 index 00000000000..4f026f75b74 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/OuterComposite.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.OuterComposite +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MyNumber** | **decimal** | | [optional] +**MyString** | **string** | | [optional] +**MyBoolean** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/OuterEnum.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/OuterEnum.md new file mode 100644 index 00000000000..22713352ca0 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/OuterEnum.md @@ -0,0 +1,8 @@ +# Org.OpenAPITools.Model.OuterEnum +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/OuterEnumDefaultValue.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/OuterEnumDefaultValue.md new file mode 100644 index 00000000000..09f6b91ee62 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/OuterEnumDefaultValue.md @@ -0,0 +1,8 @@ +# Org.OpenAPITools.Model.OuterEnumDefaultValue +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/OuterEnumInteger.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/OuterEnumInteger.md new file mode 100644 index 00000000000..149bb5a8dd1 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/OuterEnumInteger.md @@ -0,0 +1,8 @@ +# Org.OpenAPITools.Model.OuterEnumInteger +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/OuterEnumIntegerDefaultValue.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/OuterEnumIntegerDefaultValue.md new file mode 100644 index 00000000000..29de7150974 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/OuterEnumIntegerDefaultValue.md @@ -0,0 +1,8 @@ +# Org.OpenAPITools.Model.OuterEnumIntegerDefaultValue +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ParentPet.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ParentPet.md new file mode 100644 index 00000000000..188f0754e3b --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ParentPet.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.ParentPet +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PetType** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Pet.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Pet.md index 86733711fc3..348d5c8d221 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Pet.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Pet.md @@ -1,5 +1,4 @@ # Org.OpenAPITools.Model.Pet -A pet for sale in the pet store ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/PetApi.md index b84b0be8b01..5acd4f35203 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/PetApi.md @@ -1,6 +1,6 @@ # Org.OpenAPITools.Api.PetApi -All URIs are relative to *http://petstore.swagger.io/v2* +All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -12,11 +12,12 @@ Method | HTTP request | Description [**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet [**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data [**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) # **AddPet** -> Pet AddPet (Pet pet) +> void AddPet (Pet pet) Add a new pet to the store @@ -35,7 +36,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "http://petstore.swagger.io/v2"; + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth config.AccessToken = "YOUR_ACCESS_TOKEN"; @@ -45,8 +46,7 @@ namespace Example try { // Add a new pet to the store - Pet result = apiInstance.AddPet(pet); - Debug.WriteLine(result); + apiInstance.AddPet(pet); } catch (ApiException e) { @@ -67,21 +67,20 @@ Name | Type | Description | Notes ### Return type -[**Pet**](Pet.md) +void (empty response body) ### Authorization -[petstore_auth](../README.md#petstore_auth) +[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth) ### HTTP request headers - **Content-Type**: application/json, application/xml - - **Accept**: application/xml, application/json + - **Accept**: Not defined ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | | **405** | Invalid input | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -107,7 +106,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "http://petstore.swagger.io/v2"; + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth config.AccessToken = "YOUR_ACCESS_TOKEN"; @@ -181,7 +180,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "http://petstore.swagger.io/v2"; + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth config.AccessToken = "YOUR_ACCESS_TOKEN"; @@ -217,7 +216,7 @@ Name | Type | Description | Notes ### Authorization -[petstore_auth](../README.md#petstore_auth) +[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth) ### HTTP request headers @@ -255,7 +254,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "http://petstore.swagger.io/v2"; + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth config.AccessToken = "YOUR_ACCESS_TOKEN"; @@ -291,7 +290,7 @@ Name | Type | Description | Notes ### Authorization -[petstore_auth](../README.md#petstore_auth) +[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth) ### HTTP request headers @@ -329,7 +328,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "http://petstore.swagger.io/v2"; + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure API key authorization: api_key config.AddApiKey("api_key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -385,7 +384,7 @@ Name | Type | Description | Notes # **UpdatePet** -> Pet UpdatePet (Pet pet) +> void UpdatePet (Pet pet) Update an existing pet @@ -404,7 +403,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "http://petstore.swagger.io/v2"; + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth config.AccessToken = "YOUR_ACCESS_TOKEN"; @@ -414,8 +413,7 @@ namespace Example try { // Update an existing pet - Pet result = apiInstance.UpdatePet(pet); - Debug.WriteLine(result); + apiInstance.UpdatePet(pet); } catch (ApiException e) { @@ -436,21 +434,20 @@ Name | Type | Description | Notes ### Return type -[**Pet**](Pet.md) +void (empty response body) ### Authorization -[petstore_auth](../README.md#petstore_auth) +[http_signature_test](../README.md#http_signature_test), [petstore_auth](../README.md#petstore_auth) ### HTTP request headers - **Content-Type**: application/json, application/xml - - **Accept**: application/xml, application/json + - **Accept**: Not defined ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | | **400** | Invalid ID supplied | - | | **404** | Pet not found | - | | **405** | Validation exception | - | @@ -478,7 +475,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "http://petstore.swagger.io/v2"; + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth config.AccessToken = "YOUR_ACCESS_TOKEN"; @@ -552,7 +549,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "http://petstore.swagger.io/v2"; + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth config.AccessToken = "YOUR_ACCESS_TOKEN"; @@ -606,3 +603,78 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **UploadFileWithRequiredFile** +> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) + +uploads an image (required) + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class UploadFileWithRequiredFileExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + // Configure OAuth2 access token for authorization: petstore_auth + config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new PetApi(config); + var petId = 789; // long | ID of pet to update + var requiredFile = BINARY_DATA_HERE; // System.IO.Stream | file to upload + var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) + + try + { + // uploads an image (required) + ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **long**| ID of pet to update | + **requiredFile** | **System.IO.Stream****System.IO.Stream**| file to upload | + **additionalMetadata** | **string**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Pig.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Pig.md new file mode 100644 index 00000000000..6e9ea931901 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Pig.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.Pig +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClassName** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Quadrilateral.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Quadrilateral.md new file mode 100644 index 00000000000..2676d64eabb --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Quadrilateral.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.Quadrilateral +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShapeType** | **string** | | +**QuadrilateralType** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/QuadrilateralInterface.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/QuadrilateralInterface.md new file mode 100644 index 00000000000..0fd001c58bc --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/QuadrilateralInterface.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.QuadrilateralInterface +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**QuadrilateralType** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ReadOnlyFirst.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ReadOnlyFirst.md new file mode 100644 index 00000000000..5c3762e8803 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ReadOnlyFirst.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.ReadOnlyFirst +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Bar** | **string** | | [optional] [readonly] +**Baz** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Return.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Return.md new file mode 100644 index 00000000000..56a0ac3de08 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Return.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.Return +Model for testing reserved words +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_Return** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ScaleneTriangle.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ScaleneTriangle.md new file mode 100644 index 00000000000..2ebc1db5b4a --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ScaleneTriangle.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.ScaleneTriangle +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShapeType** | **string** | | +**TriangleType** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Shape.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Shape.md new file mode 100644 index 00000000000..cabde4dffc9 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Shape.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.Shape +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShapeType** | **string** | | +**QuadrilateralType** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ShapeInterface.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ShapeInterface.md new file mode 100644 index 00000000000..6126932df84 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ShapeInterface.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.ShapeInterface +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShapeType** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ShapeOrNull.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ShapeOrNull.md new file mode 100644 index 00000000000..59c2453ac78 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ShapeOrNull.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.ShapeOrNull +The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShapeType** | **string** | | +**QuadrilateralType** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/SimpleQuadrilateral.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/SimpleQuadrilateral.md new file mode 100644 index 00000000000..5f55ec3e833 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/SimpleQuadrilateral.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.SimpleQuadrilateral +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShapeType** | **string** | | +**QuadrilateralType** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/SpecialModelName.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/SpecialModelName.md new file mode 100644 index 00000000000..e0008731e60 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/SpecialModelName.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.SpecialModelName +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SpecialPropertyName** | **long** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/StoreApi.md index 2ce2b83d430..c0ed9ea4380 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/StoreApi.md @@ -1,12 +1,12 @@ # Org.OpenAPITools.Api.StoreApi -All URIs are relative to *http://petstore.swagger.io/v2* +All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**DeleteOrder**](StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +[**DeleteOrder**](StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID [**GetInventory**](StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -[**GetOrderById**](StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID +[**GetOrderById**](StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID [**PlaceOrder**](StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet @@ -33,7 +33,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "http://petstore.swagger.io/v2"; + config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(config); var orderId = orderId_example; // string | ID of the order that needs to be deleted @@ -103,7 +103,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "http://petstore.swagger.io/v2"; + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure API key authorization: api_key config.AddApiKey("api_key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -174,7 +174,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "http://petstore.swagger.io/v2"; + config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(config); var orderId = 789; // long | ID of pet that needs to be fetched @@ -244,7 +244,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "http://petstore.swagger.io/v2"; + config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(config); var order = new Order(); // Order | order placed for purchasing the pet diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Tag.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Tag.md index 319a2b6c745..718effdb02a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Tag.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Tag.md @@ -1,5 +1,4 @@ # Org.OpenAPITools.Model.Tag -A tag for a pet ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Triangle.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Triangle.md new file mode 100644 index 00000000000..6578de98039 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Triangle.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.Triangle +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShapeType** | **string** | | +**TriangleType** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/TriangleInterface.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/TriangleInterface.md new file mode 100644 index 00000000000..c354aa04761 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/TriangleInterface.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.TriangleInterface +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TriangleType** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/User.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/User.md index d2cc8c29e42..a6b2889dc60 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/User.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/User.md @@ -1,5 +1,4 @@ # Org.OpenAPITools.Model.User -A User who is purchasing from the pet store ## Properties Name | Type | Description | Notes @@ -12,6 +11,10 @@ Name | Type | Description | Notes **Password** | **string** | | [optional] **Phone** | **string** | | [optional] **UserStatus** | **int** | User Status | [optional] +**ObjectWithNoDeclaredProps** | **Object** | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional] +**ObjectWithNoDeclaredPropsNullable** | **Object** | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional] +**AnyTypeProp** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 | [optional] +**AnyTypePropNullable** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/UserApi.md index b87e345d6bd..73b2c545a54 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/UserApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/UserApi.md @@ -1,6 +1,6 @@ # Org.OpenAPITools.Api.UserApi -All URIs are relative to *http://petstore.swagger.io/v2* +All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -37,12 +37,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "http://petstore.swagger.io/v2"; - // Configure API key authorization: api_key - config.AddApiKey("api_key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("api_key", "Bearer"); - + config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); var user = new User(); // User | Created user object @@ -74,7 +69,7 @@ void (empty response body) ### Authorization -[api_key](../README.md#api_key) +No authorization required ### HTTP request headers @@ -109,12 +104,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "http://petstore.swagger.io/v2"; - // Configure API key authorization: api_key - config.AddApiKey("api_key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("api_key", "Bearer"); - + config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); var user = new List(); // List | List of user object @@ -146,7 +136,7 @@ void (empty response body) ### Authorization -[api_key](../README.md#api_key) +No authorization required ### HTTP request headers @@ -181,12 +171,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "http://petstore.swagger.io/v2"; - // Configure API key authorization: api_key - config.AddApiKey("api_key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("api_key", "Bearer"); - + config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); var user = new List(); // List | List of user object @@ -218,7 +203,7 @@ void (empty response body) ### Authorization -[api_key](../README.md#api_key) +No authorization required ### HTTP request headers @@ -255,12 +240,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "http://petstore.swagger.io/v2"; - // Configure API key authorization: api_key - config.AddApiKey("api_key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("api_key", "Bearer"); - + config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); var username = username_example; // string | The name that needs to be deleted @@ -292,7 +272,7 @@ void (empty response body) ### Authorization -[api_key](../README.md#api_key) +No authorization required ### HTTP request headers @@ -328,7 +308,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "http://petstore.swagger.io/v2"; + config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. @@ -398,7 +378,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "http://petstore.swagger.io/v2"; + config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); var username = username_example; // string | The user name for login var password = password_example; // string | The password for login in clear text @@ -443,7 +423,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | * Set-Cookie - Cookie authentication key for use with the `api_key` apiKey authentication.
* X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when toekn expires
| +| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| | **400** | Invalid username/password supplied | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -469,12 +449,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "http://petstore.swagger.io/v2"; - // Configure API key authorization: api_key - config.AddApiKey("api_key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("api_key", "Bearer"); - + config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); try @@ -502,7 +477,7 @@ void (empty response body) ### Authorization -[api_key](../README.md#api_key) +No authorization required ### HTTP request headers @@ -539,12 +514,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "http://petstore.swagger.io/v2"; - // Configure API key authorization: api_key - config.AddApiKey("api_key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("api_key", "Bearer"); - + config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); var username = username_example; // string | name that need to be deleted var user = new User(); // User | Updated user object @@ -578,7 +548,7 @@ void (empty response body) ### Authorization -[api_key](../README.md#api_key) +No authorization required ### HTTP request headers diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Whale.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Whale.md new file mode 100644 index 00000000000..cd60de874dc --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Whale.md @@ -0,0 +1,11 @@ +# Org.OpenAPITools.Model.Whale +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**HasBaleen** | **bool** | | [optional] +**HasTeeth** | **bool** | | [optional] +**ClassName** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Zebra.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Zebra.md new file mode 100644 index 00000000000..48da462bd08 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/Zebra.md @@ -0,0 +1,10 @@ +# Org.OpenAPITools.Model.Zebra +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | [optional] +**ClassName** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs new file mode 100644 index 00000000000..1d46982928d --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs @@ -0,0 +1,69 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Api; +// uncomment below to import models +//using Org.OpenAPITools.Model; + +namespace Org.OpenAPITools.Test.Api +{ + /// + /// Class for testing AnotherFakeApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class AnotherFakeApiTests : IDisposable + { + private AnotherFakeApi instance; + + public AnotherFakeApiTests() + { + instance = new AnotherFakeApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of AnotherFakeApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' AnotherFakeApi + //Assert.IsType(instance); + } + + /// + /// Test Call123TestSpecialTags + /// + [Fact] + public void Call123TestSpecialTagsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //ModelClient modelClient = null; + //var response = instance.Call123TestSpecialTags(modelClient); + //Assert.IsType(response); + } + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs new file mode 100644 index 00000000000..76a930092ba --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs @@ -0,0 +1,68 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Api; +// uncomment below to import models +//using Org.OpenAPITools.Model; + +namespace Org.OpenAPITools.Test.Api +{ + /// + /// Class for testing DefaultApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class DefaultApiTests : IDisposable + { + private DefaultApi instance; + + public DefaultApiTests() + { + instance = new DefaultApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of DefaultApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' DefaultApi + //Assert.IsType(instance); + } + + /// + /// Test FooGet + /// + [Fact] + public void FooGetTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.FooGet(); + //Assert.IsType(response); + } + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs new file mode 100644 index 00000000000..994cd46d38a --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs @@ -0,0 +1,258 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Api; +// uncomment below to import models +//using Org.OpenAPITools.Model; + +namespace Org.OpenAPITools.Test.Api +{ + /// + /// Class for testing FakeApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class FakeApiTests : IDisposable + { + private FakeApi instance; + + public FakeApiTests() + { + instance = new FakeApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of FakeApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' FakeApi + //Assert.IsType(instance); + } + + /// + /// Test FakeHealthGet + /// + [Fact] + public void FakeHealthGetTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.FakeHealthGet(); + //Assert.IsType(response); + } + + /// + /// Test FakeOuterBooleanSerialize + /// + [Fact] + public void FakeOuterBooleanSerializeTest() + { + // TODO uncomment below to test the method and replace null with proper value + //bool? body = null; + //var response = instance.FakeOuterBooleanSerialize(body); + //Assert.IsType(response); + } + + /// + /// Test FakeOuterCompositeSerialize + /// + [Fact] + public void FakeOuterCompositeSerializeTest() + { + // TODO uncomment below to test the method and replace null with proper value + //OuterComposite outerComposite = null; + //var response = instance.FakeOuterCompositeSerialize(outerComposite); + //Assert.IsType(response); + } + + /// + /// Test FakeOuterNumberSerialize + /// + [Fact] + public void FakeOuterNumberSerializeTest() + { + // TODO uncomment below to test the method and replace null with proper value + //decimal? body = null; + //var response = instance.FakeOuterNumberSerialize(body); + //Assert.IsType(response); + } + + /// + /// Test FakeOuterStringSerialize + /// + [Fact] + public void FakeOuterStringSerializeTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string body = null; + //var response = instance.FakeOuterStringSerialize(body); + //Assert.IsType(response); + } + + /// + /// Test GetArrayOfEnums + /// + [Fact] + public void GetArrayOfEnumsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetArrayOfEnums(); + //Assert.IsType>(response); + } + + /// + /// Test TestBodyWithFileSchema + /// + [Fact] + public void TestBodyWithFileSchemaTest() + { + // TODO uncomment below to test the method and replace null with proper value + //FileSchemaTestClass fileSchemaTestClass = null; + //instance.TestBodyWithFileSchema(fileSchemaTestClass); + } + + /// + /// Test TestBodyWithQueryParams + /// + [Fact] + public void TestBodyWithQueryParamsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string query = null; + //User user = null; + //instance.TestBodyWithQueryParams(query, user); + } + + /// + /// Test TestClientModel + /// + [Fact] + public void TestClientModelTest() + { + // TODO uncomment below to test the method and replace null with proper value + //ModelClient modelClient = null; + //var response = instance.TestClientModel(modelClient); + //Assert.IsType(response); + } + + /// + /// Test TestEndpointParameters + /// + [Fact] + public void TestEndpointParametersTest() + { + // TODO uncomment below to test the method and replace null with proper value + //decimal number = null; + //double _double = null; + //string patternWithoutDelimiter = null; + //byte[] _byte = null; + //int? integer = null; + //int? int32 = null; + //long? int64 = null; + //float? _float = null; + //string _string = null; + //System.IO.Stream binary = null; + //DateTime? date = null; + //DateTime? dateTime = null; + //string password = null; + //string callback = null; + //instance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); + } + + /// + /// Test TestEnumParameters + /// + [Fact] + public void TestEnumParametersTest() + { + // TODO uncomment below to test the method and replace null with proper value + //List enumHeaderStringArray = null; + //string enumHeaderString = null; + //List enumQueryStringArray = null; + //string enumQueryString = null; + //int? enumQueryInteger = null; + //double? enumQueryDouble = null; + //List enumFormStringArray = null; + //string enumFormString = null; + //instance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + } + + /// + /// Test TestGroupParameters + /// + [Fact] + public void TestGroupParametersTest() + { + // TODO uncomment below to test the method and replace null with proper value + //int requiredStringGroup = null; + //bool requiredBooleanGroup = null; + //long requiredInt64Group = null; + //int? stringGroup = null; + //bool? booleanGroup = null; + //long? int64Group = null; + //instance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } + + /// + /// Test TestInlineAdditionalProperties + /// + [Fact] + public void TestInlineAdditionalPropertiesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //Dictionary requestBody = null; + //instance.TestInlineAdditionalProperties(requestBody); + } + + /// + /// Test TestJsonFormData + /// + [Fact] + public void TestJsonFormDataTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string param = null; + //string param2 = null; + //instance.TestJsonFormData(param, param2); + } + + /// + /// Test TestQueryParameterCollectionFormat + /// + [Fact] + public void TestQueryParameterCollectionFormatTest() + { + // TODO uncomment below to test the method and replace null with proper value + //List pipe = null; + //List ioutil = null; + //List http = null; + //List url = null; + //List context = null; + //instance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + } + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs new file mode 100644 index 00000000000..bbfd4a586e7 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs @@ -0,0 +1,69 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Api; +// uncomment below to import models +//using Org.OpenAPITools.Model; + +namespace Org.OpenAPITools.Test.Api +{ + /// + /// Class for testing FakeClassnameTags123Api + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class FakeClassnameTags123ApiTests : IDisposable + { + private FakeClassnameTags123Api instance; + + public FakeClassnameTags123ApiTests() + { + instance = new FakeClassnameTags123Api(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of FakeClassnameTags123Api + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' FakeClassnameTags123Api + //Assert.IsType(instance); + } + + /// + /// Test TestClassname + /// + [Fact] + public void TestClassnameTest() + { + // TODO uncomment below to test the method and replace null with proper value + //ModelClient modelClient = null; + //var response = instance.TestClassname(modelClient); + //Assert.IsType(response); + } + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs new file mode 100644 index 00000000000..9ab029ed097 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs @@ -0,0 +1,126 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing AdditionalPropertiesClass + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class AdditionalPropertiesClassTests : IDisposable + { + // TODO uncomment below to declare an instance variable for AdditionalPropertiesClass + //private AdditionalPropertiesClass instance; + + public AdditionalPropertiesClassTests() + { + // TODO uncomment below to create an instance of AdditionalPropertiesClass + //instance = new AdditionalPropertiesClass(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of AdditionalPropertiesClass + /// + [Fact] + public void AdditionalPropertiesClassInstanceTest() + { + // TODO uncomment below to test "IsType" AdditionalPropertiesClass + //Assert.IsType(instance); + } + + + /// + /// Test the property 'MapProperty' + /// + [Fact] + public void MapPropertyTest() + { + // TODO unit test for the property 'MapProperty' + } + /// + /// Test the property 'MapOfMapProperty' + /// + [Fact] + public void MapOfMapPropertyTest() + { + // TODO unit test for the property 'MapOfMapProperty' + } + /// + /// Test the property 'Anytype1' + /// + [Fact] + public void Anytype1Test() + { + // TODO unit test for the property 'Anytype1' + } + /// + /// Test the property 'MapWithUndeclaredPropertiesAnytype1' + /// + [Fact] + public void MapWithUndeclaredPropertiesAnytype1Test() + { + // TODO unit test for the property 'MapWithUndeclaredPropertiesAnytype1' + } + /// + /// Test the property 'MapWithUndeclaredPropertiesAnytype2' + /// + [Fact] + public void MapWithUndeclaredPropertiesAnytype2Test() + { + // TODO unit test for the property 'MapWithUndeclaredPropertiesAnytype2' + } + /// + /// Test the property 'MapWithUndeclaredPropertiesAnytype3' + /// + [Fact] + public void MapWithUndeclaredPropertiesAnytype3Test() + { + // TODO unit test for the property 'MapWithUndeclaredPropertiesAnytype3' + } + /// + /// Test the property 'EmptyMap' + /// + [Fact] + public void EmptyMapTest() + { + // TODO unit test for the property 'EmptyMap' + } + /// + /// Test the property 'MapWithUndeclaredPropertiesString' + /// + [Fact] + public void MapWithUndeclaredPropertiesStringTest() + { + // TODO unit test for the property 'MapWithUndeclaredPropertiesString' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/AnimalTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/AnimalTests.cs new file mode 100644 index 00000000000..291231a91be --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/AnimalTests.cs @@ -0,0 +1,96 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing Animal + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class AnimalTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Animal + //private Animal instance; + + public AnimalTests() + { + // TODO uncomment below to create an instance of Animal + //instance = new Animal(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Animal + /// + [Fact] + public void AnimalInstanceTest() + { + // TODO uncomment below to test "IsType" Animal + //Assert.IsType(instance); + } + + /// + /// Test deserialize a Dog from type Animal + /// + [Fact] + public void DogDeserializeFromAnimalTest() + { + // TODO uncomment below to test deserialize a Dog from type Animal + //Assert.IsType(JsonConvert.DeserializeObject(new Dog().ToJson())); + } + /// + /// Test deserialize a Cat from type Animal + /// + [Fact] + public void CatDeserializeFromAnimalTest() + { + // TODO uncomment below to test deserialize a Cat from type Animal + //Assert.IsType(JsonConvert.DeserializeObject(new Cat().ToJson())); + } + + /// + /// Test the property 'ClassName' + /// + [Fact] + public void ClassNameTest() + { + // TODO unit test for the property 'ClassName' + } + /// + /// Test the property 'Color' + /// + [Fact] + public void ColorTest() + { + // TODO unit test for the property 'Color' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/AppleReqTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/AppleReqTests.cs new file mode 100644 index 00000000000..f945f659368 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/AppleReqTests.cs @@ -0,0 +1,78 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing AppleReq + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class AppleReqTests : IDisposable + { + // TODO uncomment below to declare an instance variable for AppleReq + //private AppleReq instance; + + public AppleReqTests() + { + // TODO uncomment below to create an instance of AppleReq + //instance = new AppleReq(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of AppleReq + /// + [Fact] + public void AppleReqInstanceTest() + { + // TODO uncomment below to test "IsType" AppleReq + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Cultivar' + /// + [Fact] + public void CultivarTest() + { + // TODO unit test for the property 'Cultivar' + } + /// + /// Test the property 'Mealy' + /// + [Fact] + public void MealyTest() + { + // TODO unit test for the property 'Mealy' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/AppleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/AppleTests.cs new file mode 100644 index 00000000000..468d60184ad --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/AppleTests.cs @@ -0,0 +1,78 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing Apple + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class AppleTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Apple + //private Apple instance; + + public AppleTests() + { + // TODO uncomment below to create an instance of Apple + //instance = new Apple(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Apple + /// + [Fact] + public void AppleInstanceTest() + { + // TODO uncomment below to test "IsType" Apple + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Cultivar' + /// + [Fact] + public void CultivarTest() + { + // TODO unit test for the property 'Cultivar' + } + /// + /// Test the property 'Origin' + /// + [Fact] + public void OriginTest() + { + // TODO unit test for the property 'Origin' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs new file mode 100644 index 00000000000..0b259d7d391 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs @@ -0,0 +1,70 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing ArrayOfArrayOfNumberOnly + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ArrayOfArrayOfNumberOnlyTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ArrayOfArrayOfNumberOnly + //private ArrayOfArrayOfNumberOnly instance; + + public ArrayOfArrayOfNumberOnlyTests() + { + // TODO uncomment below to create an instance of ArrayOfArrayOfNumberOnly + //instance = new ArrayOfArrayOfNumberOnly(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ArrayOfArrayOfNumberOnly + /// + [Fact] + public void ArrayOfArrayOfNumberOnlyInstanceTest() + { + // TODO uncomment below to test "IsType" ArrayOfArrayOfNumberOnly + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ArrayArrayNumber' + /// + [Fact] + public void ArrayArrayNumberTest() + { + // TODO unit test for the property 'ArrayArrayNumber' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs new file mode 100644 index 00000000000..27f312ad25f --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs @@ -0,0 +1,70 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing ArrayOfNumberOnly + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ArrayOfNumberOnlyTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ArrayOfNumberOnly + //private ArrayOfNumberOnly instance; + + public ArrayOfNumberOnlyTests() + { + // TODO uncomment below to create an instance of ArrayOfNumberOnly + //instance = new ArrayOfNumberOnly(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ArrayOfNumberOnly + /// + [Fact] + public void ArrayOfNumberOnlyInstanceTest() + { + // TODO uncomment below to test "IsType" ArrayOfNumberOnly + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ArrayNumber' + /// + [Fact] + public void ArrayNumberTest() + { + // TODO unit test for the property 'ArrayNumber' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs new file mode 100644 index 00000000000..a433e8c87cf --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs @@ -0,0 +1,86 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing ArrayTest + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ArrayTestTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ArrayTest + //private ArrayTest instance; + + public ArrayTestTests() + { + // TODO uncomment below to create an instance of ArrayTest + //instance = new ArrayTest(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ArrayTest + /// + [Fact] + public void ArrayTestInstanceTest() + { + // TODO uncomment below to test "IsType" ArrayTest + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ArrayOfString' + /// + [Fact] + public void ArrayOfStringTest() + { + // TODO unit test for the property 'ArrayOfString' + } + /// + /// Test the property 'ArrayArrayOfInteger' + /// + [Fact] + public void ArrayArrayOfIntegerTest() + { + // TODO unit test for the property 'ArrayArrayOfInteger' + } + /// + /// Test the property 'ArrayArrayOfModel' + /// + [Fact] + public void ArrayArrayOfModelTest() + { + // TODO unit test for the property 'ArrayArrayOfModel' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/BananaReqTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/BananaReqTests.cs new file mode 100644 index 00000000000..8a6eeb82eee --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/BananaReqTests.cs @@ -0,0 +1,78 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing BananaReq + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class BananaReqTests : IDisposable + { + // TODO uncomment below to declare an instance variable for BananaReq + //private BananaReq instance; + + public BananaReqTests() + { + // TODO uncomment below to create an instance of BananaReq + //instance = new BananaReq(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of BananaReq + /// + [Fact] + public void BananaReqInstanceTest() + { + // TODO uncomment below to test "IsType" BananaReq + //Assert.IsType(instance); + } + + + /// + /// Test the property 'LengthCm' + /// + [Fact] + public void LengthCmTest() + { + // TODO unit test for the property 'LengthCm' + } + /// + /// Test the property 'Sweet' + /// + [Fact] + public void SweetTest() + { + // TODO unit test for the property 'Sweet' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/BananaTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/BananaTests.cs new file mode 100644 index 00000000000..8d8cc376b03 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/BananaTests.cs @@ -0,0 +1,70 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing Banana + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class BananaTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Banana + //private Banana instance; + + public BananaTests() + { + // TODO uncomment below to create an instance of Banana + //instance = new Banana(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Banana + /// + [Fact] + public void BananaInstanceTest() + { + // TODO uncomment below to test "IsType" Banana + //Assert.IsType(instance); + } + + + /// + /// Test the property 'LengthCm' + /// + [Fact] + public void LengthCmTest() + { + // TODO unit test for the property 'LengthCm' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/BasquePigTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/BasquePigTests.cs new file mode 100644 index 00000000000..3cdccaa7595 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/BasquePigTests.cs @@ -0,0 +1,70 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing BasquePig + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class BasquePigTests : IDisposable + { + // TODO uncomment below to declare an instance variable for BasquePig + //private BasquePig instance; + + public BasquePigTests() + { + // TODO uncomment below to create an instance of BasquePig + //instance = new BasquePig(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of BasquePig + /// + [Fact] + public void BasquePigInstanceTest() + { + // TODO uncomment below to test "IsType" BasquePig + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ClassName' + /// + [Fact] + public void ClassNameTest() + { + // TODO unit test for the property 'ClassName' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs new file mode 100644 index 00000000000..185c83666fc --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs @@ -0,0 +1,110 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing Capitalization + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class CapitalizationTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Capitalization + //private Capitalization instance; + + public CapitalizationTests() + { + // TODO uncomment below to create an instance of Capitalization + //instance = new Capitalization(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Capitalization + /// + [Fact] + public void CapitalizationInstanceTest() + { + // TODO uncomment below to test "IsType" Capitalization + //Assert.IsType(instance); + } + + + /// + /// Test the property 'SmallCamel' + /// + [Fact] + public void SmallCamelTest() + { + // TODO unit test for the property 'SmallCamel' + } + /// + /// Test the property 'CapitalCamel' + /// + [Fact] + public void CapitalCamelTest() + { + // TODO unit test for the property 'CapitalCamel' + } + /// + /// Test the property 'SmallSnake' + /// + [Fact] + public void SmallSnakeTest() + { + // TODO unit test for the property 'SmallSnake' + } + /// + /// Test the property 'CapitalSnake' + /// + [Fact] + public void CapitalSnakeTest() + { + // TODO unit test for the property 'CapitalSnake' + } + /// + /// Test the property 'SCAETHFlowPoints' + /// + [Fact] + public void SCAETHFlowPointsTest() + { + // TODO unit test for the property 'SCAETHFlowPoints' + } + /// + /// Test the property 'ATT_NAME' + /// + [Fact] + public void ATT_NAMETest() + { + // TODO unit test for the property 'ATT_NAME' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs new file mode 100644 index 00000000000..fb51c28489c --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs @@ -0,0 +1,70 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing CatAllOf + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class CatAllOfTests : IDisposable + { + // TODO uncomment below to declare an instance variable for CatAllOf + //private CatAllOf instance; + + public CatAllOfTests() + { + // TODO uncomment below to create an instance of CatAllOf + //instance = new CatAllOf(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of CatAllOf + /// + [Fact] + public void CatAllOfInstanceTest() + { + // TODO uncomment below to test "IsType" CatAllOf + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Declawed' + /// + [Fact] + public void DeclawedTest() + { + // TODO unit test for the property 'Declawed' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/CatTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/CatTests.cs new file mode 100644 index 00000000000..701ba760282 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/CatTests.cs @@ -0,0 +1,70 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing Cat + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class CatTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Cat + //private Cat instance; + + public CatTests() + { + // TODO uncomment below to create an instance of Cat + //instance = new Cat(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Cat + /// + [Fact] + public void CatInstanceTest() + { + // TODO uncomment below to test "IsType" Cat + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Declawed' + /// + [Fact] + public void DeclawedTest() + { + // TODO unit test for the property 'Declawed' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ChildCatAllOfTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ChildCatAllOfTests.cs new file mode 100644 index 00000000000..49a53932490 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ChildCatAllOfTests.cs @@ -0,0 +1,78 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing ChildCatAllOf + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ChildCatAllOfTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ChildCatAllOf + //private ChildCatAllOf instance; + + public ChildCatAllOfTests() + { + // TODO uncomment below to create an instance of ChildCatAllOf + //instance = new ChildCatAllOf(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ChildCatAllOf + /// + [Fact] + public void ChildCatAllOfInstanceTest() + { + // TODO uncomment below to test "IsType" ChildCatAllOf + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'PetType' + /// + [Fact] + public void PetTypeTest() + { + // TODO unit test for the property 'PetType' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs new file mode 100644 index 00000000000..68566fd8d56 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs @@ -0,0 +1,78 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing ChildCat + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ChildCatTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ChildCat + //private ChildCat instance; + + public ChildCatTests() + { + // TODO uncomment below to create an instance of ChildCat + //instance = new ChildCat(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ChildCat + /// + [Fact] + public void ChildCatInstanceTest() + { + // TODO uncomment below to test "IsType" ChildCat + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'PetType' + /// + [Fact] + public void PetTypeTest() + { + // TODO unit test for the property 'PetType' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs new file mode 100644 index 00000000000..d29472e83aa --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs @@ -0,0 +1,70 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing ClassModel + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ClassModelTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ClassModel + //private ClassModel instance; + + public ClassModelTests() + { + // TODO uncomment below to create an instance of ClassModel + //instance = new ClassModel(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ClassModel + /// + [Fact] + public void ClassModelInstanceTest() + { + // TODO uncomment below to test "IsType" ClassModel + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Class' + /// + [Fact] + public void ClassTest() + { + // TODO unit test for the property 'Class' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs new file mode 100644 index 00000000000..b3529280c8d --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs @@ -0,0 +1,78 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing ComplexQuadrilateral + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ComplexQuadrilateralTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ComplexQuadrilateral + //private ComplexQuadrilateral instance; + + public ComplexQuadrilateralTests() + { + // TODO uncomment below to create an instance of ComplexQuadrilateral + //instance = new ComplexQuadrilateral(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ComplexQuadrilateral + /// + [Fact] + public void ComplexQuadrilateralInstanceTest() + { + // TODO uncomment below to test "IsType" ComplexQuadrilateral + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ShapeType' + /// + [Fact] + public void ShapeTypeTest() + { + // TODO unit test for the property 'ShapeType' + } + /// + /// Test the property 'QuadrilateralType' + /// + [Fact] + public void QuadrilateralTypeTest() + { + // TODO unit test for the property 'QuadrilateralType' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/DanishPigTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/DanishPigTests.cs new file mode 100644 index 00000000000..572d9bffa79 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/DanishPigTests.cs @@ -0,0 +1,70 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing DanishPig + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class DanishPigTests : IDisposable + { + // TODO uncomment below to declare an instance variable for DanishPig + //private DanishPig instance; + + public DanishPigTests() + { + // TODO uncomment below to create an instance of DanishPig + //instance = new DanishPig(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of DanishPig + /// + [Fact] + public void DanishPigInstanceTest() + { + // TODO uncomment below to test "IsType" DanishPig + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ClassName' + /// + [Fact] + public void ClassNameTest() + { + // TODO unit test for the property 'ClassName' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs new file mode 100644 index 00000000000..b22a4442096 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs @@ -0,0 +1,70 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing DogAllOf + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class DogAllOfTests : IDisposable + { + // TODO uncomment below to declare an instance variable for DogAllOf + //private DogAllOf instance; + + public DogAllOfTests() + { + // TODO uncomment below to create an instance of DogAllOf + //instance = new DogAllOf(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of DogAllOf + /// + [Fact] + public void DogAllOfInstanceTest() + { + // TODO uncomment below to test "IsType" DogAllOf + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Breed' + /// + [Fact] + public void BreedTest() + { + // TODO unit test for the property 'Breed' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/DogTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/DogTests.cs new file mode 100644 index 00000000000..992f93a51fd --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/DogTests.cs @@ -0,0 +1,70 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing Dog + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class DogTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Dog + //private Dog instance; + + public DogTests() + { + // TODO uncomment below to create an instance of Dog + //instance = new Dog(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Dog + /// + [Fact] + public void DogInstanceTest() + { + // TODO uncomment below to test "IsType" Dog + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Breed' + /// + [Fact] + public void BreedTest() + { + // TODO unit test for the property 'Breed' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/DrawingTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/DrawingTests.cs new file mode 100644 index 00000000000..0709ad9eeb3 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/DrawingTests.cs @@ -0,0 +1,94 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing Drawing + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class DrawingTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Drawing + //private Drawing instance; + + public DrawingTests() + { + // TODO uncomment below to create an instance of Drawing + //instance = new Drawing(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Drawing + /// + [Fact] + public void DrawingInstanceTest() + { + // TODO uncomment below to test "IsType" Drawing + //Assert.IsType(instance); + } + + + /// + /// Test the property 'MainShape' + /// + [Fact] + public void MainShapeTest() + { + // TODO unit test for the property 'MainShape' + } + /// + /// Test the property 'ShapeOrNull' + /// + [Fact] + public void ShapeOrNullTest() + { + // TODO unit test for the property 'ShapeOrNull' + } + /// + /// Test the property 'NullableShape' + /// + [Fact] + public void NullableShapeTest() + { + // TODO unit test for the property 'NullableShape' + } + /// + /// Test the property 'Shapes' + /// + [Fact] + public void ShapesTest() + { + // TODO unit test for the property 'Shapes' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs new file mode 100644 index 00000000000..5779ca29477 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs @@ -0,0 +1,78 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing EnumArrays + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class EnumArraysTests : IDisposable + { + // TODO uncomment below to declare an instance variable for EnumArrays + //private EnumArrays instance; + + public EnumArraysTests() + { + // TODO uncomment below to create an instance of EnumArrays + //instance = new EnumArrays(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of EnumArrays + /// + [Fact] + public void EnumArraysInstanceTest() + { + // TODO uncomment below to test "IsType" EnumArrays + //Assert.IsType(instance); + } + + + /// + /// Test the property 'JustSymbol' + /// + [Fact] + public void JustSymbolTest() + { + // TODO unit test for the property 'JustSymbol' + } + /// + /// Test the property 'ArrayEnum' + /// + [Fact] + public void ArrayEnumTest() + { + // TODO unit test for the property 'ArrayEnum' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs new file mode 100644 index 00000000000..a17738c5cbc --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing EnumClass + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class EnumClassTests : IDisposable + { + // TODO uncomment below to declare an instance variable for EnumClass + //private EnumClass instance; + + public EnumClassTests() + { + // TODO uncomment below to create an instance of EnumClass + //instance = new EnumClass(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of EnumClass + /// + [Fact] + public void EnumClassInstanceTest() + { + // TODO uncomment below to test "IsType" EnumClass + //Assert.IsType(instance); + } + + + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs new file mode 100644 index 00000000000..e2d84645c60 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs @@ -0,0 +1,126 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing EnumTest + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class EnumTestTests : IDisposable + { + // TODO uncomment below to declare an instance variable for EnumTest + //private EnumTest instance; + + public EnumTestTests() + { + // TODO uncomment below to create an instance of EnumTest + //instance = new EnumTest(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of EnumTest + /// + [Fact] + public void EnumTestInstanceTest() + { + // TODO uncomment below to test "IsType" EnumTest + //Assert.IsType(instance); + } + + + /// + /// Test the property 'EnumString' + /// + [Fact] + public void EnumStringTest() + { + // TODO unit test for the property 'EnumString' + } + /// + /// Test the property 'EnumStringRequired' + /// + [Fact] + public void EnumStringRequiredTest() + { + // TODO unit test for the property 'EnumStringRequired' + } + /// + /// Test the property 'EnumInteger' + /// + [Fact] + public void EnumIntegerTest() + { + // TODO unit test for the property 'EnumInteger' + } + /// + /// Test the property 'EnumNumber' + /// + [Fact] + public void EnumNumberTest() + { + // TODO unit test for the property 'EnumNumber' + } + /// + /// Test the property 'OuterEnum' + /// + [Fact] + public void OuterEnumTest() + { + // TODO unit test for the property 'OuterEnum' + } + /// + /// Test the property 'OuterEnumInteger' + /// + [Fact] + public void OuterEnumIntegerTest() + { + // TODO unit test for the property 'OuterEnumInteger' + } + /// + /// Test the property 'OuterEnumDefaultValue' + /// + [Fact] + public void OuterEnumDefaultValueTest() + { + // TODO unit test for the property 'OuterEnumDefaultValue' + } + /// + /// Test the property 'OuterEnumIntegerDefaultValue' + /// + [Fact] + public void OuterEnumIntegerDefaultValueTest() + { + // TODO unit test for the property 'OuterEnumIntegerDefaultValue' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs new file mode 100644 index 00000000000..4663cb667de --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs @@ -0,0 +1,78 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing EquilateralTriangle + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class EquilateralTriangleTests : IDisposable + { + // TODO uncomment below to declare an instance variable for EquilateralTriangle + //private EquilateralTriangle instance; + + public EquilateralTriangleTests() + { + // TODO uncomment below to create an instance of EquilateralTriangle + //instance = new EquilateralTriangle(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of EquilateralTriangle + /// + [Fact] + public void EquilateralTriangleInstanceTest() + { + // TODO uncomment below to test "IsType" EquilateralTriangle + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ShapeType' + /// + [Fact] + public void ShapeTypeTest() + { + // TODO unit test for the property 'ShapeType' + } + /// + /// Test the property 'TriangleType' + /// + [Fact] + public void TriangleTypeTest() + { + // TODO unit test for the property 'TriangleType' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs new file mode 100644 index 00000000000..9f45b4fe89d --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs @@ -0,0 +1,78 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing FileSchemaTestClass + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class FileSchemaTestClassTests : IDisposable + { + // TODO uncomment below to declare an instance variable for FileSchemaTestClass + //private FileSchemaTestClass instance; + + public FileSchemaTestClassTests() + { + // TODO uncomment below to create an instance of FileSchemaTestClass + //instance = new FileSchemaTestClass(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of FileSchemaTestClass + /// + [Fact] + public void FileSchemaTestClassInstanceTest() + { + // TODO uncomment below to test "IsType" FileSchemaTestClass + //Assert.IsType(instance); + } + + + /// + /// Test the property 'File' + /// + [Fact] + public void FileTest() + { + // TODO unit test for the property 'File' + } + /// + /// Test the property 'Files' + /// + [Fact] + public void FilesTest() + { + // TODO unit test for the property 'Files' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/FileTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/FileTests.cs new file mode 100644 index 00000000000..761bb72a844 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/FileTests.cs @@ -0,0 +1,70 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing File + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class FileTests : IDisposable + { + // TODO uncomment below to declare an instance variable for File + //private File instance; + + public FileTests() + { + // TODO uncomment below to create an instance of File + //instance = new File(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of File + /// + [Fact] + public void FileInstanceTest() + { + // TODO uncomment below to test "IsType" File + //Assert.IsType(instance); + } + + + /// + /// Test the property 'SourceURI' + /// + [Fact] + public void SourceURITest() + { + // TODO unit test for the property 'SourceURI' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/FooTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/FooTests.cs new file mode 100644 index 00000000000..0b6ed52edbd --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/FooTests.cs @@ -0,0 +1,70 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing Foo + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class FooTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Foo + //private Foo instance; + + public FooTests() + { + // TODO uncomment below to create an instance of Foo + //instance = new Foo(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Foo + /// + [Fact] + public void FooInstanceTest() + { + // TODO uncomment below to test "IsType" Foo + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Bar' + /// + [Fact] + public void BarTest() + { + // TODO unit test for the property 'Bar' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs new file mode 100644 index 00000000000..97332800e9a --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs @@ -0,0 +1,190 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing FormatTest + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class FormatTestTests : IDisposable + { + // TODO uncomment below to declare an instance variable for FormatTest + //private FormatTest instance; + + public FormatTestTests() + { + // TODO uncomment below to create an instance of FormatTest + //instance = new FormatTest(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of FormatTest + /// + [Fact] + public void FormatTestInstanceTest() + { + // TODO uncomment below to test "IsType" FormatTest + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Integer' + /// + [Fact] + public void IntegerTest() + { + // TODO unit test for the property 'Integer' + } + /// + /// Test the property 'Int32' + /// + [Fact] + public void Int32Test() + { + // TODO unit test for the property 'Int32' + } + /// + /// Test the property 'Int64' + /// + [Fact] + public void Int64Test() + { + // TODO unit test for the property 'Int64' + } + /// + /// Test the property 'Number' + /// + [Fact] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property 'Float' + /// + [Fact] + public void FloatTest() + { + // TODO unit test for the property 'Float' + } + /// + /// Test the property 'Double' + /// + [Fact] + public void DoubleTest() + { + // TODO unit test for the property 'Double' + } + /// + /// Test the property 'Decimal' + /// + [Fact] + public void DecimalTest() + { + // TODO unit test for the property 'Decimal' + } + /// + /// Test the property 'String' + /// + [Fact] + public void StringTest() + { + // TODO unit test for the property 'String' + } + /// + /// Test the property 'Byte' + /// + [Fact] + public void ByteTest() + { + // TODO unit test for the property 'Byte' + } + /// + /// Test the property 'Binary' + /// + [Fact] + public void BinaryTest() + { + // TODO unit test for the property 'Binary' + } + /// + /// Test the property 'Date' + /// + [Fact] + public void DateTest() + { + // TODO unit test for the property 'Date' + } + /// + /// Test the property 'DateTime' + /// + [Fact] + public void DateTimeTest() + { + // TODO unit test for the property 'DateTime' + } + /// + /// Test the property 'Uuid' + /// + [Fact] + public void UuidTest() + { + // TODO unit test for the property 'Uuid' + } + /// + /// Test the property 'Password' + /// + [Fact] + public void PasswordTest() + { + // TODO unit test for the property 'Password' + } + /// + /// Test the property 'PatternWithDigits' + /// + [Fact] + public void PatternWithDigitsTest() + { + // TODO unit test for the property 'PatternWithDigits' + } + /// + /// Test the property 'PatternWithDigitsAndDelimiter' + /// + [Fact] + public void PatternWithDigitsAndDelimiterTest() + { + // TODO unit test for the property 'PatternWithDigitsAndDelimiter' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs new file mode 100644 index 00000000000..5ea9e3ffc1d --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs @@ -0,0 +1,94 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing FruitReq + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class FruitReqTests : IDisposable + { + // TODO uncomment below to declare an instance variable for FruitReq + //private FruitReq instance; + + public FruitReqTests() + { + // TODO uncomment below to create an instance of FruitReq + //instance = new FruitReq(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of FruitReq + /// + [Fact] + public void FruitReqInstanceTest() + { + // TODO uncomment below to test "IsType" FruitReq + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Cultivar' + /// + [Fact] + public void CultivarTest() + { + // TODO unit test for the property 'Cultivar' + } + /// + /// Test the property 'Mealy' + /// + [Fact] + public void MealyTest() + { + // TODO unit test for the property 'Mealy' + } + /// + /// Test the property 'LengthCm' + /// + [Fact] + public void LengthCmTest() + { + // TODO unit test for the property 'LengthCm' + } + /// + /// Test the property 'Sweet' + /// + [Fact] + public void SweetTest() + { + // TODO unit test for the property 'Sweet' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/FruitTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/FruitTests.cs new file mode 100644 index 00000000000..91e069bb42f --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/FruitTests.cs @@ -0,0 +1,94 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing Fruit + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class FruitTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Fruit + //private Fruit instance; + + public FruitTests() + { + // TODO uncomment below to create an instance of Fruit + //instance = new Fruit(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Fruit + /// + [Fact] + public void FruitInstanceTest() + { + // TODO uncomment below to test "IsType" Fruit + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Color' + /// + [Fact] + public void ColorTest() + { + // TODO unit test for the property 'Color' + } + /// + /// Test the property 'Cultivar' + /// + [Fact] + public void CultivarTest() + { + // TODO unit test for the property 'Cultivar' + } + /// + /// Test the property 'Origin' + /// + [Fact] + public void OriginTest() + { + // TODO unit test for the property 'Origin' + } + /// + /// Test the property 'LengthCm' + /// + [Fact] + public void LengthCmTest() + { + // TODO unit test for the property 'LengthCm' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs new file mode 100644 index 00000000000..08fb0e07a1c --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs @@ -0,0 +1,94 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing GmFruit + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class GmFruitTests : IDisposable + { + // TODO uncomment below to declare an instance variable for GmFruit + //private GmFruit instance; + + public GmFruitTests() + { + // TODO uncomment below to create an instance of GmFruit + //instance = new GmFruit(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of GmFruit + /// + [Fact] + public void GmFruitInstanceTest() + { + // TODO uncomment below to test "IsType" GmFruit + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Color' + /// + [Fact] + public void ColorTest() + { + // TODO unit test for the property 'Color' + } + /// + /// Test the property 'Cultivar' + /// + [Fact] + public void CultivarTest() + { + // TODO unit test for the property 'Cultivar' + } + /// + /// Test the property 'Origin' + /// + [Fact] + public void OriginTest() + { + // TODO unit test for the property 'Origin' + } + /// + /// Test the property 'LengthCm' + /// + [Fact] + public void LengthCmTest() + { + // TODO unit test for the property 'LengthCm' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/GrandparentAnimalTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/GrandparentAnimalTests.cs new file mode 100644 index 00000000000..75f4fd8b0e5 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/GrandparentAnimalTests.cs @@ -0,0 +1,88 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing GrandparentAnimal + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class GrandparentAnimalTests : IDisposable + { + // TODO uncomment below to declare an instance variable for GrandparentAnimal + //private GrandparentAnimal instance; + + public GrandparentAnimalTests() + { + // TODO uncomment below to create an instance of GrandparentAnimal + //instance = new GrandparentAnimal(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of GrandparentAnimal + /// + [Fact] + public void GrandparentAnimalInstanceTest() + { + // TODO uncomment below to test "IsType" GrandparentAnimal + //Assert.IsType(instance); + } + + /// + /// Test deserialize a ParentPet from type GrandparentAnimal + /// + [Fact] + public void ParentPetDeserializeFromGrandparentAnimalTest() + { + // TODO uncomment below to test deserialize a ParentPet from type GrandparentAnimal + //Assert.IsType(JsonConvert.DeserializeObject(new ParentPet().ToJson())); + } + /// + /// Test deserialize a ChildCat from type ParentPet + /// + [Fact] + public void ChildCatDeserializeFromParentPetTest() + { + // TODO uncomment below to test deserialize a ChildCat from type ParentPet + //Assert.IsType(JsonConvert.DeserializeObject(new ChildCat().ToJson())); + } + + /// + /// Test the property 'PetType' + /// + [Fact] + public void PetTypeTest() + { + // TODO unit test for the property 'PetType' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs new file mode 100644 index 00000000000..651a9f0ce30 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs @@ -0,0 +1,78 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing HasOnlyReadOnly + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class HasOnlyReadOnlyTests : IDisposable + { + // TODO uncomment below to declare an instance variable for HasOnlyReadOnly + //private HasOnlyReadOnly instance; + + public HasOnlyReadOnlyTests() + { + // TODO uncomment below to create an instance of HasOnlyReadOnly + //instance = new HasOnlyReadOnly(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of HasOnlyReadOnly + /// + [Fact] + public void HasOnlyReadOnlyInstanceTest() + { + // TODO uncomment below to test "IsType" HasOnlyReadOnly + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Bar' + /// + [Fact] + public void BarTest() + { + // TODO unit test for the property 'Bar' + } + /// + /// Test the property 'Foo' + /// + [Fact] + public void FooTest() + { + // TODO unit test for the property 'Foo' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/HealthCheckResultTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/HealthCheckResultTests.cs new file mode 100644 index 00000000000..857190a3334 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/HealthCheckResultTests.cs @@ -0,0 +1,70 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing HealthCheckResult + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class HealthCheckResultTests : IDisposable + { + // TODO uncomment below to declare an instance variable for HealthCheckResult + //private HealthCheckResult instance; + + public HealthCheckResultTests() + { + // TODO uncomment below to create an instance of HealthCheckResult + //instance = new HealthCheckResult(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of HealthCheckResult + /// + [Fact] + public void HealthCheckResultInstanceTest() + { + // TODO uncomment below to test "IsType" HealthCheckResult + //Assert.IsType(instance); + } + + + /// + /// Test the property 'NullableMessage' + /// + [Fact] + public void NullableMessageTest() + { + // TODO unit test for the property 'NullableMessage' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/InlineResponseDefaultTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/InlineResponseDefaultTests.cs new file mode 100644 index 00000000000..7731f80c16d --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/InlineResponseDefaultTests.cs @@ -0,0 +1,70 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing InlineResponseDefault + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class InlineResponseDefaultTests : IDisposable + { + // TODO uncomment below to declare an instance variable for InlineResponseDefault + //private InlineResponseDefault instance; + + public InlineResponseDefaultTests() + { + // TODO uncomment below to create an instance of InlineResponseDefault + //instance = new InlineResponseDefault(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InlineResponseDefault + /// + [Fact] + public void InlineResponseDefaultInstanceTest() + { + // TODO uncomment below to test "IsType" InlineResponseDefault + //Assert.IsType(instance); + } + + + /// + /// Test the property 'String' + /// + [Fact] + public void StringTest() + { + // TODO unit test for the property 'String' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs new file mode 100644 index 00000000000..755c417cc54 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs @@ -0,0 +1,78 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing IsoscelesTriangle + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class IsoscelesTriangleTests : IDisposable + { + // TODO uncomment below to declare an instance variable for IsoscelesTriangle + //private IsoscelesTriangle instance; + + public IsoscelesTriangleTests() + { + // TODO uncomment below to create an instance of IsoscelesTriangle + //instance = new IsoscelesTriangle(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of IsoscelesTriangle + /// + [Fact] + public void IsoscelesTriangleInstanceTest() + { + // TODO uncomment below to test "IsType" IsoscelesTriangle + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ShapeType' + /// + [Fact] + public void ShapeTypeTest() + { + // TODO unit test for the property 'ShapeType' + } + /// + /// Test the property 'TriangleType' + /// + [Fact] + public void TriangleTypeTest() + { + // TODO unit test for the property 'TriangleType' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ListTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ListTests.cs new file mode 100644 index 00000000000..2ed828d0520 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ListTests.cs @@ -0,0 +1,70 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing List + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ListTests : IDisposable + { + // TODO uncomment below to declare an instance variable for List + //private List instance; + + public ListTests() + { + // TODO uncomment below to create an instance of List + //instance = new List(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of List + /// + [Fact] + public void ListInstanceTest() + { + // TODO uncomment below to test "IsType" List + //Assert.IsType(instance); + } + + + /// + /// Test the property '_123List' + /// + [Fact] + public void _123ListTest() + { + // TODO unit test for the property '_123List' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/MammalTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/MammalTests.cs new file mode 100644 index 00000000000..7b46cbf0645 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/MammalTests.cs @@ -0,0 +1,94 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing Mammal + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class MammalTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Mammal + //private Mammal instance; + + public MammalTests() + { + // TODO uncomment below to create an instance of Mammal + //instance = new Mammal(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Mammal + /// + [Fact] + public void MammalInstanceTest() + { + // TODO uncomment below to test "IsType" Mammal + //Assert.IsType(instance); + } + + + /// + /// Test the property 'HasBaleen' + /// + [Fact] + public void HasBaleenTest() + { + // TODO unit test for the property 'HasBaleen' + } + /// + /// Test the property 'HasTeeth' + /// + [Fact] + public void HasTeethTest() + { + // TODO unit test for the property 'HasTeeth' + } + /// + /// Test the property 'ClassName' + /// + [Fact] + public void ClassNameTest() + { + // TODO unit test for the property 'ClassName' + } + /// + /// Test the property 'Type' + /// + [Fact] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/MapTestTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/MapTestTests.cs new file mode 100644 index 00000000000..20036e1c905 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/MapTestTests.cs @@ -0,0 +1,94 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing MapTest + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class MapTestTests : IDisposable + { + // TODO uncomment below to declare an instance variable for MapTest + //private MapTest instance; + + public MapTestTests() + { + // TODO uncomment below to create an instance of MapTest + //instance = new MapTest(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of MapTest + /// + [Fact] + public void MapTestInstanceTest() + { + // TODO uncomment below to test "IsType" MapTest + //Assert.IsType(instance); + } + + + /// + /// Test the property 'MapMapOfString' + /// + [Fact] + public void MapMapOfStringTest() + { + // TODO unit test for the property 'MapMapOfString' + } + /// + /// Test the property 'MapOfEnumString' + /// + [Fact] + public void MapOfEnumStringTest() + { + // TODO unit test for the property 'MapOfEnumString' + } + /// + /// Test the property 'DirectMap' + /// + [Fact] + public void DirectMapTest() + { + // TODO unit test for the property 'DirectMap' + } + /// + /// Test the property 'IndirectMap' + /// + [Fact] + public void IndirectMapTest() + { + // TODO unit test for the property 'IndirectMap' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs new file mode 100644 index 00000000000..f56cd715f45 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs @@ -0,0 +1,86 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing MixedPropertiesAndAdditionalPropertiesClass + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class MixedPropertiesAndAdditionalPropertiesClassTests : IDisposable + { + // TODO uncomment below to declare an instance variable for MixedPropertiesAndAdditionalPropertiesClass + //private MixedPropertiesAndAdditionalPropertiesClass instance; + + public MixedPropertiesAndAdditionalPropertiesClassTests() + { + // TODO uncomment below to create an instance of MixedPropertiesAndAdditionalPropertiesClass + //instance = new MixedPropertiesAndAdditionalPropertiesClass(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of MixedPropertiesAndAdditionalPropertiesClass + /// + [Fact] + public void MixedPropertiesAndAdditionalPropertiesClassInstanceTest() + { + // TODO uncomment below to test "IsType" MixedPropertiesAndAdditionalPropertiesClass + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Uuid' + /// + [Fact] + public void UuidTest() + { + // TODO unit test for the property 'Uuid' + } + /// + /// Test the property 'DateTime' + /// + [Fact] + public void DateTimeTest() + { + // TODO unit test for the property 'DateTime' + } + /// + /// Test the property 'Map' + /// + [Fact] + public void MapTest() + { + // TODO unit test for the property 'Map' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs new file mode 100644 index 00000000000..e25478618f2 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs @@ -0,0 +1,78 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing Model200Response + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class Model200ResponseTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Model200Response + //private Model200Response instance; + + public Model200ResponseTests() + { + // TODO uncomment below to create an instance of Model200Response + //instance = new Model200Response(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Model200Response + /// + [Fact] + public void Model200ResponseInstanceTest() + { + // TODO uncomment below to test "IsType" Model200Response + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Class' + /// + [Fact] + public void ClassTest() + { + // TODO unit test for the property 'Class' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs new file mode 100644 index 00000000000..8a544e417fe --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs @@ -0,0 +1,70 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing ModelClient + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ModelClientTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ModelClient + //private ModelClient instance; + + public ModelClientTests() + { + // TODO uncomment below to create an instance of ModelClient + //instance = new ModelClient(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ModelClient + /// + [Fact] + public void ModelClientInstanceTest() + { + // TODO uncomment below to test "IsType" ModelClient + //Assert.IsType(instance); + } + + + /// + /// Test the property '__Client' + /// + [Fact] + public void __ClientTest() + { + // TODO unit test for the property '__Client' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/NameTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/NameTests.cs new file mode 100644 index 00000000000..c390049e66d --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/NameTests.cs @@ -0,0 +1,94 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing Name + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class NameTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Name + //private Name instance; + + public NameTests() + { + // TODO uncomment below to create an instance of Name + //instance = new Name(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Name + /// + [Fact] + public void NameInstanceTest() + { + // TODO uncomment below to test "IsType" Name + //Assert.IsType(instance); + } + + + /// + /// Test the property '_Name' + /// + [Fact] + public void _NameTest() + { + // TODO unit test for the property '_Name' + } + /// + /// Test the property 'SnakeCase' + /// + [Fact] + public void SnakeCaseTest() + { + // TODO unit test for the property 'SnakeCase' + } + /// + /// Test the property 'Property' + /// + [Fact] + public void PropertyTest() + { + // TODO unit test for the property 'Property' + } + /// + /// Test the property '_123Number' + /// + [Fact] + public void _123NumberTest() + { + // TODO unit test for the property '_123Number' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/NullableClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/NullableClassTests.cs new file mode 100644 index 00000000000..8f00505612a --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/NullableClassTests.cs @@ -0,0 +1,158 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing NullableClass + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class NullableClassTests : IDisposable + { + // TODO uncomment below to declare an instance variable for NullableClass + //private NullableClass instance; + + public NullableClassTests() + { + // TODO uncomment below to create an instance of NullableClass + //instance = new NullableClass(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of NullableClass + /// + [Fact] + public void NullableClassInstanceTest() + { + // TODO uncomment below to test "IsType" NullableClass + //Assert.IsType(instance); + } + + + /// + /// Test the property 'IntegerProp' + /// + [Fact] + public void IntegerPropTest() + { + // TODO unit test for the property 'IntegerProp' + } + /// + /// Test the property 'NumberProp' + /// + [Fact] + public void NumberPropTest() + { + // TODO unit test for the property 'NumberProp' + } + /// + /// Test the property 'BooleanProp' + /// + [Fact] + public void BooleanPropTest() + { + // TODO unit test for the property 'BooleanProp' + } + /// + /// Test the property 'StringProp' + /// + [Fact] + public void StringPropTest() + { + // TODO unit test for the property 'StringProp' + } + /// + /// Test the property 'DateProp' + /// + [Fact] + public void DatePropTest() + { + // TODO unit test for the property 'DateProp' + } + /// + /// Test the property 'DatetimeProp' + /// + [Fact] + public void DatetimePropTest() + { + // TODO unit test for the property 'DatetimeProp' + } + /// + /// Test the property 'ArrayNullableProp' + /// + [Fact] + public void ArrayNullablePropTest() + { + // TODO unit test for the property 'ArrayNullableProp' + } + /// + /// Test the property 'ArrayAndItemsNullableProp' + /// + [Fact] + public void ArrayAndItemsNullablePropTest() + { + // TODO unit test for the property 'ArrayAndItemsNullableProp' + } + /// + /// Test the property 'ArrayItemsNullable' + /// + [Fact] + public void ArrayItemsNullableTest() + { + // TODO unit test for the property 'ArrayItemsNullable' + } + /// + /// Test the property 'ObjectNullableProp' + /// + [Fact] + public void ObjectNullablePropTest() + { + // TODO unit test for the property 'ObjectNullableProp' + } + /// + /// Test the property 'ObjectAndItemsNullableProp' + /// + [Fact] + public void ObjectAndItemsNullablePropTest() + { + // TODO unit test for the property 'ObjectAndItemsNullableProp' + } + /// + /// Test the property 'ObjectItemsNullable' + /// + [Fact] + public void ObjectItemsNullableTest() + { + // TODO unit test for the property 'ObjectItemsNullable' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs new file mode 100644 index 00000000000..5662f91d6e6 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs @@ -0,0 +1,78 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing NullableShape + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class NullableShapeTests : IDisposable + { + // TODO uncomment below to declare an instance variable for NullableShape + //private NullableShape instance; + + public NullableShapeTests() + { + // TODO uncomment below to create an instance of NullableShape + //instance = new NullableShape(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of NullableShape + /// + [Fact] + public void NullableShapeInstanceTest() + { + // TODO uncomment below to test "IsType" NullableShape + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ShapeType' + /// + [Fact] + public void ShapeTypeTest() + { + // TODO unit test for the property 'ShapeType' + } + /// + /// Test the property 'QuadrilateralType' + /// + [Fact] + public void QuadrilateralTypeTest() + { + // TODO unit test for the property 'QuadrilateralType' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs new file mode 100644 index 00000000000..3a06cb020b2 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs @@ -0,0 +1,70 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing NumberOnly + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class NumberOnlyTests : IDisposable + { + // TODO uncomment below to declare an instance variable for NumberOnly + //private NumberOnly instance; + + public NumberOnlyTests() + { + // TODO uncomment below to create an instance of NumberOnly + //instance = new NumberOnly(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of NumberOnly + /// + [Fact] + public void NumberOnlyInstanceTest() + { + // TODO uncomment below to test "IsType" NumberOnly + //Assert.IsType(instance); + } + + + /// + /// Test the property 'JustNumber' + /// + [Fact] + public void JustNumberTest() + { + // TODO unit test for the property 'JustNumber' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs new file mode 100644 index 00000000000..2efda0db59c --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs @@ -0,0 +1,86 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing OuterComposite + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class OuterCompositeTests : IDisposable + { + // TODO uncomment below to declare an instance variable for OuterComposite + //private OuterComposite instance; + + public OuterCompositeTests() + { + // TODO uncomment below to create an instance of OuterComposite + //instance = new OuterComposite(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of OuterComposite + /// + [Fact] + public void OuterCompositeInstanceTest() + { + // TODO uncomment below to test "IsType" OuterComposite + //Assert.IsType(instance); + } + + + /// + /// Test the property 'MyNumber' + /// + [Fact] + public void MyNumberTest() + { + // TODO unit test for the property 'MyNumber' + } + /// + /// Test the property 'MyString' + /// + [Fact] + public void MyStringTest() + { + // TODO unit test for the property 'MyString' + } + /// + /// Test the property 'MyBoolean' + /// + [Fact] + public void MyBooleanTest() + { + // TODO unit test for the property 'MyBoolean' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/OuterEnumDefaultValueTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/OuterEnumDefaultValueTests.cs new file mode 100644 index 00000000000..986fff774c4 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/OuterEnumDefaultValueTests.cs @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing OuterEnumDefaultValue + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class OuterEnumDefaultValueTests : IDisposable + { + // TODO uncomment below to declare an instance variable for OuterEnumDefaultValue + //private OuterEnumDefaultValue instance; + + public OuterEnumDefaultValueTests() + { + // TODO uncomment below to create an instance of OuterEnumDefaultValue + //instance = new OuterEnumDefaultValue(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of OuterEnumDefaultValue + /// + [Fact] + public void OuterEnumDefaultValueInstanceTest() + { + // TODO uncomment below to test "IsType" OuterEnumDefaultValue + //Assert.IsType(instance); + } + + + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerDefaultValueTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerDefaultValueTests.cs new file mode 100644 index 00000000000..015d5dab945 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerDefaultValueTests.cs @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing OuterEnumIntegerDefaultValue + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class OuterEnumIntegerDefaultValueTests : IDisposable + { + // TODO uncomment below to declare an instance variable for OuterEnumIntegerDefaultValue + //private OuterEnumIntegerDefaultValue instance; + + public OuterEnumIntegerDefaultValueTests() + { + // TODO uncomment below to create an instance of OuterEnumIntegerDefaultValue + //instance = new OuterEnumIntegerDefaultValue(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of OuterEnumIntegerDefaultValue + /// + [Fact] + public void OuterEnumIntegerDefaultValueInstanceTest() + { + // TODO uncomment below to test "IsType" OuterEnumIntegerDefaultValue + //Assert.IsType(instance); + } + + + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerTests.cs new file mode 100644 index 00000000000..385e899110a --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerTests.cs @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing OuterEnumInteger + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class OuterEnumIntegerTests : IDisposable + { + // TODO uncomment below to declare an instance variable for OuterEnumInteger + //private OuterEnumInteger instance; + + public OuterEnumIntegerTests() + { + // TODO uncomment below to create an instance of OuterEnumInteger + //instance = new OuterEnumInteger(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of OuterEnumInteger + /// + [Fact] + public void OuterEnumIntegerInstanceTest() + { + // TODO uncomment below to test "IsType" OuterEnumInteger + //Assert.IsType(instance); + } + + + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs new file mode 100644 index 00000000000..f47304767b9 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing OuterEnum + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class OuterEnumTests : IDisposable + { + // TODO uncomment below to declare an instance variable for OuterEnum + //private OuterEnum instance; + + public OuterEnumTests() + { + // TODO uncomment below to create an instance of OuterEnum + //instance = new OuterEnum(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of OuterEnum + /// + [Fact] + public void OuterEnumInstanceTest() + { + // TODO uncomment below to test "IsType" OuterEnum + //Assert.IsType(instance); + } + + + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ParentPetTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ParentPetTests.cs new file mode 100644 index 00000000000..1e17568ed33 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ParentPetTests.cs @@ -0,0 +1,71 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing ParentPet + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ParentPetTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ParentPet + //private ParentPet instance; + + public ParentPetTests() + { + // TODO uncomment below to create an instance of ParentPet + //instance = new ParentPet(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ParentPet + /// + [Fact] + public void ParentPetInstanceTest() + { + // TODO uncomment below to test "IsType" ParentPet + //Assert.IsType(instance); + } + + /// + /// Test deserialize a ChildCat from type ParentPet + /// + [Fact] + public void ChildCatDeserializeFromParentPetTest() + { + // TODO uncomment below to test deserialize a ChildCat from type ParentPet + //Assert.IsType(JsonConvert.DeserializeObject(new ChildCat().ToJson())); + } + + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/PigTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/PigTests.cs new file mode 100644 index 00000000000..55cf2189046 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/PigTests.cs @@ -0,0 +1,70 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing Pig + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PigTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Pig + //private Pig instance; + + public PigTests() + { + // TODO uncomment below to create an instance of Pig + //instance = new Pig(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Pig + /// + [Fact] + public void PigInstanceTest() + { + // TODO uncomment below to test "IsType" Pig + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ClassName' + /// + [Fact] + public void ClassNameTest() + { + // TODO unit test for the property 'ClassName' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/QuadrilateralInterfaceTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/QuadrilateralInterfaceTests.cs new file mode 100644 index 00000000000..6eef9f4c816 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/QuadrilateralInterfaceTests.cs @@ -0,0 +1,70 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing QuadrilateralInterface + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class QuadrilateralInterfaceTests : IDisposable + { + // TODO uncomment below to declare an instance variable for QuadrilateralInterface + //private QuadrilateralInterface instance; + + public QuadrilateralInterfaceTests() + { + // TODO uncomment below to create an instance of QuadrilateralInterface + //instance = new QuadrilateralInterface(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of QuadrilateralInterface + /// + [Fact] + public void QuadrilateralInterfaceInstanceTest() + { + // TODO uncomment below to test "IsType" QuadrilateralInterface + //Assert.IsType(instance); + } + + + /// + /// Test the property 'QuadrilateralType' + /// + [Fact] + public void QuadrilateralTypeTest() + { + // TODO unit test for the property 'QuadrilateralType' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs new file mode 100644 index 00000000000..26826681a47 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs @@ -0,0 +1,78 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing Quadrilateral + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class QuadrilateralTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Quadrilateral + //private Quadrilateral instance; + + public QuadrilateralTests() + { + // TODO uncomment below to create an instance of Quadrilateral + //instance = new Quadrilateral(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Quadrilateral + /// + [Fact] + public void QuadrilateralInstanceTest() + { + // TODO uncomment below to test "IsType" Quadrilateral + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ShapeType' + /// + [Fact] + public void ShapeTypeTest() + { + // TODO unit test for the property 'ShapeType' + } + /// + /// Test the property 'QuadrilateralType' + /// + [Fact] + public void QuadrilateralTypeTest() + { + // TODO unit test for the property 'QuadrilateralType' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs new file mode 100644 index 00000000000..dc3d0fad54c --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs @@ -0,0 +1,78 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing ReadOnlyFirst + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ReadOnlyFirstTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ReadOnlyFirst + //private ReadOnlyFirst instance; + + public ReadOnlyFirstTests() + { + // TODO uncomment below to create an instance of ReadOnlyFirst + //instance = new ReadOnlyFirst(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ReadOnlyFirst + /// + [Fact] + public void ReadOnlyFirstInstanceTest() + { + // TODO uncomment below to test "IsType" ReadOnlyFirst + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Bar' + /// + [Fact] + public void BarTest() + { + // TODO unit test for the property 'Bar' + } + /// + /// Test the property 'Baz' + /// + [Fact] + public void BazTest() + { + // TODO unit test for the property 'Baz' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ReturnTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ReturnTests.cs new file mode 100644 index 00000000000..c8c1d6510d2 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ReturnTests.cs @@ -0,0 +1,70 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing Return + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ReturnTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Return + //private Return instance; + + public ReturnTests() + { + // TODO uncomment below to create an instance of Return + //instance = new Return(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Return + /// + [Fact] + public void ReturnInstanceTest() + { + // TODO uncomment below to test "IsType" Return + //Assert.IsType(instance); + } + + + /// + /// Test the property '_Return' + /// + [Fact] + public void _ReturnTest() + { + // TODO unit test for the property '_Return' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs new file mode 100644 index 00000000000..04cb9f1ab6b --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs @@ -0,0 +1,78 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing ScaleneTriangle + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ScaleneTriangleTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ScaleneTriangle + //private ScaleneTriangle instance; + + public ScaleneTriangleTests() + { + // TODO uncomment below to create an instance of ScaleneTriangle + //instance = new ScaleneTriangle(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ScaleneTriangle + /// + [Fact] + public void ScaleneTriangleInstanceTest() + { + // TODO uncomment below to test "IsType" ScaleneTriangle + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ShapeType' + /// + [Fact] + public void ShapeTypeTest() + { + // TODO unit test for the property 'ShapeType' + } + /// + /// Test the property 'TriangleType' + /// + [Fact] + public void TriangleTypeTest() + { + // TODO unit test for the property 'TriangleType' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ShapeInterfaceTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ShapeInterfaceTests.cs new file mode 100644 index 00000000000..7bd0bc86f96 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ShapeInterfaceTests.cs @@ -0,0 +1,70 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing ShapeInterface + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ShapeInterfaceTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ShapeInterface + //private ShapeInterface instance; + + public ShapeInterfaceTests() + { + // TODO uncomment below to create an instance of ShapeInterface + //instance = new ShapeInterface(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ShapeInterface + /// + [Fact] + public void ShapeInterfaceInstanceTest() + { + // TODO uncomment below to test "IsType" ShapeInterface + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ShapeType' + /// + [Fact] + public void ShapeTypeTest() + { + // TODO unit test for the property 'ShapeType' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs new file mode 100644 index 00000000000..d0af114157c --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs @@ -0,0 +1,78 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing ShapeOrNull + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ShapeOrNullTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ShapeOrNull + //private ShapeOrNull instance; + + public ShapeOrNullTests() + { + // TODO uncomment below to create an instance of ShapeOrNull + //instance = new ShapeOrNull(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ShapeOrNull + /// + [Fact] + public void ShapeOrNullInstanceTest() + { + // TODO uncomment below to test "IsType" ShapeOrNull + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ShapeType' + /// + [Fact] + public void ShapeTypeTest() + { + // TODO unit test for the property 'ShapeType' + } + /// + /// Test the property 'QuadrilateralType' + /// + [Fact] + public void QuadrilateralTypeTest() + { + // TODO unit test for the property 'QuadrilateralType' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ShapeTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ShapeTests.cs new file mode 100644 index 00000000000..b01bd531f85 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ShapeTests.cs @@ -0,0 +1,78 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing Shape + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ShapeTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Shape + //private Shape instance; + + public ShapeTests() + { + // TODO uncomment below to create an instance of Shape + //instance = new Shape(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Shape + /// + [Fact] + public void ShapeInstanceTest() + { + // TODO uncomment below to test "IsType" Shape + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ShapeType' + /// + [Fact] + public void ShapeTypeTest() + { + // TODO unit test for the property 'ShapeType' + } + /// + /// Test the property 'QuadrilateralType' + /// + [Fact] + public void QuadrilateralTypeTest() + { + // TODO unit test for the property 'QuadrilateralType' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs new file mode 100644 index 00000000000..6648e980928 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs @@ -0,0 +1,78 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing SimpleQuadrilateral + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class SimpleQuadrilateralTests : IDisposable + { + // TODO uncomment below to declare an instance variable for SimpleQuadrilateral + //private SimpleQuadrilateral instance; + + public SimpleQuadrilateralTests() + { + // TODO uncomment below to create an instance of SimpleQuadrilateral + //instance = new SimpleQuadrilateral(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of SimpleQuadrilateral + /// + [Fact] + public void SimpleQuadrilateralInstanceTest() + { + // TODO uncomment below to test "IsType" SimpleQuadrilateral + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ShapeType' + /// + [Fact] + public void ShapeTypeTest() + { + // TODO unit test for the property 'ShapeType' + } + /// + /// Test the property 'QuadrilateralType' + /// + [Fact] + public void QuadrilateralTypeTest() + { + // TODO unit test for the property 'QuadrilateralType' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs new file mode 100644 index 00000000000..57c3f6f9e42 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs @@ -0,0 +1,70 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing SpecialModelName + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class SpecialModelNameTests : IDisposable + { + // TODO uncomment below to declare an instance variable for SpecialModelName + //private SpecialModelName instance; + + public SpecialModelNameTests() + { + // TODO uncomment below to create an instance of SpecialModelName + //instance = new SpecialModelName(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of SpecialModelName + /// + [Fact] + public void SpecialModelNameInstanceTest() + { + // TODO uncomment below to test "IsType" SpecialModelName + //Assert.IsType(instance); + } + + + /// + /// Test the property 'SpecialPropertyName' + /// + [Fact] + public void SpecialPropertyNameTest() + { + // TODO unit test for the property 'SpecialPropertyName' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/TriangleInterfaceTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/TriangleInterfaceTests.cs new file mode 100644 index 00000000000..fba65470bee --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/TriangleInterfaceTests.cs @@ -0,0 +1,70 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing TriangleInterface + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class TriangleInterfaceTests : IDisposable + { + // TODO uncomment below to declare an instance variable for TriangleInterface + //private TriangleInterface instance; + + public TriangleInterfaceTests() + { + // TODO uncomment below to create an instance of TriangleInterface + //instance = new TriangleInterface(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of TriangleInterface + /// + [Fact] + public void TriangleInterfaceInstanceTest() + { + // TODO uncomment below to test "IsType" TriangleInterface + //Assert.IsType(instance); + } + + + /// + /// Test the property 'TriangleType' + /// + [Fact] + public void TriangleTypeTest() + { + // TODO unit test for the property 'TriangleType' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/TriangleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/TriangleTests.cs new file mode 100644 index 00000000000..bdaab0b4796 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/TriangleTests.cs @@ -0,0 +1,78 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing Triangle + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class TriangleTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Triangle + //private Triangle instance; + + public TriangleTests() + { + // TODO uncomment below to create an instance of Triangle + //instance = new Triangle(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Triangle + /// + [Fact] + public void TriangleInstanceTest() + { + // TODO uncomment below to test "IsType" Triangle + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ShapeType' + /// + [Fact] + public void ShapeTypeTest() + { + // TODO unit test for the property 'ShapeType' + } + /// + /// Test the property 'TriangleType' + /// + [Fact] + public void TriangleTypeTest() + { + // TODO unit test for the property 'TriangleType' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/WhaleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/WhaleTests.cs new file mode 100644 index 00000000000..09610791943 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/WhaleTests.cs @@ -0,0 +1,86 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing Whale + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class WhaleTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Whale + //private Whale instance; + + public WhaleTests() + { + // TODO uncomment below to create an instance of Whale + //instance = new Whale(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Whale + /// + [Fact] + public void WhaleInstanceTest() + { + // TODO uncomment below to test "IsType" Whale + //Assert.IsType(instance); + } + + + /// + /// Test the property 'HasBaleen' + /// + [Fact] + public void HasBaleenTest() + { + // TODO unit test for the property 'HasBaleen' + } + /// + /// Test the property 'HasTeeth' + /// + [Fact] + public void HasTeethTest() + { + // TODO unit test for the property 'HasTeeth' + } + /// + /// Test the property 'ClassName' + /// + [Fact] + public void ClassNameTest() + { + // TODO unit test for the property 'ClassName' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ZebraTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ZebraTests.cs new file mode 100644 index 00000000000..f44e9213140 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Model/ZebraTests.cs @@ -0,0 +1,78 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test.Model +{ + /// + /// Class for testing Zebra + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ZebraTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Zebra + //private Zebra instance; + + public ZebraTests() + { + // TODO uncomment below to create an instance of Zebra + //instance = new Zebra(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Zebra + /// + [Fact] + public void ZebraInstanceTest() + { + // TODO uncomment below to test "IsType" Zebra + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Type' + /// + [Fact] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } + /// + /// Test the property 'ClassName' + /// + [Fact] + public void ClassNameTest() + { + // TODO unit test for the property 'ClassName' + } + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs new file mode 100644 index 00000000000..94d8b854b0d --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -0,0 +1,320 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Org.OpenAPITools.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IAnotherFakeApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// To test special tags + /// + /// + /// To test special tags and operation ID starting with number + /// + /// Thrown when fails to make API call + /// client model + /// ModelClient + ModelClient Call123TestSpecialTags(ModelClient modelClient); + + /// + /// To test special tags + /// + /// + /// To test special tags and operation ID starting with number + /// + /// Thrown when fails to make API call + /// client model + /// ApiResponse of ModelClient + ApiResponse Call123TestSpecialTagsWithHttpInfo(ModelClient modelClient); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IAnotherFakeApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// To test special tags + /// + /// + /// To test special tags and operation ID starting with number + /// + /// Thrown when fails to make API call + /// client model + /// Cancellation Token to cancel the request. + /// Task of ModelClient + System.Threading.Tasks.Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// To test special tags + /// + /// + /// To test special tags and operation ID starting with number + /// + /// Thrown when fails to make API call + /// client model + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ModelClient) + System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IAnotherFakeApi : IAnotherFakeApiSync, IAnotherFakeApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class AnotherFakeApi : IAnotherFakeApi + { + private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public AnotherFakeApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public AnotherFakeApi(String basePath) + { + this.Configuration = Org.OpenAPITools.Client.Configuration.MergeConfigurations( + Org.OpenAPITools.Client.GlobalConfiguration.Instance, + new Org.OpenAPITools.Client.Configuration { BasePath = basePath } + ); + this.Client = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public AnotherFakeApi(Org.OpenAPITools.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Org.OpenAPITools.Client.Configuration.MergeConfigurations( + Org.OpenAPITools.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public AnotherFakeApi(Org.OpenAPITools.Client.ISynchronousClient client, Org.OpenAPITools.Client.IAsynchronousClient asyncClient, Org.OpenAPITools.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public Org.OpenAPITools.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public Org.OpenAPITools.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Org.OpenAPITools.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// To test special tags To test special tags and operation ID starting with number + /// + /// Thrown when fails to make API call + /// client model + /// ModelClient + public ModelClient Call123TestSpecialTags(ModelClient modelClient) + { + Org.OpenAPITools.Client.ApiResponse localVarResponse = Call123TestSpecialTagsWithHttpInfo(modelClient); + return localVarResponse.Data; + } + + /// + /// To test special tags To test special tags and operation ID starting with number + /// + /// Thrown when fails to make API call + /// client model + /// ApiResponse of ModelClient + public Org.OpenAPITools.Client.ApiResponse Call123TestSpecialTagsWithHttpInfo(ModelClient modelClient) + { + // verify the required parameter 'modelClient' is set + if (modelClient == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/json" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "application/json" + }; + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.Data = modelClient; + + + // make the HTTP request + var localVarResponse = this.Client.Patch("/another-fake/dummy", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("Call123TestSpecialTags", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// To test special tags To test special tags and operation ID starting with number + /// + /// Thrown when fails to make API call + /// client model + /// Cancellation Token to cancel the request. + /// Task of ModelClient + public async System.Threading.Tasks.Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Org.OpenAPITools.Client.ApiResponse localVarResponse = await Call123TestSpecialTagsWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// To test special tags To test special tags and operation ID starting with number + /// + /// Thrown when fails to make API call + /// client model + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ModelClient) + public async System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'modelClient' is set + if (modelClient == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); + + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/json" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "application/json" + }; + + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.Data = modelClient; + + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PatchAsync("/another-fake/dummy", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("Call123TestSpecialTags", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/DefaultApi.cs new file mode 100644 index 00000000000..27789c4533a --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/DefaultApi.cs @@ -0,0 +1,297 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Org.OpenAPITools.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IDefaultApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// + /// + /// Thrown when fails to make API call + /// InlineResponseDefault + InlineResponseDefault FooGet(); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ApiResponse of InlineResponseDefault + ApiResponse FooGetWithHttpInfo(); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IDefaultApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of InlineResponseDefault + System.Threading.Tasks.Task FooGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InlineResponseDefault) + System.Threading.Tasks.Task> FooGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IDefaultApi : IDefaultApiSync, IDefaultApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class DefaultApi : IDefaultApi + { + private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public DefaultApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public DefaultApi(String basePath) + { + this.Configuration = Org.OpenAPITools.Client.Configuration.MergeConfigurations( + Org.OpenAPITools.Client.GlobalConfiguration.Instance, + new Org.OpenAPITools.Client.Configuration { BasePath = basePath } + ); + this.Client = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public DefaultApi(Org.OpenAPITools.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Org.OpenAPITools.Client.Configuration.MergeConfigurations( + Org.OpenAPITools.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public DefaultApi(Org.OpenAPITools.Client.ISynchronousClient client, Org.OpenAPITools.Client.IAsynchronousClient asyncClient, Org.OpenAPITools.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public Org.OpenAPITools.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public Org.OpenAPITools.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Org.OpenAPITools.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// + /// + /// Thrown when fails to make API call + /// InlineResponseDefault + public InlineResponseDefault FooGet() + { + Org.OpenAPITools.Client.ApiResponse localVarResponse = FooGetWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// ApiResponse of InlineResponseDefault + public Org.OpenAPITools.Client.ApiResponse FooGetWithHttpInfo() + { + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "application/json" + }; + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + + + // make the HTTP request + var localVarResponse = this.Client.Get("/foo", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FooGet", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of InlineResponseDefault + public async System.Threading.Tasks.Task FooGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FooGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InlineResponseDefault) + public async System.Threading.Tasks.Task> FooGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "application/json" + }; + + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.GetAsync("/foo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FooGet", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/FakeApi.cs new file mode 100644 index 00000000000..d7749151314 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/FakeApi.cs @@ -0,0 +1,2951 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Org.OpenAPITools.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IFakeApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Health check endpoint + /// + /// Thrown when fails to make API call + /// HealthCheckResult + HealthCheckResult FakeHealthGet(); + + /// + /// Health check endpoint + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ApiResponse of HealthCheckResult + ApiResponse FakeHealthGetWithHttpInfo(); + /// + /// + /// + /// + /// Test serialization of outer boolean types + /// + /// Thrown when fails to make API call + /// Input boolean as post body (optional) + /// bool + bool FakeOuterBooleanSerialize(bool? body = default(bool?)); + + /// + /// + /// + /// + /// Test serialization of outer boolean types + /// + /// Thrown when fails to make API call + /// Input boolean as post body (optional) + /// ApiResponse of bool + ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?)); + /// + /// + /// + /// + /// Test serialization of object with outer number type + /// + /// Thrown when fails to make API call + /// Input composite as post body (optional) + /// OuterComposite + OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite)); + + /// + /// + /// + /// + /// Test serialization of object with outer number type + /// + /// Thrown when fails to make API call + /// Input composite as post body (optional) + /// ApiResponse of OuterComposite + ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite)); + /// + /// + /// + /// + /// Test serialization of outer number types + /// + /// Thrown when fails to make API call + /// Input number as post body (optional) + /// decimal + decimal FakeOuterNumberSerialize(decimal? body = default(decimal?)); + + /// + /// + /// + /// + /// Test serialization of outer number types + /// + /// Thrown when fails to make API call + /// Input number as post body (optional) + /// ApiResponse of decimal + ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?)); + /// + /// + /// + /// + /// Test serialization of outer string types + /// + /// Thrown when fails to make API call + /// Input string as post body (optional) + /// string + string FakeOuterStringSerialize(string body = default(string)); + + /// + /// + /// + /// + /// Test serialization of outer string types + /// + /// Thrown when fails to make API call + /// Input string as post body (optional) + /// ApiResponse of string + ApiResponse FakeOuterStringSerializeWithHttpInfo(string body = default(string)); + /// + /// Array of Enums + /// + /// Thrown when fails to make API call + /// List<OuterEnum> + List GetArrayOfEnums(); + + /// + /// Array of Enums + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ApiResponse of List<OuterEnum> + ApiResponse> GetArrayOfEnumsWithHttpInfo(); + /// + /// + /// + /// + /// For this test, the body for this request much reference a schema named `File`. + /// + /// Thrown when fails to make API call + /// + /// + void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass); + + /// + /// + /// + /// + /// For this test, the body for this request much reference a schema named `File`. + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Object(void) + ApiResponse TestBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass); + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void TestBodyWithQueryParams(string query, User user); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Object(void) + ApiResponse TestBodyWithQueryParamsWithHttpInfo(string query, User user); + /// + /// To test \"client\" model + /// + /// + /// To test \"client\" model + /// + /// Thrown when fails to make API call + /// client model + /// ModelClient + ModelClient TestClientModel(ModelClient modelClient); + + /// + /// To test \"client\" model + /// + /// + /// To test \"client\" model + /// + /// Thrown when fails to make API call + /// client model + /// ApiResponse of ModelClient + ApiResponse TestClientModelWithHttpInfo(ModelClient modelClient); + /// + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// + /// + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// + /// Thrown when fails to make API call + /// None + /// None + /// None + /// None + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// + void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); + + /// + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// + /// + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// + /// Thrown when fails to make API call + /// None + /// None + /// None + /// None + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// ApiResponse of Object(void) + ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); + /// + /// To test enum parameters + /// + /// + /// To test enum parameters + /// + /// Thrown when fails to make API call + /// Header parameter enum test (string array) (optional) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string) (optional, default to -efg) + /// + void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); + + /// + /// To test enum parameters + /// + /// + /// To test enum parameters + /// + /// Thrown when fails to make API call + /// Header parameter enum test (string array) (optional) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string) (optional, default to -efg) + /// ApiResponse of Object(void) + ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); + /// + /// Fake endpoint to test group parameters (optional) + /// + /// + /// Fake endpoint to test group parameters (optional) + /// + /// Thrown when fails to make API call + /// Required String in group parameters + /// Required Boolean in group parameters + /// Required Integer in group parameters + /// String in group parameters (optional) + /// Boolean in group parameters (optional) + /// Integer in group parameters (optional) + /// + void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); + + /// + /// Fake endpoint to test group parameters (optional) + /// + /// + /// Fake endpoint to test group parameters (optional) + /// + /// Thrown when fails to make API call + /// Required String in group parameters + /// Required Boolean in group parameters + /// Required Integer in group parameters + /// String in group parameters (optional) + /// Boolean in group parameters (optional) + /// Integer in group parameters (optional) + /// ApiResponse of Object(void) + ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); + /// + /// test inline additionalProperties + /// + /// Thrown when fails to make API call + /// request body + /// + void TestInlineAdditionalProperties(Dictionary requestBody); + + /// + /// test inline additionalProperties + /// + /// + /// + /// + /// Thrown when fails to make API call + /// request body + /// ApiResponse of Object(void) + ApiResponse TestInlineAdditionalPropertiesWithHttpInfo(Dictionary requestBody); + /// + /// test json serialization of form data + /// + /// Thrown when fails to make API call + /// field1 + /// field2 + /// + void TestJsonFormData(string param, string param2); + + /// + /// test json serialization of form data + /// + /// + /// + /// + /// Thrown when fails to make API call + /// field1 + /// field2 + /// ApiResponse of Object(void) + ApiResponse TestJsonFormDataWithHttpInfo(string param, string param2); + /// + /// + /// + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// + void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context); + + /// + /// + /// + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// ApiResponse of Object(void) + ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IFakeApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Health check endpoint + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of HealthCheckResult + System.Threading.Tasks.Task FakeHealthGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Health check endpoint + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HealthCheckResult) + System.Threading.Tasks.Task> FakeHealthGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Test serialization of outer boolean types + /// + /// Thrown when fails to make API call + /// Input boolean as post body (optional) + /// Cancellation Token to cancel the request. + /// Task of bool + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Test serialization of outer boolean types + /// + /// Thrown when fails to make API call + /// Input boolean as post body (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (bool) + System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Test serialization of object with outer number type + /// + /// Thrown when fails to make API call + /// Input composite as post body (optional) + /// Cancellation Token to cancel the request. + /// Task of OuterComposite + System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Test serialization of object with outer number type + /// + /// Thrown when fails to make API call + /// Input composite as post body (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (OuterComposite) + System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Test serialization of outer number types + /// + /// Thrown when fails to make API call + /// Input number as post body (optional) + /// Cancellation Token to cancel the request. + /// Task of decimal + System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Test serialization of outer number types + /// + /// Thrown when fails to make API call + /// Input number as post body (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (decimal) + System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Test serialization of outer string types + /// + /// Thrown when fails to make API call + /// Input string as post body (optional) + /// Cancellation Token to cancel the request. + /// Task of string + System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Test serialization of outer string types + /// + /// Thrown when fails to make API call + /// Input string as post body (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Array of Enums + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of List<OuterEnum> + System.Threading.Tasks.Task> GetArrayOfEnumsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Array of Enums + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<OuterEnum>) + System.Threading.Tasks.Task>> GetArrayOfEnumsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// For this test, the body for this request much reference a schema named `File`. + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// For this test, the body for this request much reference a schema named `File`. + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// To test \"client\" model + /// + /// + /// To test \"client\" model + /// + /// Thrown when fails to make API call + /// client model + /// Cancellation Token to cancel the request. + /// Task of ModelClient + System.Threading.Tasks.Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// To test \"client\" model + /// + /// + /// To test \"client\" model + /// + /// Thrown when fails to make API call + /// client model + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ModelClient) + System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// + /// + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// + /// Thrown when fails to make API call + /// None + /// None + /// None + /// None + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// + /// + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// + /// Thrown when fails to make API call + /// None + /// None + /// None + /// None + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// To test enum parameters + /// + /// + /// To test enum parameters + /// + /// Thrown when fails to make API call + /// Header parameter enum test (string array) (optional) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string) (optional, default to -efg) + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// To test enum parameters + /// + /// + /// To test enum parameters + /// + /// Thrown when fails to make API call + /// Header parameter enum test (string array) (optional) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string) (optional, default to -efg) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Fake endpoint to test group parameters (optional) + /// + /// + /// Fake endpoint to test group parameters (optional) + /// + /// Thrown when fails to make API call + /// Required String in group parameters + /// Required Boolean in group parameters + /// Required Integer in group parameters + /// String in group parameters (optional) + /// Boolean in group parameters (optional) + /// Integer in group parameters (optional) + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Fake endpoint to test group parameters (optional) + /// + /// + /// Fake endpoint to test group parameters (optional) + /// + /// Thrown when fails to make API call + /// Required String in group parameters + /// Required Boolean in group parameters + /// Required Integer in group parameters + /// String in group parameters (optional) + /// Boolean in group parameters (optional) + /// Integer in group parameters (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// test inline additionalProperties + /// + /// + /// + /// + /// Thrown when fails to make API call + /// request body + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// test inline additionalProperties + /// + /// + /// + /// + /// Thrown when fails to make API call + /// request body + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// test json serialization of form data + /// + /// + /// + /// + /// Thrown when fails to make API call + /// field1 + /// field2 + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// test json serialization of form data + /// + /// + /// + /// + /// Thrown when fails to make API call + /// field1 + /// field2 + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IFakeApi : IFakeApiSync, IFakeApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class FakeApi : IFakeApi + { + private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public FakeApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public FakeApi(String basePath) + { + this.Configuration = Org.OpenAPITools.Client.Configuration.MergeConfigurations( + Org.OpenAPITools.Client.GlobalConfiguration.Instance, + new Org.OpenAPITools.Client.Configuration { BasePath = basePath } + ); + this.Client = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public FakeApi(Org.OpenAPITools.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Org.OpenAPITools.Client.Configuration.MergeConfigurations( + Org.OpenAPITools.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public FakeApi(Org.OpenAPITools.Client.ISynchronousClient client, Org.OpenAPITools.Client.IAsynchronousClient asyncClient, Org.OpenAPITools.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public Org.OpenAPITools.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public Org.OpenAPITools.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Org.OpenAPITools.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Health check endpoint + /// + /// Thrown when fails to make API call + /// HealthCheckResult + public HealthCheckResult FakeHealthGet() + { + Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeHealthGetWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Health check endpoint + /// + /// Thrown when fails to make API call + /// ApiResponse of HealthCheckResult + public Org.OpenAPITools.Client.ApiResponse FakeHealthGetWithHttpInfo() + { + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "application/json" + }; + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + + + // make the HTTP request + var localVarResponse = this.Client.Get("/fake/health", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FakeHealthGet", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Health check endpoint + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of HealthCheckResult + public async System.Threading.Tasks.Task FakeHealthGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeHealthGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Health check endpoint + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HealthCheckResult) + public async System.Threading.Tasks.Task> FakeHealthGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "application/json" + }; + + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/health", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FakeHealthGet", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Test serialization of outer boolean types + /// + /// Thrown when fails to make API call + /// Input boolean as post body (optional) + /// bool + public bool FakeOuterBooleanSerialize(bool? body = default(bool?)) + { + Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); + return localVarResponse.Data; + } + + /// + /// Test serialization of outer boolean types + /// + /// Thrown when fails to make API call + /// Input boolean as post body (optional) + /// ApiResponse of bool + public Org.OpenAPITools.Client.ApiResponse FakeOuterBooleanSerializeWithHttpInfo(bool? body = default(bool?)) + { + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/json" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "*/*" + }; + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.Data = body; + + + // make the HTTP request + var localVarResponse = this.Client.Post("/fake/outer/boolean", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FakeOuterBooleanSerialize", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Test serialization of outer boolean types + /// + /// Thrown when fails to make API call + /// Input boolean as post body (optional) + /// Cancellation Token to cancel the request. + /// Task of bool + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Test serialization of outer boolean types + /// + /// Thrown when fails to make API call + /// Input boolean as post body (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (bool) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/json" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "*/*" + }; + + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.Data = body; + + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/boolean", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FakeOuterBooleanSerialize", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Test serialization of object with outer number type + /// + /// Thrown when fails to make API call + /// Input composite as post body (optional) + /// OuterComposite + public OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite)) + { + Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(outerComposite); + return localVarResponse.Data; + } + + /// + /// Test serialization of object with outer number type + /// + /// Thrown when fails to make API call + /// Input composite as post body (optional) + /// ApiResponse of OuterComposite + public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite)) + { + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/json" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "*/*" + }; + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.Data = outerComposite; + + + // make the HTTP request + var localVarResponse = this.Client.Post("/fake/outer/composite", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FakeOuterCompositeSerialize", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Test serialization of object with outer number type + /// + /// Thrown when fails to make API call + /// Input composite as post body (optional) + /// Cancellation Token to cancel the request. + /// Task of OuterComposite + public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Test serialization of object with outer number type + /// + /// Thrown when fails to make API call + /// Input composite as post body (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (OuterComposite) + public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/json" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "*/*" + }; + + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.Data = outerComposite; + + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/composite", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FakeOuterCompositeSerialize", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Test serialization of outer number types + /// + /// Thrown when fails to make API call + /// Input number as post body (optional) + /// decimal + public decimal FakeOuterNumberSerialize(decimal? body = default(decimal?)) + { + Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); + return localVarResponse.Data; + } + + /// + /// Test serialization of outer number types + /// + /// Thrown when fails to make API call + /// Input number as post body (optional) + /// ApiResponse of decimal + public Org.OpenAPITools.Client.ApiResponse FakeOuterNumberSerializeWithHttpInfo(decimal? body = default(decimal?)) + { + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/json" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "*/*" + }; + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.Data = body; + + + // make the HTTP request + var localVarResponse = this.Client.Post("/fake/outer/number", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FakeOuterNumberSerialize", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Test serialization of outer number types + /// + /// Thrown when fails to make API call + /// Input number as post body (optional) + /// Cancellation Token to cancel the request. + /// Task of decimal + public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Test serialization of outer number types + /// + /// Thrown when fails to make API call + /// Input number as post body (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (decimal) + public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/json" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "*/*" + }; + + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.Data = body; + + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/number", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FakeOuterNumberSerialize", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Test serialization of outer string types + /// + /// Thrown when fails to make API call + /// Input string as post body (optional) + /// string + public string FakeOuterStringSerialize(string body = default(string)) + { + Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(body); + return localVarResponse.Data; + } + + /// + /// Test serialization of outer string types + /// + /// Thrown when fails to make API call + /// Input string as post body (optional) + /// ApiResponse of string + public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(string body = default(string)) + { + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/json" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "*/*" + }; + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.Data = body; + + + // make the HTTP request + var localVarResponse = this.Client.Post("/fake/outer/string", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FakeOuterStringSerialize", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Test serialization of outer string types + /// + /// Thrown when fails to make API call + /// Input string as post body (optional) + /// Cancellation Token to cancel the request. + /// Task of string + public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Test serialization of outer string types + /// + /// Thrown when fails to make API call + /// Input string as post body (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/json" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "*/*" + }; + + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.Data = body; + + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/string", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FakeOuterStringSerialize", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Array of Enums + /// + /// Thrown when fails to make API call + /// List<OuterEnum> + public List GetArrayOfEnums() + { + Org.OpenAPITools.Client.ApiResponse> localVarResponse = GetArrayOfEnumsWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Array of Enums + /// + /// Thrown when fails to make API call + /// ApiResponse of List<OuterEnum> + public Org.OpenAPITools.Client.ApiResponse> GetArrayOfEnumsWithHttpInfo() + { + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "application/json" + }; + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + + + // make the HTTP request + var localVarResponse = this.Client.Get>("/fake/array-of-enums", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetArrayOfEnums", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Array of Enums + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of List<OuterEnum> + public async System.Threading.Tasks.Task> GetArrayOfEnumsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetArrayOfEnumsWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Array of Enums + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<OuterEnum>) + public async System.Threading.Tasks.Task>> GetArrayOfEnumsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "application/json" + }; + + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.GetAsync>("/fake/array-of-enums", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetArrayOfEnums", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// For this test, the body for this request much reference a schema named `File`. + /// + /// Thrown when fails to make API call + /// + /// + public void TestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) + { + TestBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass); + } + + /// + /// For this test, the body for this request much reference a schema named `File`. + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Object(void) + public Org.OpenAPITools.Client.ApiResponse TestBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass) + { + // verify the required parameter 'fileSchemaTestClass' is set + if (fileSchemaTestClass == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/json" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + }; + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.Data = fileSchemaTestClass; + + + // make the HTTP request + var localVarResponse = this.Client.Put("/fake/body-with-file-schema", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestBodyWithFileSchema", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// For this test, the body for this request much reference a schema named `File`. + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await TestBodyWithFileSchemaWithHttpInfoAsync(fileSchemaTestClass, cancellationToken).ConfigureAwait(false); + } + + /// + /// For this test, the body for this request much reference a schema named `File`. + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'fileSchemaTestClass' is set + if (fileSchemaTestClass == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); + + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/json" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + }; + + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.Data = fileSchemaTestClass; + + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/body-with-file-schema", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestBodyWithFileSchema", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + public void TestBodyWithQueryParams(string query, User user) + { + TestBodyWithQueryParamsWithHttpInfo(query, user); + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Object(void) + public Org.OpenAPITools.Client.ApiResponse TestBodyWithQueryParamsWithHttpInfo(string query, User user) + { + // verify the required parameter 'query' is set + if (query == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); + + // verify the required parameter 'user' is set + if (user == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/json" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + }; + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)); + localVarRequestOptions.Data = user; + + + // make the HTTP request + var localVarResponse = this.Client.Put("/fake/body-with-query-params", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestBodyWithQueryParams", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await TestBodyWithQueryParamsWithHttpInfoAsync(query, user, cancellationToken).ConfigureAwait(false); + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'query' is set + if (query == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); + + // verify the required parameter 'user' is set + if (user == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); + + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/json" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + }; + + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query", query)); + localVarRequestOptions.Data = user; + + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/body-with-query-params", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestBodyWithQueryParams", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// To test \"client\" model To test \"client\" model + /// + /// Thrown when fails to make API call + /// client model + /// ModelClient + public ModelClient TestClientModel(ModelClient modelClient) + { + Org.OpenAPITools.Client.ApiResponse localVarResponse = TestClientModelWithHttpInfo(modelClient); + return localVarResponse.Data; + } + + /// + /// To test \"client\" model To test \"client\" model + /// + /// Thrown when fails to make API call + /// client model + /// ApiResponse of ModelClient + public Org.OpenAPITools.Client.ApiResponse TestClientModelWithHttpInfo(ModelClient modelClient) + { + // verify the required parameter 'modelClient' is set + if (modelClient == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeApi->TestClientModel"); + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/json" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "application/json" + }; + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.Data = modelClient; + + + // make the HTTP request + var localVarResponse = this.Client.Patch("/fake", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestClientModel", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// To test \"client\" model To test \"client\" model + /// + /// Thrown when fails to make API call + /// client model + /// Cancellation Token to cancel the request. + /// Task of ModelClient + public async System.Threading.Tasks.Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClientModelWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// To test \"client\" model To test \"client\" model + /// + /// Thrown when fails to make API call + /// client model + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ModelClient) + public async System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'modelClient' is set + if (modelClient == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeApi->TestClientModel"); + + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/json" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "application/json" + }; + + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.Data = modelClient; + + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PatchAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestClientModel", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// + /// Thrown when fails to make API call + /// None + /// None + /// None + /// None + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// + public void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) + { + TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); + } + + /// + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// + /// Thrown when fails to make API call + /// None + /// None + /// None + /// None + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// ApiResponse of Object(void) + public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) + { + // verify the required parameter 'patternWithoutDelimiter' is set + if (patternWithoutDelimiter == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter '_byte' is set + if (_byte == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter '_byte' when calling FakeApi->TestEndpointParameters"); + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/x-www-form-urlencoded" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + }; + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + if (integer != null) + { + localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter + } + if (int32 != null) + { + localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter + } + if (int64 != null) + { + localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter + } + localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter + if (_float != null) + { + localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_float)); // form parameter + } + localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_double)); // form parameter + if (_string != null) + { + localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_string)); // form parameter + } + localVarRequestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter + localVarRequestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_byte)); // form parameter + if (binary != null) + { + localVarRequestOptions.FileParameters.Add("binary", binary); + } + if (date != null) + { + localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter + } + if (dateTime != null) + { + localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter + } + if (password != null) + { + localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter + } + if (callback != null) + { + localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter + } + + // authentication (http_basic_test) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Org.OpenAPITools.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/fake", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestEndpointParameters", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// + /// Thrown when fails to make API call + /// None + /// None + /// None + /// None + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback, cancellationToken).ConfigureAwait(false); + } + + /// + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// + /// Thrown when fails to make API call + /// None + /// None + /// None + /// None + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// None (optional) + /// None (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'patternWithoutDelimiter' is set + if (patternWithoutDelimiter == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); + + // verify the required parameter '_byte' is set + if (_byte == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter '_byte' when calling FakeApi->TestEndpointParameters"); + + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/x-www-form-urlencoded" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + }; + + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + if (integer != null) + { + localVarRequestOptions.FormParameters.Add("integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integer)); // form parameter + } + if (int32 != null) + { + localVarRequestOptions.FormParameters.Add("int32", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int32)); // form parameter + } + if (int64 != null) + { + localVarRequestOptions.FormParameters.Add("int64", Org.OpenAPITools.Client.ClientUtils.ParameterToString(int64)); // form parameter + } + localVarRequestOptions.FormParameters.Add("number", Org.OpenAPITools.Client.ClientUtils.ParameterToString(number)); // form parameter + if (_float != null) + { + localVarRequestOptions.FormParameters.Add("float", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_float)); // form parameter + } + localVarRequestOptions.FormParameters.Add("double", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_double)); // form parameter + if (_string != null) + { + localVarRequestOptions.FormParameters.Add("string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_string)); // form parameter + } + localVarRequestOptions.FormParameters.Add("pattern_without_delimiter", Org.OpenAPITools.Client.ClientUtils.ParameterToString(patternWithoutDelimiter)); // form parameter + localVarRequestOptions.FormParameters.Add("byte", Org.OpenAPITools.Client.ClientUtils.ParameterToString(_byte)); // form parameter + if (binary != null) + { + localVarRequestOptions.FileParameters.Add("binary", binary); + } + if (date != null) + { + localVarRequestOptions.FormParameters.Add("date", Org.OpenAPITools.Client.ClientUtils.ParameterToString(date)); // form parameter + } + if (dateTime != null) + { + localVarRequestOptions.FormParameters.Add("dateTime", Org.OpenAPITools.Client.ClientUtils.ParameterToString(dateTime)); // form parameter + } + if (password != null) + { + localVarRequestOptions.FormParameters.Add("password", Org.OpenAPITools.Client.ClientUtils.ParameterToString(password)); // form parameter + } + if (callback != null) + { + localVarRequestOptions.FormParameters.Add("callback", Org.OpenAPITools.Client.ClientUtils.ParameterToString(callback)); // form parameter + } + + // authentication (http_basic_test) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Org.OpenAPITools.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestEndpointParameters", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// To test enum parameters To test enum parameters + /// + /// Thrown when fails to make API call + /// Header parameter enum test (string array) (optional) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string) (optional, default to -efg) + /// + public void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) + { + TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + } + + /// + /// To test enum parameters To test enum parameters + /// + /// Thrown when fails to make API call + /// Header parameter enum test (string array) (optional) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string) (optional, default to -efg) + /// ApiResponse of Object(void) + public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) + { + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/x-www-form-urlencoded" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + }; + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + if (enumQueryStringArray != null) + { + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray)); + } + if (enumQueryString != null) + { + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)); + } + if (enumQueryInteger != null) + { + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)); + } + if (enumQueryDouble != null) + { + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)); + } + if (enumHeaderStringArray != null) + { + localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter + } + if (enumHeaderString != null) + { + localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter + } + if (enumFormStringArray != null) + { + localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormStringArray)); // form parameter + } + if (enumFormString != null) + { + localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter + } + + + // make the HTTP request + var localVarResponse = this.Client.Get("/fake", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestEnumParameters", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// To test enum parameters To test enum parameters + /// + /// Thrown when fails to make API call + /// Header parameter enum test (string array) (optional) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string) (optional, default to -efg) + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + } + + /// + /// To test enum parameters To test enum parameters + /// + /// Thrown when fails to make API call + /// Header parameter enum test (string array) (optional) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string array) (optional) + /// Query parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional, default to $) + /// Form parameter enum test (string) (optional, default to -efg) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/x-www-form-urlencoded" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + }; + + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + if (enumQueryStringArray != null) + { + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "enum_query_string_array", enumQueryStringArray)); + } + if (enumQueryString != null) + { + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_string", enumQueryString)); + } + if (enumQueryInteger != null) + { + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_integer", enumQueryInteger)); + } + if (enumQueryDouble != null) + { + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_query_double", enumQueryDouble)); + } + if (enumHeaderStringArray != null) + { + localVarRequestOptions.HeaderParameters.Add("enum_header_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderStringArray)); // header parameter + } + if (enumHeaderString != null) + { + localVarRequestOptions.HeaderParameters.Add("enum_header_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumHeaderString)); // header parameter + } + if (enumFormStringArray != null) + { + localVarRequestOptions.FormParameters.Add("enum_form_string_array", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormStringArray)); // form parameter + } + if (enumFormString != null) + { + localVarRequestOptions.FormParameters.Add("enum_form_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(enumFormString)); // form parameter + } + + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.GetAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestEnumParameters", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) + /// + /// Thrown when fails to make API call + /// Required String in group parameters + /// Required Boolean in group parameters + /// Required Integer in group parameters + /// String in group parameters (optional) + /// Boolean in group parameters (optional) + /// Integer in group parameters (optional) + /// + public void TestGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) + { + TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } + + /// + /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) + /// + /// Thrown when fails to make API call + /// Required String in group parameters + /// Required Boolean in group parameters + /// Required Integer in group parameters + /// String in group parameters (optional) + /// Boolean in group parameters (optional) + /// Integer in group parameters (optional) + /// ApiResponse of Object(void) + public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) + { + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + }; + + // to determine the Accept header + String[] _accepts = new String[] { + }; + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)); + if (stringGroup != null) + { + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)); + } + if (int64Group != null) + { + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)); + } + localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter + if (booleanGroup != null) + { + localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter + } + + // authentication (bearer_test) required + // bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/fake", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestGroupParameters", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) + /// + /// Thrown when fails to make API call + /// Required String in group parameters + /// Required Boolean in group parameters + /// Required Integer in group parameters + /// String in group parameters (optional) + /// Boolean in group parameters (optional) + /// Integer in group parameters (optional) + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); + } + + /// + /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) + /// + /// Thrown when fails to make API call + /// Required String in group parameters + /// Required Boolean in group parameters + /// Required Integer in group parameters + /// String in group parameters (optional) + /// Boolean in group parameters (optional) + /// Integer in group parameters (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + }; + + // to determine the Accept header + String[] _accepts = new String[] { + }; + + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_string_group", requiredStringGroup)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "required_int64_group", requiredInt64Group)); + if (stringGroup != null) + { + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_group", stringGroup)); + } + if (int64Group != null) + { + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "int64_group", int64Group)); + } + localVarRequestOptions.HeaderParameters.Add("required_boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(requiredBooleanGroup)); // header parameter + if (booleanGroup != null) + { + localVarRequestOptions.HeaderParameters.Add("boolean_group", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanGroup)); // header parameter + } + + // authentication (bearer_test) required + // bearer authentication required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestGroupParameters", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// test inline additionalProperties + /// + /// Thrown when fails to make API call + /// request body + /// + public void TestInlineAdditionalProperties(Dictionary requestBody) + { + TestInlineAdditionalPropertiesWithHttpInfo(requestBody); + } + + /// + /// test inline additionalProperties + /// + /// Thrown when fails to make API call + /// request body + /// ApiResponse of Object(void) + public Org.OpenAPITools.Client.ApiResponse TestInlineAdditionalPropertiesWithHttpInfo(Dictionary requestBody) + { + // verify the required parameter 'requestBody' is set + if (requestBody == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/json" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + }; + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.Data = requestBody; + + + // make the HTTP request + var localVarResponse = this.Client.Post("/fake/inline-additionalProperties", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestInlineAdditionalProperties", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// test inline additionalProperties + /// + /// Thrown when fails to make API call + /// request body + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await TestInlineAdditionalPropertiesWithHttpInfoAsync(requestBody, cancellationToken).ConfigureAwait(false); + } + + /// + /// test inline additionalProperties + /// + /// Thrown when fails to make API call + /// request body + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'requestBody' is set + if (requestBody == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); + + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/json" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + }; + + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.Data = requestBody; + + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/inline-additionalProperties", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestInlineAdditionalProperties", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// test json serialization of form data + /// + /// Thrown when fails to make API call + /// field1 + /// field2 + /// + public void TestJsonFormData(string param, string param2) + { + TestJsonFormDataWithHttpInfo(param, param2); + } + + /// + /// test json serialization of form data + /// + /// Thrown when fails to make API call + /// field1 + /// field2 + /// ApiResponse of Object(void) + public Org.OpenAPITools.Client.ApiResponse TestJsonFormDataWithHttpInfo(string param, string param2) + { + // verify the required parameter 'param' is set + if (param == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); + + // verify the required parameter 'param2' is set + if (param2 == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/x-www-form-urlencoded" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + }; + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.FormParameters.Add("param", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param)); // form parameter + localVarRequestOptions.FormParameters.Add("param2", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param2)); // form parameter + + + // make the HTTP request + var localVarResponse = this.Client.Get("/fake/jsonFormData", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestJsonFormData", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// test json serialization of form data + /// + /// Thrown when fails to make API call + /// field1 + /// field2 + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await TestJsonFormDataWithHttpInfoAsync(param, param2, cancellationToken).ConfigureAwait(false); + } + + /// + /// test json serialization of form data + /// + /// Thrown when fails to make API call + /// field1 + /// field2 + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'param' is set + if (param == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); + + // verify the required parameter 'param2' is set + if (param2 == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); + + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/x-www-form-urlencoded" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + }; + + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.FormParameters.Add("param", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param)); // form parameter + localVarRequestOptions.FormParameters.Add("param2", Org.OpenAPITools.Client.ClientUtils.ParameterToString(param2)); // form parameter + + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/jsonFormData", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestJsonFormData", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// + public void TestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) + { + TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); + } + + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// ApiResponse of Object(void) + public Org.OpenAPITools.Client.ApiResponse TestQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context) + { + // verify the required parameter 'pipe' is set + if (pipe == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'ioutil' is set + if (ioutil == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'http' is set + if (http == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'url' is set + if (url == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'context' is set + if (context == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + }; + + // to determine the Accept header + String[] _accepts = new String[] { + }; + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "pipe", pipe)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "ioutil", ioutil)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("ssv", "http", http)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); + + + // make the HTTP request + var localVarResponse = this.Client.Put("/fake/test-query-paramters", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestQueryParameterCollectionFormat", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, cancellationToken).ConfigureAwait(false); + } + + /// + /// To test the collection format in query parameters + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'pipe' is set + if (pipe == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'ioutil' is set + if (ioutil == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'http' is set + if (http == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'url' is set + if (url == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); + + // verify the required parameter 'context' is set + if (context == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); + + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + }; + + // to determine the Accept header + String[] _accepts = new String[] { + }; + + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "pipe", pipe)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "ioutil", ioutil)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("ssv", "http", http)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "url", url)); + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("multi", "context", context)); + + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/test-query-paramters", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestQueryParameterCollectionFormat", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs new file mode 100644 index 00000000000..56ebdf5fd10 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -0,0 +1,330 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Org.OpenAPITools.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IFakeClassnameTags123ApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// To test class name in snake case + /// + /// + /// To test class name in snake case + /// + /// Thrown when fails to make API call + /// client model + /// ModelClient + ModelClient TestClassname(ModelClient modelClient); + + /// + /// To test class name in snake case + /// + /// + /// To test class name in snake case + /// + /// Thrown when fails to make API call + /// client model + /// ApiResponse of ModelClient + ApiResponse TestClassnameWithHttpInfo(ModelClient modelClient); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IFakeClassnameTags123ApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// To test class name in snake case + /// + /// + /// To test class name in snake case + /// + /// Thrown when fails to make API call + /// client model + /// Cancellation Token to cancel the request. + /// Task of ModelClient + System.Threading.Tasks.Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// To test class name in snake case + /// + /// + /// To test class name in snake case + /// + /// Thrown when fails to make API call + /// client model + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ModelClient) + System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IFakeClassnameTags123Api : IFakeClassnameTags123ApiSync, IFakeClassnameTags123ApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class FakeClassnameTags123Api : IFakeClassnameTags123Api + { + private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public FakeClassnameTags123Api() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public FakeClassnameTags123Api(String basePath) + { + this.Configuration = Org.OpenAPITools.Client.Configuration.MergeConfigurations( + Org.OpenAPITools.Client.GlobalConfiguration.Instance, + new Org.OpenAPITools.Client.Configuration { BasePath = basePath } + ); + this.Client = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public FakeClassnameTags123Api(Org.OpenAPITools.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Org.OpenAPITools.Client.Configuration.MergeConfigurations( + Org.OpenAPITools.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public FakeClassnameTags123Api(Org.OpenAPITools.Client.ISynchronousClient client, Org.OpenAPITools.Client.IAsynchronousClient asyncClient, Org.OpenAPITools.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public Org.OpenAPITools.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public Org.OpenAPITools.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Org.OpenAPITools.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// To test class name in snake case To test class name in snake case + /// + /// Thrown when fails to make API call + /// client model + /// ModelClient + public ModelClient TestClassname(ModelClient modelClient) + { + Org.OpenAPITools.Client.ApiResponse localVarResponse = TestClassnameWithHttpInfo(modelClient); + return localVarResponse.Data; + } + + /// + /// To test class name in snake case To test class name in snake case + /// + /// Thrown when fails to make API call + /// client model + /// ApiResponse of ModelClient + public Org.OpenAPITools.Client.ApiResponse TestClassnameWithHttpInfo(ModelClient modelClient) + { + // verify the required parameter 'modelClient' is set + if (modelClient == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/json" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "application/json" + }; + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.Data = modelClient; + + // authentication (api_key_query) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) + { + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))); + } + + // make the HTTP request + var localVarResponse = this.Client.Patch("/fake_classname_test", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestClassname", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// To test class name in snake case To test class name in snake case + /// + /// Thrown when fails to make API call + /// client model + /// Cancellation Token to cancel the request. + /// Task of ModelClient + public async System.Threading.Tasks.Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClassnameWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// To test class name in snake case To test class name in snake case + /// + /// Thrown when fails to make API call + /// client model + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ModelClient) + public async System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'modelClient' is set + if (modelClient == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); + + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/json" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "application/json" + }; + + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.Data = modelClient; + + // authentication (api_key_query) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) + { + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PatchAsync("/fake_classname_test", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestClassname", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/PetApi.cs index 34913501ea0..61759145f12 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/PetApi.cs @@ -1,7 +1,7 @@ /* * OpenAPI Petstore * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git @@ -31,8 +31,8 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store - /// Pet - Pet AddPet(Pet pet); + /// + void AddPet(Pet pet); /// /// Add a new pet to the store @@ -42,8 +42,8 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store - /// ApiResponse of Pet - ApiResponse AddPetWithHttpInfo(Pet pet); + /// ApiResponse of Object(void) + ApiResponse AddPetWithHttpInfo(Pet pet); /// /// Deletes a pet /// @@ -132,8 +132,8 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store - /// Pet - Pet UpdatePet(Pet pet); + /// + void UpdatePet(Pet pet); /// /// Update an existing pet @@ -143,8 +143,8 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store - /// ApiResponse of Pet - ApiResponse UpdatePetWithHttpInfo(Pet pet); + /// ApiResponse of Object(void) + ApiResponse UpdatePetWithHttpInfo(Pet pet); /// /// Updates a pet in the store with form data /// @@ -189,6 +189,28 @@ namespace Org.OpenAPITools.Api /// file to upload (optional) /// ApiResponse of ApiResponse ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); + /// + /// uploads an image (required) + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); + + /// + /// uploads an image (required) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); #endregion Synchronous Operations } @@ -207,8 +229,8 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Pet object that needs to be added to the store /// Cancellation Token to cancel the request. - /// Task of Pet - System.Threading.Tasks.Task AddPetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of void + System.Threading.Tasks.Task AddPetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Add a new pet to the store @@ -219,8 +241,8 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Pet object that needs to be added to the store /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Pet) - System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse + System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deletes a pet /// @@ -324,8 +346,8 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Pet object that needs to be added to the store /// Cancellation Token to cancel the request. - /// Task of Pet - System.Threading.Tasks.Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of void + System.Threading.Tasks.Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update an existing pet @@ -336,8 +358,8 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Pet object that needs to be added to the store /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Pet) - System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse + System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updates a pet in the store with form data /// @@ -392,6 +414,33 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// uploads an image (required) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// uploads an image (required) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ApiResponse) + System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -517,11 +566,10 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store - /// Pet - public Pet AddPet(Pet pet) + /// + public void AddPet(Pet pet) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = AddPetWithHttpInfo(pet); - return localVarResponse.Data; + AddPetWithHttpInfo(pet); } /// @@ -529,8 +577,8 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store - /// ApiResponse of Pet - public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) + /// ApiResponse of Object(void) + public Org.OpenAPITools.Client.ApiResponse AddPetWithHttpInfo(Pet pet) { // verify the required parameter 'pet' is set if (pet == null) @@ -545,8 +593,6 @@ namespace Org.OpenAPITools.Api // to determine the Accept header String[] _accepts = new String[] { - "application/xml", - "application/json" }; var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); @@ -557,6 +603,22 @@ namespace Org.OpenAPITools.Api localVarRequestOptions.Data = pet; + // authentication (http_signature_test) required + if (this.Configuration.HttpSigningConfiguration != null) + { + var HttpSigningHeaders = this.Configuration.HttpSigningConfiguration.GetHttpSignedHeader(this.Configuration.BasePath, "POST", "/pet", localVarRequestOptions); + foreach (var headerItem in HttpSigningHeaders) + { + if (localVarRequestOptions.HeaderParameters.ContainsKey(headerItem.Key)) + { + localVarRequestOptions.HeaderParameters[headerItem.Key] = new List() { headerItem.Value }; + } + else + { + localVarRequestOptions.HeaderParameters.Add(headerItem.Key, headerItem.Value); + } + } + } // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) @@ -565,7 +627,7 @@ namespace Org.OpenAPITools.Api } // make the HTTP request - var localVarResponse = this.Client.Post("/pet", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/pet", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { @@ -582,11 +644,10 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Pet object that needs to be added to the store /// Cancellation Token to cancel the request. - /// Task of Pet - public async System.Threading.Tasks.Task AddPetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of void + public async System.Threading.Tasks.Task AddPetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await AddPetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; + await AddPetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); } /// @@ -595,8 +656,8 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Pet object that needs to be added to the store /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Pet) - public async System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> AddPetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pet' is set if (pet == null) @@ -612,8 +673,6 @@ namespace Org.OpenAPITools.Api // to determine the Accept header String[] _accepts = new String[] { - "application/xml", - "application/json" }; @@ -625,6 +684,22 @@ namespace Org.OpenAPITools.Api localVarRequestOptions.Data = pet; + // authentication (http_signature_test) required + if (this.Configuration.HttpSigningConfiguration != null) + { + var HttpSigningHeaders = this.Configuration.HttpSigningConfiguration.GetHttpSignedHeader(this.Configuration.BasePath, "POST", "/pet", localVarRequestOptions); + foreach (var headerItem in HttpSigningHeaders) + { + if (localVarRequestOptions.HeaderParameters.ContainsKey(headerItem.Key)) + { + localVarRequestOptions.HeaderParameters[headerItem.Key] = new List() { headerItem.Value }; + } + else + { + localVarRequestOptions.HeaderParameters.Add(headerItem.Key, headerItem.Value); + } + } + } // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) @@ -634,7 +709,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/pet", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PostAsync("/pet", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -815,6 +890,22 @@ namespace Org.OpenAPITools.Api localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)); + // authentication (http_signature_test) required + if (this.Configuration.HttpSigningConfiguration != null) + { + var HttpSigningHeaders = this.Configuration.HttpSigningConfiguration.GetHttpSignedHeader(this.Configuration.BasePath, "GET", "/pet/findByStatus", localVarRequestOptions); + foreach (var headerItem in HttpSigningHeaders) + { + if (localVarRequestOptions.HeaderParameters.ContainsKey(headerItem.Key)) + { + localVarRequestOptions.HeaderParameters[headerItem.Key] = new List() { headerItem.Value }; + } + else + { + localVarRequestOptions.HeaderParameters.Add(headerItem.Key, headerItem.Value); + } + } + } // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) @@ -881,6 +972,22 @@ namespace Org.OpenAPITools.Api localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "status", status)); + // authentication (http_signature_test) required + if (this.Configuration.HttpSigningConfiguration != null) + { + var HttpSigningHeaders = this.Configuration.HttpSigningConfiguration.GetHttpSignedHeader(this.Configuration.BasePath, "GET", "/pet/findByStatus", localVarRequestOptions); + foreach (var headerItem in HttpSigningHeaders) + { + if (localVarRequestOptions.HeaderParameters.ContainsKey(headerItem.Key)) + { + localVarRequestOptions.HeaderParameters[headerItem.Key] = new List() { headerItem.Value }; + } + else + { + localVarRequestOptions.HeaderParameters.Add(headerItem.Key, headerItem.Value); + } + } + } // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) @@ -944,6 +1051,22 @@ namespace Org.OpenAPITools.Api localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)); + // authentication (http_signature_test) required + if (this.Configuration.HttpSigningConfiguration != null) + { + var HttpSigningHeaders = this.Configuration.HttpSigningConfiguration.GetHttpSignedHeader(this.Configuration.BasePath, "GET", "/pet/findByTags", localVarRequestOptions); + foreach (var headerItem in HttpSigningHeaders) + { + if (localVarRequestOptions.HeaderParameters.ContainsKey(headerItem.Key)) + { + localVarRequestOptions.HeaderParameters[headerItem.Key] = new List() { headerItem.Value }; + } + else + { + localVarRequestOptions.HeaderParameters.Add(headerItem.Key, headerItem.Value); + } + } + } // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) @@ -1010,6 +1133,22 @@ namespace Org.OpenAPITools.Api localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("csv", "tags", tags)); + // authentication (http_signature_test) required + if (this.Configuration.HttpSigningConfiguration != null) + { + var HttpSigningHeaders = this.Configuration.HttpSigningConfiguration.GetHttpSignedHeader(this.Configuration.BasePath, "GET", "/pet/findByTags", localVarRequestOptions); + foreach (var headerItem in HttpSigningHeaders) + { + if (localVarRequestOptions.HeaderParameters.ContainsKey(headerItem.Key)) + { + localVarRequestOptions.HeaderParameters[headerItem.Key] = new List() { headerItem.Value }; + } + else + { + localVarRequestOptions.HeaderParameters.Add(headerItem.Key, headerItem.Value); + } + } + } // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) @@ -1154,11 +1293,10 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store - /// Pet - public Pet UpdatePet(Pet pet) + /// + public void UpdatePet(Pet pet) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = UpdatePetWithHttpInfo(pet); - return localVarResponse.Data; + UpdatePetWithHttpInfo(pet); } /// @@ -1166,8 +1304,8 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// Pet object that needs to be added to the store - /// ApiResponse of Pet - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) + /// ApiResponse of Object(void) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithHttpInfo(Pet pet) { // verify the required parameter 'pet' is set if (pet == null) @@ -1182,8 +1320,6 @@ namespace Org.OpenAPITools.Api // to determine the Accept header String[] _accepts = new String[] { - "application/xml", - "application/json" }; var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); @@ -1194,6 +1330,22 @@ namespace Org.OpenAPITools.Api localVarRequestOptions.Data = pet; + // authentication (http_signature_test) required + if (this.Configuration.HttpSigningConfiguration != null) + { + var HttpSigningHeaders = this.Configuration.HttpSigningConfiguration.GetHttpSignedHeader(this.Configuration.BasePath, "PUT", "/pet", localVarRequestOptions); + foreach (var headerItem in HttpSigningHeaders) + { + if (localVarRequestOptions.HeaderParameters.ContainsKey(headerItem.Key)) + { + localVarRequestOptions.HeaderParameters[headerItem.Key] = new List() { headerItem.Value }; + } + else + { + localVarRequestOptions.HeaderParameters.Add(headerItem.Key, headerItem.Value); + } + } + } // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) @@ -1202,7 +1354,7 @@ namespace Org.OpenAPITools.Api } // make the HTTP request - var localVarResponse = this.Client.Put("/pet", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Put("/pet", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { @@ -1219,11 +1371,10 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Pet object that needs to be added to the store /// Cancellation Token to cancel the request. - /// Task of Pet - public async System.Threading.Tasks.Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of void + public async System.Threading.Tasks.Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await UpdatePetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; + await UpdatePetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); } /// @@ -1232,8 +1383,8 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Pet object that needs to be added to the store /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Pet) - public async System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'pet' is set if (pet == null) @@ -1249,8 +1400,6 @@ namespace Org.OpenAPITools.Api // to determine the Accept header String[] _accepts = new String[] { - "application/xml", - "application/json" }; @@ -1262,6 +1411,22 @@ namespace Org.OpenAPITools.Api localVarRequestOptions.Data = pet; + // authentication (http_signature_test) required + if (this.Configuration.HttpSigningConfiguration != null) + { + var HttpSigningHeaders = this.Configuration.HttpSigningConfiguration.GetHttpSignedHeader(this.Configuration.BasePath, "PUT", "/pet", localVarRequestOptions); + foreach (var headerItem in HttpSigningHeaders) + { + if (localVarRequestOptions.HeaderParameters.ContainsKey(headerItem.Key)) + { + localVarRequestOptions.HeaderParameters[headerItem.Key] = new List() { headerItem.Value }; + } + else + { + localVarRequestOptions.HeaderParameters.Add(headerItem.Key, headerItem.Value); + } + } + } // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) @@ -1271,7 +1436,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/pet", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PutAsync("/pet", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1568,5 +1733,152 @@ namespace Org.OpenAPITools.Api return localVarResponse; } + /// + /// uploads an image (required) + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse + public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) + { + Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); + return localVarResponse.Data; + } + + /// + /// uploads an image (required) + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// ApiResponse of ApiResponse + public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) + { + // verify the required parameter 'requiredFile' is set + if (requiredFile == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "multipart/form-data" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "application/json" + }; + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + if (additionalMetadata != null) + { + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + } + localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); + + // authentication (petstore_auth) required + // oauth required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/fake/{petId}/uploadImageWithRequiredFile", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// uploads an image (required) + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// uploads an image (required) + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload + /// Additional data to pass to server (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ApiResponse) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'requiredFile' is set + if (requiredFile == null) + throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); + + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "multipart/form-data" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "application/json" + }; + + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("petId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(petId)); // path parameter + if (additionalMetadata != null) + { + localVarRequestOptions.FormParameters.Add("additionalMetadata", Org.OpenAPITools.Client.ClientUtils.ParameterToString(additionalMetadata)); // form parameter + } + localVarRequestOptions.FileParameters.Add("requiredFile", requiredFile); + + // authentication (petstore_auth) required + // oauth required + if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/{petId}/uploadImageWithRequiredFile", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/StoreApi.cs index d4d37dc9d4d..6ab56c9e9bf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/StoreApi.cs @@ -1,7 +1,7 @@ /* * OpenAPI Petstore * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git @@ -362,11 +362,11 @@ namespace Org.OpenAPITools.Api var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.PathParameters.Add("orderId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter // make the HTTP request - var localVarResponse = this.Client.Delete("/store/order/{orderId}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Delete("/store/order/{order_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { @@ -419,12 +419,12 @@ namespace Org.OpenAPITools.Api var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.PathParameters.Add("orderId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/store/order/{orderId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/store/order/{order_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -583,11 +583,11 @@ namespace Org.OpenAPITools.Api var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.PathParameters.Add("orderId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter // make the HTTP request - var localVarResponse = this.Client.Get("/store/order/{orderId}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/store/order/{order_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { @@ -639,12 +639,12 @@ namespace Org.OpenAPITools.Api var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.PathParameters.Add("orderId", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter + localVarRequestOptions.PathParameters.Add("order_id", Org.OpenAPITools.Client.ClientUtils.ParameterToString(orderId)); // path parameter // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/store/order/{orderId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.GetAsync("/store/order/{order_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/UserApi.cs index 8e6455d1b99..80436c9b433 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/UserApi.cs @@ -1,7 +1,7 @@ /* * OpenAPI Petstore * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git @@ -537,11 +537,6 @@ namespace Org.OpenAPITools.Api localVarRequestOptions.Data = user; - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); - } // make the HTTP request var localVarResponse = this.Client.Post("/user", localVarRequestOptions, this.Configuration); @@ -600,11 +595,6 @@ namespace Org.OpenAPITools.Api localVarRequestOptions.Data = user; - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); - } // make the HTTP request @@ -660,11 +650,6 @@ namespace Org.OpenAPITools.Api localVarRequestOptions.Data = user; - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); - } // make the HTTP request var localVarResponse = this.Client.Post("/user/createWithArray", localVarRequestOptions, this.Configuration); @@ -723,11 +708,6 @@ namespace Org.OpenAPITools.Api localVarRequestOptions.Data = user; - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); - } // make the HTTP request @@ -783,11 +763,6 @@ namespace Org.OpenAPITools.Api localVarRequestOptions.Data = user; - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); - } // make the HTTP request var localVarResponse = this.Client.Post("/user/createWithList", localVarRequestOptions, this.Configuration); @@ -846,11 +821,6 @@ namespace Org.OpenAPITools.Api localVarRequestOptions.Data = user; - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); - } // make the HTTP request @@ -905,11 +875,6 @@ namespace Org.OpenAPITools.Api localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); - } // make the HTTP request var localVarResponse = this.Client.Delete("/user/{username}", localVarRequestOptions, this.Configuration); @@ -967,11 +932,6 @@ namespace Org.OpenAPITools.Api localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); - } // make the HTTP request @@ -1267,11 +1227,6 @@ namespace Org.OpenAPITools.Api if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); - } // make the HTTP request var localVarResponse = this.Client.Get("/user/logout", localVarRequestOptions, this.Configuration); @@ -1322,11 +1277,6 @@ namespace Org.OpenAPITools.Api if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); - } // make the HTTP request @@ -1389,11 +1339,6 @@ namespace Org.OpenAPITools.Api localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter localVarRequestOptions.Data = user; - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); - } // make the HTTP request var localVarResponse = this.Client.Put("/user/{username}", localVarRequestOptions, this.Configuration); @@ -1459,11 +1404,6 @@ namespace Org.OpenAPITools.Api localVarRequestOptions.PathParameters.Add("username", Org.OpenAPITools.Client.ClientUtils.ParameterToString(username)); // path parameter localVarRequestOptions.Data = user; - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarRequestOptions.HeaderParameters.Add("api_key", this.Configuration.GetApiKeyWithPrefix("api_key")); - } // make the HTTP request diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ApiClient.cs index a78ae625eee..d70c53adbdb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ApiClient.cs @@ -1,7 +1,7 @@ /* * OpenAPI Petstore * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ApiException.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ApiException.cs index dcc378ad208..67d9888d6a3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ApiException.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ApiException.cs @@ -1,7 +1,7 @@ /* * OpenAPI Petstore * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ApiResponse.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ApiResponse.cs index 57a13978ecb..1b7d787c84b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ApiResponse.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ApiResponse.cs @@ -1,7 +1,7 @@ /* * OpenAPI Petstore * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ClientUtils.cs index fd0d02973fe..844e7e9a8f4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -1,7 +1,7 @@ /* * OpenAPI Petstore * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/Configuration.cs index 1bde137e17a..154091fc731 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/Configuration.cs @@ -1,7 +1,7 @@ /* * OpenAPI Petstore * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git @@ -95,6 +95,11 @@ namespace Org.OpenAPITools.Client /// /// The servers private IList> _servers; + + /// + /// HttpSigning configuration + /// + private HttpSigningConfiguration _HttpSigningConfiguration = null; #endregion Private Members #region Constructors @@ -107,7 +112,7 @@ namespace Org.OpenAPITools.Client { Proxy = null; UserAgent = "OpenAPI-Generator/1.0.0/csharp"; - BasePath = "http://petstore.swagger.io/v2"; + BasePath = "http://petstore.swagger.io:80/v2"; DefaultHeaders = new ConcurrentDictionary(); ApiKey = new ConcurrentDictionary(); ApiKeyPrefix = new ConcurrentDictionary(); @@ -115,8 +120,65 @@ namespace Org.OpenAPITools.Client { { new Dictionary { - {"url", "http://petstore.swagger.io/v2"}, - {"description", "No description provided"}, + {"url", "http://{server}.swagger.io:{port}/v2"}, + {"description", "petstore server"}, + { + "variables", new Dictionary { + { + "server", new Dictionary { + {"description", "No description provided"}, + {"default_value", "petstore"}, + { + "enum_values", new List() { + "petstore", + "qa-petstore", + "dev-petstore" + } + } + } + }, + { + "port", new Dictionary { + {"description", "No description provided"}, + {"default_value", "80"}, + { + "enum_values", new List() { + "80", + "8080" + } + } + } + } + } + } + } + }, + { + new Dictionary { + {"url", "https://localhost:8080/{version}"}, + {"description", "The local server"}, + { + "variables", new Dictionary { + { + "version", new Dictionary { + {"description", "No description provided"}, + {"default_value", "v2"}, + { + "enum_values", new List() { + "v1", + "v2" + } + } + } + } + } + } + } + }, + { + new Dictionary { + {"url", "https://127.0.0.1/no_variable"}, + {"description", "The local server without variables"}, } } }; @@ -133,7 +195,7 @@ namespace Org.OpenAPITools.Client IDictionary defaultHeaders, IDictionary apiKey, IDictionary apiKeyPrefix, - string basePath = "http://petstore.swagger.io/v2") : this() + string basePath = "http://petstore.swagger.io:80/v2") : this() { if (string.IsNullOrWhiteSpace(basePath)) throw new ArgumentException("The provided basePath is invalid.", "basePath"); @@ -438,6 +500,15 @@ namespace Org.OpenAPITools.Client return url; } + /// + /// Gets and Sets the HttpSigningConfiuration + /// + public HttpSigningConfiguration HttpSigningConfiguration + { + get { return _HttpSigningConfiguration; } + set { _HttpSigningConfiguration = value; } + } + #endregion Properties #region Methods @@ -510,6 +581,7 @@ namespace Org.OpenAPITools.Client Username = second.Username ?? first.Username, Password = second.Password ?? first.Password, AccessToken = second.AccessToken ?? first.AccessToken, + HttpSigningConfiguration = second.HttpSigningConfiguration ?? first.HttpSigningConfiguration, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat }; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ExceptionFactory.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ExceptionFactory.cs index 6ae2a10aae4..43624dd7c86 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ExceptionFactory.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ExceptionFactory.cs @@ -1,7 +1,7 @@ /* * OpenAPI Petstore * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/GlobalConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/GlobalConfiguration.cs index e1c00c89a03..4bc467ffa40 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/GlobalConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/GlobalConfiguration.cs @@ -1,7 +1,7 @@ /* * OpenAPI Petstore * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/HttpMethod.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/HttpMethod.cs index 1dd692d8cfb..39cde64b2a5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/HttpMethod.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/HttpMethod.cs @@ -1,7 +1,7 @@ /* * OpenAPI Petstore * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs new file mode 100644 index 00000000000..ba5fdee34d1 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs @@ -0,0 +1,732 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Runtime.InteropServices; +using System.Security; +using System.Security.Cryptography; +using System.Text; +using System.Web; + +namespace Org.OpenAPITools.Client +{ + /// + /// Class for HttpSigning auth related parameter and methods + /// + public class HttpSigningConfiguration + { + #region + /// + /// Initailize the HashAlgorithm and SigningAlgorithm to default value + /// + public HttpSigningConfiguration() + { + HashAlgorithm = HashAlgorithmName.SHA256; + SigningAlgorithm = "PKCS1-v15"; + } + #endregion + + #region Properties + /// + ///Gets the Api keyId + /// + public string KeyId { get; set; } + + /// + /// Gets the Key file path + /// + public string KeyFilePath { get; set; } + + /// + /// Gets the key pass phrase for password protected key + /// + public SecureString KeyPassPhrase { get; set; } + + /// + /// Gets the HTTP signing header + /// + public List HttpSigningHeader { get; set; } + + /// + /// Gets the hash algorithm sha256 or sha512 + /// + public HashAlgorithmName HashAlgorithm { get; set; } + + /// + /// Gets the signing algorithm + /// + public string SigningAlgorithm { get; set; } + + /// + /// Gets the Signature validaty period in seconds + /// + public int SignatureValidityPeriod { get; set; } + + #endregion + + #region enum + private enum PrivateKeyType + { + None = 0, + RSA = 1, + ECDSA = 2, + } + #endregion + + #region Methods + /// + /// Gets the Headers for HttpSigning + /// + /// Base path + /// HTTP method + /// Path + /// Request options + /// + internal Dictionary GetHttpSignedHeader(string basePath,string method, string path, RequestOptions requestOptions) + { + const string HEADER_REQUEST_TARGET = "(request-target)"; + //The time when the HTTP signature expires. The API server should reject HTTP requests + //that have expired. + const string HEADER_EXPIRES = "(expires)"; + //The 'Date' header. + const string HEADER_DATE = "Date"; + //The 'Host' header. + const string HEADER_HOST = "Host"; + //The time when the HTTP signature was generated. + const string HEADER_CREATED = "(created)"; + //When the 'Digest' header is included in the HTTP signature, the client automatically + //computes the digest of the HTTP request body, per RFC 3230. + const string HEADER_DIGEST = "Digest"; + //The 'Authorization' header is automatically generated by the client. It includes + //the list of signed headers and a base64-encoded signature. + const string HEADER_AUTHORIZATION = "Authorization"; + + //Hash table to store singed headers + var HttpSignedRequestHeader = new Dictionary(); + var HttpSignatureHeader = new Dictionary(); + + if (HttpSigningHeader.Count == 0) + { + HttpSigningHeader.Add("(created)"); + } + + if (requestOptions.PathParameters != null) + { + foreach (var pathParam in requestOptions.PathParameters) + { + var tempPath = path.Replace(pathParam.Key, "0"); + path = string.Format(tempPath, pathParam.Value); + } + } + + var httpValues = HttpUtility.ParseQueryString(String.Empty); + foreach (var parameter in requestOptions.QueryParameters) + { +#if (NETCOREAPP) + if (parameter.Value.Count > 1) + { // array + foreach (var value in parameter.Value) + { + httpValues.Add(HttpUtility.UrlEncode(parameter.Key) + "[]", value); + } + } + else + { + httpValues.Add(HttpUtility.UrlEncode(parameter.Key), parameter.Value[0]); + } +#else + if (parameter.Value.Count > 1) + { // array + foreach (var value in parameter.Value) + { + httpValues.Add(parameter.Key + "[]", value); + } + } + else + { + httpValues.Add(parameter.Key, parameter.Value[0]); + } +#endif + } + var uriBuilder = new UriBuilder(string.Concat(basePath, path)); + uriBuilder.Query = httpValues.ToString().Replace("+", "%20"); + + var dateTime = DateTime.Now; + String Digest = String.Empty; + + //get the body + string requestBody = string.Empty; + if (requestOptions.Data != null) + { + var serializerSettings = new JsonSerializerSettings(); + requestBody = JsonConvert.SerializeObject(requestOptions.Data, serializerSettings); + } + + if (HashAlgorithm == HashAlgorithmName.SHA256) + { + var bodyDigest = GetStringHash(HashAlgorithm.ToString(), requestBody); + Digest = string.Format("SHA-256={0}", Convert.ToBase64String(bodyDigest)); + } + else if (HashAlgorithm == HashAlgorithmName.SHA512) + { + var bodyDigest = GetStringHash(HashAlgorithm.ToString(), requestBody); + Digest = string.Format("SHA-512={0}", Convert.ToBase64String(bodyDigest)); + } + else + { + throw new Exception(string.Format("{0} not supported", HashAlgorithm)); + } + + + foreach (var header in HttpSigningHeader) + { + if (header.Equals(HEADER_REQUEST_TARGET)) + { + var targetUrl = string.Format("{0} {1}{2}", method.ToLower(), uriBuilder.Path, uriBuilder.Query); + HttpSignatureHeader.Add(header.ToLower(), targetUrl); + } + else if (header.Equals(HEADER_EXPIRES)) + { + var expireDateTime = dateTime.AddSeconds(SignatureValidityPeriod); + HttpSignatureHeader.Add(header.ToLower(), GetUnixTime(expireDateTime).ToString()); + } + else if (header.Equals(HEADER_DATE)) + { + var utcDateTime = dateTime.ToString("r").ToString(); + HttpSignatureHeader.Add(header.ToLower(), utcDateTime); + HttpSignedRequestHeader.Add(HEADER_DATE, utcDateTime); + } + else if (header.Equals(HEADER_HOST)) + { + HttpSignatureHeader.Add(header.ToLower(), uriBuilder.Host); + HttpSignedRequestHeader.Add(HEADER_HOST, uriBuilder.Host); + } + else if (header.Equals(HEADER_CREATED)) + { + HttpSignatureHeader.Add(header.ToLower(), GetUnixTime(dateTime).ToString()); + } + else if (header.Equals(HEADER_DIGEST)) + { + HttpSignedRequestHeader.Add(HEADER_DIGEST, Digest); + HttpSignatureHeader.Add(header.ToLower(), Digest); + } + else + { + bool isHeaderFound = false; + foreach (var item in requestOptions.HeaderParameters) + { + if (string.Equals(item.Key, header, StringComparison.OrdinalIgnoreCase)) + { + HttpSignatureHeader.Add(header.ToLower(), item.Value.ToString()); + isHeaderFound = true; + break; + } + } + if (!isHeaderFound) + { + throw new Exception(string.Format("Cannot sign HTTP request.Request does not contain the {0} header.",header)); + } + } + + } + var headersKeysString = String.Join(" ", HttpSignatureHeader.Keys); + var headerValuesList = new List(); + + foreach (var keyVal in HttpSignatureHeader) + { + headerValuesList.Add(string.Format("{0}: {1}", keyVal.Key, keyVal.Value)); + + } + //Concatinate headers value separated by new line + var headerValuesString = string.Join("\n", headerValuesList); + var signatureStringHash = GetStringHash(HashAlgorithm.ToString(), headerValuesString); + string headerSignatureStr = null; + var keyType = GetKeyType(KeyFilePath); + + if (keyType == PrivateKeyType.RSA) + { + headerSignatureStr = GetRSASignature(signatureStringHash); + } + else if (keyType == PrivateKeyType.ECDSA) + { + headerSignatureStr = GetECDSASignature(signatureStringHash); + } + var cryptographicScheme = "hs2019"; + var authorizationHeaderValue = string.Format("Signature keyId=\"{0}\",algorithm=\"{1}\"", + KeyId, cryptographicScheme); + + + if (HttpSignatureHeader.ContainsKey(HEADER_CREATED)) + { + authorizationHeaderValue += string.Format(",created={0}", HttpSignatureHeader[HEADER_CREATED]); + } + + if (HttpSignatureHeader.ContainsKey(HEADER_EXPIRES)) + { + authorizationHeaderValue += string.Format(",expires={0}", HttpSignatureHeader[HEADER_EXPIRES]); + } + + authorizationHeaderValue += string.Format(",headers=\"{0}\",signature=\"{1}\"", + headersKeysString, headerSignatureStr); + + HttpSignedRequestHeader.Add(HEADER_AUTHORIZATION, authorizationHeaderValue); + + return HttpSignedRequestHeader; + } + + private byte[] GetStringHash(string hashName, string stringToBeHashed) + { + var hashAlgorithm = System.Security.Cryptography.HashAlgorithm.Create(hashName); + + var bytes = Encoding.UTF8.GetBytes(stringToBeHashed); + var stringHash = hashAlgorithm.ComputeHash(bytes); + return stringHash; + } + + private int GetUnixTime(DateTime date2) + { + DateTime date1 = new DateTime(1970, 01, 01); + TimeSpan timeSpan = date2 - date1; + return (int)timeSpan.TotalSeconds; + } + + private string GetRSASignature(byte[] stringToSign) + { + RSA rsa = GetRSAProviderFromPemFile(KeyFilePath, KeyPassPhrase); + if (SigningAlgorithm == "RSASSA-PSS") + { + var signedbytes = rsa.SignHash(stringToSign, HashAlgorithm, RSASignaturePadding.Pss); + return Convert.ToBase64String(signedbytes); + + } + else if (SigningAlgorithm == "PKCS1-v15") + { + var signedbytes = rsa.SignHash(stringToSign, HashAlgorithm, RSASignaturePadding.Pkcs1); + return Convert.ToBase64String(signedbytes); + } + return string.Empty; + } + + /// + /// Gets the ECDSA signature + /// + /// + /// + private string GetECDSASignature(byte[] dataToSign) + { + if (!File.Exists(KeyFilePath)) + { + throw new Exception("key file path does not exist."); + } + + var ecKeyHeader = "-----BEGIN EC PRIVATE KEY-----"; + var ecKeyFooter = "-----END EC PRIVATE KEY-----"; + var keyStr = File.ReadAllText(KeyFilePath); + var ecKeyBase64String = keyStr.Replace(ecKeyHeader, "").Replace(ecKeyFooter, "").Trim(); + var keyBytes = System.Convert.FromBase64String(ecKeyBase64String); + var ecdsa = ECDsa.Create(); + +#if (NETCOREAPP3_0 || NETCOREAPP3_1 || NET5_0) + var byteCount = 0; + if (KeyPassPhrase != null) + { + IntPtr unmanagedString = IntPtr.Zero; + try + { + // convert secure string to byte array + unmanagedString = Marshal.SecureStringToGlobalAllocUnicode(KeyPassPhrase); + ecdsa.ImportEncryptedPkcs8PrivateKey(Encoding.UTF8.GetBytes(Marshal.PtrToStringUni(unmanagedString)), keyBytes, out byteCount); + } + finally + { + if (unmanagedString != IntPtr.Zero) + { + Marshal.ZeroFreeBSTR(unmanagedString); + } + } + } + else + { + ecdsa.ImportPkcs8PrivateKey(keyBytes, out byteCount); + } + var signedBytes = ecdsa.SignHash(dataToSign); + var derBytes = ConvertToECDSAANS1Format(signedBytes); + var signedString = System.Convert.ToBase64String(derBytes); + + return signedString; +#else + throw new Exception("ECDSA signing is supported only on NETCOREAPP3_0 and above"); +#endif + + } + + private byte[] ConvertToECDSAANS1Format(byte[] signedBytes) + { + var derBytes = new List(); + byte derLength = 68; //default lenght for ECDSA code signinged bit 0x44 + byte rbytesLength = 32; //R length 0x20 + byte sbytesLength = 32; //S length 0x20 + var rBytes = new List(); + var sBytes = new List(); + for (int i = 0; i < 32; i++) + { + rBytes.Add(signedBytes[i]); + } + for (int i = 32; i < 64; i++) + { + sBytes.Add(signedBytes[i]); + } + + if (rBytes[0] > 0x7F) + { + derLength++; + rbytesLength++; + var tempBytes = new List(); + tempBytes.AddRange(rBytes); + rBytes.Clear(); + rBytes.Add(0x00); + rBytes.AddRange(tempBytes); + } + + if (sBytes[0] > 0x7F) + { + derLength++; + sbytesLength++; + var tempBytes = new List(); + tempBytes.AddRange(sBytes); + sBytes.Clear(); + sBytes.Add(0x00); + sBytes.AddRange(tempBytes); + + } + + derBytes.Add(48); //start of the sequence 0x30 + derBytes.Add(derLength); //total length r lenth, type and r bytes + + derBytes.Add(2); //tag for integer + derBytes.Add(rbytesLength); //length of r + derBytes.AddRange(rBytes); + + derBytes.Add(2); //tag for integer + derBytes.Add(sbytesLength); //length of s + derBytes.AddRange(sBytes); + return derBytes.ToArray(); + } + + private RSACryptoServiceProvider GetRSAProviderFromPemFile(String pemfile, SecureString keyPassPharse = null) + { + const String pempubheader = "-----BEGIN PUBLIC KEY-----"; + const String pempubfooter = "-----END PUBLIC KEY-----"; + bool isPrivateKeyFile = true; + byte[] pemkey = null; + + if (!File.Exists(pemfile)) + { + throw new Exception("private key file does not exist."); + } + string pemstr = File.ReadAllText(pemfile).Trim(); + + if (pemstr.StartsWith(pempubheader) && pemstr.EndsWith(pempubfooter)) + { + isPrivateKeyFile = false; + } + + if (isPrivateKeyFile) + { + pemkey = ConvertPrivateKeyToBytes(pemstr, keyPassPharse); + if (pemkey == null) + { + return null; + } + return DecodeRSAPrivateKey(pemkey); + } + return null; + } + + private byte[] ConvertPrivateKeyToBytes(String instr, SecureString keyPassPharse = null) + { + const String pemprivheader = "-----BEGIN RSA PRIVATE KEY-----"; + const String pemprivfooter = "-----END RSA PRIVATE KEY-----"; + String pemstr = instr.Trim(); + byte[] binkey; + + if (!pemstr.StartsWith(pemprivheader) || !pemstr.EndsWith(pemprivfooter)) + { + return null; + } + + StringBuilder sb = new StringBuilder(pemstr); + sb.Replace(pemprivheader, ""); + sb.Replace(pemprivfooter, ""); + String pvkstr = sb.ToString().Trim(); + + try + { // if there are no PEM encryption info lines, this is an UNencrypted PEM private key + binkey = Convert.FromBase64String(pvkstr); + return binkey; + } + catch (System.FormatException) + { + StringReader str = new StringReader(pvkstr); + + //-------- read PEM encryption info. lines and extract salt ----- + if (!str.ReadLine().StartsWith("Proc-Type: 4,ENCRYPTED")) + return null; + String saltline = str.ReadLine(); + if (!saltline.StartsWith("DEK-Info: DES-EDE3-CBC,")) + return null; + String saltstr = saltline.Substring(saltline.IndexOf(",") + 1).Trim(); + byte[] salt = new byte[saltstr.Length / 2]; + for (int i = 0; i < salt.Length; i++) + salt[i] = Convert.ToByte(saltstr.Substring(i * 2, 2), 16); + if (!(str.ReadLine() == "")) + return null; + + //------ remaining b64 data is encrypted RSA key ---- + String encryptedstr = str.ReadToEnd(); + + try + { //should have b64 encrypted RSA key now + binkey = Convert.FromBase64String(encryptedstr); + } + catch (System.FormatException) + { //data is not in base64 fromat + return null; + } + + byte[] deskey = GetEncryptedKey(salt, keyPassPharse, 1, 2); // count=1 (for OpenSSL implementation); 2 iterations to get at least 24 bytes + if (deskey == null) + return null; + + //------ Decrypt the encrypted 3des-encrypted RSA private key ------ + byte[] rsakey = DecryptKey(binkey, deskey, salt); //OpenSSL uses salt value in PEM header also as 3DES IV + return rsakey; + } + } + + private RSACryptoServiceProvider DecodeRSAPrivateKey(byte[] privkey) + { + byte[] MODULUS, E, D, P, Q, DP, DQ, IQ; + + // --------- Set up stream to decode the asn.1 encoded RSA private key ------ + MemoryStream mem = new MemoryStream(privkey); + BinaryReader binr = new BinaryReader(mem); //wrap Memory Stream with BinaryReader for easy reading + byte bt = 0; + ushort twobytes = 0; + int elems = 0; + try + { + twobytes = binr.ReadUInt16(); + if (twobytes == 0x8130) //data read as little endian order (actual data order for Sequence is 30 81) + binr.ReadByte(); //advance 1 byte + else if (twobytes == 0x8230) + binr.ReadInt16(); //advance 2 bytes + else + return null; + + twobytes = binr.ReadUInt16(); + if (twobytes != 0x0102) //version number + return null; + bt = binr.ReadByte(); + if (bt != 0x00) + return null; + + //------ all private key components are Integer sequences ---- + elems = GetIntegerSize(binr); + MODULUS = binr.ReadBytes(elems); + + elems = GetIntegerSize(binr); + E = binr.ReadBytes(elems); + + elems = GetIntegerSize(binr); + D = binr.ReadBytes(elems); + + elems = GetIntegerSize(binr); + P = binr.ReadBytes(elems); + + elems = GetIntegerSize(binr); + Q = binr.ReadBytes(elems); + + elems = GetIntegerSize(binr); + DP = binr.ReadBytes(elems); + + elems = GetIntegerSize(binr); + DQ = binr.ReadBytes(elems); + + elems = GetIntegerSize(binr); + IQ = binr.ReadBytes(elems); + + // ------- create RSACryptoServiceProvider instance and initialize with public key ----- + RSACryptoServiceProvider RSA = new RSACryptoServiceProvider(); + RSAParameters RSAparams = new RSAParameters(); + RSAparams.Modulus = MODULUS; + RSAparams.Exponent = E; + RSAparams.D = D; + RSAparams.P = P; + RSAparams.Q = Q; + RSAparams.DP = DP; + RSAparams.DQ = DQ; + RSAparams.InverseQ = IQ; + RSA.ImportParameters(RSAparams); + return RSA; + } + catch (Exception) + { + return null; + } + finally { binr.Close(); } + } + + private int GetIntegerSize(BinaryReader binr) + { + byte bt = 0; + byte lowbyte = 0x00; + byte highbyte = 0x00; + int count = 0; + bt = binr.ReadByte(); + if (bt != 0x02) //expect integer + return 0; + bt = binr.ReadByte(); + + if (bt == 0x81) + count = binr.ReadByte(); // data size in next byte + else if (bt == 0x82) + { + highbyte = binr.ReadByte(); // data size in next 2 bytes + lowbyte = binr.ReadByte(); + byte[] modint = { lowbyte, highbyte, 0x00, 0x00 }; + count = BitConverter.ToInt32(modint, 0); + } + else + { + count = bt; // we already have the data size + } + while (binr.ReadByte() == 0x00) + { //remove high order zeros in data + count -= 1; + } + binr.BaseStream.Seek(-1, SeekOrigin.Current); + //last ReadByte wasn't a removed zero, so back up a byte + return count; + } + + private byte[] GetEncryptedKey(byte[] salt, SecureString secpswd, int count, int miter) + { + IntPtr unmanagedPswd = IntPtr.Zero; + int HASHLENGTH = 16; //MD5 bytes + byte[] keymaterial = new byte[HASHLENGTH * miter]; //to store contatenated Mi hashed results + + byte[] psbytes = new byte[secpswd.Length]; + unmanagedPswd = Marshal.SecureStringToGlobalAllocAnsi(secpswd); + Marshal.Copy(unmanagedPswd, psbytes, 0, psbytes.Length); + Marshal.ZeroFreeGlobalAllocAnsi(unmanagedPswd); + + // --- contatenate salt and pswd bytes into fixed data array --- + byte[] data00 = new byte[psbytes.Length + salt.Length]; + Array.Copy(psbytes, data00, psbytes.Length); //copy the pswd bytes + Array.Copy(salt, 0, data00, psbytes.Length, salt.Length); //concatenate the salt bytes + + // ---- do multi-hashing and contatenate results D1, D2 ... into keymaterial bytes ---- + MD5 md5 = new MD5CryptoServiceProvider(); + byte[] result = null; + byte[] hashtarget = new byte[HASHLENGTH + data00.Length]; //fixed length initial hashtarget + + for (int j = 0; j < miter; j++) + { + // ---- Now hash consecutively for count times ------ + if (j == 0) + result = data00; //initialize + else + { + Array.Copy(result, hashtarget, result.Length); + Array.Copy(data00, 0, hashtarget, result.Length, data00.Length); + result = hashtarget; + } + + for (int i = 0; i < count; i++) + result = md5.ComputeHash(result); + Array.Copy(result, 0, keymaterial, j * HASHLENGTH, result.Length); //contatenate to keymaterial + } + byte[] deskey = new byte[24]; + Array.Copy(keymaterial, deskey, deskey.Length); + + Array.Clear(psbytes, 0, psbytes.Length); + Array.Clear(data00, 0, data00.Length); + Array.Clear(result, 0, result.Length); + Array.Clear(hashtarget, 0, hashtarget.Length); + Array.Clear(keymaterial, 0, keymaterial.Length); + return deskey; + } + + private byte[] DecryptKey(byte[] cipherData, byte[] desKey, byte[] IV) + { + MemoryStream memst = new MemoryStream(); + TripleDES alg = TripleDES.Create(); + alg.Key = desKey; + alg.IV = IV; + try + { + CryptoStream cs = new CryptoStream(memst, alg.CreateDecryptor(), CryptoStreamMode.Write); + cs.Write(cipherData, 0, cipherData.Length); + cs.Close(); + } + catch (Exception) + { + return null; + } + byte[] decryptedData = memst.ToArray(); + return decryptedData; + } + + /// + /// Detect the key type from the pem file. + /// + /// key file path in pem format + /// + private PrivateKeyType GetKeyType(string keyFilePath) + { + if (!File.Exists(keyFilePath)) + { + throw new Exception("Key file path does not exist."); + } + + var ecPrivateKeyHeader = "BEGIN EC PRIVATE KEY"; + var ecPrivateKeyFooter = "END EC PRIVATE KEY"; + var rsaPrivateKeyHeader = "BEGIN RSA PRIVATE KEY"; + var rsaPrivateFooter = "END RSA PRIVATE KEY"; + //var pkcs8Header = "BEGIN PRIVATE KEY"; + //var pkcs8Footer = "END PRIVATE KEY"; + var keyType = PrivateKeyType.None; + var key = File.ReadAllLines(keyFilePath); + + if (key[0].ToString().Contains(rsaPrivateKeyHeader) && + key[key.Length - 1].ToString().Contains(rsaPrivateFooter)) + { + keyType = PrivateKeyType.RSA; + } + else if (key[0].ToString().Contains(ecPrivateKeyHeader) && + key[key.Length - 1].ToString().Contains(ecPrivateKeyFooter)) + { + keyType = PrivateKeyType.ECDSA; + } + else if (key[0].ToString().Contains(ecPrivateKeyHeader) && + key[key.Length - 1].ToString().Contains(ecPrivateKeyFooter)) + { + + /*this type of key can hold many type different types of private key, but here due lack of pem header + Considering this as EC key + */ + //TODO :- update the key based on oid + keyType = PrivateKeyType.ECDSA; + } + else + { + throw new Exception("Either the key is invalid or key is not supported"); + + } + return keyType; + } + #endregion + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/IApiAccessor.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/IApiAccessor.cs index edcf9827ebb..59465ae8e90 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/IApiAccessor.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/IApiAccessor.cs @@ -1,7 +1,7 @@ /* * OpenAPI Petstore * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/IAsynchronousClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/IAsynchronousClient.cs index 6b62316325d..8a6f726678a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/IAsynchronousClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/IAsynchronousClient.cs @@ -1,7 +1,7 @@ /* * OpenAPI Petstore * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 00bedba8ee2..141e65a5b72 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -1,7 +1,7 @@ /* * OpenAPI Petstore * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git @@ -111,5 +111,10 @@ namespace Org.OpenAPITools.Client /// /// X509 Certificate collection. X509CertificateCollection ClientCertificates { get; } + + /// + /// Gets the HttpSigning configuration + /// + HttpSigningConfiguration HttpSigningConfiguration { get; } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ISynchronousClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ISynchronousClient.cs index 22bb7a560f7..d27f01a588b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ISynchronousClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ISynchronousClient.cs @@ -1,7 +1,7 @@ /* * OpenAPI Petstore * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/Multimap.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/Multimap.cs index 966d634a50b..738a64c570b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/Multimap.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/Multimap.cs @@ -1,7 +1,7 @@ /* * OpenAPI Petstore * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs index dcc79edd944..a5253e58201 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs @@ -1,7 +1,7 @@ /* * OpenAPI Petstore * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/RequestOptions.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/RequestOptions.cs index e5facdfdaf8..d8da585db9c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/RequestOptions.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/RequestOptions.cs @@ -1,7 +1,7 @@ /* * OpenAPI Petstore * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs index 675bb752f4b..b3fc4c3c7a3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs @@ -1,7 +1,7 @@ /* * OpenAPI Petstore * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs new file mode 100644 index 00000000000..5f212ec734f --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -0,0 +1,206 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// AdditionalPropertiesClass + /// + [DataContract(Name = "AdditionalPropertiesClass")] + public partial class AdditionalPropertiesClass : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// mapProperty. + /// mapOfMapProperty. + /// anytype1. + /// mapWithUndeclaredPropertiesAnytype1. + /// mapWithUndeclaredPropertiesAnytype2. + /// mapWithUndeclaredPropertiesAnytype3. + /// an object with no declared properties and no undeclared properties, hence it's an empty map.. + /// mapWithUndeclaredPropertiesString. + public AdditionalPropertiesClass(Dictionary mapProperty = default(Dictionary), Dictionary> mapOfMapProperty = default(Dictionary>), Object anytype1 = default(Object), Object mapWithUndeclaredPropertiesAnytype1 = default(Object), Object mapWithUndeclaredPropertiesAnytype2 = default(Object), Dictionary mapWithUndeclaredPropertiesAnytype3 = default(Dictionary), Object emptyMap = default(Object), Dictionary mapWithUndeclaredPropertiesString = default(Dictionary)) + { + this.MapProperty = mapProperty; + this.MapOfMapProperty = mapOfMapProperty; + this.Anytype1 = anytype1; + this.MapWithUndeclaredPropertiesAnytype1 = mapWithUndeclaredPropertiesAnytype1; + this.MapWithUndeclaredPropertiesAnytype2 = mapWithUndeclaredPropertiesAnytype2; + this.MapWithUndeclaredPropertiesAnytype3 = mapWithUndeclaredPropertiesAnytype3; + this.EmptyMap = emptyMap; + this.MapWithUndeclaredPropertiesString = mapWithUndeclaredPropertiesString; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets MapProperty + /// + [DataMember(Name = "map_property", EmitDefaultValue = false)] + public Dictionary MapProperty { get; set; } + + /// + /// Gets or Sets MapOfMapProperty + /// + [DataMember(Name = "map_of_map_property", EmitDefaultValue = false)] + public Dictionary> MapOfMapProperty { get; set; } + + /// + /// Gets or Sets Anytype1 + /// + [DataMember(Name = "anytype_1", EmitDefaultValue = true)] + public Object Anytype1 { get; set; } + + /// + /// Gets or Sets MapWithUndeclaredPropertiesAnytype1 + /// + [DataMember(Name = "map_with_undeclared_properties_anytype_1", EmitDefaultValue = false)] + public Object MapWithUndeclaredPropertiesAnytype1 { get; set; } + + /// + /// Gets or Sets MapWithUndeclaredPropertiesAnytype2 + /// + [DataMember(Name = "map_with_undeclared_properties_anytype_2", EmitDefaultValue = false)] + public Object MapWithUndeclaredPropertiesAnytype2 { get; set; } + + /// + /// Gets or Sets MapWithUndeclaredPropertiesAnytype3 + /// + [DataMember(Name = "map_with_undeclared_properties_anytype_3", EmitDefaultValue = false)] + public Dictionary MapWithUndeclaredPropertiesAnytype3 { get; set; } + + /// + /// an object with no declared properties and no undeclared properties, hence it's an empty map. + /// + /// an object with no declared properties and no undeclared properties, hence it's an empty map. + [DataMember(Name = "empty_map", EmitDefaultValue = false)] + public Object EmptyMap { get; set; } + + /// + /// Gets or Sets MapWithUndeclaredPropertiesString + /// + [DataMember(Name = "map_with_undeclared_properties_string", EmitDefaultValue = false)] + public Dictionary MapWithUndeclaredPropertiesString { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AdditionalPropertiesClass {\n"); + sb.Append(" MapProperty: ").Append(MapProperty).Append("\n"); + sb.Append(" MapOfMapProperty: ").Append(MapOfMapProperty).Append("\n"); + sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype1: ").Append(MapWithUndeclaredPropertiesAnytype1).Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype2: ").Append(MapWithUndeclaredPropertiesAnytype2).Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesAnytype3: ").Append(MapWithUndeclaredPropertiesAnytype3).Append("\n"); + sb.Append(" EmptyMap: ").Append(EmptyMap).Append("\n"); + sb.Append(" MapWithUndeclaredPropertiesString: ").Append(MapWithUndeclaredPropertiesString).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as AdditionalPropertiesClass).AreEqual; + } + + /// + /// Returns true if AdditionalPropertiesClass instances are equal + /// + /// Instance of AdditionalPropertiesClass to be compared + /// Boolean + public bool Equals(AdditionalPropertiesClass input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.MapProperty != null) + hashCode = hashCode * 59 + this.MapProperty.GetHashCode(); + if (this.MapOfMapProperty != null) + hashCode = hashCode * 59 + this.MapOfMapProperty.GetHashCode(); + if (this.Anytype1 != null) + hashCode = hashCode * 59 + this.Anytype1.GetHashCode(); + if (this.MapWithUndeclaredPropertiesAnytype1 != null) + hashCode = hashCode * 59 + this.MapWithUndeclaredPropertiesAnytype1.GetHashCode(); + if (this.MapWithUndeclaredPropertiesAnytype2 != null) + hashCode = hashCode * 59 + this.MapWithUndeclaredPropertiesAnytype2.GetHashCode(); + if (this.MapWithUndeclaredPropertiesAnytype3 != null) + hashCode = hashCode * 59 + this.MapWithUndeclaredPropertiesAnytype3.GetHashCode(); + if (this.EmptyMap != null) + hashCode = hashCode * 59 + this.EmptyMap.GetHashCode(); + if (this.MapWithUndeclaredPropertiesString != null) + hashCode = hashCode * 59 + this.MapWithUndeclaredPropertiesString.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Animal.cs new file mode 100644 index 00000000000..95c79122ad7 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Animal.cs @@ -0,0 +1,163 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// Animal + /// + [DataContract(Name = "Animal")] + [JsonConverter(typeof(JsonSubtypes), "ClassName")] + [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] + [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] + public partial class Animal : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Animal() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// className (required). + /// color (default to "red"). + public Animal(string className = default(string), string color = "red") + { + // to ensure "className" is required (not null) + this.ClassName = className ?? throw new ArgumentNullException("className is a required property for Animal and cannot be null"); + // use default value if no "color" provided + this.Color = color ?? "red"; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets ClassName + /// + [DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)] + public string ClassName { get; set; } + + /// + /// Gets or Sets Color + /// + [DataMember(Name = "color", EmitDefaultValue = false)] + public string Color { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Animal {\n"); + sb.Append(" ClassName: ").Append(ClassName).Append("\n"); + sb.Append(" Color: ").Append(Color).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as Animal).AreEqual; + } + + /// + /// Returns true if Animal instances are equal + /// + /// Instance of Animal to be compared + /// Boolean + public bool Equals(Animal input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ClassName != null) + hashCode = hashCode * 59 + this.ClassName.GetHashCode(); + if (this.Color != null) + hashCode = hashCode * 59 + this.Color.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ApiResponse.cs index 5bf6b7b9b79..c9a0a78efa7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -1,7 +1,7 @@ /* * OpenAPI Petstore * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git @@ -27,7 +27,7 @@ using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model { /// - /// Describes the result of uploading an image resource + /// ApiResponse /// [DataContract(Name = "ApiResponse")] public partial class ApiResponse : IEquatable, IValidatableObject diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Apple.cs new file mode 100644 index 00000000000..b414d3021a6 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Apple.cs @@ -0,0 +1,153 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// Apple + /// + [DataContract(Name = "apple")] + public partial class Apple : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// cultivar. + /// origin. + public Apple(string cultivar = default(string), string origin = default(string)) + { + this.Cultivar = cultivar; + this.Origin = origin; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Cultivar + /// + [DataMember(Name = "cultivar", EmitDefaultValue = false)] + public string Cultivar { get; set; } + + /// + /// Gets or Sets Origin + /// + [DataMember(Name = "origin", EmitDefaultValue = false)] + public string Origin { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Apple {\n"); + sb.Append(" Cultivar: ").Append(Cultivar).Append("\n"); + sb.Append(" Origin: ").Append(Origin).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as Apple).AreEqual; + } + + /// + /// Returns true if Apple instances are equal + /// + /// Instance of Apple to be compared + /// Boolean + public bool Equals(Apple input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Cultivar != null) + hashCode = hashCode * 59 + this.Cultivar.GetHashCode(); + if (this.Origin != null) + hashCode = hashCode * 59 + this.Origin.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // Cultivar (string) pattern + Regex regexCultivar = new Regex(@"^[a-zA-Z\\s]*$", RegexOptions.CultureInvariant); + if (false == regexCultivar.Match(this.Cultivar).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Cultivar, must match a pattern of " + regexCultivar, new [] { "Cultivar" }); + } + + // Origin (string) pattern + Regex regexOrigin = new Regex(@"^[A-Z\\s]*$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + if (false == regexOrigin.Match(this.Origin).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Origin, must match a pattern of " + regexOrigin, new [] { "Origin" }); + } + + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/AppleReq.cs new file mode 100644 index 00000000000..7501463d801 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/AppleReq.cs @@ -0,0 +1,134 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// AppleReq + /// + [DataContract(Name = "appleReq")] + public partial class AppleReq : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected AppleReq() { } + /// + /// Initializes a new instance of the class. + /// + /// cultivar (required). + /// mealy. + public AppleReq(string cultivar = default(string), bool mealy = default(bool)) + { + // to ensure "cultivar" is required (not null) + this.Cultivar = cultivar ?? throw new ArgumentNullException("cultivar is a required property for AppleReq and cannot be null"); + this.Mealy = mealy; + } + + /// + /// Gets or Sets Cultivar + /// + [DataMember(Name = "cultivar", IsRequired = true, EmitDefaultValue = false)] + public string Cultivar { get; set; } + + /// + /// Gets or Sets Mealy + /// + [DataMember(Name = "mealy", EmitDefaultValue = false)] + public bool Mealy { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AppleReq {\n"); + sb.Append(" Cultivar: ").Append(Cultivar).Append("\n"); + sb.Append(" Mealy: ").Append(Mealy).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as AppleReq).AreEqual; + } + + /// + /// Returns true if AppleReq instances are equal + /// + /// Instance of AppleReq to be compared + /// Boolean + public bool Equals(AppleReq input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Cultivar != null) + hashCode = hashCode * 59 + this.Cultivar.GetHashCode(); + hashCode = hashCode * 59 + this.Mealy.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs new file mode 100644 index 00000000000..bf2c8663ff6 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -0,0 +1,128 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// ArrayOfArrayOfNumberOnly + /// + [DataContract(Name = "ArrayOfArrayOfNumberOnly")] + public partial class ArrayOfArrayOfNumberOnly : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// arrayArrayNumber. + public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber = default(List>)) + { + this.ArrayArrayNumber = arrayArrayNumber; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets ArrayArrayNumber + /// + [DataMember(Name = "ArrayArrayNumber", EmitDefaultValue = false)] + public List> ArrayArrayNumber { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ArrayOfArrayOfNumberOnly {\n"); + sb.Append(" ArrayArrayNumber: ").Append(ArrayArrayNumber).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as ArrayOfArrayOfNumberOnly).AreEqual; + } + + /// + /// Returns true if ArrayOfArrayOfNumberOnly instances are equal + /// + /// Instance of ArrayOfArrayOfNumberOnly to be compared + /// Boolean + public bool Equals(ArrayOfArrayOfNumberOnly input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ArrayArrayNumber != null) + hashCode = hashCode * 59 + this.ArrayArrayNumber.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs new file mode 100644 index 00000000000..09a9bbb8850 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -0,0 +1,128 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// ArrayOfNumberOnly + /// + [DataContract(Name = "ArrayOfNumberOnly")] + public partial class ArrayOfNumberOnly : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// arrayNumber. + public ArrayOfNumberOnly(List arrayNumber = default(List)) + { + this.ArrayNumber = arrayNumber; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets ArrayNumber + /// + [DataMember(Name = "ArrayNumber", EmitDefaultValue = false)] + public List ArrayNumber { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ArrayOfNumberOnly {\n"); + sb.Append(" ArrayNumber: ").Append(ArrayNumber).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as ArrayOfNumberOnly).AreEqual; + } + + /// + /// Returns true if ArrayOfNumberOnly instances are equal + /// + /// Instance of ArrayOfNumberOnly to be compared + /// Boolean + public bool Equals(ArrayOfNumberOnly input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ArrayNumber != null) + hashCode = hashCode * 59 + this.ArrayNumber.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ArrayTest.cs new file mode 100644 index 00000000000..4406ffb33ea --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -0,0 +1,150 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// ArrayTest + /// + [DataContract(Name = "ArrayTest")] + public partial class ArrayTest : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// arrayOfString. + /// arrayArrayOfInteger. + /// arrayArrayOfModel. + public ArrayTest(List arrayOfString = default(List), List> arrayArrayOfInteger = default(List>), List> arrayArrayOfModel = default(List>)) + { + this.ArrayOfString = arrayOfString; + this.ArrayArrayOfInteger = arrayArrayOfInteger; + this.ArrayArrayOfModel = arrayArrayOfModel; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets ArrayOfString + /// + [DataMember(Name = "array_of_string", EmitDefaultValue = false)] + public List ArrayOfString { get; set; } + + /// + /// Gets or Sets ArrayArrayOfInteger + /// + [DataMember(Name = "array_array_of_integer", EmitDefaultValue = false)] + public List> ArrayArrayOfInteger { get; set; } + + /// + /// Gets or Sets ArrayArrayOfModel + /// + [DataMember(Name = "array_array_of_model", EmitDefaultValue = false)] + public List> ArrayArrayOfModel { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ArrayTest {\n"); + sb.Append(" ArrayOfString: ").Append(ArrayOfString).Append("\n"); + sb.Append(" ArrayArrayOfInteger: ").Append(ArrayArrayOfInteger).Append("\n"); + sb.Append(" ArrayArrayOfModel: ").Append(ArrayArrayOfModel).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as ArrayTest).AreEqual; + } + + /// + /// Returns true if ArrayTest instances are equal + /// + /// Instance of ArrayTest to be compared + /// Boolean + public bool Equals(ArrayTest input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ArrayOfString != null) + hashCode = hashCode * 59 + this.ArrayOfString.GetHashCode(); + if (this.ArrayArrayOfInteger != null) + hashCode = hashCode * 59 + this.ArrayArrayOfInteger.GetHashCode(); + if (this.ArrayArrayOfModel != null) + hashCode = hashCode * 59 + this.ArrayArrayOfModel.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Banana.cs new file mode 100644 index 00000000000..a7513bb453a --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Banana.cs @@ -0,0 +1,127 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// Banana + /// + [DataContract(Name = "banana")] + public partial class Banana : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// lengthCm. + public Banana(decimal lengthCm = default(decimal)) + { + this.LengthCm = lengthCm; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets LengthCm + /// + [DataMember(Name = "lengthCm", EmitDefaultValue = false)] + public decimal LengthCm { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Banana {\n"); + sb.Append(" LengthCm: ").Append(LengthCm).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as Banana).AreEqual; + } + + /// + /// Returns true if Banana instances are equal + /// + /// Instance of Banana to be compared + /// Boolean + public bool Equals(Banana input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = hashCode * 59 + this.LengthCm.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/BananaReq.cs new file mode 100644 index 00000000000..6e7c0c7fb3b --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/BananaReq.cs @@ -0,0 +1,132 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// BananaReq + /// + [DataContract(Name = "bananaReq")] + public partial class BananaReq : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected BananaReq() { } + /// + /// Initializes a new instance of the class. + /// + /// lengthCm (required). + /// sweet. + public BananaReq(decimal lengthCm = default(decimal), bool sweet = default(bool)) + { + this.LengthCm = lengthCm; + this.Sweet = sweet; + } + + /// + /// Gets or Sets LengthCm + /// + [DataMember(Name = "lengthCm", IsRequired = true, EmitDefaultValue = false)] + public decimal LengthCm { get; set; } + + /// + /// Gets or Sets Sweet + /// + [DataMember(Name = "sweet", EmitDefaultValue = false)] + public bool Sweet { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BananaReq {\n"); + sb.Append(" LengthCm: ").Append(LengthCm).Append("\n"); + sb.Append(" Sweet: ").Append(Sweet).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as BananaReq).AreEqual; + } + + /// + /// Returns true if BananaReq instances are equal + /// + /// Instance of BananaReq to be compared + /// Boolean + public bool Equals(BananaReq input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = hashCode * 59 + this.LengthCm.GetHashCode(); + hashCode = hashCode * 59 + this.Sweet.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/BasquePig.cs new file mode 100644 index 00000000000..5c6f9a0e83d --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/BasquePig.cs @@ -0,0 +1,137 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// BasquePig + /// + [DataContract(Name = "BasquePig")] + public partial class BasquePig : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected BasquePig() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// className (required). + public BasquePig(string className = default(string)) + { + // to ensure "className" is required (not null) + this.ClassName = className ?? throw new ArgumentNullException("className is a required property for BasquePig and cannot be null"); + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets ClassName + /// + [DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)] + public string ClassName { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BasquePig {\n"); + sb.Append(" ClassName: ").Append(ClassName).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as BasquePig).AreEqual; + } + + /// + /// Returns true if BasquePig instances are equal + /// + /// Instance of BasquePig to be compared + /// Boolean + public bool Equals(BasquePig input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ClassName != null) + hashCode = hashCode * 59 + this.ClassName.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Capitalization.cs new file mode 100644 index 00000000000..a4ab27bd898 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Capitalization.cs @@ -0,0 +1,184 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// Capitalization + /// + [DataContract(Name = "Capitalization")] + public partial class Capitalization : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// smallCamel. + /// capitalCamel. + /// smallSnake. + /// capitalSnake. + /// sCAETHFlowPoints. + /// Name of the pet . + public Capitalization(string smallCamel = default(string), string capitalCamel = default(string), string smallSnake = default(string), string capitalSnake = default(string), string sCAETHFlowPoints = default(string), string aTTNAME = default(string)) + { + this.SmallCamel = smallCamel; + this.CapitalCamel = capitalCamel; + this.SmallSnake = smallSnake; + this.CapitalSnake = capitalSnake; + this.SCAETHFlowPoints = sCAETHFlowPoints; + this.ATT_NAME = aTTNAME; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets SmallCamel + /// + [DataMember(Name = "smallCamel", EmitDefaultValue = false)] + public string SmallCamel { get; set; } + + /// + /// Gets or Sets CapitalCamel + /// + [DataMember(Name = "CapitalCamel", EmitDefaultValue = false)] + public string CapitalCamel { get; set; } + + /// + /// Gets or Sets SmallSnake + /// + [DataMember(Name = "small_Snake", EmitDefaultValue = false)] + public string SmallSnake { get; set; } + + /// + /// Gets or Sets CapitalSnake + /// + [DataMember(Name = "Capital_Snake", EmitDefaultValue = false)] + public string CapitalSnake { get; set; } + + /// + /// Gets or Sets SCAETHFlowPoints + /// + [DataMember(Name = "SCA_ETH_Flow_Points", EmitDefaultValue = false)] + public string SCAETHFlowPoints { get; set; } + + /// + /// Name of the pet + /// + /// Name of the pet + [DataMember(Name = "ATT_NAME", EmitDefaultValue = false)] + public string ATT_NAME { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Capitalization {\n"); + sb.Append(" SmallCamel: ").Append(SmallCamel).Append("\n"); + sb.Append(" CapitalCamel: ").Append(CapitalCamel).Append("\n"); + sb.Append(" SmallSnake: ").Append(SmallSnake).Append("\n"); + sb.Append(" CapitalSnake: ").Append(CapitalSnake).Append("\n"); + sb.Append(" SCAETHFlowPoints: ").Append(SCAETHFlowPoints).Append("\n"); + sb.Append(" ATT_NAME: ").Append(ATT_NAME).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as Capitalization).AreEqual; + } + + /// + /// Returns true if Capitalization instances are equal + /// + /// Instance of Capitalization to be compared + /// Boolean + public bool Equals(Capitalization input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.SmallCamel != null) + hashCode = hashCode * 59 + this.SmallCamel.GetHashCode(); + if (this.CapitalCamel != null) + hashCode = hashCode * 59 + this.CapitalCamel.GetHashCode(); + if (this.SmallSnake != null) + hashCode = hashCode * 59 + this.SmallSnake.GetHashCode(); + if (this.CapitalSnake != null) + hashCode = hashCode * 59 + this.CapitalSnake.GetHashCode(); + if (this.SCAETHFlowPoints != null) + hashCode = hashCode * 59 + this.SCAETHFlowPoints.GetHashCode(); + if (this.ATT_NAME != null) + hashCode = hashCode * 59 + this.ATT_NAME.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Cat.cs new file mode 100644 index 00000000000..1c6fa0f4220 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Cat.cs @@ -0,0 +1,151 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// Cat + /// + [DataContract(Name = "Cat")] + [JsonConverter(typeof(JsonSubtypes), "ClassName")] + public partial class Cat : Animal, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Cat() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// declawed. + /// className (required) (default to "Cat"). + /// color (default to "red"). + public Cat(bool declawed = default(bool), string className = "Cat", string color = "red") : base(className, color) + { + this.Declawed = declawed; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Declawed + /// + [DataMember(Name = "declawed", EmitDefaultValue = false)] + public bool Declawed { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Cat {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" Declawed: ").Append(Declawed).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as Cat).AreEqual; + } + + /// + /// Returns true if Cat instances are equal + /// + /// Instance of Cat to be compared + /// Boolean + public bool Equals(Cat input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + hashCode = hashCode * 59 + this.Declawed.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach(var x in BaseValidate(validationContext)) yield return x; + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/CatAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/CatAllOf.cs new file mode 100644 index 00000000000..ed6a94eedeb --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/CatAllOf.cs @@ -0,0 +1,127 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// CatAllOf + /// + [DataContract(Name = "Cat_allOf")] + public partial class CatAllOf : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// declawed. + public CatAllOf(bool declawed = default(bool)) + { + this.Declawed = declawed; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Declawed + /// + [DataMember(Name = "declawed", EmitDefaultValue = false)] + public bool Declawed { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CatAllOf {\n"); + sb.Append(" Declawed: ").Append(Declawed).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as CatAllOf).AreEqual; + } + + /// + /// Returns true if CatAllOf instances are equal + /// + /// Instance of CatAllOf to be compared + /// Boolean + public bool Equals(CatAllOf input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = hashCode * 59 + this.Declawed.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Category.cs index dff8136d1c1..581a23ef2a5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Category.cs @@ -1,7 +1,7 @@ /* * OpenAPI Petstore * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git @@ -27,7 +27,7 @@ using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model { /// - /// A category for a pet + /// Category /// [DataContract(Name = "Category")] public partial class Category : IEquatable, IValidatableObject @@ -35,12 +35,21 @@ namespace Org.OpenAPITools.Model /// /// Initializes a new instance of the class. /// - /// id. - /// name. - public Category(long id = default(long), string name = default(string)) + [JsonConstructorAttribute] + protected Category() { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// id. + /// name (required) (default to "default-name"). + public Category(long id = default(long), string name = "default-name") + { + // to ensure "name" is required (not null) + this.Name = name ?? throw new ArgumentNullException("name is a required property for Category and cannot be null"); this.Id = id; - this.Name = name; this.AdditionalProperties = new Dictionary(); } @@ -53,7 +62,7 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Name /// - [DataMember(Name = "name", EmitDefaultValue = false)] + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] public string Name { get; set; } /// @@ -131,13 +140,6 @@ namespace Org.OpenAPITools.Model /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - // Name (string) pattern - Regex regexName = new Regex(@"^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$", RegexOptions.CultureInvariant); - if (false == regexName.Match(this.Name).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, must match a pattern of " + regexName, new [] { "Name" }); - } - yield break; } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ChildCat.cs new file mode 100644 index 00000000000..8c2d77ca45d --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ChildCat.cs @@ -0,0 +1,173 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// ChildCat + /// + [DataContract(Name = "ChildCat")] + [JsonConverter(typeof(JsonSubtypes), "PetType")] + public partial class ChildCat : ParentPet, IEquatable, IValidatableObject + { + /// + /// Defines PetType + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum PetTypeEnum + { + /// + /// Enum ChildCat for value: ChildCat + /// + [EnumMember(Value = "ChildCat")] + ChildCat = 1 + + } + + /// + /// Gets or Sets PetType + /// + [DataMember(Name = "pet_type", IsRequired = true, EmitDefaultValue = false)] + public PetTypeEnum PetType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ChildCat() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// name. + /// petType (required) (default to PetTypeEnum.ChildCat). + public ChildCat(string name = default(string), PetTypeEnum petType = PetTypeEnum.ChildCat) : base() + { + this.PetType = petType; + this.Name = name; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ChildCat {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" PetType: ").Append(PetType).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as ChildCat).AreEqual; + } + + /// + /// Returns true if ChildCat instances are equal + /// + /// Instance of ChildCat to be compared + /// Boolean + public bool Equals(ChildCat input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + hashCode = hashCode * 59 + this.PetType.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach(var x in BaseValidate(validationContext)) yield return x; + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ChildCatAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ChildCatAllOf.cs new file mode 100644 index 00000000000..a8a0e05b660 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ChildCatAllOf.cs @@ -0,0 +1,151 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// ChildCatAllOf + /// + [DataContract(Name = "ChildCat_allOf")] + public partial class ChildCatAllOf : IEquatable, IValidatableObject + { + /// + /// Defines PetType + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum PetTypeEnum + { + /// + /// Enum ChildCat for value: ChildCat + /// + [EnumMember(Value = "ChildCat")] + ChildCat = 1 + + } + + /// + /// Gets or Sets PetType + /// + [DataMember(Name = "pet_type", EmitDefaultValue = false)] + public PetTypeEnum? PetType { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// name. + /// petType (default to PetTypeEnum.ChildCat). + public ChildCatAllOf(string name = default(string), PetTypeEnum? petType = PetTypeEnum.ChildCat) + { + this.Name = name; + this.PetType = petType; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ChildCatAllOf {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" PetType: ").Append(PetType).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as ChildCatAllOf).AreEqual; + } + + /// + /// Returns true if ChildCatAllOf instances are equal + /// + /// Instance of ChildCatAllOf to be compared + /// Boolean + public bool Equals(ChildCatAllOf input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + hashCode = hashCode * 59 + this.PetType.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ClassModel.cs new file mode 100644 index 00000000000..bb2121cd517 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ClassModel.cs @@ -0,0 +1,128 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// Model for testing model with \"_class\" property + /// + [DataContract(Name = "ClassModel")] + public partial class ClassModel : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// _class. + public ClassModel(string _class = default(string)) + { + this.Class = _class; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Class + /// + [DataMember(Name = "_class", EmitDefaultValue = false)] + public string Class { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ClassModel {\n"); + sb.Append(" Class: ").Append(Class).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as ClassModel).AreEqual; + } + + /// + /// Returns true if ClassModel instances are equal + /// + /// Instance of ClassModel to be compared + /// Boolean + public bool Equals(ClassModel input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Class != null) + hashCode = hashCode * 59 + this.Class.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs new file mode 100644 index 00000000000..78f3c6c03e3 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -0,0 +1,149 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// ComplexQuadrilateral + /// + [DataContract(Name = "ComplexQuadrilateral")] + public partial class ComplexQuadrilateral : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ComplexQuadrilateral() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// shapeType (required). + /// quadrilateralType (required). + public ComplexQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) + { + // to ensure "shapeType" is required (not null) + this.ShapeType = shapeType ?? throw new ArgumentNullException("shapeType is a required property for ComplexQuadrilateral and cannot be null"); + // to ensure "quadrilateralType" is required (not null) + this.QuadrilateralType = quadrilateralType ?? throw new ArgumentNullException("quadrilateralType is a required property for ComplexQuadrilateral and cannot be null"); + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets ShapeType + /// + [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] + public string ShapeType { get; set; } + + /// + /// Gets or Sets QuadrilateralType + /// + [DataMember(Name = "quadrilateralType", IsRequired = true, EmitDefaultValue = false)] + public string QuadrilateralType { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ComplexQuadrilateral {\n"); + sb.Append(" ShapeType: ").Append(ShapeType).Append("\n"); + sb.Append(" QuadrilateralType: ").Append(QuadrilateralType).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as ComplexQuadrilateral).AreEqual; + } + + /// + /// Returns true if ComplexQuadrilateral instances are equal + /// + /// Instance of ComplexQuadrilateral to be compared + /// Boolean + public bool Equals(ComplexQuadrilateral input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ShapeType != null) + hashCode = hashCode * 59 + this.ShapeType.GetHashCode(); + if (this.QuadrilateralType != null) + hashCode = hashCode * 59 + this.QuadrilateralType.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/DanishPig.cs new file mode 100644 index 00000000000..dd2de1d038a --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/DanishPig.cs @@ -0,0 +1,137 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// DanishPig + /// + [DataContract(Name = "DanishPig")] + public partial class DanishPig : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DanishPig() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// className (required). + public DanishPig(string className = default(string)) + { + // to ensure "className" is required (not null) + this.ClassName = className ?? throw new ArgumentNullException("className is a required property for DanishPig and cannot be null"); + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets ClassName + /// + [DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)] + public string ClassName { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DanishPig {\n"); + sb.Append(" ClassName: ").Append(ClassName).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as DanishPig).AreEqual; + } + + /// + /// Returns true if DanishPig instances are equal + /// + /// Instance of DanishPig to be compared + /// Boolean + public bool Equals(DanishPig input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ClassName != null) + hashCode = hashCode * 59 + this.ClassName.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Dog.cs new file mode 100644 index 00000000000..1ff9ab1624d --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Dog.cs @@ -0,0 +1,152 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// Dog + /// + [DataContract(Name = "Dog")] + [JsonConverter(typeof(JsonSubtypes), "ClassName")] + public partial class Dog : Animal, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Dog() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// breed. + /// className (required) (default to "Dog"). + /// color (default to "red"). + public Dog(string breed = default(string), string className = "Dog", string color = "red") : base(className, color) + { + this.Breed = breed; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Breed + /// + [DataMember(Name = "breed", EmitDefaultValue = false)] + public string Breed { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Dog {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" Breed: ").Append(Breed).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as Dog).AreEqual; + } + + /// + /// Returns true if Dog instances are equal + /// + /// Instance of Dog to be compared + /// Boolean + public bool Equals(Dog input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Breed != null) + hashCode = hashCode * 59 + this.Breed.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach(var x in BaseValidate(validationContext)) yield return x; + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/DogAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/DogAllOf.cs new file mode 100644 index 00000000000..cd2f1a0eeec --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/DogAllOf.cs @@ -0,0 +1,128 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// DogAllOf + /// + [DataContract(Name = "Dog_allOf")] + public partial class DogAllOf : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// breed. + public DogAllOf(string breed = default(string)) + { + this.Breed = breed; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Breed + /// + [DataMember(Name = "breed", EmitDefaultValue = false)] + public string Breed { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DogAllOf {\n"); + sb.Append(" Breed: ").Append(Breed).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as DogAllOf).AreEqual; + } + + /// + /// Returns true if DogAllOf instances are equal + /// + /// Instance of DogAllOf to be compared + /// Boolean + public bool Equals(DogAllOf input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Breed != null) + hashCode = hashCode * 59 + this.Breed.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Drawing.cs new file mode 100644 index 00000000000..28e2ea55693 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Drawing.cs @@ -0,0 +1,152 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// Drawing + /// + [DataContract(Name = "Drawing")] + public partial class Drawing : Dictionary, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// mainShape. + /// shapeOrNull. + /// nullableShape. + /// shapes. + public Drawing(Shape mainShape = default(Shape), ShapeOrNull shapeOrNull = default(ShapeOrNull), NullableShape nullableShape = default(NullableShape), List shapes = default(List)) : base() + { + this.MainShape = mainShape; + this.ShapeOrNull = shapeOrNull; + this.NullableShape = nullableShape; + this.Shapes = shapes; + } + + /// + /// Gets or Sets MainShape + /// + [DataMember(Name = "mainShape", EmitDefaultValue = false)] + public Shape MainShape { get; set; } + + /// + /// Gets or Sets ShapeOrNull + /// + [DataMember(Name = "shapeOrNull", EmitDefaultValue = false)] + public ShapeOrNull ShapeOrNull { get; set; } + + /// + /// Gets or Sets NullableShape + /// + [DataMember(Name = "nullableShape", EmitDefaultValue = true)] + public NullableShape NullableShape { get; set; } + + /// + /// Gets or Sets Shapes + /// + [DataMember(Name = "shapes", EmitDefaultValue = false)] + public List Shapes { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Drawing {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" MainShape: ").Append(MainShape).Append("\n"); + sb.Append(" ShapeOrNull: ").Append(ShapeOrNull).Append("\n"); + sb.Append(" NullableShape: ").Append(NullableShape).Append("\n"); + sb.Append(" Shapes: ").Append(Shapes).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as Drawing).AreEqual; + } + + /// + /// Returns true if Drawing instances are equal + /// + /// Instance of Drawing to be compared + /// Boolean + public bool Equals(Drawing input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.MainShape != null) + hashCode = hashCode * 59 + this.MainShape.GetHashCode(); + if (this.ShapeOrNull != null) + hashCode = hashCode * 59 + this.ShapeOrNull.GetHashCode(); + if (this.NullableShape != null) + hashCode = hashCode * 59 + this.NullableShape.GetHashCode(); + if (this.Shapes != null) + hashCode = hashCode * 59 + this.Shapes.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/EnumArrays.cs new file mode 100644 index 00000000000..8befbb0b504 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -0,0 +1,176 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// EnumArrays + /// + [DataContract(Name = "EnumArrays")] + public partial class EnumArrays : IEquatable, IValidatableObject + { + /// + /// Defines JustSymbol + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum JustSymbolEnum + { + /// + /// Enum GreaterThanOrEqualTo for value: >= + /// + [EnumMember(Value = ">=")] + GreaterThanOrEqualTo = 1, + + /// + /// Enum Dollar for value: $ + /// + [EnumMember(Value = "$")] + Dollar = 2 + + } + + /// + /// Gets or Sets JustSymbol + /// + [DataMember(Name = "just_symbol", EmitDefaultValue = false)] + public JustSymbolEnum? JustSymbol { get; set; } + /// + /// Defines ArrayEnum + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum ArrayEnumEnum + { + /// + /// Enum Fish for value: fish + /// + [EnumMember(Value = "fish")] + Fish = 1, + + /// + /// Enum Crab for value: crab + /// + [EnumMember(Value = "crab")] + Crab = 2 + + } + + + /// + /// Gets or Sets ArrayEnum + /// + [DataMember(Name = "array_enum", EmitDefaultValue = false)] + public List ArrayEnum { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// justSymbol. + /// arrayEnum. + public EnumArrays(JustSymbolEnum? justSymbol = default(JustSymbolEnum?), List arrayEnum = default(List)) + { + this.JustSymbol = justSymbol; + this.ArrayEnum = arrayEnum; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class EnumArrays {\n"); + sb.Append(" JustSymbol: ").Append(JustSymbol).Append("\n"); + sb.Append(" ArrayEnum: ").Append(ArrayEnum).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as EnumArrays).AreEqual; + } + + /// + /// Returns true if EnumArrays instances are equal + /// + /// Instance of EnumArrays to be compared + /// Boolean + public bool Equals(EnumArrays input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = hashCode * 59 + this.JustSymbol.GetHashCode(); + hashCode = hashCode * 59 + this.ArrayEnum.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/EnumClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/EnumClass.cs new file mode 100644 index 00000000000..99f8afbbbfd --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/EnumClass.cs @@ -0,0 +1,57 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// Defines EnumClass + /// + + [JsonConverter(typeof(StringEnumConverter))] + + public enum EnumClass + { + /// + /// Enum Abc for value: _abc + /// + [EnumMember(Value = "_abc")] + Abc = 1, + + /// + /// Enum Efg for value: -efg + /// + [EnumMember(Value = "-efg")] + Efg = 2, + + /// + /// Enum Xyz for value: (xyz) + /// + [EnumMember(Value = "(xyz)")] + Xyz = 3 + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/EnumTest.cs new file mode 100644 index 00000000000..233087cc170 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/EnumTest.cs @@ -0,0 +1,286 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// EnumTest + /// + [DataContract(Name = "Enum_Test")] + public partial class EnumTest : IEquatable, IValidatableObject + { + /// + /// Defines EnumString + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnumStringEnum + { + /// + /// Enum UPPER for value: UPPER + /// + [EnumMember(Value = "UPPER")] + UPPER = 1, + + /// + /// Enum Lower for value: lower + /// + [EnumMember(Value = "lower")] + Lower = 2, + + /// + /// Enum Empty for value: + /// + [EnumMember(Value = "")] + Empty = 3 + + } + + /// + /// Gets or Sets EnumString + /// + [DataMember(Name = "enum_string", EmitDefaultValue = false)] + public EnumStringEnum? EnumString { get; set; } + /// + /// Defines EnumStringRequired + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnumStringRequiredEnum + { + /// + /// Enum UPPER for value: UPPER + /// + [EnumMember(Value = "UPPER")] + UPPER = 1, + + /// + /// Enum Lower for value: lower + /// + [EnumMember(Value = "lower")] + Lower = 2, + + /// + /// Enum Empty for value: + /// + [EnumMember(Value = "")] + Empty = 3 + + } + + /// + /// Gets or Sets EnumStringRequired + /// + [DataMember(Name = "enum_string_required", IsRequired = true, EmitDefaultValue = false)] + public EnumStringRequiredEnum EnumStringRequired { get; set; } + /// + /// Defines EnumInteger + /// + public enum EnumIntegerEnum + { + /// + /// Enum NUMBER_1 for value: 1 + /// + NUMBER_1 = 1, + + /// + /// Enum NUMBER_MINUS_1 for value: -1 + /// + NUMBER_MINUS_1 = -1 + + } + + /// + /// Gets or Sets EnumInteger + /// + [DataMember(Name = "enum_integer", EmitDefaultValue = false)] + public EnumIntegerEnum? EnumInteger { get; set; } + /// + /// Defines EnumNumber + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnumNumberEnum + { + /// + /// Enum NUMBER_1_DOT_1 for value: 1.1 + /// + [EnumMember(Value = "1.1")] + NUMBER_1_DOT_1 = 1, + + /// + /// Enum NUMBER_MINUS_1_DOT_2 for value: -1.2 + /// + [EnumMember(Value = "-1.2")] + NUMBER_MINUS_1_DOT_2 = 2 + + } + + /// + /// Gets or Sets EnumNumber + /// + [DataMember(Name = "enum_number", EmitDefaultValue = false)] + public EnumNumberEnum? EnumNumber { get; set; } + /// + /// Gets or Sets OuterEnum + /// + [DataMember(Name = "outerEnum", EmitDefaultValue = true)] + public OuterEnum? OuterEnum { get; set; } + /// + /// Gets or Sets OuterEnumInteger + /// + [DataMember(Name = "outerEnumInteger", EmitDefaultValue = false)] + public OuterEnumInteger? OuterEnumInteger { get; set; } + /// + /// Gets or Sets OuterEnumDefaultValue + /// + [DataMember(Name = "outerEnumDefaultValue", EmitDefaultValue = false)] + public OuterEnumDefaultValue? OuterEnumDefaultValue { get; set; } + /// + /// Gets or Sets OuterEnumIntegerDefaultValue + /// + [DataMember(Name = "outerEnumIntegerDefaultValue", EmitDefaultValue = false)] + public OuterEnumIntegerDefaultValue? OuterEnumIntegerDefaultValue { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected EnumTest() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// enumString. + /// enumStringRequired (required). + /// enumInteger. + /// enumNumber. + /// outerEnum. + /// outerEnumInteger. + /// outerEnumDefaultValue. + /// outerEnumIntegerDefaultValue. + public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum? outerEnum = default(OuterEnum?), OuterEnumInteger? outerEnumInteger = default(OuterEnumInteger?), OuterEnumDefaultValue? outerEnumDefaultValue = default(OuterEnumDefaultValue?), OuterEnumIntegerDefaultValue? outerEnumIntegerDefaultValue = default(OuterEnumIntegerDefaultValue?)) + { + this.EnumStringRequired = enumStringRequired; + this.EnumString = enumString; + this.EnumInteger = enumInteger; + this.EnumNumber = enumNumber; + this.OuterEnum = outerEnum; + this.OuterEnumInteger = outerEnumInteger; + this.OuterEnumDefaultValue = outerEnumDefaultValue; + this.OuterEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class EnumTest {\n"); + sb.Append(" EnumString: ").Append(EnumString).Append("\n"); + sb.Append(" EnumStringRequired: ").Append(EnumStringRequired).Append("\n"); + sb.Append(" EnumInteger: ").Append(EnumInteger).Append("\n"); + sb.Append(" EnumNumber: ").Append(EnumNumber).Append("\n"); + sb.Append(" OuterEnum: ").Append(OuterEnum).Append("\n"); + sb.Append(" OuterEnumInteger: ").Append(OuterEnumInteger).Append("\n"); + sb.Append(" OuterEnumDefaultValue: ").Append(OuterEnumDefaultValue).Append("\n"); + sb.Append(" OuterEnumIntegerDefaultValue: ").Append(OuterEnumIntegerDefaultValue).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as EnumTest).AreEqual; + } + + /// + /// Returns true if EnumTest instances are equal + /// + /// Instance of EnumTest to be compared + /// Boolean + public bool Equals(EnumTest input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = hashCode * 59 + this.EnumString.GetHashCode(); + hashCode = hashCode * 59 + this.EnumStringRequired.GetHashCode(); + hashCode = hashCode * 59 + this.EnumInteger.GetHashCode(); + hashCode = hashCode * 59 + this.EnumNumber.GetHashCode(); + hashCode = hashCode * 59 + this.OuterEnum.GetHashCode(); + hashCode = hashCode * 59 + this.OuterEnumInteger.GetHashCode(); + hashCode = hashCode * 59 + this.OuterEnumDefaultValue.GetHashCode(); + hashCode = hashCode * 59 + this.OuterEnumIntegerDefaultValue.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/EquilateralTriangle.cs new file mode 100644 index 00000000000..ed443f68cf7 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -0,0 +1,149 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// EquilateralTriangle + /// + [DataContract(Name = "EquilateralTriangle")] + public partial class EquilateralTriangle : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected EquilateralTriangle() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// shapeType (required). + /// triangleType (required). + public EquilateralTriangle(string shapeType = default(string), string triangleType = default(string)) + { + // to ensure "shapeType" is required (not null) + this.ShapeType = shapeType ?? throw new ArgumentNullException("shapeType is a required property for EquilateralTriangle and cannot be null"); + // to ensure "triangleType" is required (not null) + this.TriangleType = triangleType ?? throw new ArgumentNullException("triangleType is a required property for EquilateralTriangle and cannot be null"); + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets ShapeType + /// + [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] + public string ShapeType { get; set; } + + /// + /// Gets or Sets TriangleType + /// + [DataMember(Name = "triangleType", IsRequired = true, EmitDefaultValue = false)] + public string TriangleType { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class EquilateralTriangle {\n"); + sb.Append(" ShapeType: ").Append(ShapeType).Append("\n"); + sb.Append(" TriangleType: ").Append(TriangleType).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as EquilateralTriangle).AreEqual; + } + + /// + /// Returns true if EquilateralTriangle instances are equal + /// + /// Instance of EquilateralTriangle to be compared + /// Boolean + public bool Equals(EquilateralTriangle input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ShapeType != null) + hashCode = hashCode * 59 + this.ShapeType.GetHashCode(); + if (this.TriangleType != null) + hashCode = hashCode * 59 + this.TriangleType.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/File.cs new file mode 100644 index 00000000000..af4a38ae023 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/File.cs @@ -0,0 +1,129 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// Must be named `File` for test. + /// + [DataContract(Name = "File")] + public partial class File : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Test capitalization. + public File(string sourceURI = default(string)) + { + this.SourceURI = sourceURI; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Test capitalization + /// + /// Test capitalization + [DataMember(Name = "sourceURI", EmitDefaultValue = false)] + public string SourceURI { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class File {\n"); + sb.Append(" SourceURI: ").Append(SourceURI).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as File).AreEqual; + } + + /// + /// Returns true if File instances are equal + /// + /// Instance of File to be compared + /// Boolean + public bool Equals(File input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.SourceURI != null) + hashCode = hashCode * 59 + this.SourceURI.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs new file mode 100644 index 00000000000..cc6b3e34c5d --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -0,0 +1,139 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// FileSchemaTestClass + /// + [DataContract(Name = "FileSchemaTestClass")] + public partial class FileSchemaTestClass : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// file. + /// files. + public FileSchemaTestClass(File file = default(File), List files = default(List)) + { + this.File = file; + this.Files = files; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets File + /// + [DataMember(Name = "file", EmitDefaultValue = false)] + public File File { get; set; } + + /// + /// Gets or Sets Files + /// + [DataMember(Name = "files", EmitDefaultValue = false)] + public List Files { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class FileSchemaTestClass {\n"); + sb.Append(" File: ").Append(File).Append("\n"); + sb.Append(" Files: ").Append(Files).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as FileSchemaTestClass).AreEqual; + } + + /// + /// Returns true if FileSchemaTestClass instances are equal + /// + /// Instance of FileSchemaTestClass to be compared + /// Boolean + public bool Equals(FileSchemaTestClass input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.File != null) + hashCode = hashCode * 59 + this.File.GetHashCode(); + if (this.Files != null) + hashCode = hashCode * 59 + this.Files.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Foo.cs new file mode 100644 index 00000000000..83637468119 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Foo.cs @@ -0,0 +1,129 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// Foo + /// + [DataContract(Name = "Foo")] + public partial class Foo : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// bar (default to "bar"). + public Foo(string bar = "bar") + { + // use default value if no "bar" provided + this.Bar = bar ?? "bar"; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Bar + /// + [DataMember(Name = "bar", EmitDefaultValue = false)] + public string Bar { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Foo {\n"); + sb.Append(" Bar: ").Append(Bar).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as Foo).AreEqual; + } + + /// + /// Returns true if Foo instances are equal + /// + /// Instance of Foo to be compared + /// Boolean + public bool Equals(Foo input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Bar != null) + hashCode = hashCode * 59 + this.Bar.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/FormatTest.cs new file mode 100644 index 00000000000..9e7466bb502 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/FormatTest.cs @@ -0,0 +1,392 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// FormatTest + /// + [DataContract(Name = "format_test")] + public partial class FormatTest : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FormatTest() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// integer. + /// int32. + /// int64. + /// number (required). + /// _float. + /// _double. + /// _decimal. + /// _string. + /// _byte (required). + /// binary. + /// date (required). + /// dateTime. + /// uuid. + /// password (required). + /// A string that is a 10 digit number. Can have leading zeros.. + /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. + public FormatTest(int integer = default(int), int int32 = default(int), long int64 = default(long), decimal number = default(decimal), float _float = default(float), double _double = default(double), decimal _decimal = default(decimal), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string)) + { + this.Number = number; + // to ensure "_byte" is required (not null) + this.Byte = _byte ?? throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null"); + this.Date = date; + // to ensure "password" is required (not null) + this.Password = password ?? throw new ArgumentNullException("password is a required property for FormatTest and cannot be null"); + this.Integer = integer; + this.Int32 = int32; + this.Int64 = int64; + this.Float = _float; + this.Double = _double; + this.Decimal = _decimal; + this.String = _string; + this.Binary = binary; + this.DateTime = dateTime; + this.Uuid = uuid; + this.PatternWithDigits = patternWithDigits; + this.PatternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Integer + /// + [DataMember(Name = "integer", EmitDefaultValue = false)] + public int Integer { get; set; } + + /// + /// Gets or Sets Int32 + /// + [DataMember(Name = "int32", EmitDefaultValue = false)] + public int Int32 { get; set; } + + /// + /// Gets or Sets Int64 + /// + [DataMember(Name = "int64", EmitDefaultValue = false)] + public long Int64 { get; set; } + + /// + /// Gets or Sets Number + /// + [DataMember(Name = "number", IsRequired = true, EmitDefaultValue = false)] + public decimal Number { get; set; } + + /// + /// Gets or Sets Float + /// + [DataMember(Name = "float", EmitDefaultValue = false)] + public float Float { get; set; } + + /// + /// Gets or Sets Double + /// + [DataMember(Name = "double", EmitDefaultValue = false)] + public double Double { get; set; } + + /// + /// Gets or Sets Decimal + /// + [DataMember(Name = "decimal", EmitDefaultValue = false)] + public decimal Decimal { get; set; } + + /// + /// Gets or Sets String + /// + [DataMember(Name = "string", EmitDefaultValue = false)] + public string String { get; set; } + + /// + /// Gets or Sets Byte + /// + [DataMember(Name = "byte", IsRequired = true, EmitDefaultValue = false)] + public byte[] Byte { get; set; } + + /// + /// Gets or Sets Binary + /// + [DataMember(Name = "binary", EmitDefaultValue = false)] + public System.IO.Stream Binary { get; set; } + + /// + /// Gets or Sets Date + /// + [DataMember(Name = "date", IsRequired = true, EmitDefaultValue = false)] + [JsonConverter(typeof(OpenAPIDateConverter))] + public DateTime Date { get; set; } + + /// + /// Gets or Sets DateTime + /// + [DataMember(Name = "dateTime", EmitDefaultValue = false)] + public DateTime DateTime { get; set; } + + /// + /// Gets or Sets Uuid + /// + [DataMember(Name = "uuid", EmitDefaultValue = false)] + public Guid Uuid { get; set; } + + /// + /// Gets or Sets Password + /// + [DataMember(Name = "password", IsRequired = true, EmitDefaultValue = false)] + public string Password { get; set; } + + /// + /// A string that is a 10 digit number. Can have leading zeros. + /// + /// A string that is a 10 digit number. Can have leading zeros. + [DataMember(Name = "pattern_with_digits", EmitDefaultValue = false)] + public string PatternWithDigits { get; set; } + + /// + /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + /// + /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + [DataMember(Name = "pattern_with_digits_and_delimiter", EmitDefaultValue = false)] + public string PatternWithDigitsAndDelimiter { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class FormatTest {\n"); + sb.Append(" Integer: ").Append(Integer).Append("\n"); + sb.Append(" Int32: ").Append(Int32).Append("\n"); + sb.Append(" Int64: ").Append(Int64).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Float: ").Append(Float).Append("\n"); + sb.Append(" Double: ").Append(Double).Append("\n"); + sb.Append(" Decimal: ").Append(Decimal).Append("\n"); + sb.Append(" String: ").Append(String).Append("\n"); + sb.Append(" Byte: ").Append(Byte).Append("\n"); + sb.Append(" Binary: ").Append(Binary).Append("\n"); + sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" DateTime: ").Append(DateTime).Append("\n"); + sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n"); + sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as FormatTest).AreEqual; + } + + /// + /// Returns true if FormatTest instances are equal + /// + /// Instance of FormatTest to be compared + /// Boolean + public bool Equals(FormatTest input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = hashCode * 59 + this.Integer.GetHashCode(); + hashCode = hashCode * 59 + this.Int32.GetHashCode(); + hashCode = hashCode * 59 + this.Int64.GetHashCode(); + hashCode = hashCode * 59 + this.Number.GetHashCode(); + hashCode = hashCode * 59 + this.Float.GetHashCode(); + hashCode = hashCode * 59 + this.Double.GetHashCode(); + hashCode = hashCode * 59 + this.Decimal.GetHashCode(); + if (this.String != null) + hashCode = hashCode * 59 + this.String.GetHashCode(); + if (this.Byte != null) + hashCode = hashCode * 59 + this.Byte.GetHashCode(); + if (this.Binary != null) + hashCode = hashCode * 59 + this.Binary.GetHashCode(); + if (this.Date != null) + hashCode = hashCode * 59 + this.Date.GetHashCode(); + if (this.DateTime != null) + hashCode = hashCode * 59 + this.DateTime.GetHashCode(); + if (this.Uuid != null) + hashCode = hashCode * 59 + this.Uuid.GetHashCode(); + if (this.Password != null) + hashCode = hashCode * 59 + this.Password.GetHashCode(); + if (this.PatternWithDigits != null) + hashCode = hashCode * 59 + this.PatternWithDigits.GetHashCode(); + if (this.PatternWithDigitsAndDelimiter != null) + hashCode = hashCode * 59 + this.PatternWithDigitsAndDelimiter.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // Integer (int) maximum + if(this.Integer > (int)100) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value less than or equal to 100.", new [] { "Integer" }); + } + + // Integer (int) minimum + if(this.Integer < (int)10) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.", new [] { "Integer" }); + } + + // Int32 (int) maximum + if(this.Int32 > (int)200) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value less than or equal to 200.", new [] { "Int32" }); + } + + // Int32 (int) minimum + if(this.Int32 < (int)20) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" }); + } + + // Number (decimal) maximum + if(this.Number > (decimal)543.2) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value less than or equal to 543.2.", new [] { "Number" }); + } + + // Number (decimal) minimum + if(this.Number < (decimal)32.1) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value greater than or equal to 32.1.", new [] { "Number" }); + } + + // Float (float) maximum + if(this.Float > (float)987.6) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value less than or equal to 987.6.", new [] { "Float" }); + } + + // Float (float) minimum + if(this.Float < (float)54.3) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value greater than or equal to 54.3.", new [] { "Float" }); + } + + // Double (double) maximum + if(this.Double > (double)123.4) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value less than or equal to 123.4.", new [] { "Double" }); + } + + // Double (double) minimum + if(this.Double < (double)67.8) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 67.8.", new [] { "Double" }); + } + + // String (string) pattern + Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + if (false == regexString.Match(this.String).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" }); + } + + // Password (string) maxLength + if(this.Password != null && this.Password.Length > 64) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be less than 64.", new [] { "Password" }); + } + + // Password (string) minLength + if(this.Password != null && this.Password.Length < 10) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" }); + } + + // PatternWithDigits (string) pattern + Regex regexPatternWithDigits = new Regex(@"^\\d{10}$", RegexOptions.CultureInvariant); + if (false == regexPatternWithDigits.Match(this.PatternWithDigits).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigits, must match a pattern of " + regexPatternWithDigits, new [] { "PatternWithDigits" }); + } + + // PatternWithDigitsAndDelimiter (string) pattern + Regex regexPatternWithDigitsAndDelimiter = new Regex(@"^image_\\d{1,3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + if (false == regexPatternWithDigitsAndDelimiter.Match(this.PatternWithDigitsAndDelimiter).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigitsAndDelimiter, must match a pattern of " + regexPatternWithDigitsAndDelimiter, new [] { "PatternWithDigitsAndDelimiter" }); + } + + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Fruit.cs new file mode 100644 index 00000000000..8226bbd0a2f --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Fruit.cs @@ -0,0 +1,285 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using System.Reflection; + +namespace Org.OpenAPITools.Model +{ + /// + /// Fruit + /// + [JsonConverter(typeof(FruitJsonConverter))] + [DataContract(Name = "fruit")] + public partial class Fruit : AbstractOpenAPISchema, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of Apple. + public Fruit(Apple actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of Banana. + public Fruit(Banana actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(Apple)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(Banana)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: Apple, Banana"); + } + } + } + + /// + /// Get the actual instance of `Apple`. If the actual instanct is not `Apple`, + /// the InvalidClassException will be thrown + /// + /// An instance of Apple + public Apple GetApple() + { + return (Apple)this.ActualInstance; + } + + /// + /// Get the actual instance of `Banana`. If the actual instanct is not `Banana`, + /// the InvalidClassException will be thrown + /// + /// An instance of Banana + public Banana GetBanana() + { + return (Banana)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Fruit {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this.ActualInstance, Fruit.SerializerSettings); + } + + /// + /// Converts the JSON string into an instance of Fruit + /// + /// JSON string + /// An instance of Fruit + public static Fruit FromJson(string jsonString) + { + Fruit newFruit = null; + + if (jsonString == null) + { + return newFruit; + } + int match = 0; + List matchedTypes = new List(); + + try + { + newFruit = new Fruit(JsonConvert.DeserializeObject(jsonString, Fruit.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newFruit.GetType().GetProperty("AdditionalProperties") == null) + { + newFruit = new Fruit(JsonConvert.DeserializeObject(jsonString, Fruit.SerializerSettings)); + } + matchedTypes.Add("Apple"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(String.Format("Failed to deserialize `{0}` into Apple: {1}", jsonString, exception.ToString())); + } + + try + { + newFruit = new Fruit(JsonConvert.DeserializeObject(jsonString, Fruit.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newFruit.GetType().GetProperty("AdditionalProperties") == null) + { + newFruit = new Fruit(JsonConvert.DeserializeObject(jsonString, Fruit.SerializerSettings)); + } + matchedTypes.Add("Banana"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(String.Format("Failed to deserialize `{0}` into Banana: {1}", jsonString, exception.ToString())); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); + } + else if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newFruit; + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as Fruit).AreEqual; + } + + /// + /// Returns true if Fruit instances are equal + /// + /// Instance of Fruit to be compared + /// Boolean + public bool Equals(Fruit input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ActualInstance != null) + hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// Custom JSON converter for Fruit + /// + public class FruitJsonConverter : JsonConverter + { + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// JSON Serializer + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteRawValue((String)(typeof(Fruit).GetMethod("ToJson").Invoke(value, null))); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type + /// Existing value + /// JSON Serializer + /// The object converted from the JSON string + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + if(reader.TokenType != JsonToken.Null) + { + return Fruit.FromJson(JObject.Load(reader).ToString(Formatting.None)); + } + return null; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return false; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/FruitReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/FruitReq.cs new file mode 100644 index 00000000000..57d5d8d271b --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/FruitReq.cs @@ -0,0 +1,294 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using System.Reflection; + +namespace Org.OpenAPITools.Model +{ + /// + /// FruitReq + /// + [JsonConverter(typeof(FruitReqJsonConverter))] + [DataContract(Name = "fruitReq")] + public partial class FruitReq : AbstractOpenAPISchema, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + public FruitReq() + { + this.IsNullable = true; + this.SchemaType= "oneOf"; + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of AppleReq. + public FruitReq(AppleReq actualInstance) + { + this.IsNullable = true; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance; + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of BananaReq. + public FruitReq(BananaReq actualInstance) + { + this.IsNullable = true; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance; + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(AppleReq)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(BananaReq)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: AppleReq, BananaReq"); + } + } + } + + /// + /// Get the actual instance of `AppleReq`. If the actual instanct is not `AppleReq`, + /// the InvalidClassException will be thrown + /// + /// An instance of AppleReq + public AppleReq GetAppleReq() + { + return (AppleReq)this.ActualInstance; + } + + /// + /// Get the actual instance of `BananaReq`. If the actual instanct is not `BananaReq`, + /// the InvalidClassException will be thrown + /// + /// An instance of BananaReq + public BananaReq GetBananaReq() + { + return (BananaReq)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class FruitReq {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this.ActualInstance, FruitReq.SerializerSettings); + } + + /// + /// Converts the JSON string into an instance of FruitReq + /// + /// JSON string + /// An instance of FruitReq + public static FruitReq FromJson(string jsonString) + { + FruitReq newFruitReq = null; + + if (jsonString == null) + { + return newFruitReq; + } + int match = 0; + List matchedTypes = new List(); + + try + { + newFruitReq = new FruitReq(JsonConvert.DeserializeObject(jsonString, FruitReq.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newFruitReq.GetType().GetProperty("AdditionalProperties") == null) + { + newFruitReq = new FruitReq(JsonConvert.DeserializeObject(jsonString, FruitReq.SerializerSettings)); + } + matchedTypes.Add("AppleReq"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(String.Format("Failed to deserialize `{0}` into AppleReq: {1}", jsonString, exception.ToString())); + } + + try + { + newFruitReq = new FruitReq(JsonConvert.DeserializeObject(jsonString, FruitReq.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newFruitReq.GetType().GetProperty("AdditionalProperties") == null) + { + newFruitReq = new FruitReq(JsonConvert.DeserializeObject(jsonString, FruitReq.SerializerSettings)); + } + matchedTypes.Add("BananaReq"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(String.Format("Failed to deserialize `{0}` into BananaReq: {1}", jsonString, exception.ToString())); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); + } + else if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newFruitReq; + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as FruitReq).AreEqual; + } + + /// + /// Returns true if FruitReq instances are equal + /// + /// Instance of FruitReq to be compared + /// Boolean + public bool Equals(FruitReq input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ActualInstance != null) + hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// Custom JSON converter for FruitReq + /// + public class FruitReqJsonConverter : JsonConverter + { + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// JSON Serializer + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteRawValue((String)(typeof(FruitReq).GetMethod("ToJson").Invoke(value, null))); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type + /// Existing value + /// JSON Serializer + /// The object converted from the JSON string + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + if(reader.TokenType != JsonToken.Null) + { + return FruitReq.FromJson(JObject.Load(reader).ToString(Formatting.None)); + } + return null; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return false; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/GmFruit.cs new file mode 100644 index 00000000000..c168aa41d4c --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/GmFruit.cs @@ -0,0 +1,263 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// GmFruit + /// + [JsonConverter(typeof(GmFruitJsonConverter))] + [DataContract(Name = "gmFruit")] + public partial class GmFruit : AbstractOpenAPISchema, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of Apple. + public GmFruit(Apple actualInstance) + { + this.IsNullable = false; + this.SchemaType= "anyOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of Banana. + public GmFruit(Banana actualInstance) + { + this.IsNullable = false; + this.SchemaType= "anyOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(Apple)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(Banana)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: Apple, Banana"); + } + } + } + + /// + /// Get the actual instance of `Apple`. If the actual instanct is not `Apple`, + /// the InvalidClassException will be thrown + /// + /// An instance of Apple + public Apple GetApple() + { + return (Apple)this.ActualInstance; + } + + /// + /// Get the actual instance of `Banana`. If the actual instanct is not `Banana`, + /// the InvalidClassException will be thrown + /// + /// An instance of Banana + public Banana GetBanana() + { + return (Banana)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GmFruit {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this.ActualInstance, GmFruit.SerializerSettings); + } + + /// + /// Converts the JSON string into an instance of GmFruit + /// + /// JSON string + /// An instance of GmFruit + public static GmFruit FromJson(string jsonString) + { + GmFruit newGmFruit = null; + + if (jsonString == null) + { + return newGmFruit; + } + + try + { + newGmFruit = new GmFruit(JsonConvert.DeserializeObject(jsonString, GmFruit.SerializerSettings)); + // deserialization is considered successful at this point if no exception has been thrown. + return newGmFruit; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(String.Format("Failed to deserialize `{0}` into Apple: {1}", jsonString, exception.ToString())); + } + + try + { + newGmFruit = new GmFruit(JsonConvert.DeserializeObject(jsonString, GmFruit.SerializerSettings)); + // deserialization is considered successful at this point if no exception has been thrown. + return newGmFruit; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(String.Format("Failed to deserialize `{0}` into Banana: {1}", jsonString, exception.ToString())); + } + + // no match found, throw an exception + throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as GmFruit).AreEqual; + } + + /// + /// Returns true if GmFruit instances are equal + /// + /// Instance of GmFruit to be compared + /// Boolean + public bool Equals(GmFruit input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ActualInstance != null) + hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// Custom JSON converter for GmFruit + /// + public class GmFruitJsonConverter : JsonConverter + { + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// JSON Serializer + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteRawValue((String)(typeof(GmFruit).GetMethod("ToJson").Invoke(value, null))); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type + /// Existing value + /// JSON Serializer + /// The object converted from the JSON string + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + if(reader.TokenType != JsonToken.Null) + { + return GmFruit.FromJson(JObject.Load(reader).ToString(Formatting.None)); + } + return null; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return false; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/GrandparentAnimal.cs new file mode 100644 index 00000000000..9352d27022f --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -0,0 +1,151 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// GrandparentAnimal + /// + [DataContract(Name = "GrandparentAnimal")] + [JsonConverter(typeof(JsonSubtypes), "PetType")] + [JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")] + [JsonSubtypes.KnownSubType(typeof(ParentPet), "ParentPet")] + public partial class GrandparentAnimal : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GrandparentAnimal() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// petType (required). + public GrandparentAnimal(string petType = default(string)) + { + // to ensure "petType" is required (not null) + this.PetType = petType ?? throw new ArgumentNullException("petType is a required property for GrandparentAnimal and cannot be null"); + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets PetType + /// + [DataMember(Name = "pet_type", IsRequired = true, EmitDefaultValue = false)] + public string PetType { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GrandparentAnimal {\n"); + sb.Append(" PetType: ").Append(PetType).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as GrandparentAnimal).AreEqual; + } + + /// + /// Returns true if GrandparentAnimal instances are equal + /// + /// Instance of GrandparentAnimal to be compared + /// Boolean + public bool Equals(GrandparentAnimal input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.PetType != null) + hashCode = hashCode * 59 + this.PetType.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs new file mode 100644 index 00000000000..3a2c3d26a92 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -0,0 +1,154 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// HasOnlyReadOnly + /// + [DataContract(Name = "hasOnlyReadOnly")] + public partial class HasOnlyReadOnly : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + public HasOnlyReadOnly() + { + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Bar + /// + [DataMember(Name = "bar", EmitDefaultValue = false)] + public string Bar { get; private set; } + + /// + /// Returns false as Bar should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerializeBar() + { + return false; + } + + /// + /// Gets or Sets Foo + /// + [DataMember(Name = "foo", EmitDefaultValue = false)] + public string Foo { get; private set; } + + /// + /// Returns false as Foo should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerializeFoo() + { + return false; + } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class HasOnlyReadOnly {\n"); + sb.Append(" Bar: ").Append(Bar).Append("\n"); + sb.Append(" Foo: ").Append(Foo).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as HasOnlyReadOnly).AreEqual; + } + + /// + /// Returns true if HasOnlyReadOnly instances are equal + /// + /// Instance of HasOnlyReadOnly to be compared + /// Boolean + public bool Equals(HasOnlyReadOnly input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Bar != null) + hashCode = hashCode * 59 + this.Bar.GetHashCode(); + if (this.Foo != null) + hashCode = hashCode * 59 + this.Foo.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/HealthCheckResult.cs new file mode 100644 index 00000000000..1cd90560cbe --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/HealthCheckResult.cs @@ -0,0 +1,128 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + /// + [DataContract(Name = "HealthCheckResult")] + public partial class HealthCheckResult : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// nullableMessage. + public HealthCheckResult(string nullableMessage = default(string)) + { + this.NullableMessage = nullableMessage; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets NullableMessage + /// + [DataMember(Name = "NullableMessage", EmitDefaultValue = true)] + public string NullableMessage { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class HealthCheckResult {\n"); + sb.Append(" NullableMessage: ").Append(NullableMessage).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as HealthCheckResult).AreEqual; + } + + /// + /// Returns true if HealthCheckResult instances are equal + /// + /// Instance of HealthCheckResult to be compared + /// Boolean + public bool Equals(HealthCheckResult input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.NullableMessage != null) + hashCode = hashCode * 59 + this.NullableMessage.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/InlineResponseDefault.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/InlineResponseDefault.cs new file mode 100644 index 00000000000..5f4b24acafa --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/InlineResponseDefault.cs @@ -0,0 +1,128 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// InlineResponseDefault + /// + [DataContract(Name = "inline_response_default")] + public partial class InlineResponseDefault : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// _string. + public InlineResponseDefault(Foo _string = default(Foo)) + { + this.String = _string; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets String + /// + [DataMember(Name = "string", EmitDefaultValue = false)] + public Foo String { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponseDefault {\n"); + sb.Append(" String: ").Append(String).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as InlineResponseDefault).AreEqual; + } + + /// + /// Returns true if InlineResponseDefault instances are equal + /// + /// Instance of InlineResponseDefault to be compared + /// Boolean + public bool Equals(InlineResponseDefault input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.String != null) + hashCode = hashCode * 59 + this.String.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs new file mode 100644 index 00000000000..46963173f71 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -0,0 +1,136 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// IsoscelesTriangle + /// + [DataContract(Name = "IsoscelesTriangle")] + public partial class IsoscelesTriangle : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected IsoscelesTriangle() { } + /// + /// Initializes a new instance of the class. + /// + /// shapeType (required). + /// triangleType (required). + public IsoscelesTriangle(string shapeType = default(string), string triangleType = default(string)) + { + // to ensure "shapeType" is required (not null) + this.ShapeType = shapeType ?? throw new ArgumentNullException("shapeType is a required property for IsoscelesTriangle and cannot be null"); + // to ensure "triangleType" is required (not null) + this.TriangleType = triangleType ?? throw new ArgumentNullException("triangleType is a required property for IsoscelesTriangle and cannot be null"); + } + + /// + /// Gets or Sets ShapeType + /// + [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] + public string ShapeType { get; set; } + + /// + /// Gets or Sets TriangleType + /// + [DataMember(Name = "triangleType", IsRequired = true, EmitDefaultValue = false)] + public string TriangleType { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class IsoscelesTriangle {\n"); + sb.Append(" ShapeType: ").Append(ShapeType).Append("\n"); + sb.Append(" TriangleType: ").Append(TriangleType).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as IsoscelesTriangle).AreEqual; + } + + /// + /// Returns true if IsoscelesTriangle instances are equal + /// + /// Instance of IsoscelesTriangle to be compared + /// Boolean + public bool Equals(IsoscelesTriangle input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ShapeType != null) + hashCode = hashCode * 59 + this.ShapeType.GetHashCode(); + if (this.TriangleType != null) + hashCode = hashCode * 59 + this.TriangleType.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/List.cs new file mode 100644 index 00000000000..ecf4e8ff00e --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/List.cs @@ -0,0 +1,128 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// List + /// + [DataContract(Name = "List")] + public partial class List : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// _123list. + public List(string _123list = default(string)) + { + this._123List = _123list; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets _123List + /// + [DataMember(Name = "123-list", EmitDefaultValue = false)] + public string _123List { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class List {\n"); + sb.Append(" _123List: ").Append(_123List).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as List).AreEqual; + } + + /// + /// Returns true if List instances are equal + /// + /// Instance of List to be compared + /// Boolean + public bool Equals(List input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this._123List != null) + hashCode = hashCode * 59 + this._123List.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Mammal.cs new file mode 100644 index 00000000000..c8e3229ed3b --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Mammal.cs @@ -0,0 +1,362 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using System.Reflection; + +namespace Org.OpenAPITools.Model +{ + /// + /// Mammal + /// + [JsonConverter(typeof(MammalJsonConverter))] + [DataContract(Name = "mammal")] + public partial class Mammal : AbstractOpenAPISchema, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of Pig. + public Mammal(Pig actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of Whale. + public Mammal(Whale actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of Zebra. + public Mammal(Zebra actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(Pig)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(Whale)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(Zebra)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: Pig, Whale, Zebra"); + } + } + } + + /// + /// Get the actual instance of `Pig`. If the actual instanct is not `Pig`, + /// the InvalidClassException will be thrown + /// + /// An instance of Pig + public Pig GetPig() + { + return (Pig)this.ActualInstance; + } + + /// + /// Get the actual instance of `Whale`. If the actual instanct is not `Whale`, + /// the InvalidClassException will be thrown + /// + /// An instance of Whale + public Whale GetWhale() + { + return (Whale)this.ActualInstance; + } + + /// + /// Get the actual instance of `Zebra`. If the actual instanct is not `Zebra`, + /// the InvalidClassException will be thrown + /// + /// An instance of Zebra + public Zebra GetZebra() + { + return (Zebra)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Mammal {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this.ActualInstance, Mammal.SerializerSettings); + } + + /// + /// Converts the JSON string into an instance of Mammal + /// + /// JSON string + /// An instance of Mammal + public static Mammal FromJson(string jsonString) + { + Mammal newMammal = null; + + if (jsonString == null) + { + return newMammal; + } + + string discriminatorValue = JObject.Parse(jsonString)["className"].ToString(); + switch (discriminatorValue) + { + case "Pig": + newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newMammal.GetType().GetProperty("AdditionalProperties") == null) + { + newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.SerializerSettings)); + } + return newMammal; + case "whale": + newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newMammal.GetType().GetProperty("AdditionalProperties") == null) + { + newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.SerializerSettings)); + } + return newMammal; + case "zebra": + newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newMammal.GetType().GetProperty("AdditionalProperties") == null) + { + newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.SerializerSettings)); + } + return newMammal; + default: + System.Diagnostics.Debug.WriteLine(String.Format("Failed to lookup discriminator value `{0}` for Mammal. Possible values: Pig whale zebra", discriminatorValue)); + break; + } + + int match = 0; + List matchedTypes = new List(); + + try + { + newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newMammal.GetType().GetProperty("AdditionalProperties") == null) + { + newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.SerializerSettings)); + } + matchedTypes.Add("Pig"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(String.Format("Failed to deserialize `{0}` into Pig: {1}", jsonString, exception.ToString())); + } + + try + { + newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newMammal.GetType().GetProperty("AdditionalProperties") == null) + { + newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.SerializerSettings)); + } + matchedTypes.Add("Whale"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(String.Format("Failed to deserialize `{0}` into Whale: {1}", jsonString, exception.ToString())); + } + + try + { + newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newMammal.GetType().GetProperty("AdditionalProperties") == null) + { + newMammal = new Mammal(JsonConvert.DeserializeObject(jsonString, Mammal.SerializerSettings)); + } + matchedTypes.Add("Zebra"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(String.Format("Failed to deserialize `{0}` into Zebra: {1}", jsonString, exception.ToString())); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); + } + else if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newMammal; + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as Mammal).AreEqual; + } + + /// + /// Returns true if Mammal instances are equal + /// + /// Instance of Mammal to be compared + /// Boolean + public bool Equals(Mammal input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ActualInstance != null) + hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// Custom JSON converter for Mammal + /// + public class MammalJsonConverter : JsonConverter + { + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// JSON Serializer + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteRawValue((String)(typeof(Mammal).GetMethod("ToJson").Invoke(value, null))); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type + /// Existing value + /// JSON Serializer + /// The object converted from the JSON string + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + if(reader.TokenType != JsonToken.Null) + { + return Mammal.FromJson(JObject.Load(reader).ToString(Formatting.None)); + } + return null; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return false; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/MapTest.cs new file mode 100644 index 00000000000..0f9e49a98b3 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/MapTest.cs @@ -0,0 +1,180 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// MapTest + /// + [DataContract(Name = "MapTest")] + public partial class MapTest : IEquatable, IValidatableObject + { + /// + /// Defines Inner + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum InnerEnum + { + /// + /// Enum UPPER for value: UPPER + /// + [EnumMember(Value = "UPPER")] + UPPER = 1, + + /// + /// Enum Lower for value: lower + /// + [EnumMember(Value = "lower")] + Lower = 2 + + } + + + /// + /// Gets or Sets MapOfEnumString + /// + [DataMember(Name = "map_of_enum_string", EmitDefaultValue = false)] + public Dictionary MapOfEnumString { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// mapMapOfString. + /// mapOfEnumString. + /// directMap. + /// indirectMap. + public MapTest(Dictionary> mapMapOfString = default(Dictionary>), Dictionary mapOfEnumString = default(Dictionary), Dictionary directMap = default(Dictionary), Dictionary indirectMap = default(Dictionary)) + { + this.MapMapOfString = mapMapOfString; + this.MapOfEnumString = mapOfEnumString; + this.DirectMap = directMap; + this.IndirectMap = indirectMap; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets MapMapOfString + /// + [DataMember(Name = "map_map_of_string", EmitDefaultValue = false)] + public Dictionary> MapMapOfString { get; set; } + + /// + /// Gets or Sets DirectMap + /// + [DataMember(Name = "direct_map", EmitDefaultValue = false)] + public Dictionary DirectMap { get; set; } + + /// + /// Gets or Sets IndirectMap + /// + [DataMember(Name = "indirect_map", EmitDefaultValue = false)] + public Dictionary IndirectMap { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class MapTest {\n"); + sb.Append(" MapMapOfString: ").Append(MapMapOfString).Append("\n"); + sb.Append(" MapOfEnumString: ").Append(MapOfEnumString).Append("\n"); + sb.Append(" DirectMap: ").Append(DirectMap).Append("\n"); + sb.Append(" IndirectMap: ").Append(IndirectMap).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as MapTest).AreEqual; + } + + /// + /// Returns true if MapTest instances are equal + /// + /// Instance of MapTest to be compared + /// Boolean + public bool Equals(MapTest input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.MapMapOfString != null) + hashCode = hashCode * 59 + this.MapMapOfString.GetHashCode(); + hashCode = hashCode * 59 + this.MapOfEnumString.GetHashCode(); + if (this.DirectMap != null) + hashCode = hashCode * 59 + this.DirectMap.GetHashCode(); + if (this.IndirectMap != null) + hashCode = hashCode * 59 + this.IndirectMap.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs new file mode 100644 index 00000000000..dc3d45a080a --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -0,0 +1,150 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// MixedPropertiesAndAdditionalPropertiesClass + /// + [DataContract(Name = "MixedPropertiesAndAdditionalPropertiesClass")] + public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// uuid. + /// dateTime. + /// map. + public MixedPropertiesAndAdditionalPropertiesClass(Guid uuid = default(Guid), DateTime dateTime = default(DateTime), Dictionary map = default(Dictionary)) + { + this.Uuid = uuid; + this.DateTime = dateTime; + this.Map = map; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Uuid + /// + [DataMember(Name = "uuid", EmitDefaultValue = false)] + public Guid Uuid { get; set; } + + /// + /// Gets or Sets DateTime + /// + [DataMember(Name = "dateTime", EmitDefaultValue = false)] + public DateTime DateTime { get; set; } + + /// + /// Gets or Sets Map + /// + [DataMember(Name = "map", EmitDefaultValue = false)] + public Dictionary Map { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); + sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" DateTime: ").Append(DateTime).Append("\n"); + sb.Append(" Map: ").Append(Map).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as MixedPropertiesAndAdditionalPropertiesClass).AreEqual; + } + + /// + /// Returns true if MixedPropertiesAndAdditionalPropertiesClass instances are equal + /// + /// Instance of MixedPropertiesAndAdditionalPropertiesClass to be compared + /// Boolean + public bool Equals(MixedPropertiesAndAdditionalPropertiesClass input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Uuid != null) + hashCode = hashCode * 59 + this.Uuid.GetHashCode(); + if (this.DateTime != null) + hashCode = hashCode * 59 + this.DateTime.GetHashCode(); + if (this.Map != null) + hashCode = hashCode * 59 + this.Map.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Model200Response.cs new file mode 100644 index 00000000000..b1e76d25081 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Model200Response.cs @@ -0,0 +1,138 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// Model for testing model name starting with number + /// + [DataContract(Name = "200_response")] + public partial class Model200Response : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// name. + /// _class. + public Model200Response(int name = default(int), string _class = default(string)) + { + this.Name = name; + this.Class = _class; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Name + /// + [DataMember(Name = "name", EmitDefaultValue = false)] + public int Name { get; set; } + + /// + /// Gets or Sets Class + /// + [DataMember(Name = "class", EmitDefaultValue = false)] + public string Class { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Model200Response {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Class: ").Append(Class).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as Model200Response).AreEqual; + } + + /// + /// Returns true if Model200Response instances are equal + /// + /// Instance of Model200Response to be compared + /// Boolean + public bool Equals(Model200Response input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Class != null) + hashCode = hashCode * 59 + this.Class.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ModelClient.cs new file mode 100644 index 00000000000..16f1dc95bab --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ModelClient.cs @@ -0,0 +1,128 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// ModelClient + /// + [DataContract(Name = "_Client")] + public partial class ModelClient : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// _client. + public ModelClient(string _client = default(string)) + { + this.__Client = _client; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets __Client + /// + [DataMember(Name = "client", EmitDefaultValue = false)] + public string __Client { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ModelClient {\n"); + sb.Append(" __Client: ").Append(__Client).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as ModelClient).AreEqual; + } + + /// + /// Returns true if ModelClient instances are equal + /// + /// Instance of ModelClient to be compared + /// Boolean + public bool Equals(ModelClient input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.__Client != null) + hashCode = hashCode * 59 + this.__Client.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Name.cs new file mode 100644 index 00000000000..a6a01dd4ed3 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Name.cs @@ -0,0 +1,180 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// Model for testing model name same as property name + /// + [DataContract(Name = "Name")] + public partial class Name : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Name() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// name (required). + /// property. + public Name(int name = default(int), string property = default(string)) + { + this._Name = name; + this.Property = property; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets _Name + /// + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public int _Name { get; set; } + + /// + /// Gets or Sets SnakeCase + /// + [DataMember(Name = "snake_case", EmitDefaultValue = false)] + public int SnakeCase { get; private set; } + + /// + /// Returns false as SnakeCase should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerializeSnakeCase() + { + return false; + } + + /// + /// Gets or Sets Property + /// + [DataMember(Name = "property", EmitDefaultValue = false)] + public string Property { get; set; } + + /// + /// Gets or Sets _123Number + /// + [DataMember(Name = "123Number", EmitDefaultValue = false)] + public int _123Number { get; private set; } + + /// + /// Returns false as _123Number should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerialize_123Number() + { + return false; + } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Name {\n"); + sb.Append(" _Name: ").Append(_Name).Append("\n"); + sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); + sb.Append(" Property: ").Append(Property).Append("\n"); + sb.Append(" _123Number: ").Append(_123Number).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as Name).AreEqual; + } + + /// + /// Returns true if Name instances are equal + /// + /// Instance of Name to be compared + /// Boolean + public bool Equals(Name input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = hashCode * 59 + this._Name.GetHashCode(); + hashCode = hashCode * 59 + this.SnakeCase.GetHashCode(); + if (this.Property != null) + hashCode = hashCode * 59 + this.Property.GetHashCode(); + hashCode = hashCode * 59 + this._123Number.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/NullableClass.cs new file mode 100644 index 00000000000..4ceaab61bc6 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/NullableClass.cs @@ -0,0 +1,241 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// NullableClass + /// + [DataContract(Name = "NullableClass")] + public partial class NullableClass : Dictionary, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// integerProp. + /// numberProp. + /// booleanProp. + /// stringProp. + /// dateProp. + /// datetimeProp. + /// arrayNullableProp. + /// arrayAndItemsNullableProp. + /// arrayItemsNullable. + /// objectNullableProp. + /// objectAndItemsNullableProp. + /// objectItemsNullable. + public NullableClass(int? integerProp = default(int?), decimal? numberProp = default(decimal?), bool? booleanProp = default(bool?), string stringProp = default(string), DateTime? dateProp = default(DateTime?), DateTime? datetimeProp = default(DateTime?), List arrayNullableProp = default(List), List arrayAndItemsNullableProp = default(List), List arrayItemsNullable = default(List), Dictionary objectNullableProp = default(Dictionary), Dictionary objectAndItemsNullableProp = default(Dictionary), Dictionary objectItemsNullable = default(Dictionary)) : base() + { + this.IntegerProp = integerProp; + this.NumberProp = numberProp; + this.BooleanProp = booleanProp; + this.StringProp = stringProp; + this.DateProp = dateProp; + this.DatetimeProp = datetimeProp; + this.ArrayNullableProp = arrayNullableProp; + this.ArrayAndItemsNullableProp = arrayAndItemsNullableProp; + this.ArrayItemsNullable = arrayItemsNullable; + this.ObjectNullableProp = objectNullableProp; + this.ObjectAndItemsNullableProp = objectAndItemsNullableProp; + this.ObjectItemsNullable = objectItemsNullable; + } + + /// + /// Gets or Sets IntegerProp + /// + [DataMember(Name = "integer_prop", EmitDefaultValue = true)] + public int? IntegerProp { get; set; } + + /// + /// Gets or Sets NumberProp + /// + [DataMember(Name = "number_prop", EmitDefaultValue = true)] + public decimal? NumberProp { get; set; } + + /// + /// Gets or Sets BooleanProp + /// + [DataMember(Name = "boolean_prop", EmitDefaultValue = true)] + public bool? BooleanProp { get; set; } + + /// + /// Gets or Sets StringProp + /// + [DataMember(Name = "string_prop", EmitDefaultValue = true)] + public string StringProp { get; set; } + + /// + /// Gets or Sets DateProp + /// + [DataMember(Name = "date_prop", EmitDefaultValue = true)] + [JsonConverter(typeof(OpenAPIDateConverter))] + public DateTime? DateProp { get; set; } + + /// + /// Gets or Sets DatetimeProp + /// + [DataMember(Name = "datetime_prop", EmitDefaultValue = true)] + public DateTime? DatetimeProp { get; set; } + + /// + /// Gets or Sets ArrayNullableProp + /// + [DataMember(Name = "array_nullable_prop", EmitDefaultValue = true)] + public List ArrayNullableProp { get; set; } + + /// + /// Gets or Sets ArrayAndItemsNullableProp + /// + [DataMember(Name = "array_and_items_nullable_prop", EmitDefaultValue = true)] + public List ArrayAndItemsNullableProp { get; set; } + + /// + /// Gets or Sets ArrayItemsNullable + /// + [DataMember(Name = "array_items_nullable", EmitDefaultValue = false)] + public List ArrayItemsNullable { get; set; } + + /// + /// Gets or Sets ObjectNullableProp + /// + [DataMember(Name = "object_nullable_prop", EmitDefaultValue = true)] + public Dictionary ObjectNullableProp { get; set; } + + /// + /// Gets or Sets ObjectAndItemsNullableProp + /// + [DataMember(Name = "object_and_items_nullable_prop", EmitDefaultValue = true)] + public Dictionary ObjectAndItemsNullableProp { get; set; } + + /// + /// Gets or Sets ObjectItemsNullable + /// + [DataMember(Name = "object_items_nullable", EmitDefaultValue = false)] + public Dictionary ObjectItemsNullable { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class NullableClass {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" IntegerProp: ").Append(IntegerProp).Append("\n"); + sb.Append(" NumberProp: ").Append(NumberProp).Append("\n"); + sb.Append(" BooleanProp: ").Append(BooleanProp).Append("\n"); + sb.Append(" StringProp: ").Append(StringProp).Append("\n"); + sb.Append(" DateProp: ").Append(DateProp).Append("\n"); + sb.Append(" DatetimeProp: ").Append(DatetimeProp).Append("\n"); + sb.Append(" ArrayNullableProp: ").Append(ArrayNullableProp).Append("\n"); + sb.Append(" ArrayAndItemsNullableProp: ").Append(ArrayAndItemsNullableProp).Append("\n"); + sb.Append(" ArrayItemsNullable: ").Append(ArrayItemsNullable).Append("\n"); + sb.Append(" ObjectNullableProp: ").Append(ObjectNullableProp).Append("\n"); + sb.Append(" ObjectAndItemsNullableProp: ").Append(ObjectAndItemsNullableProp).Append("\n"); + sb.Append(" ObjectItemsNullable: ").Append(ObjectItemsNullable).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as NullableClass).AreEqual; + } + + /// + /// Returns true if NullableClass instances are equal + /// + /// Instance of NullableClass to be compared + /// Boolean + public bool Equals(NullableClass input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.IntegerProp != null) + hashCode = hashCode * 59 + this.IntegerProp.GetHashCode(); + if (this.NumberProp != null) + hashCode = hashCode * 59 + this.NumberProp.GetHashCode(); + if (this.BooleanProp != null) + hashCode = hashCode * 59 + this.BooleanProp.GetHashCode(); + if (this.StringProp != null) + hashCode = hashCode * 59 + this.StringProp.GetHashCode(); + if (this.DateProp != null) + hashCode = hashCode * 59 + this.DateProp.GetHashCode(); + if (this.DatetimeProp != null) + hashCode = hashCode * 59 + this.DatetimeProp.GetHashCode(); + if (this.ArrayNullableProp != null) + hashCode = hashCode * 59 + this.ArrayNullableProp.GetHashCode(); + if (this.ArrayAndItemsNullableProp != null) + hashCode = hashCode * 59 + this.ArrayAndItemsNullableProp.GetHashCode(); + if (this.ArrayItemsNullable != null) + hashCode = hashCode * 59 + this.ArrayItemsNullable.GetHashCode(); + if (this.ObjectNullableProp != null) + hashCode = hashCode * 59 + this.ObjectNullableProp.GetHashCode(); + if (this.ObjectAndItemsNullableProp != null) + hashCode = hashCode * 59 + this.ObjectAndItemsNullableProp.GetHashCode(); + if (this.ObjectItemsNullable != null) + hashCode = hashCode * 59 + this.ObjectItemsNullable.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/NullableShape.cs new file mode 100644 index 00000000000..ae8ae903e98 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/NullableShape.cs @@ -0,0 +1,320 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using System.Reflection; + +namespace Org.OpenAPITools.Model +{ + /// + /// The value may be a shape or the 'null' value. The 'nullable' attribute was introduced in OAS schema >= 3.0 and has been deprecated in OAS schema >= 3.1. + /// + [JsonConverter(typeof(NullableShapeJsonConverter))] + [DataContract(Name = "NullableShape")] + public partial class NullableShape : AbstractOpenAPISchema, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + public NullableShape() + { + this.IsNullable = true; + this.SchemaType= "oneOf"; + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of Quadrilateral. + public NullableShape(Quadrilateral actualInstance) + { + this.IsNullable = true; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance; + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of Triangle. + public NullableShape(Triangle actualInstance) + { + this.IsNullable = true; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance; + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(Quadrilateral)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(Triangle)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: Quadrilateral, Triangle"); + } + } + } + + /// + /// Get the actual instance of `Quadrilateral`. If the actual instanct is not `Quadrilateral`, + /// the InvalidClassException will be thrown + /// + /// An instance of Quadrilateral + public Quadrilateral GetQuadrilateral() + { + return (Quadrilateral)this.ActualInstance; + } + + /// + /// Get the actual instance of `Triangle`. If the actual instanct is not `Triangle`, + /// the InvalidClassException will be thrown + /// + /// An instance of Triangle + public Triangle GetTriangle() + { + return (Triangle)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class NullableShape {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this.ActualInstance, NullableShape.SerializerSettings); + } + + /// + /// Converts the JSON string into an instance of NullableShape + /// + /// JSON string + /// An instance of NullableShape + public static NullableShape FromJson(string jsonString) + { + NullableShape newNullableShape = null; + + if (jsonString == null) + { + return newNullableShape; + } + + string discriminatorValue = JObject.Parse(jsonString)["shapeType"].ToString(); + switch (discriminatorValue) + { + case "Quadrilateral": + newNullableShape = new NullableShape(JsonConvert.DeserializeObject(jsonString, NullableShape.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newNullableShape.GetType().GetProperty("AdditionalProperties") == null) + { + newNullableShape = new NullableShape(JsonConvert.DeserializeObject(jsonString, NullableShape.SerializerSettings)); + } + return newNullableShape; + case "Triangle": + newNullableShape = new NullableShape(JsonConvert.DeserializeObject(jsonString, NullableShape.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newNullableShape.GetType().GetProperty("AdditionalProperties") == null) + { + newNullableShape = new NullableShape(JsonConvert.DeserializeObject(jsonString, NullableShape.SerializerSettings)); + } + return newNullableShape; + default: + System.Diagnostics.Debug.WriteLine(String.Format("Failed to lookup discriminator value `{0}` for NullableShape. Possible values: Quadrilateral Triangle", discriminatorValue)); + break; + } + + int match = 0; + List matchedTypes = new List(); + + try + { + newNullableShape = new NullableShape(JsonConvert.DeserializeObject(jsonString, NullableShape.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newNullableShape.GetType().GetProperty("AdditionalProperties") == null) + { + newNullableShape = new NullableShape(JsonConvert.DeserializeObject(jsonString, NullableShape.SerializerSettings)); + } + matchedTypes.Add("Quadrilateral"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(String.Format("Failed to deserialize `{0}` into Quadrilateral: {1}", jsonString, exception.ToString())); + } + + try + { + newNullableShape = new NullableShape(JsonConvert.DeserializeObject(jsonString, NullableShape.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newNullableShape.GetType().GetProperty("AdditionalProperties") == null) + { + newNullableShape = new NullableShape(JsonConvert.DeserializeObject(jsonString, NullableShape.SerializerSettings)); + } + matchedTypes.Add("Triangle"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(String.Format("Failed to deserialize `{0}` into Triangle: {1}", jsonString, exception.ToString())); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); + } + else if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newNullableShape; + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as NullableShape).AreEqual; + } + + /// + /// Returns true if NullableShape instances are equal + /// + /// Instance of NullableShape to be compared + /// Boolean + public bool Equals(NullableShape input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ActualInstance != null) + hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// Custom JSON converter for NullableShape + /// + public class NullableShapeJsonConverter : JsonConverter + { + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// JSON Serializer + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteRawValue((String)(typeof(NullableShape).GetMethod("ToJson").Invoke(value, null))); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type + /// Existing value + /// JSON Serializer + /// The object converted from the JSON string + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + if(reader.TokenType != JsonToken.Null) + { + return NullableShape.FromJson(JObject.Load(reader).ToString(Formatting.None)); + } + return null; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return false; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/NumberOnly.cs new file mode 100644 index 00000000000..e9b006094cf --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -0,0 +1,127 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// NumberOnly + /// + [DataContract(Name = "NumberOnly")] + public partial class NumberOnly : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// justNumber. + public NumberOnly(decimal justNumber = default(decimal)) + { + this.JustNumber = justNumber; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets JustNumber + /// + [DataMember(Name = "JustNumber", EmitDefaultValue = false)] + public decimal JustNumber { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class NumberOnly {\n"); + sb.Append(" JustNumber: ").Append(JustNumber).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as NumberOnly).AreEqual; + } + + /// + /// Returns true if NumberOnly instances are equal + /// + /// Instance of NumberOnly to be compared + /// Boolean + public bool Equals(NumberOnly input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = hashCode * 59 + this.JustNumber.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Order.cs index 10b83e0a24d..975f3b711dd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Order.cs @@ -1,7 +1,7 @@ /* * OpenAPI Petstore * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git @@ -27,7 +27,7 @@ using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model { /// - /// An order for a pets from the pet store + /// Order /// [DataContract(Name = "Order")] public partial class Order : IEquatable, IValidatableObject diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/OuterComposite.cs new file mode 100644 index 00000000000..61c4bca3e3c --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -0,0 +1,148 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// OuterComposite + /// + [DataContract(Name = "OuterComposite")] + public partial class OuterComposite : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// myNumber. + /// myString. + /// myBoolean. + public OuterComposite(decimal myNumber = default(decimal), string myString = default(string), bool myBoolean = default(bool)) + { + this.MyNumber = myNumber; + this.MyString = myString; + this.MyBoolean = myBoolean; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets MyNumber + /// + [DataMember(Name = "my_number", EmitDefaultValue = false)] + public decimal MyNumber { get; set; } + + /// + /// Gets or Sets MyString + /// + [DataMember(Name = "my_string", EmitDefaultValue = false)] + public string MyString { get; set; } + + /// + /// Gets or Sets MyBoolean + /// + [DataMember(Name = "my_boolean", EmitDefaultValue = false)] + public bool MyBoolean { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class OuterComposite {\n"); + sb.Append(" MyNumber: ").Append(MyNumber).Append("\n"); + sb.Append(" MyString: ").Append(MyString).Append("\n"); + sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as OuterComposite).AreEqual; + } + + /// + /// Returns true if OuterComposite instances are equal + /// + /// Instance of OuterComposite to be compared + /// Boolean + public bool Equals(OuterComposite input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = hashCode * 59 + this.MyNumber.GetHashCode(); + if (this.MyString != null) + hashCode = hashCode * 59 + this.MyString.GetHashCode(); + hashCode = hashCode * 59 + this.MyBoolean.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/OuterEnum.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/OuterEnum.cs new file mode 100644 index 00000000000..3b2dc2a110a --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/OuterEnum.cs @@ -0,0 +1,57 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// Defines OuterEnum + /// + + [JsonConverter(typeof(StringEnumConverter))] + + public enum OuterEnum + { + /// + /// Enum Placed for value: placed + /// + [EnumMember(Value = "placed")] + Placed = 1, + + /// + /// Enum Approved for value: approved + /// + [EnumMember(Value = "approved")] + Approved = 2, + + /// + /// Enum Delivered for value: delivered + /// + [EnumMember(Value = "delivered")] + Delivered = 3 + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs new file mode 100644 index 00000000000..04d88ac8fec --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs @@ -0,0 +1,57 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// Defines OuterEnumDefaultValue + /// + + [JsonConverter(typeof(StringEnumConverter))] + + public enum OuterEnumDefaultValue + { + /// + /// Enum Placed for value: placed + /// + [EnumMember(Value = "placed")] + Placed = 1, + + /// + /// Enum Approved for value: approved + /// + [EnumMember(Value = "approved")] + Approved = 2, + + /// + /// Enum Delivered for value: delivered + /// + [EnumMember(Value = "delivered")] + Delivered = 3 + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/OuterEnumInteger.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/OuterEnumInteger.cs new file mode 100644 index 00000000000..da111ad9341 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/OuterEnumInteger.cs @@ -0,0 +1,57 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// Defines OuterEnumInteger + /// + + [JsonConverter(typeof(StringEnumConverter))] + + public enum OuterEnumInteger + { + /// + /// Enum NUMBER_0 for value: 0 + /// + [EnumMember(Value = "0")] + NUMBER_0 = 1, + + /// + /// Enum NUMBER_1 for value: 1 + /// + [EnumMember(Value = "1")] + NUMBER_1 = 2, + + /// + /// Enum NUMBER_2 for value: 2 + /// + [EnumMember(Value = "2")] + NUMBER_2 = 3 + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs new file mode 100644 index 00000000000..ff0d8505623 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs @@ -0,0 +1,57 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// Defines OuterEnumIntegerDefaultValue + /// + + [JsonConverter(typeof(StringEnumConverter))] + + public enum OuterEnumIntegerDefaultValue + { + /// + /// Enum NUMBER_0 for value: 0 + /// + [EnumMember(Value = "0")] + NUMBER_0 = 1, + + /// + /// Enum NUMBER_1 for value: 1 + /// + [EnumMember(Value = "1")] + NUMBER_1 = 2, + + /// + /// Enum NUMBER_2 for value: 2 + /// + [EnumMember(Value = "2")] + NUMBER_2 = 3 + + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ParentPet.cs new file mode 100644 index 00000000000..a205b59b6d0 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ParentPet.cs @@ -0,0 +1,141 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// ParentPet + /// + [DataContract(Name = "ParentPet")] + [JsonConverter(typeof(JsonSubtypes), "PetType")] + [JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")] + public partial class ParentPet : GrandparentAnimal, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ParentPet() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// petType (required) (default to "ParentPet"). + public ParentPet(string petType = "ParentPet") : base(petType) + { + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ParentPet {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as ParentPet).AreEqual; + } + + /// + /// Returns true if ParentPet instances are equal + /// + /// Instance of ParentPet to be compared + /// Boolean + public bool Equals(ParentPet input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach(var x in BaseValidate(validationContext)) yield return x; + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Pet.cs index f1f98667f36..4f7057df98d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Pet.cs @@ -1,7 +1,7 @@ /* * OpenAPI Petstore * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git @@ -27,7 +27,7 @@ using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model { /// - /// A pet for sale in the pet store + /// Pet /// [DataContract(Name = "Pet")] public partial class Pet : IEquatable, IValidatableObject diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Pig.cs new file mode 100644 index 00000000000..ffdc73846d6 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Pig.cs @@ -0,0 +1,311 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using System.Reflection; + +namespace Org.OpenAPITools.Model +{ + /// + /// Pig + /// + [JsonConverter(typeof(PigJsonConverter))] + [DataContract(Name = "Pig")] + public partial class Pig : AbstractOpenAPISchema, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of BasquePig. + public Pig(BasquePig actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of DanishPig. + public Pig(DanishPig actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(BasquePig)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(DanishPig)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: BasquePig, DanishPig"); + } + } + } + + /// + /// Get the actual instance of `BasquePig`. If the actual instanct is not `BasquePig`, + /// the InvalidClassException will be thrown + /// + /// An instance of BasquePig + public BasquePig GetBasquePig() + { + return (BasquePig)this.ActualInstance; + } + + /// + /// Get the actual instance of `DanishPig`. If the actual instanct is not `DanishPig`, + /// the InvalidClassException will be thrown + /// + /// An instance of DanishPig + public DanishPig GetDanishPig() + { + return (DanishPig)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Pig {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this.ActualInstance, Pig.SerializerSettings); + } + + /// + /// Converts the JSON string into an instance of Pig + /// + /// JSON string + /// An instance of Pig + public static Pig FromJson(string jsonString) + { + Pig newPig = null; + + if (jsonString == null) + { + return newPig; + } + + string discriminatorValue = JObject.Parse(jsonString)["className"].ToString(); + switch (discriminatorValue) + { + case "BasquePig": + newPig = new Pig(JsonConvert.DeserializeObject(jsonString, Pig.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newPig.GetType().GetProperty("AdditionalProperties") == null) + { + newPig = new Pig(JsonConvert.DeserializeObject(jsonString, Pig.SerializerSettings)); + } + return newPig; + case "DanishPig": + newPig = new Pig(JsonConvert.DeserializeObject(jsonString, Pig.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newPig.GetType().GetProperty("AdditionalProperties") == null) + { + newPig = new Pig(JsonConvert.DeserializeObject(jsonString, Pig.SerializerSettings)); + } + return newPig; + default: + System.Diagnostics.Debug.WriteLine(String.Format("Failed to lookup discriminator value `{0}` for Pig. Possible values: BasquePig DanishPig", discriminatorValue)); + break; + } + + int match = 0; + List matchedTypes = new List(); + + try + { + newPig = new Pig(JsonConvert.DeserializeObject(jsonString, Pig.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newPig.GetType().GetProperty("AdditionalProperties") == null) + { + newPig = new Pig(JsonConvert.DeserializeObject(jsonString, Pig.SerializerSettings)); + } + matchedTypes.Add("BasquePig"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(String.Format("Failed to deserialize `{0}` into BasquePig: {1}", jsonString, exception.ToString())); + } + + try + { + newPig = new Pig(JsonConvert.DeserializeObject(jsonString, Pig.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newPig.GetType().GetProperty("AdditionalProperties") == null) + { + newPig = new Pig(JsonConvert.DeserializeObject(jsonString, Pig.SerializerSettings)); + } + matchedTypes.Add("DanishPig"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(String.Format("Failed to deserialize `{0}` into DanishPig: {1}", jsonString, exception.ToString())); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); + } + else if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newPig; + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as Pig).AreEqual; + } + + /// + /// Returns true if Pig instances are equal + /// + /// Instance of Pig to be compared + /// Boolean + public bool Equals(Pig input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ActualInstance != null) + hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// Custom JSON converter for Pig + /// + public class PigJsonConverter : JsonConverter + { + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// JSON Serializer + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteRawValue((String)(typeof(Pig).GetMethod("ToJson").Invoke(value, null))); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type + /// Existing value + /// JSON Serializer + /// The object converted from the JSON string + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + if(reader.TokenType != JsonToken.Null) + { + return Pig.FromJson(JObject.Load(reader).ToString(Formatting.None)); + } + return null; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return false; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Quadrilateral.cs new file mode 100644 index 00000000000..0a5cffe71db --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -0,0 +1,311 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using System.Reflection; + +namespace Org.OpenAPITools.Model +{ + /// + /// Quadrilateral + /// + [JsonConverter(typeof(QuadrilateralJsonConverter))] + [DataContract(Name = "Quadrilateral")] + public partial class Quadrilateral : AbstractOpenAPISchema, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ComplexQuadrilateral. + public Quadrilateral(ComplexQuadrilateral actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of SimpleQuadrilateral. + public Quadrilateral(SimpleQuadrilateral actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(ComplexQuadrilateral)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(SimpleQuadrilateral)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: ComplexQuadrilateral, SimpleQuadrilateral"); + } + } + } + + /// + /// Get the actual instance of `ComplexQuadrilateral`. If the actual instanct is not `ComplexQuadrilateral`, + /// the InvalidClassException will be thrown + /// + /// An instance of ComplexQuadrilateral + public ComplexQuadrilateral GetComplexQuadrilateral() + { + return (ComplexQuadrilateral)this.ActualInstance; + } + + /// + /// Get the actual instance of `SimpleQuadrilateral`. If the actual instanct is not `SimpleQuadrilateral`, + /// the InvalidClassException will be thrown + /// + /// An instance of SimpleQuadrilateral + public SimpleQuadrilateral GetSimpleQuadrilateral() + { + return (SimpleQuadrilateral)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Quadrilateral {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this.ActualInstance, Quadrilateral.SerializerSettings); + } + + /// + /// Converts the JSON string into an instance of Quadrilateral + /// + /// JSON string + /// An instance of Quadrilateral + public static Quadrilateral FromJson(string jsonString) + { + Quadrilateral newQuadrilateral = null; + + if (jsonString == null) + { + return newQuadrilateral; + } + + string discriminatorValue = JObject.Parse(jsonString)["quadrilateralType"].ToString(); + switch (discriminatorValue) + { + case "ComplexQuadrilateral": + newQuadrilateral = new Quadrilateral(JsonConvert.DeserializeObject(jsonString, Quadrilateral.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newQuadrilateral.GetType().GetProperty("AdditionalProperties") == null) + { + newQuadrilateral = new Quadrilateral(JsonConvert.DeserializeObject(jsonString, Quadrilateral.SerializerSettings)); + } + return newQuadrilateral; + case "SimpleQuadrilateral": + newQuadrilateral = new Quadrilateral(JsonConvert.DeserializeObject(jsonString, Quadrilateral.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newQuadrilateral.GetType().GetProperty("AdditionalProperties") == null) + { + newQuadrilateral = new Quadrilateral(JsonConvert.DeserializeObject(jsonString, Quadrilateral.SerializerSettings)); + } + return newQuadrilateral; + default: + System.Diagnostics.Debug.WriteLine(String.Format("Failed to lookup discriminator value `{0}` for Quadrilateral. Possible values: ComplexQuadrilateral SimpleQuadrilateral", discriminatorValue)); + break; + } + + int match = 0; + List matchedTypes = new List(); + + try + { + newQuadrilateral = new Quadrilateral(JsonConvert.DeserializeObject(jsonString, Quadrilateral.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newQuadrilateral.GetType().GetProperty("AdditionalProperties") == null) + { + newQuadrilateral = new Quadrilateral(JsonConvert.DeserializeObject(jsonString, Quadrilateral.SerializerSettings)); + } + matchedTypes.Add("ComplexQuadrilateral"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(String.Format("Failed to deserialize `{0}` into ComplexQuadrilateral: {1}", jsonString, exception.ToString())); + } + + try + { + newQuadrilateral = new Quadrilateral(JsonConvert.DeserializeObject(jsonString, Quadrilateral.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newQuadrilateral.GetType().GetProperty("AdditionalProperties") == null) + { + newQuadrilateral = new Quadrilateral(JsonConvert.DeserializeObject(jsonString, Quadrilateral.SerializerSettings)); + } + matchedTypes.Add("SimpleQuadrilateral"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(String.Format("Failed to deserialize `{0}` into SimpleQuadrilateral: {1}", jsonString, exception.ToString())); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); + } + else if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newQuadrilateral; + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as Quadrilateral).AreEqual; + } + + /// + /// Returns true if Quadrilateral instances are equal + /// + /// Instance of Quadrilateral to be compared + /// Boolean + public bool Equals(Quadrilateral input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ActualInstance != null) + hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// Custom JSON converter for Quadrilateral + /// + public class QuadrilateralJsonConverter : JsonConverter + { + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// JSON Serializer + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteRawValue((String)(typeof(Quadrilateral).GetMethod("ToJson").Invoke(value, null))); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type + /// Existing value + /// JSON Serializer + /// The object converted from the JSON string + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + if(reader.TokenType != JsonToken.Null) + { + return Quadrilateral.FromJson(JObject.Load(reader).ToString(Formatting.None)); + } + return null; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return false; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs new file mode 100644 index 00000000000..e7727cf856c --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -0,0 +1,137 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// QuadrilateralInterface + /// + [DataContract(Name = "QuadrilateralInterface")] + public partial class QuadrilateralInterface : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected QuadrilateralInterface() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// quadrilateralType (required). + public QuadrilateralInterface(string quadrilateralType = default(string)) + { + // to ensure "quadrilateralType" is required (not null) + this.QuadrilateralType = quadrilateralType ?? throw new ArgumentNullException("quadrilateralType is a required property for QuadrilateralInterface and cannot be null"); + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets QuadrilateralType + /// + [DataMember(Name = "quadrilateralType", IsRequired = true, EmitDefaultValue = false)] + public string QuadrilateralType { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class QuadrilateralInterface {\n"); + sb.Append(" QuadrilateralType: ").Append(QuadrilateralType).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as QuadrilateralInterface).AreEqual; + } + + /// + /// Returns true if QuadrilateralInterface instances are equal + /// + /// Instance of QuadrilateralInterface to be compared + /// Boolean + public bool Equals(QuadrilateralInterface input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.QuadrilateralType != null) + hashCode = hashCode * 59 + this.QuadrilateralType.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs new file mode 100644 index 00000000000..4ab8f7d5c6a --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -0,0 +1,146 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// ReadOnlyFirst + /// + [DataContract(Name = "ReadOnlyFirst")] + public partial class ReadOnlyFirst : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// baz. + public ReadOnlyFirst(string baz = default(string)) + { + this.Baz = baz; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Bar + /// + [DataMember(Name = "bar", EmitDefaultValue = false)] + public string Bar { get; private set; } + + /// + /// Returns false as Bar should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerializeBar() + { + return false; + } + + /// + /// Gets or Sets Baz + /// + [DataMember(Name = "baz", EmitDefaultValue = false)] + public string Baz { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ReadOnlyFirst {\n"); + sb.Append(" Bar: ").Append(Bar).Append("\n"); + sb.Append(" Baz: ").Append(Baz).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as ReadOnlyFirst).AreEqual; + } + + /// + /// Returns true if ReadOnlyFirst instances are equal + /// + /// Instance of ReadOnlyFirst to be compared + /// Boolean + public bool Equals(ReadOnlyFirst input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Bar != null) + hashCode = hashCode * 59 + this.Bar.GetHashCode(); + if (this.Baz != null) + hashCode = hashCode * 59 + this.Baz.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Return.cs new file mode 100644 index 00000000000..75e7f1f2530 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Return.cs @@ -0,0 +1,127 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// Model for testing reserved words + /// + [DataContract(Name = "Return")] + public partial class Return : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// _return. + public Return(int _return = default(int)) + { + this._Return = _return; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets _Return + /// + [DataMember(Name = "return", EmitDefaultValue = false)] + public int _Return { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Return {\n"); + sb.Append(" _Return: ").Append(_Return).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as Return).AreEqual; + } + + /// + /// Returns true if Return instances are equal + /// + /// Instance of Return to be compared + /// Boolean + public bool Equals(Return input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = hashCode * 59 + this._Return.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ScaleneTriangle.cs new file mode 100644 index 00000000000..c539590907c --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -0,0 +1,149 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// ScaleneTriangle + /// + [DataContract(Name = "ScaleneTriangle")] + public partial class ScaleneTriangle : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ScaleneTriangle() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// shapeType (required). + /// triangleType (required). + public ScaleneTriangle(string shapeType = default(string), string triangleType = default(string)) + { + // to ensure "shapeType" is required (not null) + this.ShapeType = shapeType ?? throw new ArgumentNullException("shapeType is a required property for ScaleneTriangle and cannot be null"); + // to ensure "triangleType" is required (not null) + this.TriangleType = triangleType ?? throw new ArgumentNullException("triangleType is a required property for ScaleneTriangle and cannot be null"); + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets ShapeType + /// + [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] + public string ShapeType { get; set; } + + /// + /// Gets or Sets TriangleType + /// + [DataMember(Name = "triangleType", IsRequired = true, EmitDefaultValue = false)] + public string TriangleType { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ScaleneTriangle {\n"); + sb.Append(" ShapeType: ").Append(ShapeType).Append("\n"); + sb.Append(" TriangleType: ").Append(TriangleType).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as ScaleneTriangle).AreEqual; + } + + /// + /// Returns true if ScaleneTriangle instances are equal + /// + /// Instance of ScaleneTriangle to be compared + /// Boolean + public bool Equals(ScaleneTriangle input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ShapeType != null) + hashCode = hashCode * 59 + this.ShapeType.GetHashCode(); + if (this.TriangleType != null) + hashCode = hashCode * 59 + this.TriangleType.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Shape.cs new file mode 100644 index 00000000000..7db4ac39060 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Shape.cs @@ -0,0 +1,311 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using System.Reflection; + +namespace Org.OpenAPITools.Model +{ + /// + /// Shape + /// + [JsonConverter(typeof(ShapeJsonConverter))] + [DataContract(Name = "Shape")] + public partial class Shape : AbstractOpenAPISchema, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of Quadrilateral. + public Shape(Quadrilateral actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of Triangle. + public Shape(Triangle actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(Quadrilateral)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(Triangle)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: Quadrilateral, Triangle"); + } + } + } + + /// + /// Get the actual instance of `Quadrilateral`. If the actual instanct is not `Quadrilateral`, + /// the InvalidClassException will be thrown + /// + /// An instance of Quadrilateral + public Quadrilateral GetQuadrilateral() + { + return (Quadrilateral)this.ActualInstance; + } + + /// + /// Get the actual instance of `Triangle`. If the actual instanct is not `Triangle`, + /// the InvalidClassException will be thrown + /// + /// An instance of Triangle + public Triangle GetTriangle() + { + return (Triangle)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Shape {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this.ActualInstance, Shape.SerializerSettings); + } + + /// + /// Converts the JSON string into an instance of Shape + /// + /// JSON string + /// An instance of Shape + public static Shape FromJson(string jsonString) + { + Shape newShape = null; + + if (jsonString == null) + { + return newShape; + } + + string discriminatorValue = JObject.Parse(jsonString)["shapeType"].ToString(); + switch (discriminatorValue) + { + case "Quadrilateral": + newShape = new Shape(JsonConvert.DeserializeObject(jsonString, Shape.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newShape.GetType().GetProperty("AdditionalProperties") == null) + { + newShape = new Shape(JsonConvert.DeserializeObject(jsonString, Shape.SerializerSettings)); + } + return newShape; + case "Triangle": + newShape = new Shape(JsonConvert.DeserializeObject(jsonString, Shape.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newShape.GetType().GetProperty("AdditionalProperties") == null) + { + newShape = new Shape(JsonConvert.DeserializeObject(jsonString, Shape.SerializerSettings)); + } + return newShape; + default: + System.Diagnostics.Debug.WriteLine(String.Format("Failed to lookup discriminator value `{0}` for Shape. Possible values: Quadrilateral Triangle", discriminatorValue)); + break; + } + + int match = 0; + List matchedTypes = new List(); + + try + { + newShape = new Shape(JsonConvert.DeserializeObject(jsonString, Shape.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newShape.GetType().GetProperty("AdditionalProperties") == null) + { + newShape = new Shape(JsonConvert.DeserializeObject(jsonString, Shape.SerializerSettings)); + } + matchedTypes.Add("Quadrilateral"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(String.Format("Failed to deserialize `{0}` into Quadrilateral: {1}", jsonString, exception.ToString())); + } + + try + { + newShape = new Shape(JsonConvert.DeserializeObject(jsonString, Shape.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newShape.GetType().GetProperty("AdditionalProperties") == null) + { + newShape = new Shape(JsonConvert.DeserializeObject(jsonString, Shape.SerializerSettings)); + } + matchedTypes.Add("Triangle"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(String.Format("Failed to deserialize `{0}` into Triangle: {1}", jsonString, exception.ToString())); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); + } + else if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newShape; + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as Shape).AreEqual; + } + + /// + /// Returns true if Shape instances are equal + /// + /// Instance of Shape to be compared + /// Boolean + public bool Equals(Shape input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ActualInstance != null) + hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// Custom JSON converter for Shape + /// + public class ShapeJsonConverter : JsonConverter + { + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// JSON Serializer + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteRawValue((String)(typeof(Shape).GetMethod("ToJson").Invoke(value, null))); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type + /// Existing value + /// JSON Serializer + /// The object converted from the JSON string + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + if(reader.TokenType != JsonToken.Null) + { + return Shape.FromJson(JObject.Load(reader).ToString(Formatting.None)); + } + return null; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return false; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ShapeInterface.cs new file mode 100644 index 00000000000..051100b4e6c --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -0,0 +1,137 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// ShapeInterface + /// + [DataContract(Name = "ShapeInterface")] + public partial class ShapeInterface : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ShapeInterface() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// shapeType (required). + public ShapeInterface(string shapeType = default(string)) + { + // to ensure "shapeType" is required (not null) + this.ShapeType = shapeType ?? throw new ArgumentNullException("shapeType is a required property for ShapeInterface and cannot be null"); + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets ShapeType + /// + [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] + public string ShapeType { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShapeInterface {\n"); + sb.Append(" ShapeType: ").Append(ShapeType).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as ShapeInterface).AreEqual; + } + + /// + /// Returns true if ShapeInterface instances are equal + /// + /// Instance of ShapeInterface to be compared + /// Boolean + public bool Equals(ShapeInterface input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ShapeType != null) + hashCode = hashCode * 59 + this.ShapeType.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ShapeOrNull.cs new file mode 100644 index 00000000000..11456f9c653 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -0,0 +1,320 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using System.Reflection; + +namespace Org.OpenAPITools.Model +{ + /// + /// The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1. + /// + [JsonConverter(typeof(ShapeOrNullJsonConverter))] + [DataContract(Name = "ShapeOrNull")] + public partial class ShapeOrNull : AbstractOpenAPISchema, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + public ShapeOrNull() + { + this.IsNullable = true; + this.SchemaType= "oneOf"; + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of Quadrilateral. + public ShapeOrNull(Quadrilateral actualInstance) + { + this.IsNullable = true; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance; + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of Triangle. + public ShapeOrNull(Triangle actualInstance) + { + this.IsNullable = true; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance; + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(Quadrilateral)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(Triangle)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: Quadrilateral, Triangle"); + } + } + } + + /// + /// Get the actual instance of `Quadrilateral`. If the actual instanct is not `Quadrilateral`, + /// the InvalidClassException will be thrown + /// + /// An instance of Quadrilateral + public Quadrilateral GetQuadrilateral() + { + return (Quadrilateral)this.ActualInstance; + } + + /// + /// Get the actual instance of `Triangle`. If the actual instanct is not `Triangle`, + /// the InvalidClassException will be thrown + /// + /// An instance of Triangle + public Triangle GetTriangle() + { + return (Triangle)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShapeOrNull {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this.ActualInstance, ShapeOrNull.SerializerSettings); + } + + /// + /// Converts the JSON string into an instance of ShapeOrNull + /// + /// JSON string + /// An instance of ShapeOrNull + public static ShapeOrNull FromJson(string jsonString) + { + ShapeOrNull newShapeOrNull = null; + + if (jsonString == null) + { + return newShapeOrNull; + } + + string discriminatorValue = JObject.Parse(jsonString)["shapeType"].ToString(); + switch (discriminatorValue) + { + case "Quadrilateral": + newShapeOrNull = new ShapeOrNull(JsonConvert.DeserializeObject(jsonString, ShapeOrNull.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newShapeOrNull.GetType().GetProperty("AdditionalProperties") == null) + { + newShapeOrNull = new ShapeOrNull(JsonConvert.DeserializeObject(jsonString, ShapeOrNull.SerializerSettings)); + } + return newShapeOrNull; + case "Triangle": + newShapeOrNull = new ShapeOrNull(JsonConvert.DeserializeObject(jsonString, ShapeOrNull.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newShapeOrNull.GetType().GetProperty("AdditionalProperties") == null) + { + newShapeOrNull = new ShapeOrNull(JsonConvert.DeserializeObject(jsonString, ShapeOrNull.SerializerSettings)); + } + return newShapeOrNull; + default: + System.Diagnostics.Debug.WriteLine(String.Format("Failed to lookup discriminator value `{0}` for ShapeOrNull. Possible values: Quadrilateral Triangle", discriminatorValue)); + break; + } + + int match = 0; + List matchedTypes = new List(); + + try + { + newShapeOrNull = new ShapeOrNull(JsonConvert.DeserializeObject(jsonString, ShapeOrNull.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newShapeOrNull.GetType().GetProperty("AdditionalProperties") == null) + { + newShapeOrNull = new ShapeOrNull(JsonConvert.DeserializeObject(jsonString, ShapeOrNull.SerializerSettings)); + } + matchedTypes.Add("Quadrilateral"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(String.Format("Failed to deserialize `{0}` into Quadrilateral: {1}", jsonString, exception.ToString())); + } + + try + { + newShapeOrNull = new ShapeOrNull(JsonConvert.DeserializeObject(jsonString, ShapeOrNull.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newShapeOrNull.GetType().GetProperty("AdditionalProperties") == null) + { + newShapeOrNull = new ShapeOrNull(JsonConvert.DeserializeObject(jsonString, ShapeOrNull.SerializerSettings)); + } + matchedTypes.Add("Triangle"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(String.Format("Failed to deserialize `{0}` into Triangle: {1}", jsonString, exception.ToString())); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); + } + else if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newShapeOrNull; + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as ShapeOrNull).AreEqual; + } + + /// + /// Returns true if ShapeOrNull instances are equal + /// + /// Instance of ShapeOrNull to be compared + /// Boolean + public bool Equals(ShapeOrNull input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ActualInstance != null) + hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// Custom JSON converter for ShapeOrNull + /// + public class ShapeOrNullJsonConverter : JsonConverter + { + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// JSON Serializer + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteRawValue((String)(typeof(ShapeOrNull).GetMethod("ToJson").Invoke(value, null))); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type + /// Existing value + /// JSON Serializer + /// The object converted from the JSON string + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + if(reader.TokenType != JsonToken.Null) + { + return ShapeOrNull.FromJson(JObject.Load(reader).ToString(Formatting.None)); + } + return null; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return false; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs new file mode 100644 index 00000000000..5280a0c308a --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -0,0 +1,149 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// SimpleQuadrilateral + /// + [DataContract(Name = "SimpleQuadrilateral")] + public partial class SimpleQuadrilateral : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SimpleQuadrilateral() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// shapeType (required). + /// quadrilateralType (required). + public SimpleQuadrilateral(string shapeType = default(string), string quadrilateralType = default(string)) + { + // to ensure "shapeType" is required (not null) + this.ShapeType = shapeType ?? throw new ArgumentNullException("shapeType is a required property for SimpleQuadrilateral and cannot be null"); + // to ensure "quadrilateralType" is required (not null) + this.QuadrilateralType = quadrilateralType ?? throw new ArgumentNullException("quadrilateralType is a required property for SimpleQuadrilateral and cannot be null"); + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets ShapeType + /// + [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] + public string ShapeType { get; set; } + + /// + /// Gets or Sets QuadrilateralType + /// + [DataMember(Name = "quadrilateralType", IsRequired = true, EmitDefaultValue = false)] + public string QuadrilateralType { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SimpleQuadrilateral {\n"); + sb.Append(" ShapeType: ").Append(ShapeType).Append("\n"); + sb.Append(" QuadrilateralType: ").Append(QuadrilateralType).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as SimpleQuadrilateral).AreEqual; + } + + /// + /// Returns true if SimpleQuadrilateral instances are equal + /// + /// Instance of SimpleQuadrilateral to be compared + /// Boolean + public bool Equals(SimpleQuadrilateral input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ShapeType != null) + hashCode = hashCode * 59 + this.ShapeType.GetHashCode(); + if (this.QuadrilateralType != null) + hashCode = hashCode * 59 + this.QuadrilateralType.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/SpecialModelName.cs new file mode 100644 index 00000000000..f7199da4c03 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -0,0 +1,127 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// SpecialModelName + /// + [DataContract(Name = "_special_model.name_")] + public partial class SpecialModelName : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// specialPropertyName. + public SpecialModelName(long specialPropertyName = default(long)) + { + this.SpecialPropertyName = specialPropertyName; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets SpecialPropertyName + /// + [DataMember(Name = "$special[property.name]", EmitDefaultValue = false)] + public long SpecialPropertyName { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SpecialModelName {\n"); + sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as SpecialModelName).AreEqual; + } + + /// + /// Returns true if SpecialModelName instances are equal + /// + /// Instance of SpecialModelName to be compared + /// Boolean + public bool Equals(SpecialModelName input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = hashCode * 59 + this.SpecialPropertyName.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Tag.cs index 1142ff9557e..aba43e338be 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Tag.cs @@ -1,7 +1,7 @@ /* * OpenAPI Petstore * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git @@ -27,7 +27,7 @@ using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model { /// - /// A tag for a pet + /// Tag /// [DataContract(Name = "Tag")] public partial class Tag : IEquatable, IValidatableObject diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Triangle.cs new file mode 100644 index 00000000000..efe1b348399 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Triangle.cs @@ -0,0 +1,362 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; +using System.Reflection; + +namespace Org.OpenAPITools.Model +{ + /// + /// Triangle + /// + [JsonConverter(typeof(TriangleJsonConverter))] + [DataContract(Name = "Triangle")] + public partial class Triangle : AbstractOpenAPISchema, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of EquilateralTriangle. + public Triangle(EquilateralTriangle actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of IsoscelesTriangle. + public Triangle(IsoscelesTriangle actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ScaleneTriangle. + public Triangle(ScaleneTriangle actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(EquilateralTriangle)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(IsoscelesTriangle)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ScaleneTriangle)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: EquilateralTriangle, IsoscelesTriangle, ScaleneTriangle"); + } + } + } + + /// + /// Get the actual instance of `EquilateralTriangle`. If the actual instanct is not `EquilateralTriangle`, + /// the InvalidClassException will be thrown + /// + /// An instance of EquilateralTriangle + public EquilateralTriangle GetEquilateralTriangle() + { + return (EquilateralTriangle)this.ActualInstance; + } + + /// + /// Get the actual instance of `IsoscelesTriangle`. If the actual instanct is not `IsoscelesTriangle`, + /// the InvalidClassException will be thrown + /// + /// An instance of IsoscelesTriangle + public IsoscelesTriangle GetIsoscelesTriangle() + { + return (IsoscelesTriangle)this.ActualInstance; + } + + /// + /// Get the actual instance of `ScaleneTriangle`. If the actual instanct is not `ScaleneTriangle`, + /// the InvalidClassException will be thrown + /// + /// An instance of ScaleneTriangle + public ScaleneTriangle GetScaleneTriangle() + { + return (ScaleneTriangle)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Triangle {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this.ActualInstance, Triangle.SerializerSettings); + } + + /// + /// Converts the JSON string into an instance of Triangle + /// + /// JSON string + /// An instance of Triangle + public static Triangle FromJson(string jsonString) + { + Triangle newTriangle = null; + + if (jsonString == null) + { + return newTriangle; + } + + string discriminatorValue = JObject.Parse(jsonString)["triangleType"].ToString(); + switch (discriminatorValue) + { + case "EquilateralTriangle": + newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newTriangle.GetType().GetProperty("AdditionalProperties") == null) + { + newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.SerializerSettings)); + } + return newTriangle; + case "IsoscelesTriangle": + newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newTriangle.GetType().GetProperty("AdditionalProperties") == null) + { + newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.SerializerSettings)); + } + return newTriangle; + case "ScaleneTriangle": + newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newTriangle.GetType().GetProperty("AdditionalProperties") == null) + { + newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.SerializerSettings)); + } + return newTriangle; + default: + System.Diagnostics.Debug.WriteLine(String.Format("Failed to lookup discriminator value `{0}` for Triangle. Possible values: EquilateralTriangle IsoscelesTriangle ScaleneTriangle", discriminatorValue)); + break; + } + + int match = 0; + List matchedTypes = new List(); + + try + { + newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newTriangle.GetType().GetProperty("AdditionalProperties") == null) + { + newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.SerializerSettings)); + } + matchedTypes.Add("EquilateralTriangle"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(String.Format("Failed to deserialize `{0}` into EquilateralTriangle: {1}", jsonString, exception.ToString())); + } + + try + { + newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newTriangle.GetType().GetProperty("AdditionalProperties") == null) + { + newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.SerializerSettings)); + } + matchedTypes.Add("IsoscelesTriangle"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(String.Format("Failed to deserialize `{0}` into IsoscelesTriangle: {1}", jsonString, exception.ToString())); + } + + try + { + newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.AdditionalPropertiesSerializerSettings)); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (newTriangle.GetType().GetProperty("AdditionalProperties") == null) + { + newTriangle = new Triangle(JsonConvert.DeserializeObject(jsonString, Triangle.SerializerSettings)); + } + matchedTypes.Add("ScaleneTriangle"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(String.Format("Failed to deserialize `{0}` into ScaleneTriangle: {1}", jsonString, exception.ToString())); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); + } + else if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newTriangle; + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as Triangle).AreEqual; + } + + /// + /// Returns true if Triangle instances are equal + /// + /// Instance of Triangle to be compared + /// Boolean + public bool Equals(Triangle input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ActualInstance != null) + hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// Custom JSON converter for Triangle + /// + public class TriangleJsonConverter : JsonConverter + { + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// JSON Serializer + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteRawValue((String)(typeof(Triangle).GetMethod("ToJson").Invoke(value, null))); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type + /// Existing value + /// JSON Serializer + /// The object converted from the JSON string + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + if(reader.TokenType != JsonToken.Null) + { + return Triangle.FromJson(JObject.Load(reader).ToString(Formatting.None)); + } + return null; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return false; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/TriangleInterface.cs new file mode 100644 index 00000000000..4b7274465ce --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -0,0 +1,137 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// TriangleInterface + /// + [DataContract(Name = "TriangleInterface")] + public partial class TriangleInterface : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TriangleInterface() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// triangleType (required). + public TriangleInterface(string triangleType = default(string)) + { + // to ensure "triangleType" is required (not null) + this.TriangleType = triangleType ?? throw new ArgumentNullException("triangleType is a required property for TriangleInterface and cannot be null"); + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets TriangleType + /// + [DataMember(Name = "triangleType", IsRequired = true, EmitDefaultValue = false)] + public string TriangleType { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class TriangleInterface {\n"); + sb.Append(" TriangleType: ").Append(TriangleType).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as TriangleInterface).AreEqual; + } + + /// + /// Returns true if TriangleInterface instances are equal + /// + /// Instance of TriangleInterface to be compared + /// Boolean + public bool Equals(TriangleInterface input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.TriangleType != null) + hashCode = hashCode * 59 + this.TriangleType.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/User.cs index 94910923572..ea24f093e14 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/User.cs @@ -1,7 +1,7 @@ /* * OpenAPI Petstore * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://github.com/openapitools/openapi-generator.git @@ -27,7 +27,7 @@ using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; namespace Org.OpenAPITools.Model { /// - /// A User who is purchasing from the pet store + /// User /// [DataContract(Name = "User")] public partial class User : IEquatable, IValidatableObject @@ -43,7 +43,11 @@ namespace Org.OpenAPITools.Model /// password. /// phone. /// User Status. - public User(long id = default(long), string username = default(string), string firstName = default(string), string lastName = default(string), string email = default(string), string password = default(string), string phone = default(string), int userStatus = default(int)) + /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value.. + /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value.. + /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389. + /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values.. + public User(long id = default(long), string username = default(string), string firstName = default(string), string lastName = default(string), string email = default(string), string password = default(string), string phone = default(string), int userStatus = default(int), Object objectWithNoDeclaredProps = default(Object), Object objectWithNoDeclaredPropsNullable = default(Object), Object anyTypeProp = default(Object), Object anyTypePropNullable = default(Object)) { this.Id = id; this.Username = username; @@ -53,6 +57,10 @@ namespace Org.OpenAPITools.Model this.Password = password; this.Phone = phone; this.UserStatus = userStatus; + this.ObjectWithNoDeclaredProps = objectWithNoDeclaredProps; + this.ObjectWithNoDeclaredPropsNullable = objectWithNoDeclaredPropsNullable; + this.AnyTypeProp = anyTypeProp; + this.AnyTypePropNullable = anyTypePropNullable; this.AdditionalProperties = new Dictionary(); } @@ -105,6 +113,34 @@ namespace Org.OpenAPITools.Model [DataMember(Name = "userStatus", EmitDefaultValue = false)] public int UserStatus { get; set; } + /// + /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. + /// + /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. + [DataMember(Name = "objectWithNoDeclaredProps", EmitDefaultValue = false)] + public Object ObjectWithNoDeclaredProps { get; set; } + + /// + /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. + /// + /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. + [DataMember(Name = "objectWithNoDeclaredPropsNullable", EmitDefaultValue = true)] + public Object ObjectWithNoDeclaredPropsNullable { get; set; } + + /// + /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 + /// + /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 + [DataMember(Name = "anyTypeProp", EmitDefaultValue = true)] + public Object AnyTypeProp { get; set; } + + /// + /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. + /// + /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. + [DataMember(Name = "anyTypePropNullable", EmitDefaultValue = true)] + public Object AnyTypePropNullable { get; set; } + /// /// Gets or Sets additional properties /// @@ -127,6 +163,10 @@ namespace Org.OpenAPITools.Model sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" Phone: ").Append(Phone).Append("\n"); sb.Append(" UserStatus: ").Append(UserStatus).Append("\n"); + sb.Append(" ObjectWithNoDeclaredProps: ").Append(ObjectWithNoDeclaredProps).Append("\n"); + sb.Append(" ObjectWithNoDeclaredPropsNullable: ").Append(ObjectWithNoDeclaredPropsNullable).Append("\n"); + sb.Append(" AnyTypeProp: ").Append(AnyTypeProp).Append("\n"); + sb.Append(" AnyTypePropNullable: ").Append(AnyTypePropNullable).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -184,6 +224,14 @@ namespace Org.OpenAPITools.Model if (this.Phone != null) hashCode = hashCode * 59 + this.Phone.GetHashCode(); hashCode = hashCode * 59 + this.UserStatus.GetHashCode(); + if (this.ObjectWithNoDeclaredProps != null) + hashCode = hashCode * 59 + this.ObjectWithNoDeclaredProps.GetHashCode(); + if (this.ObjectWithNoDeclaredPropsNullable != null) + hashCode = hashCode * 59 + this.ObjectWithNoDeclaredPropsNullable.GetHashCode(); + if (this.AnyTypeProp != null) + hashCode = hashCode * 59 + this.AnyTypeProp.GetHashCode(); + if (this.AnyTypePropNullable != null) + hashCode = hashCode * 59 + this.AnyTypePropNullable.GetHashCode(); if (this.AdditionalProperties != null) hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); return hashCode; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Whale.cs new file mode 100644 index 00000000000..fdecfefd679 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Whale.cs @@ -0,0 +1,157 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// Whale + /// + [DataContract(Name = "whale")] + public partial class Whale : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Whale() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// hasBaleen. + /// hasTeeth. + /// className (required). + public Whale(bool hasBaleen = default(bool), bool hasTeeth = default(bool), string className = default(string)) + { + // to ensure "className" is required (not null) + this.ClassName = className ?? throw new ArgumentNullException("className is a required property for Whale and cannot be null"); + this.HasBaleen = hasBaleen; + this.HasTeeth = hasTeeth; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets HasBaleen + /// + [DataMember(Name = "hasBaleen", EmitDefaultValue = false)] + public bool HasBaleen { get; set; } + + /// + /// Gets or Sets HasTeeth + /// + [DataMember(Name = "hasTeeth", EmitDefaultValue = false)] + public bool HasTeeth { get; set; } + + /// + /// Gets or Sets ClassName + /// + [DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)] + public string ClassName { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Whale {\n"); + sb.Append(" HasBaleen: ").Append(HasBaleen).Append("\n"); + sb.Append(" HasTeeth: ").Append(HasTeeth).Append("\n"); + sb.Append(" ClassName: ").Append(ClassName).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as Whale).AreEqual; + } + + /// + /// Returns true if Whale instances are equal + /// + /// Instance of Whale to be compared + /// Boolean + public bool Equals(Whale input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = hashCode * 59 + this.HasBaleen.GetHashCode(); + hashCode = hashCode * 59 + this.HasTeeth.GetHashCode(); + if (this.ClassName != null) + hashCode = hashCode * 59 + this.ClassName.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Zebra.cs new file mode 100644 index 00000000000..cd2f85fe1ac --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Zebra.cs @@ -0,0 +1,173 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; + +namespace Org.OpenAPITools.Model +{ + /// + /// Zebra + /// + [DataContract(Name = "zebra")] + public partial class Zebra : Dictionary, IEquatable, IValidatableObject + { + /// + /// Defines Type + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum TypeEnum + { + /// + /// Enum Plains for value: plains + /// + [EnumMember(Value = "plains")] + Plains = 1, + + /// + /// Enum Mountain for value: mountain + /// + [EnumMember(Value = "mountain")] + Mountain = 2, + + /// + /// Enum Grevys for value: grevys + /// + [EnumMember(Value = "grevys")] + Grevys = 3 + + } + + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = false)] + public TypeEnum? Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Zebra() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// type. + /// className (required). + public Zebra(TypeEnum? type = default(TypeEnum?), string className = default(string)) : base() + { + // to ensure "className" is required (not null) + this.ClassName = className ?? throw new ArgumentNullException("className is a required property for Zebra and cannot be null"); + this.Type = type; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets ClassName + /// + [DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)] + public string ClassName { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Zebra {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" ClassName: ").Append(ClassName).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input as Zebra).AreEqual; + } + + /// + /// Returns true if Zebra instances are equal + /// + /// Instance of Zebra to be compared + /// Boolean + public bool Equals(Zebra input) + { + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.ClassName != null) + hashCode = hashCode * 59 + this.ClassName.GetHashCode(); + if (this.AdditionalProperties != null) + hashCode = hashCode * 59 + this.AdditionalProperties.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs index 584900d1a30..ba5fdee34d1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs @@ -329,9 +329,22 @@ namespace Org.OpenAPITools.Client #if (NETCOREAPP3_0 || NETCOREAPP3_1 || NET5_0) var byteCount = 0; - if (configuration.KeyPassPhrase != null) + if (KeyPassPhrase != null) { - ecdsa.ImportEncryptedPkcs8PrivateKey(keyPassPhrase, keyBytes, out byteCount); + IntPtr unmanagedString = IntPtr.Zero; + try + { + // convert secure string to byte array + unmanagedString = Marshal.SecureStringToGlobalAllocUnicode(KeyPassPhrase); + ecdsa.ImportEncryptedPkcs8PrivateKey(Encoding.UTF8.GetBytes(Marshal.PtrToStringUni(unmanagedString)), keyBytes, out byteCount); + } + finally + { + if (unmanagedString != IntPtr.Zero) + { + Marshal.ZeroFreeBSTR(unmanagedString); + } + } } else { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs index 584900d1a30..ba5fdee34d1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs @@ -329,9 +329,22 @@ namespace Org.OpenAPITools.Client #if (NETCOREAPP3_0 || NETCOREAPP3_1 || NET5_0) var byteCount = 0; - if (configuration.KeyPassPhrase != null) + if (KeyPassPhrase != null) { - ecdsa.ImportEncryptedPkcs8PrivateKey(keyPassPhrase, keyBytes, out byteCount); + IntPtr unmanagedString = IntPtr.Zero; + try + { + // convert secure string to byte array + unmanagedString = Marshal.SecureStringToGlobalAllocUnicode(KeyPassPhrase); + ecdsa.ImportEncryptedPkcs8PrivateKey(Encoding.UTF8.GetBytes(Marshal.PtrToStringUni(unmanagedString)), keyBytes, out byteCount); + } + finally + { + if (unmanagedString != IntPtr.Zero) + { + Marshal.ZeroFreeBSTR(unmanagedString); + } + } } else { From df107e22449737373e92ec43c3f81b43bb5ad541 Mon Sep 17 00:00:00 2001 From: Reinhard-PTV <77726540+Reinhard-PTV@users.noreply.github.com> Date: Mon, 8 Feb 2021 12:25:58 +0100 Subject: [PATCH 32/44] Do not use context timezone. (#8614) --- .../src/main/resources/Java/libraries/native/ApiClient.mustache | 1 + .../src/main/java/org/openapitools/client/ApiClient.java | 1 + .../native/src/main/java/org/openapitools/client/ApiClient.java | 1 + .../native/src/main/java/org/openapitools/client/ApiClient.java | 1 + 4 files changed, 4 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache index 4fff8b5e962..d38af2abb69 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache @@ -156,6 +156,7 @@ public class ApiClient { mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + mapper.disable(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE); mapper.registerModule(new JavaTimeModule()); {{#openApiNullable}} JsonNullableModule jnm = new JsonNullableModule(); diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ApiClient.java index aac27630361..c03fab20332 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ApiClient.java @@ -165,6 +165,7 @@ public class ApiClient { mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + mapper.disable(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE); mapper.registerModule(new JavaTimeModule()); JsonNullableModule jnm = new JsonNullableModule(); mapper.registerModule(jnm); diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java index aac27630361..c03fab20332 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java @@ -165,6 +165,7 @@ public class ApiClient { mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + mapper.disable(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE); mapper.registerModule(new JavaTimeModule()); JsonNullableModule jnm = new JsonNullableModule(); mapper.registerModule(jnm); diff --git a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java b/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java index aac27630361..c03fab20332 100644 --- a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java @@ -165,6 +165,7 @@ public class ApiClient { mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + mapper.disable(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE); mapper.registerModule(new JavaTimeModule()); JsonNullableModule jnm = new JsonNullableModule(); mapper.registerModule(jnm); From 578420cfa93c98c8f590f1154a620c8f4a1b5b45 Mon Sep 17 00:00:00 2001 From: basyskom-dege <72982549+basyskom-dege@users.noreply.github.com> Date: Mon, 8 Feb 2021 13:21:53 +0100 Subject: [PATCH 33/44] Finished paramter styling(query,path,header,cookie) (#8587) --- docs/generators/cpp-qt5-client.md | 2 +- .../languages/CppQt5ClientCodegen.java | 1 + .../cpp-qt5-client/api-body.mustache | 391 +++++++++++++++++- .../cpp-qt5-client/api-header.mustache | 3 + .../petstore/cpp-qt5/client/PFXPetApi.cpp | 250 +++++++++-- .../petstore/cpp-qt5/client/PFXPetApi.h | 3 + .../petstore/cpp-qt5/client/PFXStoreApi.cpp | 94 ++++- .../petstore/cpp-qt5/client/PFXStoreApi.h | 3 + .../petstore/cpp-qt5/client/PFXUserApi.cpp | 137 +++++- .../petstore/cpp-qt5/client/PFXUserApi.h | 3 + 10 files changed, 819 insertions(+), 68 deletions(-) diff --git a/docs/generators/cpp-qt5-client.md b/docs/generators/cpp-qt5-client.md index ada59e68cea..282c674f9ed 100644 --- a/docs/generators/cpp-qt5-client.md +++ b/docs/generators/cpp-qt5-client.md @@ -206,7 +206,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |XMLStructureDefinitions|✗|OAS2,OAS3 |MultiServer|✓|OAS3 |ParameterizedServer|✓|OAS3 -|ParameterStyling|✗|OAS3 +|ParameterStyling|✓|OAS3 |Callbacks|✗|OAS3 |LinkObjects|✗|OAS3 diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java index 7a383a1e87e..bda75d399c2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java @@ -46,6 +46,7 @@ public class CppQt5ClientCodegen extends CppQt5AbstractCodegen implements Codege .includeSecurityFeatures(SecurityFeature.BasicAuth) .includeSecurityFeatures(SecurityFeature.ApiKey) .includeSecurityFeatures(SecurityFeature.BearerToken) + .includeGlobalFeatures(GlobalFeature.ParameterStyling) ); // set the output folder here diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-body.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-body.mustache index 08ae9aa8ddb..42c30bfba38 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-body.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-body.mustache @@ -139,15 +139,73 @@ void {{classname}}::abortRequests(){ emit abortRequestsSignal(); } +QString {{classname}}::getParamStylePrefix(QString style){ + + if(style == "matrix"){ + return ";"; + }else if(style == "label"){ + return "."; + }else if(style == "form"){ + return "&"; + }else if(style == "simple"){ + return ""; + }else if(style == "spaceDelimited"){ + return "&"; + }else if(style == "pipeDelimited"){ + return "&"; + }else + return "none"; +} + +QString {{classname}}::getParamStyleSuffix(QString style){ + + if(style == "matrix"){ + return "="; + }else if(style == "label"){ + return ""; + }else if(style == "form"){ + return "="; + }else if(style == "simple"){ + return ""; + }else if(style == "spaceDelimited"){ + return "="; + }else if(style == "pipeDelimited"){ + return "="; + }else + return "none"; +} + +QString {{classname}}::getParamStyleDelimiter(QString style, QString name, bool isExplode){ + + if(style == "matrix"){ + return (isExplode) ? ";" + name + "=" : ","; + + }else if(style == "label"){ + return (isExplode) ? "." : ","; + + }else if(style == "form"){ + return (isExplode) ? "&" + name + "=" : ","; + + }else if(style == "simple"){ + return ","; + }else if(style == "spaceDelimited"){ + return (isExplode) ? "&" + name + "=" : " "; + + }else if(style == "pipeDelimited"){ + return (isExplode) ? "&" + name + "=" : "|"; + + }else if(style == "deepObject"){ + return (isExplode) ? "&" : "none"; + + }else + return "none"; +} + {{#operations}} {{#operation}} void {{classname}}::{{nickname}}({{#allParams}}const {{{dataType}}} &{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) { QString fullPath = QString(_serverConfigs["{{nickname}}"][_serverIndices.value("{{nickname}}")].URL()+"{{{path}}}"); - {{#pathParams}} - QString {{paramName}}PathParam("{"); - {{paramName}}PathParam.append("{{baseName}}").append("}"); - fullPath.replace({{paramName}}PathParam, QUrl::toPercentEncoding(::{{cppNamespace}}::toStringValue({{paramName}}))); - {{/pathParams}}{{#authMethods}}{{#isApiKey}}{{#isKeyInHeader}} + {{#authMethods}}{{#isApiKey}}{{#isKeyInHeader}} if(_apiKeys.contains("{{name}}")){ addHeaders("{{name}}",_apiKeys.find("{{name}}").value()); } @@ -168,18 +226,148 @@ void {{classname}}::{{nickname}}({{#allParams}}const {{{dataType}}} &{{paramName b64.append(_username.toUtf8() + ":" + _password.toUtf8()); addHeaders("Authorization","Basic " + b64.toBase64()); }{{/isBasicBasic}}{{/authMethods}} -{{#queryParams}}{{^collectionFormat}} + {{#pathParams}} + QString {{paramName}}PathParam("{"); + {{paramName}}PathParam.append("{{baseName}}").append("}"); + QString pathPrefix, pathSuffix, pathDelimiter; + QString pathStyle = "{{style}}"; + if(pathStyle == "") + pathStyle = "simple"; + pathPrefix = getParamStylePrefix(pathStyle); + pathSuffix = getParamStyleSuffix(pathStyle); + pathDelimiter = getParamStyleDelimiter(pathStyle, "{{baseName}}", {{isExplode}}); + {{^collectionFormat}} + {{^isPrimitiveType}} + QString paramString = (pathStyle == "matrix" && {{isExplode}}) ? pathPrefix : pathPrefix+"{{baseName}}"+pathSuffix; + QJsonObject parameter = {{paramName}}.asJsonObject(); + qint32 count = 0; + foreach(const QString& key, parameter.keys()) { + if (count > 0) { + pathDelimiter = (pathStyle == "matrix" && {{isExplode}}) ? ";" : getParamStyleDelimiter(pathStyle, key, {{isExplode}}); + paramString.append(pathDelimiter); + } + QString assignOperator = ({{isExplode}}) ? "=" : ","; + switch(parameter.value(key).type()) { + case QJsonValue::String: + { + paramString.append(key+assignOperator+parameter.value(key).toString()); + break; + } + case QJsonValue::Double: + { + paramString.append(key+assignOperator+QString::number(parameter.value(key).toDouble())); + break; + } + case QJsonValue::Bool: + { + paramString.append(key+assignOperator+QVariant(parameter.value(key).toBool()).toString()); + break; + } + case QJsonValue::Array: + { + paramString.append(key+assignOperator+QVariant(parameter.value(key).toArray()).toString()); + break; + } + case QJsonValue::Object: + { + paramString.append(key+assignOperator+QVariant(parameter.value(key).toObject()).toString()); + break; + } + case QJsonValue::Null: + case QJsonValue::Undefined: + break; + } + count++; + } + fullPath.replace({{paramName}}PathParam, QUrl::toPercentEncoding(paramString)); + {{/isPrimitiveType}} + {{#isPrimitiveType}} + QString paramString = (pathStyle == "matrix") ? pathPrefix+"{{baseName}}"+pathSuffix : pathPrefix; + fullPath.replace({{paramName}}PathParam, paramString+QUrl::toPercentEncoding(::{{cppNamespace}}::toStringValue({{paramName}}))); +{{/isPrimitiveType}}{{/collectionFormat}}{{#collectionFormat}} + if ({{{paramName}}}.size() > 0) { + QString paramString = (pathStyle == "matrix") ? pathPrefix+"{{baseName}}"+pathSuffix : pathPrefix; + qint32 count = 0; + foreach ({{{baseType}}} t, {{paramName}}) { + if (count > 0) { + fullPath.append(pathDelimiter); + } + fullPath.append(QUrl::toPercentEncoding(::{{cppNamespace}}::toStringValue(t))); + count++; + } + fullPath.replace({{paramName}}PathParam, paramString); + } +{{/collectionFormat}}{{/pathParams}} + {{#hasQueryParams}} + QString queryPrefix, querySuffix, queryDelimiter, queryStyle; + {{/hasQueryParams}} +{{#queryParams}} + queryStyle = "{{style}}"; + if(queryStyle == "") + queryStyle = "form"; + queryPrefix = getParamStylePrefix(queryStyle); + querySuffix = getParamStyleSuffix(queryStyle); + queryDelimiter = getParamStyleDelimiter(queryStyle, "{{baseName}}", {{isExplode}}); +{{^collectionFormat}} if (fullPath.indexOf("?") > 0) - fullPath.append("&"); + fullPath.append(queryPrefix); else fullPath.append("?"); - fullPath.append(QUrl::toPercentEncoding("{{baseName}}")).append("=").append(QUrl::toPercentEncoding(::{{cppNamespace}}::toStringValue({{paramName}}))); -{{/collectionFormat}}{{#collectionFormat}} + {{^isPrimitiveType}} + QString paramString = (queryStyle == "form" && {{isExplode}}) ? "" : (queryStyle == "form" && !({{isExplode}})) ? "{{baseName}}"+querySuffix : ""; + QJsonObject parameter = {{paramName}}.asJsonObject(); + qint32 count = 0; + foreach(const QString& key, parameter.keys()) { + if (count > 0) { + queryDelimiter = ((queryStyle == "form" || queryStyle == "deepObject") && {{isExplode}}) ? "&" : getParamStyleDelimiter(queryStyle, key, {{isExplode}}); + paramString.append(queryDelimiter); + } + QString assignOperator; + if (queryStyle == "form") + assignOperator = ({{isExplode}}) ? "=" : ","; + else if (queryStyle == "deepObject") + assignOperator = ({{isExplode}}) ? "=" : "none"; + switch(parameter.value(key).type()) { + case QJsonValue::String: + { + paramString.append(((queryStyle == "form") ? key : QString("{{baseName}}").append("[").append(key).append("]"))+assignOperator+parameter.value(key).toString()); + break; + } + case QJsonValue::Double: + { + paramString.append(((queryStyle == "form") ? key : QString("{{baseName}}").append("[").append(key).append("]"))+assignOperator+QString::number(parameter.value(key).toDouble())); + break; + } + case QJsonValue::Bool: + { + paramString.append(((queryStyle == "form") ? key : QString("{{baseName}}").append("[").append(key).append("]"))+assignOperator+QVariant(parameter.value(key).toBool()).toString()); + break; + } + case QJsonValue::Array: + { + paramString.append(((queryStyle == "form") ? key : QString("{{baseName}}").append("[").append(key).append("]"))+assignOperator+QVariant(parameter.value(key).toArray()).toString()); + break; + } + case QJsonValue::Object: + { + paramString.append(((queryStyle == "form") ? key : QString("{{baseName}}").append("[").append(key).append("]"))+assignOperator+QVariant(parameter.value(key).toObject()).toString()); + break; + } + case QJsonValue::Null: + case QJsonValue::Undefined: + break; + } + count++; + } + fullPath.append(paramString); + {{/isPrimitiveType}}{{#isPrimitiveType}} + fullPath.append(QUrl::toPercentEncoding("{{baseName}}")).append(querySuffix).append(QUrl::toPercentEncoding(::{{cppNamespace}}::toStringValue({{paramName}}))); +{{/isPrimitiveType}}{{/collectionFormat}}{{#collectionFormat}} if ({{{paramName}}}.size() > 0) { if (QString("{{collectionFormat}}").indexOf("multi") == 0) { foreach ({{{baseType}}} t, {{paramName}}) { if (fullPath.indexOf("?") > 0) - fullPath.append("&"); + fullPath.append(queryPrefix); else fullPath.append("?"); fullPath.append("{{{baseName}}}=").append(::{{cppNamespace}}::toStringValue(t)); @@ -188,28 +376,67 @@ void {{classname}}::{{nickname}}({{#allParams}}const {{{dataType}}} &{{paramName if (fullPath.indexOf("?") > 0) fullPath.append("&"); else - fullPath.append("?"); - fullPath.append("{{baseName}}="); + fullPath.append("?").append(queryPrefix).append("{{baseName}}").append(querySuffix); qint32 count = 0; foreach ({{{baseType}}} t, {{paramName}}) { if (count > 0) { - fullPath.append(" "); + fullPath.append(({{isExplode}})? queryDelimiter : QUrl::toPercentEncoding(queryDelimiter)); } fullPath.append(::{{cppNamespace}}::toStringValue(t)); + count++; } } else if (QString("{{collectionFormat}}").indexOf("tsv") == 0) { if (fullPath.indexOf("?") > 0) fullPath.append("&"); else - fullPath.append("?"); - fullPath.append("{{baseName}}="); + fullPath.append("?").append(queryPrefix).append("{{baseName}}").append(querySuffix); qint32 count = 0; foreach ({{{baseType}}} t, {{paramName}}) { if (count > 0) { fullPath.append("\t"); } fullPath.append(::{{cppNamespace}}::toStringValue(t)); + count++; } + } else if (QString("{{collectionFormat}}").indexOf("csv") == 0) { + if (fullPath.indexOf("?") > 0) + fullPath.append("&"); + else + fullPath.append("?").append(queryPrefix).append("{{baseName}}").append(querySuffix); + qint32 count = 0; + foreach ({{{baseType}}} t, {{paramName}}) { + if (count > 0) { + fullPath.append(queryDelimiter); + } + fullPath.append(::{{cppNamespace}}::toStringValue(t)); + count++; + } + } else if (QString("{{collectionFormat}}").indexOf("pipes") == 0) { + if (fullPath.indexOf("?") > 0) + fullPath.append("&"); + else + fullPath.append("?").append(queryPrefix).append("{{baseName}}").append(querySuffix); + qint32 count = 0; + foreach ({{{baseType}}} t, {{paramName}}) { + if (count > 0) { + fullPath.append(queryDelimiter); + } + fullPath.append(::{{cppNamespace}}::toStringValue(t)); + count++; + } + } else if (QString("{{collectionFormat}}").indexOf("deepObject") == 0) { + if (fullPath.indexOf("?") > 0) + fullPath.append("&"); + else + fullPath.append("?").append(queryPrefix).append("{{baseName}}").append(querySuffix); + qint32 count = 0; + foreach ({{{baseType}}} t, {{paramName}}) { + if (count > 0) { + fullPath.append(queryDelimiter); + } + fullPath.append(::{{cppNamespace}}::toStringValue(t)); + count++; + } } } {{/collectionFormat}}{{/queryParams}} @@ -219,7 +446,18 @@ void {{classname}}::{{nickname}}({{#allParams}}const {{{dataType}}} &{{paramName worker->setResponseCompressionEnabled(isResponseCompressionEnabled); worker->setRequestCompressionEnabled(isRequestCompressionEnabled);{{/contentCompression}} {{prefix}}HttpRequestInput input(fullPath, "{{httpMethod}}"); -{{#formParams}}{{^isFile}} + +{{#formParams}} + {{#first}} + QString formPrefix,formSuffix, formDelimiter; + QString formStyle = "{{style}}"; + if(formStyle == "") + formStyle = "form"; + formPrefix = getParamStylePrefix(formStyle); + formSuffix = getParamStyleSuffix(formStyle); + formDelimiter = getParamStyleDelimiter(formStyle, "{{baseName}}", {{isExplode}}); + {{/first}} +{{^isFile}} input.add_var("{{baseName}}", ::{{cppNamespace}}::toStringValue({{paramName}}));{{/isFile}}{{#isFile}} input.add_file("{{baseName}}", {{paramName}}.local_filename, {{paramName}}.request_filename, {{paramName}}.mime_type);{{/isFile}}{{/formParams}}{{#bodyParams}}{{#isContainer}}{{#isArray}} QJsonDocument doc(::{{cppNamespace}}::toJsonValue({{paramName}}).toArray());{{/isArray}}{{#isMap}} @@ -232,11 +470,130 @@ void {{classname}}::{{nickname}}({{#allParams}}const {{{dataType}}} &{{paramName QByteArray output = {{paramName}}.asByteArray();{{/isFile}} input.request_body.append(output); {{/isContainer}}{{/bodyParams}}{{#headerParams}} +{{^collectionFormat}}{{^isPrimitiveType}} + QString headerString; + QJsonObject parameter = {{paramName}}.asJsonObject(); + qint32 count = 0; + foreach(const QString& key, parameter.keys()) { + if (count > 0) { + headerString.append(","); + } + QString assignOperator = ({{isExplode}}) ? "=" : ","; + switch(parameter.value(key).type()) { + case QJsonValue::String: + { + headerString.append(key+assignOperator+parameter.value(key).toString()); + break; + } + case QJsonValue::Double: + { + headerString.append(key+assignOperator+QString::number(parameter.value(key).toDouble())); + break; + } + case QJsonValue::Bool: + { + headerString.append(key+assignOperator+QVariant(parameter.value(key).toBool()).toString()); + break; + } + case QJsonValue::Array: + { + headerString.append(key+assignOperator+QVariant(parameter.value(key).toArray()).toString()); + break; + } + case QJsonValue::Object: + { + headerString.append(key+assignOperator+QVariant(parameter.value(key).toObject()).toString()); + break; + } + case QJsonValue::Null: + case QJsonValue::Undefined: + break; + } + count++; + } + input.headers.insert("{{baseName}}", headerString); +{{/isPrimitiveType}}{{#isPrimitiveType}} if (!::{{cppNamespace}}::toStringValue({{paramName}}).isEmpty()) { input.headers.insert("{{baseName}}", ::{{cppNamespace}}::toStringValue({{paramName}})); } +{{/isPrimitiveType}}{{/collectionFormat}}{{#collectionFormat}} + QString headerString; + if ({{{paramName}}}.size() > 0) { + qint32 count = 0; + foreach ({{{baseType}}} t, {{paramName}}) { + if (count > 0) { + headerString.append(","); + } + headerString.append(::{{cppNamespace}}::toStringValue(t)); + count++; + } + input.headers.insert("{{baseName}}", headerString); + } +{{/collectionFormat}} {{/headerParams}} - +{{#cookieParams}} +if(QString("{{style}}").indexOf("form") == 0){ +{{^collectionFormat}}{{^isPrimitiveType}}{{^isExplode}} + QString cookieString = "{{baseName}}="; + QJsonObject parameter = {{paramName}}.asJsonObject(); + qint32 count = 0; + foreach(const QString& key, parameter.keys()) { + if (count > 0) { + cookieString.append(","); + } + switch(parameter.value(key).type()) { + case QJsonValue::String: + { + cookieString.append(key+","+parameter.value(key).toString()); + break; + } + case QJsonValue::Double: + { + cookieString.append(key+","+QString::number(parameter.value(key).toDouble())); + break; + } + case QJsonValue::Bool: + { + cookieString.append(key+","+QVariant(parameter.value(key).toBool()).toString()); + break; + } + case QJsonValue::Array: + { + cookieString.append(key+","+QVariant(parameter.value(key).toArray()).toString()); + break; + } + case QJsonValue::Object: + { + cookieString.append(key+","+QVariant(parameter.value(key).toObject()).toString()); + break; + } + case QJsonValue::Null: + case QJsonValue::Undefined: + break; + } + count++; + } + input.headers.insert("Cookie", cookieString); +{{/isExplode}}{{/isPrimitiveType}}{{#isPrimitiveType}} + if (!::{{cppNamespace}}::toStringValue({{paramName}}).isEmpty()) { + input.headers.insert("Cookie", "{{baseName}}="+::{{cppNamespace}}::toStringValue({{paramName}})); + } +{{/isPrimitiveType}}{{/collectionFormat}}{{#collectionFormat}}{{^isExplode}} + QString cookieString = "{{baseName}}="; + if ({{{paramName}}}.size() > 0) { + qint32 count = 0; + foreach ({{{baseType}}} t, {{paramName}}) { + if (count > 0) { + cookieString.append(","); + } + cookieString.append(::{{cppNamespace}}::toStringValue(t)); + count++; + } + input.headers.insert("Cookie", cookieString); + } +{{/isExplode}}{{/collectionFormat}} +} +{{/cookieParams}} foreach (QString key, this->defaultHeaders.keys()) { input.headers.insert(key, this->defaultHeaders.value(key)); } connect(worker, &{{prefix}}HttpRequestWorker::on_execution_finished, this, &{{classname}}::{{nickname}}Callback); diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-header.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-header.mustache index f802c2015da..2a8b5e0f8b1 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt5-client/api-header.mustache @@ -43,6 +43,9 @@ public: void enableRequestCompression(); void enableResponseCompression(); void abortRequests(); + QString getParamStylePrefix(QString style); + QString getParamStyleSuffix(QString style); + QString getParamStyleDelimiter(QString style, QString name, bool isExplode); {{#operations}}{{#operation}} void {{nickname}}({{#allParams}}const {{{dataType}}} &{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/operation}}{{/operations}} diff --git a/samples/client/petstore/cpp-qt5/client/PFXPetApi.cpp b/samples/client/petstore/cpp-qt5/client/PFXPetApi.cpp index 14e5285627b..fa389e1c4dd 100644 --- a/samples/client/petstore/cpp-qt5/client/PFXPetApi.cpp +++ b/samples/client/petstore/cpp-qt5/client/PFXPetApi.cpp @@ -145,8 +145,71 @@ void PFXPetApi::abortRequests(){ emit abortRequestsSignal(); } +QString PFXPetApi::getParamStylePrefix(QString style){ + + if(style == "matrix"){ + return ";"; + }else if(style == "label"){ + return "."; + }else if(style == "form"){ + return "&"; + }else if(style == "simple"){ + return ""; + }else if(style == "spaceDelimited"){ + return "&"; + }else if(style == "pipeDelimited"){ + return "&"; + }else + return "none"; +} + +QString PFXPetApi::getParamStyleSuffix(QString style){ + + if(style == "matrix"){ + return "="; + }else if(style == "label"){ + return ""; + }else if(style == "form"){ + return "="; + }else if(style == "simple"){ + return ""; + }else if(style == "spaceDelimited"){ + return "="; + }else if(style == "pipeDelimited"){ + return "="; + }else + return "none"; +} + +QString PFXPetApi::getParamStyleDelimiter(QString style, QString name, bool isExplode){ + + if(style == "matrix"){ + return (isExplode) ? ";" + name + "=" : ","; + + }else if(style == "label"){ + return (isExplode) ? "." : ","; + + }else if(style == "form"){ + return (isExplode) ? "&" + name + "=" : ","; + + }else if(style == "simple"){ + return ","; + }else if(style == "spaceDelimited"){ + return (isExplode) ? "&" + name + "=" : " "; + + }else if(style == "pipeDelimited"){ + return (isExplode) ? "&" + name + "=" : "|"; + + }else if(style == "deepObject"){ + return (isExplode) ? "&" : "none"; + + }else + return "none"; +} + void PFXPetApi::addPet(const PFXPet &body) { QString fullPath = QString(_serverConfigs["addPet"][_serverIndices.value("addPet")].URL()+"/pet"); + PFXHttpRequestWorker *worker = new PFXHttpRequestWorker(this, _manager); @@ -154,9 +217,9 @@ void PFXPetApi::addPet(const PFXPet &body) { worker->setWorkingDirectory(_workingDirectory); PFXHttpRequestInput input(fullPath, "POST"); + QByteArray output = body.asJson().toUtf8(); input.request_body.append(output); - foreach (QString key, this->defaultHeaders.keys()) { input.headers.insert(key, this->defaultHeaders.value(key)); } connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::addPetCallback); @@ -188,20 +251,30 @@ void PFXPetApi::addPetCallback(PFXHttpRequestWorker *worker) { void PFXPetApi::deletePet(const qint64 &pet_id, const QString &api_key) { QString fullPath = QString(_serverConfigs["deletePet"][_serverIndices.value("deletePet")].URL()+"/pet/{petId}"); + QString pet_idPathParam("{"); pet_idPathParam.append("petId").append("}"); - fullPath.replace(pet_idPathParam, QUrl::toPercentEncoding(::test_namespace::toStringValue(pet_id))); - + QString pathPrefix, pathSuffix, pathDelimiter; + QString pathStyle = ""; + if(pathStyle == "") + pathStyle = "simple"; + pathPrefix = getParamStylePrefix(pathStyle); + pathSuffix = getParamStyleSuffix(pathStyle); + pathDelimiter = getParamStyleDelimiter(pathStyle, "petId", false); + QString paramString = (pathStyle == "matrix") ? pathPrefix+"petId"+pathSuffix : pathPrefix; + fullPath.replace(pet_idPathParam, paramString+QUrl::toPercentEncoding(::test_namespace::toStringValue(pet_id))); + PFXHttpRequestWorker *worker = new PFXHttpRequestWorker(this, _manager); worker->setTimeOut(_timeOut); worker->setWorkingDirectory(_workingDirectory); PFXHttpRequestInput input(fullPath, "DELETE"); + + if (!::test_namespace::toStringValue(api_key).isEmpty()) { input.headers.insert("api_key", ::test_namespace::toStringValue(api_key)); } - foreach (QString key, this->defaultHeaders.keys()) { input.headers.insert(key, this->defaultHeaders.value(key)); } connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::deletePetCallback); @@ -233,13 +306,21 @@ void PFXPetApi::deletePetCallback(PFXHttpRequestWorker *worker) { void PFXPetApi::findPetsByStatus(const QList &status) { QString fullPath = QString(_serverConfigs["findPetsByStatus"][_serverIndices.value("findPetsByStatus")].URL()+"/pet/findByStatus"); + + QString queryPrefix, querySuffix, queryDelimiter, queryStyle; + queryStyle = "form"; + if(queryStyle == "") + queryStyle = "form"; + queryPrefix = getParamStylePrefix(queryStyle); + querySuffix = getParamStyleSuffix(queryStyle); + queryDelimiter = getParamStyleDelimiter(queryStyle, "status", false); if (status.size() > 0) { if (QString("csv").indexOf("multi") == 0) { foreach (QString t, status) { if (fullPath.indexOf("?") > 0) - fullPath.append("&"); + fullPath.append(queryPrefix); else fullPath.append("?"); fullPath.append("status=").append(::test_namespace::toStringValue(t)); @@ -248,28 +329,67 @@ void PFXPetApi::findPetsByStatus(const QList &status) { if (fullPath.indexOf("?") > 0) fullPath.append("&"); else - fullPath.append("?"); - fullPath.append("status="); + fullPath.append("?").append(queryPrefix).append("status").append(querySuffix); qint32 count = 0; foreach (QString t, status) { if (count > 0) { - fullPath.append(" "); + fullPath.append((false)? queryDelimiter : QUrl::toPercentEncoding(queryDelimiter)); } fullPath.append(::test_namespace::toStringValue(t)); + count++; } } else if (QString("csv").indexOf("tsv") == 0) { if (fullPath.indexOf("?") > 0) fullPath.append("&"); else - fullPath.append("?"); - fullPath.append("status="); + fullPath.append("?").append(queryPrefix).append("status").append(querySuffix); qint32 count = 0; foreach (QString t, status) { if (count > 0) { fullPath.append("\t"); } fullPath.append(::test_namespace::toStringValue(t)); + count++; } + } else if (QString("csv").indexOf("csv") == 0) { + if (fullPath.indexOf("?") > 0) + fullPath.append("&"); + else + fullPath.append("?").append(queryPrefix).append("status").append(querySuffix); + qint32 count = 0; + foreach (QString t, status) { + if (count > 0) { + fullPath.append(queryDelimiter); + } + fullPath.append(::test_namespace::toStringValue(t)); + count++; + } + } else if (QString("csv").indexOf("pipes") == 0) { + if (fullPath.indexOf("?") > 0) + fullPath.append("&"); + else + fullPath.append("?").append(queryPrefix).append("status").append(querySuffix); + qint32 count = 0; + foreach (QString t, status) { + if (count > 0) { + fullPath.append(queryDelimiter); + } + fullPath.append(::test_namespace::toStringValue(t)); + count++; + } + } else if (QString("csv").indexOf("deepObject") == 0) { + if (fullPath.indexOf("?") > 0) + fullPath.append("&"); + else + fullPath.append("?").append(queryPrefix).append("status").append(querySuffix); + qint32 count = 0; + foreach (QString t, status) { + if (count > 0) { + fullPath.append(queryDelimiter); + } + fullPath.append(::test_namespace::toStringValue(t)); + count++; + } } } @@ -319,13 +439,21 @@ void PFXPetApi::findPetsByStatusCallback(PFXHttpRequestWorker *worker) { void PFXPetApi::findPetsByTags(const QList &tags) { QString fullPath = QString(_serverConfigs["findPetsByTags"][_serverIndices.value("findPetsByTags")].URL()+"/pet/findByTags"); + + QString queryPrefix, querySuffix, queryDelimiter, queryStyle; + queryStyle = "form"; + if(queryStyle == "") + queryStyle = "form"; + queryPrefix = getParamStylePrefix(queryStyle); + querySuffix = getParamStyleSuffix(queryStyle); + queryDelimiter = getParamStyleDelimiter(queryStyle, "tags", false); if (tags.size() > 0) { if (QString("csv").indexOf("multi") == 0) { foreach (QString t, tags) { if (fullPath.indexOf("?") > 0) - fullPath.append("&"); + fullPath.append(queryPrefix); else fullPath.append("?"); fullPath.append("tags=").append(::test_namespace::toStringValue(t)); @@ -334,28 +462,67 @@ void PFXPetApi::findPetsByTags(const QList &tags) { if (fullPath.indexOf("?") > 0) fullPath.append("&"); else - fullPath.append("?"); - fullPath.append("tags="); + fullPath.append("?").append(queryPrefix).append("tags").append(querySuffix); qint32 count = 0; foreach (QString t, tags) { if (count > 0) { - fullPath.append(" "); + fullPath.append((false)? queryDelimiter : QUrl::toPercentEncoding(queryDelimiter)); } fullPath.append(::test_namespace::toStringValue(t)); + count++; } } else if (QString("csv").indexOf("tsv") == 0) { if (fullPath.indexOf("?") > 0) fullPath.append("&"); else - fullPath.append("?"); - fullPath.append("tags="); + fullPath.append("?").append(queryPrefix).append("tags").append(querySuffix); qint32 count = 0; foreach (QString t, tags) { if (count > 0) { fullPath.append("\t"); } fullPath.append(::test_namespace::toStringValue(t)); + count++; } + } else if (QString("csv").indexOf("csv") == 0) { + if (fullPath.indexOf("?") > 0) + fullPath.append("&"); + else + fullPath.append("?").append(queryPrefix).append("tags").append(querySuffix); + qint32 count = 0; + foreach (QString t, tags) { + if (count > 0) { + fullPath.append(queryDelimiter); + } + fullPath.append(::test_namespace::toStringValue(t)); + count++; + } + } else if (QString("csv").indexOf("pipes") == 0) { + if (fullPath.indexOf("?") > 0) + fullPath.append("&"); + else + fullPath.append("?").append(queryPrefix).append("tags").append(querySuffix); + qint32 count = 0; + foreach (QString t, tags) { + if (count > 0) { + fullPath.append(queryDelimiter); + } + fullPath.append(::test_namespace::toStringValue(t)); + count++; + } + } else if (QString("csv").indexOf("deepObject") == 0) { + if (fullPath.indexOf("?") > 0) + fullPath.append("&"); + else + fullPath.append("?").append(queryPrefix).append("tags").append(querySuffix); + qint32 count = 0; + foreach (QString t, tags) { + if (count > 0) { + fullPath.append(queryDelimiter); + } + fullPath.append(::test_namespace::toStringValue(t)); + count++; + } } } @@ -405,14 +572,23 @@ void PFXPetApi::findPetsByTagsCallback(PFXHttpRequestWorker *worker) { void PFXPetApi::getPetById(const qint64 &pet_id) { QString fullPath = QString(_serverConfigs["getPetById"][_serverIndices.value("getPetById")].URL()+"/pet/{petId}"); - QString pet_idPathParam("{"); - pet_idPathParam.append("petId").append("}"); - fullPath.replace(pet_idPathParam, QUrl::toPercentEncoding(::test_namespace::toStringValue(pet_id))); if(_apiKeys.contains("api_key")){ addHeaders("api_key",_apiKeys.find("api_key").value()); } + QString pet_idPathParam("{"); + pet_idPathParam.append("petId").append("}"); + QString pathPrefix, pathSuffix, pathDelimiter; + QString pathStyle = ""; + if(pathStyle == "") + pathStyle = "simple"; + pathPrefix = getParamStylePrefix(pathStyle); + pathSuffix = getParamStyleSuffix(pathStyle); + pathDelimiter = getParamStyleDelimiter(pathStyle, "petId", false); + QString paramString = (pathStyle == "matrix") ? pathPrefix+"petId"+pathSuffix : pathPrefix; + fullPath.replace(pet_idPathParam, paramString+QUrl::toPercentEncoding(::test_namespace::toStringValue(pet_id))); + PFXHttpRequestWorker *worker = new PFXHttpRequestWorker(this, _manager); worker->setTimeOut(_timeOut); @@ -451,6 +627,7 @@ void PFXPetApi::getPetByIdCallback(PFXHttpRequestWorker *worker) { void PFXPetApi::updatePet(const PFXPet &body) { QString fullPath = QString(_serverConfigs["updatePet"][_serverIndices.value("updatePet")].URL()+"/pet"); + PFXHttpRequestWorker *worker = new PFXHttpRequestWorker(this, _manager); @@ -458,9 +635,9 @@ void PFXPetApi::updatePet(const PFXPet &body) { worker->setWorkingDirectory(_workingDirectory); PFXHttpRequestInput input(fullPath, "PUT"); + QByteArray output = body.asJson().toUtf8(); input.request_body.append(output); - foreach (QString key, this->defaultHeaders.keys()) { input.headers.insert(key, this->defaultHeaders.value(key)); } connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::updatePetCallback); @@ -492,19 +669,26 @@ void PFXPetApi::updatePetCallback(PFXHttpRequestWorker *worker) { void PFXPetApi::updatePetWithForm(const qint64 &pet_id, const QString &name, const QString &status) { QString fullPath = QString(_serverConfigs["updatePetWithForm"][_serverIndices.value("updatePetWithForm")].URL()+"/pet/{petId}"); + QString pet_idPathParam("{"); pet_idPathParam.append("petId").append("}"); - fullPath.replace(pet_idPathParam, QUrl::toPercentEncoding(::test_namespace::toStringValue(pet_id))); - + QString pathPrefix, pathSuffix, pathDelimiter; + QString pathStyle = ""; + if(pathStyle == "") + pathStyle = "simple"; + pathPrefix = getParamStylePrefix(pathStyle); + pathSuffix = getParamStyleSuffix(pathStyle); + pathDelimiter = getParamStyleDelimiter(pathStyle, "petId", false); + QString paramString = (pathStyle == "matrix") ? pathPrefix+"petId"+pathSuffix : pathPrefix; + fullPath.replace(pet_idPathParam, paramString+QUrl::toPercentEncoding(::test_namespace::toStringValue(pet_id))); + PFXHttpRequestWorker *worker = new PFXHttpRequestWorker(this, _manager); worker->setTimeOut(_timeOut); worker->setWorkingDirectory(_workingDirectory); PFXHttpRequestInput input(fullPath, "POST"); - input.add_var("name", ::test_namespace::toStringValue(name)); - input.add_var("status", ::test_namespace::toStringValue(status)); - foreach (QString key, this->defaultHeaders.keys()) { input.headers.insert(key, this->defaultHeaders.value(key)); } + input.add_var("name", ::test_namespace::toStringValue(name)); input.add_var("status", ::test_namespace::toStringValue(status)); foreach (QString key, this->defaultHeaders.keys()) { input.headers.insert(key, this->defaultHeaders.value(key)); } connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::updatePetWithFormCallback); connect(this, &PFXPetApi::abortRequestsSignal, worker, &QObject::deleteLater); @@ -535,10 +719,19 @@ void PFXPetApi::updatePetWithFormCallback(PFXHttpRequestWorker *worker) { void PFXPetApi::uploadFile(const qint64 &pet_id, const QString &additional_metadata, const PFXHttpFileElement &file) { QString fullPath = QString(_serverConfigs["uploadFile"][_serverIndices.value("uploadFile")].URL()+"/pet/{petId}/uploadImage"); + QString pet_idPathParam("{"); pet_idPathParam.append("petId").append("}"); - fullPath.replace(pet_idPathParam, QUrl::toPercentEncoding(::test_namespace::toStringValue(pet_id))); - + QString pathPrefix, pathSuffix, pathDelimiter; + QString pathStyle = ""; + if(pathStyle == "") + pathStyle = "simple"; + pathPrefix = getParamStylePrefix(pathStyle); + pathSuffix = getParamStyleSuffix(pathStyle); + pathDelimiter = getParamStyleDelimiter(pathStyle, "petId", false); + QString paramString = (pathStyle == "matrix") ? pathPrefix+"petId"+pathSuffix : pathPrefix; + fullPath.replace(pet_idPathParam, paramString+QUrl::toPercentEncoding(::test_namespace::toStringValue(pet_id))); + PFXHttpRequestWorker *worker = new PFXHttpRequestWorker(this, _manager); worker->setTimeOut(_timeOut); @@ -546,8 +739,7 @@ void PFXPetApi::uploadFile(const qint64 &pet_id, const QString &additional_metad PFXHttpRequestInput input(fullPath, "POST"); input.add_var("additionalMetadata", ::test_namespace::toStringValue(additional_metadata)); - input.add_file("file", file.local_filename, file.request_filename, file.mime_type); - foreach (QString key, this->defaultHeaders.keys()) { input.headers.insert(key, this->defaultHeaders.value(key)); } + input.add_file("file", file.local_filename, file.request_filename, file.mime_type); foreach (QString key, this->defaultHeaders.keys()) { input.headers.insert(key, this->defaultHeaders.value(key)); } connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXPetApi::uploadFileCallback); connect(this, &PFXPetApi::abortRequestsSignal, worker, &QObject::deleteLater); diff --git a/samples/client/petstore/cpp-qt5/client/PFXPetApi.h b/samples/client/petstore/cpp-qt5/client/PFXPetApi.h index 7c3e9b331f3..fc0ea8f738a 100644 --- a/samples/client/petstore/cpp-qt5/client/PFXPetApi.h +++ b/samples/client/petstore/cpp-qt5/client/PFXPetApi.h @@ -53,6 +53,9 @@ public: void enableRequestCompression(); void enableResponseCompression(); void abortRequests(); + QString getParamStylePrefix(QString style); + QString getParamStyleSuffix(QString style); + QString getParamStyleDelimiter(QString style, QString name, bool isExplode); void addPet(const PFXPet &body); void deletePet(const qint64 &pet_id, const QString &api_key); diff --git a/samples/client/petstore/cpp-qt5/client/PFXStoreApi.cpp b/samples/client/petstore/cpp-qt5/client/PFXStoreApi.cpp index 211e318b688..8be10eb33bb 100644 --- a/samples/client/petstore/cpp-qt5/client/PFXStoreApi.cpp +++ b/samples/client/petstore/cpp-qt5/client/PFXStoreApi.cpp @@ -133,12 +133,83 @@ void PFXStoreApi::abortRequests(){ emit abortRequestsSignal(); } +QString PFXStoreApi::getParamStylePrefix(QString style){ + + if(style == "matrix"){ + return ";"; + }else if(style == "label"){ + return "."; + }else if(style == "form"){ + return "&"; + }else if(style == "simple"){ + return ""; + }else if(style == "spaceDelimited"){ + return "&"; + }else if(style == "pipeDelimited"){ + return "&"; + }else + return "none"; +} + +QString PFXStoreApi::getParamStyleSuffix(QString style){ + + if(style == "matrix"){ + return "="; + }else if(style == "label"){ + return ""; + }else if(style == "form"){ + return "="; + }else if(style == "simple"){ + return ""; + }else if(style == "spaceDelimited"){ + return "="; + }else if(style == "pipeDelimited"){ + return "="; + }else + return "none"; +} + +QString PFXStoreApi::getParamStyleDelimiter(QString style, QString name, bool isExplode){ + + if(style == "matrix"){ + return (isExplode) ? ";" + name + "=" : ","; + + }else if(style == "label"){ + return (isExplode) ? "." : ","; + + }else if(style == "form"){ + return (isExplode) ? "&" + name + "=" : ","; + + }else if(style == "simple"){ + return ","; + }else if(style == "spaceDelimited"){ + return (isExplode) ? "&" + name + "=" : " "; + + }else if(style == "pipeDelimited"){ + return (isExplode) ? "&" + name + "=" : "|"; + + }else if(style == "deepObject"){ + return (isExplode) ? "&" : "none"; + + }else + return "none"; +} + void PFXStoreApi::deleteOrder(const QString &order_id) { QString fullPath = QString(_serverConfigs["deleteOrder"][_serverIndices.value("deleteOrder")].URL()+"/store/order/{orderId}"); + QString order_idPathParam("{"); order_idPathParam.append("orderId").append("}"); - fullPath.replace(order_idPathParam, QUrl::toPercentEncoding(::test_namespace::toStringValue(order_id))); - + QString pathPrefix, pathSuffix, pathDelimiter; + QString pathStyle = ""; + if(pathStyle == "") + pathStyle = "simple"; + pathPrefix = getParamStylePrefix(pathStyle); + pathSuffix = getParamStyleSuffix(pathStyle); + pathDelimiter = getParamStyleDelimiter(pathStyle, "orderId", false); + QString paramString = (pathStyle == "matrix") ? pathPrefix+"orderId"+pathSuffix : pathPrefix; + fullPath.replace(order_idPathParam, paramString+QUrl::toPercentEncoding(::test_namespace::toStringValue(order_id))); + PFXHttpRequestWorker *worker = new PFXHttpRequestWorker(this, _manager); worker->setTimeOut(_timeOut); @@ -176,12 +247,13 @@ void PFXStoreApi::deleteOrderCallback(PFXHttpRequestWorker *worker) { void PFXStoreApi::getInventory() { QString fullPath = QString(_serverConfigs["getInventory"][_serverIndices.value("getInventory")].URL()+"/store/inventory"); - + if(_apiKeys.contains("api_key")){ addHeaders("api_key",_apiKeys.find("api_key").value()); } + PFXHttpRequestWorker *worker = new PFXHttpRequestWorker(this, _manager); worker->setTimeOut(_timeOut); worker->setWorkingDirectory(_workingDirectory); @@ -228,10 +300,19 @@ void PFXStoreApi::getInventoryCallback(PFXHttpRequestWorker *worker) { void PFXStoreApi::getOrderById(const qint64 &order_id) { QString fullPath = QString(_serverConfigs["getOrderById"][_serverIndices.value("getOrderById")].URL()+"/store/order/{orderId}"); + QString order_idPathParam("{"); order_idPathParam.append("orderId").append("}"); - fullPath.replace(order_idPathParam, QUrl::toPercentEncoding(::test_namespace::toStringValue(order_id))); - + QString pathPrefix, pathSuffix, pathDelimiter; + QString pathStyle = ""; + if(pathStyle == "") + pathStyle = "simple"; + pathPrefix = getParamStylePrefix(pathStyle); + pathSuffix = getParamStyleSuffix(pathStyle); + pathDelimiter = getParamStyleDelimiter(pathStyle, "orderId", false); + QString paramString = (pathStyle == "matrix") ? pathPrefix+"orderId"+pathSuffix : pathPrefix; + fullPath.replace(order_idPathParam, paramString+QUrl::toPercentEncoding(::test_namespace::toStringValue(order_id))); + PFXHttpRequestWorker *worker = new PFXHttpRequestWorker(this, _manager); worker->setTimeOut(_timeOut); @@ -270,6 +351,7 @@ void PFXStoreApi::getOrderByIdCallback(PFXHttpRequestWorker *worker) { void PFXStoreApi::placeOrder(const PFXOrder &body) { QString fullPath = QString(_serverConfigs["placeOrder"][_serverIndices.value("placeOrder")].URL()+"/store/order"); + PFXHttpRequestWorker *worker = new PFXHttpRequestWorker(this, _manager); @@ -277,9 +359,9 @@ void PFXStoreApi::placeOrder(const PFXOrder &body) { worker->setWorkingDirectory(_workingDirectory); PFXHttpRequestInput input(fullPath, "POST"); + QByteArray output = body.asJson().toUtf8(); input.request_body.append(output); - foreach (QString key, this->defaultHeaders.keys()) { input.headers.insert(key, this->defaultHeaders.value(key)); } connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXStoreApi::placeOrderCallback); diff --git a/samples/client/petstore/cpp-qt5/client/PFXStoreApi.h b/samples/client/petstore/cpp-qt5/client/PFXStoreApi.h index d065169e181..55a248e60a7 100644 --- a/samples/client/petstore/cpp-qt5/client/PFXStoreApi.h +++ b/samples/client/petstore/cpp-qt5/client/PFXStoreApi.h @@ -52,6 +52,9 @@ public: void enableRequestCompression(); void enableResponseCompression(); void abortRequests(); + QString getParamStylePrefix(QString style); + QString getParamStyleSuffix(QString style); + QString getParamStyleDelimiter(QString style, QString name, bool isExplode); void deleteOrder(const QString &order_id); void getInventory(); diff --git a/samples/client/petstore/cpp-qt5/client/PFXUserApi.cpp b/samples/client/petstore/cpp-qt5/client/PFXUserApi.cpp index 389e99f83d2..ab8723212fd 100644 --- a/samples/client/petstore/cpp-qt5/client/PFXUserApi.cpp +++ b/samples/client/petstore/cpp-qt5/client/PFXUserApi.cpp @@ -145,8 +145,71 @@ void PFXUserApi::abortRequests(){ emit abortRequestsSignal(); } +QString PFXUserApi::getParamStylePrefix(QString style){ + + if(style == "matrix"){ + return ";"; + }else if(style == "label"){ + return "."; + }else if(style == "form"){ + return "&"; + }else if(style == "simple"){ + return ""; + }else if(style == "spaceDelimited"){ + return "&"; + }else if(style == "pipeDelimited"){ + return "&"; + }else + return "none"; +} + +QString PFXUserApi::getParamStyleSuffix(QString style){ + + if(style == "matrix"){ + return "="; + }else if(style == "label"){ + return ""; + }else if(style == "form"){ + return "="; + }else if(style == "simple"){ + return ""; + }else if(style == "spaceDelimited"){ + return "="; + }else if(style == "pipeDelimited"){ + return "="; + }else + return "none"; +} + +QString PFXUserApi::getParamStyleDelimiter(QString style, QString name, bool isExplode){ + + if(style == "matrix"){ + return (isExplode) ? ";" + name + "=" : ","; + + }else if(style == "label"){ + return (isExplode) ? "." : ","; + + }else if(style == "form"){ + return (isExplode) ? "&" + name + "=" : ","; + + }else if(style == "simple"){ + return ","; + }else if(style == "spaceDelimited"){ + return (isExplode) ? "&" + name + "=" : " "; + + }else if(style == "pipeDelimited"){ + return (isExplode) ? "&" + name + "=" : "|"; + + }else if(style == "deepObject"){ + return (isExplode) ? "&" : "none"; + + }else + return "none"; +} + void PFXUserApi::createUser(const PFXUser &body) { QString fullPath = QString(_serverConfigs["createUser"][_serverIndices.value("createUser")].URL()+"/user"); + PFXHttpRequestWorker *worker = new PFXHttpRequestWorker(this, _manager); @@ -154,9 +217,9 @@ void PFXUserApi::createUser(const PFXUser &body) { worker->setWorkingDirectory(_workingDirectory); PFXHttpRequestInput input(fullPath, "POST"); + QByteArray output = body.asJson().toUtf8(); input.request_body.append(output); - foreach (QString key, this->defaultHeaders.keys()) { input.headers.insert(key, this->defaultHeaders.value(key)); } connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXUserApi::createUserCallback); @@ -188,6 +251,7 @@ void PFXUserApi::createUserCallback(PFXHttpRequestWorker *worker) { void PFXUserApi::createUsersWithArrayInput(const QList &body) { QString fullPath = QString(_serverConfigs["createUsersWithArrayInput"][_serverIndices.value("createUsersWithArrayInput")].URL()+"/user/createWithArray"); + PFXHttpRequestWorker *worker = new PFXHttpRequestWorker(this, _manager); @@ -195,10 +259,10 @@ void PFXUserApi::createUsersWithArrayInput(const QList &body) { worker->setWorkingDirectory(_workingDirectory); PFXHttpRequestInput input(fullPath, "POST"); + QJsonDocument doc(::test_namespace::toJsonValue(body).toArray()); QByteArray bytes = doc.toJson(); input.request_body.append(bytes); - foreach (QString key, this->defaultHeaders.keys()) { input.headers.insert(key, this->defaultHeaders.value(key)); } connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXUserApi::createUsersWithArrayInputCallback); @@ -230,6 +294,7 @@ void PFXUserApi::createUsersWithArrayInputCallback(PFXHttpRequestWorker *worker) void PFXUserApi::createUsersWithListInput(const QList &body) { QString fullPath = QString(_serverConfigs["createUsersWithListInput"][_serverIndices.value("createUsersWithListInput")].URL()+"/user/createWithList"); + PFXHttpRequestWorker *worker = new PFXHttpRequestWorker(this, _manager); @@ -237,10 +302,10 @@ void PFXUserApi::createUsersWithListInput(const QList &body) { worker->setWorkingDirectory(_workingDirectory); PFXHttpRequestInput input(fullPath, "POST"); + QJsonDocument doc(::test_namespace::toJsonValue(body).toArray()); QByteArray bytes = doc.toJson(); input.request_body.append(bytes); - foreach (QString key, this->defaultHeaders.keys()) { input.headers.insert(key, this->defaultHeaders.value(key)); } connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXUserApi::createUsersWithListInputCallback); @@ -272,10 +337,19 @@ void PFXUserApi::createUsersWithListInputCallback(PFXHttpRequestWorker *worker) void PFXUserApi::deleteUser(const QString &username) { QString fullPath = QString(_serverConfigs["deleteUser"][_serverIndices.value("deleteUser")].URL()+"/user/{username}"); + QString usernamePathParam("{"); usernamePathParam.append("username").append("}"); - fullPath.replace(usernamePathParam, QUrl::toPercentEncoding(::test_namespace::toStringValue(username))); - + QString pathPrefix, pathSuffix, pathDelimiter; + QString pathStyle = ""; + if(pathStyle == "") + pathStyle = "simple"; + pathPrefix = getParamStylePrefix(pathStyle); + pathSuffix = getParamStyleSuffix(pathStyle); + pathDelimiter = getParamStyleDelimiter(pathStyle, "username", false); + QString paramString = (pathStyle == "matrix") ? pathPrefix+"username"+pathSuffix : pathPrefix; + fullPath.replace(usernamePathParam, paramString+QUrl::toPercentEncoding(::test_namespace::toStringValue(username))); + PFXHttpRequestWorker *worker = new PFXHttpRequestWorker(this, _manager); worker->setTimeOut(_timeOut); @@ -313,10 +387,19 @@ void PFXUserApi::deleteUserCallback(PFXHttpRequestWorker *worker) { void PFXUserApi::getUserByName(const QString &username) { QString fullPath = QString(_serverConfigs["getUserByName"][_serverIndices.value("getUserByName")].URL()+"/user/{username}"); + QString usernamePathParam("{"); usernamePathParam.append("username").append("}"); - fullPath.replace(usernamePathParam, QUrl::toPercentEncoding(::test_namespace::toStringValue(username))); - + QString pathPrefix, pathSuffix, pathDelimiter; + QString pathStyle = ""; + if(pathStyle == "") + pathStyle = "simple"; + pathPrefix = getParamStylePrefix(pathStyle); + pathSuffix = getParamStyleSuffix(pathStyle); + pathDelimiter = getParamStyleDelimiter(pathStyle, "username", false); + QString paramString = (pathStyle == "matrix") ? pathPrefix+"username"+pathSuffix : pathPrefix; + fullPath.replace(usernamePathParam, paramString+QUrl::toPercentEncoding(::test_namespace::toStringValue(username))); + PFXHttpRequestWorker *worker = new PFXHttpRequestWorker(this, _manager); worker->setTimeOut(_timeOut); @@ -355,19 +438,33 @@ void PFXUserApi::getUserByNameCallback(PFXHttpRequestWorker *worker) { void PFXUserApi::loginUser(const QString &username, const QString &password) { QString fullPath = QString(_serverConfigs["loginUser"][_serverIndices.value("loginUser")].URL()+"/user/login"); + - + QString queryPrefix, querySuffix, queryDelimiter, queryStyle; + queryStyle = ""; + if(queryStyle == "") + queryStyle = "form"; + queryPrefix = getParamStylePrefix(queryStyle); + querySuffix = getParamStyleSuffix(queryStyle); + queryDelimiter = getParamStyleDelimiter(queryStyle, "username", false); if (fullPath.indexOf("?") > 0) - fullPath.append("&"); + fullPath.append(queryPrefix); else fullPath.append("?"); - fullPath.append(QUrl::toPercentEncoding("username")).append("=").append(QUrl::toPercentEncoding(::test_namespace::toStringValue(username))); + fullPath.append(QUrl::toPercentEncoding("username")).append(querySuffix).append(QUrl::toPercentEncoding(::test_namespace::toStringValue(username))); + queryStyle = ""; + if(queryStyle == "") + queryStyle = "form"; + queryPrefix = getParamStylePrefix(queryStyle); + querySuffix = getParamStyleSuffix(queryStyle); + queryDelimiter = getParamStyleDelimiter(queryStyle, "password", false); if (fullPath.indexOf("?") > 0) - fullPath.append("&"); + fullPath.append(queryPrefix); else fullPath.append("?"); - fullPath.append(QUrl::toPercentEncoding("password")).append("=").append(QUrl::toPercentEncoding(::test_namespace::toStringValue(password))); + + fullPath.append(QUrl::toPercentEncoding("password")).append(querySuffix).append(QUrl::toPercentEncoding(::test_namespace::toStringValue(password))); PFXHttpRequestWorker *worker = new PFXHttpRequestWorker(this, _manager); worker->setTimeOut(_timeOut); @@ -407,6 +504,7 @@ void PFXUserApi::loginUserCallback(PFXHttpRequestWorker *worker) { void PFXUserApi::logoutUser() { QString fullPath = QString(_serverConfigs["logoutUser"][_serverIndices.value("logoutUser")].URL()+"/user/logout"); + PFXHttpRequestWorker *worker = new PFXHttpRequestWorker(this, _manager); @@ -445,19 +543,28 @@ void PFXUserApi::logoutUserCallback(PFXHttpRequestWorker *worker) { void PFXUserApi::updateUser(const QString &username, const PFXUser &body) { QString fullPath = QString(_serverConfigs["updateUser"][_serverIndices.value("updateUser")].URL()+"/user/{username}"); + QString usernamePathParam("{"); usernamePathParam.append("username").append("}"); - fullPath.replace(usernamePathParam, QUrl::toPercentEncoding(::test_namespace::toStringValue(username))); - + QString pathPrefix, pathSuffix, pathDelimiter; + QString pathStyle = ""; + if(pathStyle == "") + pathStyle = "simple"; + pathPrefix = getParamStylePrefix(pathStyle); + pathSuffix = getParamStyleSuffix(pathStyle); + pathDelimiter = getParamStyleDelimiter(pathStyle, "username", false); + QString paramString = (pathStyle == "matrix") ? pathPrefix+"username"+pathSuffix : pathPrefix; + fullPath.replace(usernamePathParam, paramString+QUrl::toPercentEncoding(::test_namespace::toStringValue(username))); + PFXHttpRequestWorker *worker = new PFXHttpRequestWorker(this, _manager); worker->setTimeOut(_timeOut); worker->setWorkingDirectory(_workingDirectory); PFXHttpRequestInput input(fullPath, "PUT"); + QByteArray output = body.asJson().toUtf8(); input.request_body.append(output); - foreach (QString key, this->defaultHeaders.keys()) { input.headers.insert(key, this->defaultHeaders.value(key)); } connect(worker, &PFXHttpRequestWorker::on_execution_finished, this, &PFXUserApi::updateUserCallback); diff --git a/samples/client/petstore/cpp-qt5/client/PFXUserApi.h b/samples/client/petstore/cpp-qt5/client/PFXUserApi.h index aada5d8f3bf..9e742cf5e49 100644 --- a/samples/client/petstore/cpp-qt5/client/PFXUserApi.h +++ b/samples/client/petstore/cpp-qt5/client/PFXUserApi.h @@ -52,6 +52,9 @@ public: void enableRequestCompression(); void enableResponseCompression(); void abortRequests(); + QString getParamStylePrefix(QString style); + QString getParamStyleSuffix(QString style); + QString getParamStyleDelimiter(QString style, QString name, bool isExplode); void createUser(const PFXUser &body); void createUsersWithArrayInput(const QList &body); From 6fdd8ea3daf01db3e38a57a28425dd716f2229e9 Mon Sep 17 00:00:00 2001 From: Reinhard-PTV <77726540+Reinhard-PTV@users.noreply.github.com> Date: Mon, 8 Feb 2021 16:03:29 +0100 Subject: [PATCH 34/44] Fixed serialization of date-time query parameters. (#8616) --- .../Java/libraries/native/ApiClient.mustache | 11 ++++++++++- .../main/resources/typescript-fetch/runtime.mustache | 3 +++ .../main/java/org/openapitools/client/ApiClient.java | 7 ++++++- .../main/java/org/openapitools/client/ApiClient.java | 7 ++++++- .../typescript-fetch/builds/default-v3.0/runtime.ts | 3 +++ .../typescript-fetch/builds/default/runtime.ts | 3 +++ .../petstore/typescript-fetch/builds/enum/runtime.ts | 3 +++ .../typescript-fetch/builds/es6-target/src/runtime.ts | 3 +++ .../builds/multiple-parameters/runtime.ts | 3 +++ .../builds/prefix-parameter-interfaces/src/runtime.ts | 3 +++ .../builds/typescript-three-plus/src/runtime.ts | 3 +++ .../builds/with-interfaces/runtime.ts | 3 +++ .../builds/with-npm-version/src/runtime.ts | 3 +++ .../builds/without-runtime-checks/src/runtime.ts | 3 +++ .../main/java/org/openapitools/client/ApiClient.java | 7 ++++++- 15 files changed, 61 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache index d38af2abb69..abdea5d8f27 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache @@ -18,6 +18,10 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.nio.charset.Charset; import java.time.Duration; +{{#java8}} +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +{{/java8}} import java.util.Collection; import java.util.Collections; import java.util.List; @@ -57,6 +61,11 @@ public class ApiClient { if (value == null) { return ""; } + {{#java8}} + if (value instanceof OffsetDateTime) { + return ((OffsetDateTime) value).format(DateTimeFormatter.ISO_OFFSET_DATE_TIME); + } + {{/java8}} return value.toString(); } @@ -87,7 +96,7 @@ public class ApiClient { if (name == null || name.isEmpty() || value == null) { return Collections.emptyList(); } - return Collections.singletonList(new Pair(urlEncode(name), urlEncode(value.toString()))); + return Collections.singletonList(new Pair(urlEncode(name), urlEncode(valueToString(value)))); } /** diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache index 04001417a82..3fd6265e636 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache @@ -216,6 +216,9 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string { .join(`&${encodeURIComponent(fullKey)}=`); return `${encodeURIComponent(fullKey)}=${multiValue}`; } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } if (value instanceof Object) { return querystring(value as HTTPQuery, fullKey); } diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ApiClient.java index c03fab20332..ce2f5a68f61 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ApiClient.java @@ -27,6 +27,8 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.nio.charset.Charset; import java.time.Duration; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; import java.util.Collection; import java.util.Collections; import java.util.List; @@ -66,6 +68,9 @@ public class ApiClient { if (value == null) { return ""; } + if (value instanceof OffsetDateTime) { + return ((OffsetDateTime) value).format(DateTimeFormatter.ISO_OFFSET_DATE_TIME); + } return value.toString(); } @@ -96,7 +101,7 @@ public class ApiClient { if (name == null || name.isEmpty() || value == null) { return Collections.emptyList(); } - return Collections.singletonList(new Pair(urlEncode(name), urlEncode(value.toString()))); + return Collections.singletonList(new Pair(urlEncode(name), urlEncode(valueToString(value)))); } /** diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java index c03fab20332..ce2f5a68f61 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java @@ -27,6 +27,8 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.nio.charset.Charset; import java.time.Duration; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; import java.util.Collection; import java.util.Collections; import java.util.List; @@ -66,6 +68,9 @@ public class ApiClient { if (value == null) { return ""; } + if (value instanceof OffsetDateTime) { + return ((OffsetDateTime) value).format(DateTimeFormatter.ISO_OFFSET_DATE_TIME); + } return value.toString(); } @@ -96,7 +101,7 @@ public class ApiClient { if (name == null || name.isEmpty() || value == null) { return Collections.emptyList(); } - return Collections.singletonList(new Pair(urlEncode(name), urlEncode(value.toString()))); + return Collections.singletonList(new Pair(urlEncode(name), urlEncode(valueToString(value)))); } /** diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/runtime.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/runtime.ts index f84920e94e3..89b721d0c5d 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/runtime.ts @@ -227,6 +227,9 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string { .join(`&${encodeURIComponent(fullKey)}=`); return `${encodeURIComponent(fullKey)}=${multiValue}`; } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } if (value instanceof Object) { return querystring(value as HTTPQuery, fullKey); } diff --git a/samples/client/petstore/typescript-fetch/builds/default/runtime.ts b/samples/client/petstore/typescript-fetch/builds/default/runtime.ts index 87070cedb4c..3673659f277 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/runtime.ts @@ -227,6 +227,9 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string { .join(`&${encodeURIComponent(fullKey)}=`); return `${encodeURIComponent(fullKey)}=${multiValue}`; } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } if (value instanceof Object) { return querystring(value as HTTPQuery, fullKey); } diff --git a/samples/client/petstore/typescript-fetch/builds/enum/runtime.ts b/samples/client/petstore/typescript-fetch/builds/enum/runtime.ts index 533e9912b14..e04306cadcb 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/enum/runtime.ts @@ -227,6 +227,9 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string { .join(`&${encodeURIComponent(fullKey)}=`); return `${encodeURIComponent(fullKey)}=${multiValue}`; } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } if (value instanceof Object) { return querystring(value as HTTPQuery, fullKey); } diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/runtime.ts index 87070cedb4c..3673659f277 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/runtime.ts @@ -227,6 +227,9 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string { .join(`&${encodeURIComponent(fullKey)}=`); return `${encodeURIComponent(fullKey)}=${multiValue}`; } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } if (value instanceof Object) { return querystring(value as HTTPQuery, fullKey); } diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts index 87070cedb4c..3673659f277 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts @@ -227,6 +227,9 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string { .join(`&${encodeURIComponent(fullKey)}=`); return `${encodeURIComponent(fullKey)}=${multiValue}`; } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } if (value instanceof Object) { return querystring(value as HTTPQuery, fullKey); } diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/runtime.ts index 87070cedb4c..3673659f277 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/runtime.ts @@ -227,6 +227,9 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string { .join(`&${encodeURIComponent(fullKey)}=`); return `${encodeURIComponent(fullKey)}=${multiValue}`; } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } if (value instanceof Object) { return querystring(value as HTTPQuery, fullKey); } diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/runtime.ts index 3e18bd1692c..c541d163bd4 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/runtime.ts @@ -227,6 +227,9 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string { .join(`&${encodeURIComponent(fullKey)}=`); return `${encodeURIComponent(fullKey)}=${multiValue}`; } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } if (value instanceof Object) { return querystring(value as HTTPQuery, fullKey); } diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts index 87070cedb4c..3673659f277 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts @@ -227,6 +227,9 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string { .join(`&${encodeURIComponent(fullKey)}=`); return `${encodeURIComponent(fullKey)}=${multiValue}`; } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } if (value instanceof Object) { return querystring(value as HTTPQuery, fullKey); } diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/runtime.ts index 87070cedb4c..3673659f277 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/runtime.ts @@ -227,6 +227,9 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string { .join(`&${encodeURIComponent(fullKey)}=`); return `${encodeURIComponent(fullKey)}=${multiValue}`; } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } if (value instanceof Object) { return querystring(value as HTTPQuery, fullKey); } diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/runtime.ts index 87070cedb4c..3673659f277 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/runtime.ts @@ -227,6 +227,9 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string { .join(`&${encodeURIComponent(fullKey)}=`); return `${encodeURIComponent(fullKey)}=${multiValue}`; } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } if (value instanceof Object) { return querystring(value as HTTPQuery, fullKey); } diff --git a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java b/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java index c03fab20332..ce2f5a68f61 100644 --- a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java @@ -27,6 +27,8 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.nio.charset.Charset; import java.time.Duration; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; import java.util.Collection; import java.util.Collections; import java.util.List; @@ -66,6 +68,9 @@ public class ApiClient { if (value == null) { return ""; } + if (value instanceof OffsetDateTime) { + return ((OffsetDateTime) value).format(DateTimeFormatter.ISO_OFFSET_DATE_TIME); + } return value.toString(); } @@ -96,7 +101,7 @@ public class ApiClient { if (name == null || name.isEmpty() || value == null) { return Collections.emptyList(); } - return Collections.singletonList(new Pair(urlEncode(name), urlEncode(value.toString()))); + return Collections.singletonList(new Pair(urlEncode(name), urlEncode(valueToString(value)))); } /** From df1df5c5dfcd269abab09375467681099267fe8f Mon Sep 17 00:00:00 2001 From: Kaijia Feng Date: Tue, 9 Feb 2021 20:42:27 +0800 Subject: [PATCH 35/44] Minor fix for typescript-nestjs (#8654) --- .../resources/typescript-nestjs/api.module.mustache | 10 +++++----- .../builds/default/api.module.ts | 10 +++++++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-nestjs/api.module.mustache b/modules/openapi-generator/src/main/resources/typescript-nestjs/api.module.mustache index 0226f69fb1f..120cae581c0 100644 --- a/modules/openapi-generator/src/main/resources/typescript-nestjs/api.module.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-nestjs/api.module.mustache @@ -11,13 +11,13 @@ import { {{classname}} } from './{{importPath}}'; @Global @Module({ imports: [ HttpModule ], - exports: [ - {{#apiInfo}}{{#apis}}{{classname}}{{#hasMore}}, - {{/hasMore}}{{/apis}}{{/apiInfo}} + exports: [ + {{#apiInfo}}{{#apis}}{{classname}}{{^-last}}, + {{/-last}}{{/apis}}{{/apiInfo}} ], providers: [ - {{#apiInfo}}{{#apis}}{{classname}}{{#hasMore}}, - {{/hasMore}}{{/apis}}{{/apiInfo}} + {{#apiInfo}}{{#apis}}{{classname}}{{^-last}}, + {{/-last}}{{/apis}}{{/apiInfo}} ] }) export class ApiModule { diff --git a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api.module.ts b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api.module.ts index 3e56bd5c091..af299fdd56d 100644 --- a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api.module.ts +++ b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api.module.ts @@ -9,11 +9,15 @@ import { UserService } from './api/user.service'; @Global @Module({ imports: [ HttpModule ], - exports: [ - PetServiceStoreServiceUserService + exports: [ + PetService, + StoreService, + UserService ], providers: [ - PetServiceStoreServiceUserService + PetService, + StoreService, + UserService ] }) export class ApiModule { From 71a8e0afda1e2a0876d166b8dba4c7ba0fe0a5a5 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 9 Feb 2021 21:49:49 +0800 Subject: [PATCH 36/44] Add sponsorship message in C generator (#8649) * update c generator sponsorship message * add powerofcreation --- bin/configs/{other => }/c.yaml | 0 .../codegen/languages/CLibcurlClientCodegen.java | 15 +++++++++++++++ .../client/petstore/c/.openapi-generator/VERSION | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) rename bin/configs/{other => }/c.yaml (100%) diff --git a/bin/configs/other/c.yaml b/bin/configs/c.yaml similarity index 100% rename from bin/configs/other/c.yaml rename to bin/configs/c.yaml 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 dbc59ae281c..62d1a13f9c2 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 @@ -898,4 +898,19 @@ public class CLibcurlClientCodegen extends DefaultCodegen implements CodegenConf } } } + + @Override + public void postProcess() { + System.out.println("################################################################################"); + System.out.println("# Thanks for using OpenAPI Generator. #"); + System.out.println("# Please consider donation to help us maintain this project \uD83D\uDE4F #"); + System.out.println("# https://opencollective.com/openapi_generator/donate #"); + System.out.println("# #"); + System.out.println("# This generator is contributed by Hemant Zope (https://github.com/zhemant) #"); + System.out.println("# and Niklas Werner (https://github.com/PowerOfCreation). #"); + System.out.println("# Please support their work directly \uD83D\uDE4F #"); + System.out.println("# > Hemant Zope - https://www.patreon.com/zhemant #"); + System.out.println("# > Niklas Werner - https://paypal.me/wernerdevelopment #"); + System.out.println("################################################################################"); + } } diff --git a/samples/client/petstore/c/.openapi-generator/VERSION b/samples/client/petstore/c/.openapi-generator/VERSION index 3fa3b389a57..c30f0ec2be7 100644 --- a/samples/client/petstore/c/.openapi-generator/VERSION +++ b/samples/client/petstore/c/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.1.0-SNAPSHOT \ No newline at end of file From 5a3ab4299fcd9791f2cabd260b7be9992b27d57e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Ka=C5=A1par=20Jir=C3=A1sek?= Date: Tue, 9 Feb 2021 17:11:36 +0100 Subject: [PATCH 37/44] Update Swift styleguide link in contribution (#8656) --- docs/contributing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contributing.md b/docs/contributing.md index a791b0d6f1b..a6f32bc7063 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -73,7 +73,7 @@ Code change should conform to the programming style guide of the respective lang - Ruby: https://github.com/bbatsov/ruby-style-guide - Rust: https://github.com/rust-lang-nursery/fmt-rfcs/blob/master/guide/guide.md (the default [rustfmt](https://github.com/rust-lang-nursery/rustfmt) configuration) - Scala: http://docs.scala-lang.org/style/ -- Swift: [Apple Developer](https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/TheBasics.html) +- Swift: https://swift.org/documentation/api-design-guidelines/ - TypeScript: https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines For other languages, feel free to suggest. From 7a435ac1bba0a77698c45fa342fe9e9fb9a417b2 Mon Sep 17 00:00:00 2001 From: Bruno Coelho <4brunu@users.noreply.github.com> Date: Tue, 9 Feb 2021 16:13:25 +0000 Subject: [PATCH 38/44] [Kotlin][Client] create request config method (#8617) * [kotlin][client] create an api method to create the RequestConfig * [kotlin][client] generate sample projects * [kotlin] add docs to RequestConfig method * [kotlin][client] generate sample projects * [kotlin] improve docs on the RequestConfig method * [kotlin][client] generate sample projects --- .../infrastructure/RequestConfig.kt.mustache | 3 +- .../libraries/jvm-okhttp/api.mustache | 57 ++-- .../infrastructure/ApiClient.kt.mustache | 10 +- .../org/openapitools/client/apis/PetApi.kt | 308 +++++++++++------ .../org/openapitools/client/apis/StoreApi.kt | 143 +++++--- .../org/openapitools/client/apis/UserApi.kt | 297 +++++++++++------ .../client/infrastructure/ApiClient.kt | 10 +- .../client/infrastructure/RequestConfig.kt | 3 +- .../org/openapitools/client/apis/PetApi.kt | 308 +++++++++++------ .../org/openapitools/client/apis/StoreApi.kt | 143 +++++--- .../org/openapitools/client/apis/UserApi.kt | 297 +++++++++++------ .../client/infrastructure/ApiClient.kt | 10 +- .../client/infrastructure/RequestConfig.kt | 3 +- .../org/openapitools/client/apis/PetApi.kt | 312 ++++++++++++------ .../org/openapitools/client/apis/StoreApi.kt | 143 +++++--- .../org/openapitools/client/apis/UserApi.kt | 297 +++++++++++------ .../client/infrastructure/ApiClient.kt | 10 +- .../client/infrastructure/RequestConfig.kt | 3 +- .../org/openapitools/client/apis/PetApi.kt | 308 +++++++++++------ .../org/openapitools/client/apis/StoreApi.kt | 143 +++++--- .../org/openapitools/client/apis/UserApi.kt | 297 +++++++++++------ .../client/infrastructure/ApiClient.kt | 10 +- .../client/infrastructure/RequestConfig.kt | 3 +- .../org/openapitools/client/apis/PetApi.kt | 308 +++++++++++------ .../org/openapitools/client/apis/StoreApi.kt | 143 +++++--- .../org/openapitools/client/apis/UserApi.kt | 297 +++++++++++------ .../client/infrastructure/ApiClient.kt | 10 +- .../client/infrastructure/RequestConfig.kt | 3 +- .../client/infrastructure/RequestConfig.kt | 3 +- .../org/openapitools/client/apis/PetApi.kt | 308 +++++++++++------ .../org/openapitools/client/apis/StoreApi.kt | 143 +++++--- .../org/openapitools/client/apis/UserApi.kt | 297 +++++++++++------ .../client/infrastructure/ApiClient.kt | 10 +- .../client/infrastructure/RequestConfig.kt | 3 +- .../org/openapitools/client/apis/PetApi.kt | 308 +++++++++++------ .../org/openapitools/client/apis/StoreApi.kt | 143 +++++--- .../org/openapitools/client/apis/UserApi.kt | 297 +++++++++++------ .../client/infrastructure/ApiClient.kt | 10 +- .../client/infrastructure/RequestConfig.kt | 3 +- .../org/openapitools/client/apis/PetApi.kt | 308 +++++++++++------ .../org/openapitools/client/apis/StoreApi.kt | 143 +++++--- .../org/openapitools/client/apis/UserApi.kt | 297 +++++++++++------ .../client/infrastructure/ApiClient.kt | 10 +- .../client/infrastructure/RequestConfig.kt | 3 +- .../org/openapitools/client/apis/PetApi.kt | 308 +++++++++++------ .../org/openapitools/client/apis/StoreApi.kt | 143 +++++--- .../org/openapitools/client/apis/UserApi.kt | 297 +++++++++++------ .../client/infrastructure/ApiClient.kt | 10 +- .../client/infrastructure/RequestConfig.kt | 3 +- .../org/openapitools/client/apis/PetApi.kt | 308 +++++++++++------ .../org/openapitools/client/apis/StoreApi.kt | 143 +++++--- .../org/openapitools/client/apis/UserApi.kt | 297 +++++++++++------ .../client/infrastructure/ApiClient.kt | 10 +- .../client/infrastructure/RequestConfig.kt | 3 +- .../org/openapitools/client/apis/PetApi.kt | 308 +++++++++++------ .../org/openapitools/client/apis/StoreApi.kt | 143 +++++--- .../org/openapitools/client/apis/UserApi.kt | 297 +++++++++++------ .../client/infrastructure/ApiClient.kt | 10 +- .../client/infrastructure/RequestConfig.kt | 3 +- 59 files changed, 5812 insertions(+), 2636 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/RequestConfig.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/RequestConfig.kt.mustache index 435583e9726..61677c22aff 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/RequestConfig.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/infrastructure/RequestConfig.kt.mustache @@ -12,5 +12,6 @@ package {{packageName}}.infrastructure val method: RequestMethod, val path: String, val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf() + val query: MutableMap> = mutableMapOf(), + val body: kotlin.Any? = null ) \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/api.mustache index 13c9c560407..8adf1980e42 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/api.mustache @@ -41,6 +41,37 @@ import {{packageName}}.infrastructure.toMultiValue @Deprecated(message = "This operation is deprecated.") {{/isDeprecated}} {{^doNotUseRxAndCoroutines}}{{#useCoroutines}}suspend {{/useCoroutines}}{{/doNotUseRxAndCoroutines}}fun {{operationId}}({{#allParams}}{{{paramName}}}: {{{dataType}}}{{^required}}?{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) : {{#returnType}}{{{returnType}}}{{#nullableReturnType}}?{{/nullableReturnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}} { + val localVariableConfig = {{operationId}}RequestConfig({{#allParams}}{{{paramName}}} = {{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) + + val localVarResponse = request<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Any?{{/returnType}}>( + localVariableConfig + ) + + return when (localVarResponse.responseType) { + ResponseType.Success -> {{#returnType}}(localVarResponse as Success<*>).data as {{{returnType}}}{{#nullableReturnType}}?{{/nullableReturnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}} + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * To obtain the request config of the operation {{operationId}} + * + {{#allParams}}* @param {{{paramName}}} {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} + {{/allParams}}* @return RequestConfig + */ + {{#isDeprecated}} + @Deprecated(message = "This operation is deprecated.") + {{/isDeprecated}} + fun {{operationId}}RequestConfig({{#allParams}}{{{paramName}}}: {{{dataType}}}{{^required}}?{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) : RequestConfig { val localVariableBody: kotlin.Any? = {{#hasBodyParam}}{{#bodyParams}}{{{paramName}}}{{/bodyParams}}{{/hasBodyParam}}{{^hasBodyParam}}{{^hasFormParams}}null{{/hasFormParams}}{{#hasFormParams}}mapOf({{#formParams}}"{{{baseName}}}" to {{{paramName}}}{{^-last}}, {{/-last}}{{/formParams}}){{/hasFormParams}}{{/hasBodyParam}} val localVariableQuery: MultiValueMap = {{^hasQueryParams}}mutableMapOf() {{/hasQueryParams}}{{#hasQueryParams}}mutableMapOf>() @@ -68,30 +99,16 @@ import {{packageName}}.infrastructure.toMultiValue {{#headerParams}} {{{paramName}}}?.apply { localVariableHeaders["{{baseName}}"] = {{#isContainer}}this.joinToString(separator = collectionDelimiter("{{collectionFormat}}")){{/isContainer}}{{^isContainer}}this.toString(){{/isContainer}} } {{/headerParams}} + val localVariableConfig = RequestConfig( - RequestMethod.{{httpMethod}}, - "{{path}}"{{#pathParams}}.replace("{"+"{{baseName}}"+"}", "${{{paramName}}}"){{/pathParams}}, + method = RequestMethod.{{httpMethod}}, + path = "{{path}}"{{#pathParams}}.replace("{"+"{{baseName}}"+"}", "${{{paramName}}}"){{/pathParams}}, query = localVariableQuery, - headers = localVariableHeaders - ) - val localVarResponse = request<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Any?{{/returnType}}>( - localVariableConfig, - localVariableBody + headers = localVariableHeaders, + body = localVariableBody ) - return when (localVarResponse.responseType) { - ResponseType.Success -> {{#returnType}}(localVarResponse as Success<*>).data as {{{returnType}}}{{#nullableReturnType}}?{{/nullableReturnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}} - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } + return localVariableConfig } {{/operation}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/infrastructure/ApiClient.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/infrastructure/ApiClient.kt.mustache index 3bff3d10d97..cfc573b9f82 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/infrastructure/ApiClient.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/infrastructure/ApiClient.kt.mustache @@ -232,7 +232,7 @@ import org.threeten.bp.OffsetTime } {{/hasAuthMethods}} - protected inline fun request(requestConfig: RequestConfig, body : Any? = null): ApiInfrastructureResponse { + protected inline fun request(requestConfig: RequestConfig): ApiInfrastructureResponse { {{#jvm-okhttp3}} val httpUrl = HttpUrl.parse(baseUrl) ?: throw IllegalStateException("baseUrl is invalid.") {{/jvm-okhttp3}} @@ -276,12 +276,12 @@ import org.threeten.bp.OffsetTime val contentType = (headers[ContentType] as String).substringBefore(";").toLowerCase() val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(body, contentType)) + RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) RequestMethod.GET -> Request.Builder().url(url) RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(body, contentType)) + RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) + RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) + RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) }.apply { headers.forEach { header -> addHeader(header.key, header.value) } diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index e4f7f4eeae0..c8b93b33bf6 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -45,18 +45,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun addPet(body: Pet) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = addPetRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -74,6 +66,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation addPet + * + * @param body Pet object that needs to be added to the store + * @return RequestConfig + */ + fun addPetRequestConfig(body: Pet) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Deletes a pet * @@ -86,19 +100,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - apiKey?.apply { localVariableHeaders["api_key"] = this.toString() } - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deletePetRequestConfig(petId = petId, apiKey = apiKey) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -116,6 +121,30 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation deletePet + * + * @param petId Pet id to delete + * @param apiKey (optional) + * @return RequestConfig + */ + fun deletePetRequestConfig(petId: kotlin.Long, apiKey: kotlin.String?) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + apiKey?.apply { localVariableHeaders["api_key"] = this.toString() } + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -128,21 +157,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun findPetsByStatus(status: kotlin.collections.List) : kotlin.collections.List { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("status", toMultiValue(status.toList(), "csv")) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/findByStatus", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = findPetsByStatusRequestConfig(status = status) + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -160,6 +178,31 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation findPetsByStatus + * + * @param status Status values that need to be considered for filter + * @return RequestConfig + */ + fun findPetsByStatusRequestConfig(status: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("status", toMultiValue(status.toList(), "csv")) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/findByStatus", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -173,21 +216,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) @Deprecated(message = "This operation is deprecated.") fun findPetsByTags(tags: kotlin.collections.List) : kotlin.collections.List { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("tags", toMultiValue(tags.toList(), "csv")) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/findByTags", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = findPetsByTagsRequestConfig(tags = tags) + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -205,6 +237,32 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation findPetsByTags + * + * @param tags Tags to filter by + * @return RequestConfig + */ + @Deprecated(message = "This operation is deprecated.") + fun findPetsByTagsRequestConfig(tags: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("tags", toMultiValue(tags.toList(), "csv")) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/findByTags", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Find pet by ID * Returns a single pet @@ -217,18 +275,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getPetById(petId: kotlin.Long) : Pet { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getPetByIdRequestConfig(petId = petId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -246,6 +296,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation getPetById + * + * @param petId ID of pet to return + * @return RequestConfig + */ + fun getPetByIdRequestConfig(petId: kotlin.Long) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Update an existing pet * @@ -257,18 +329,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePet(body: Pet) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.PUT, - "/pet", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updatePetRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -286,6 +350,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updatePet + * + * @param body Pet object that needs to be added to the store + * @return RequestConfig + */ + fun updatePetRequestConfig(body: Pet) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.PUT, + path = "/pet", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Updates a pet in the store with form data * @@ -299,18 +385,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : Unit { - val localVariableBody: kotlin.Any? = mapOf("name" to name, "status" to status) - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -328,6 +406,30 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updatePetWithForm + * + * @param petId ID of pet that needs to be updated + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return RequestConfig + */ + fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig { + val localVariableBody: kotlin.Any? = mapOf("name" to name, "status" to status) + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * uploads an image * @@ -342,18 +444,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { - val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to additionalMetadata, "file" to file) - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -371,4 +465,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation uploadFile + * + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return RequestConfig + */ + fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig { + val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to additionalMetadata, "file" to file) + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 08822c67e32..215ed63420c 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -44,18 +44,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteOrder(orderId: kotlin.String) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deleteOrderRequestConfig(orderId = orderId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -73,6 +65,28 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation deleteOrder + * + * @param orderId ID of the order that needs to be deleted + * @return RequestConfig + */ + fun deleteOrderRequestConfig(orderId: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Returns pet inventories by status * Returns a map of status codes to quantities @@ -84,18 +98,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getInventory() : kotlin.collections.Map { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/store/inventory", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getInventoryRequestConfig() + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -113,6 +119,27 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation getInventory + * + * @return RequestConfig + */ + fun getInventoryRequestConfig() : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/store/inventory", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Find purchase order by ID * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -125,18 +152,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getOrderById(orderId: kotlin.Long) : Order { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getOrderByIdRequestConfig(orderId = orderId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -154,6 +173,28 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation getOrderById + * + * @param orderId ID of pet that needs to be fetched + * @return RequestConfig + */ + fun getOrderByIdRequestConfig(orderId: kotlin.Long) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Place an order for a pet * @@ -166,18 +207,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun placeOrder(body: Order) : Order { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/store/order", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = placeOrderRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -195,4 +228,26 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation placeOrder + * + * @param body order placed for purchasing the pet + * @return RequestConfig + */ + fun placeOrderRequestConfig(body: Order) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/store/order", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 258a2540e9e..53748b93463 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -44,18 +44,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUser(body: User) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUserRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -73,6 +65,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUser + * + * @param body Created user object + * @return RequestConfig + */ + fun createUserRequestConfig(body: User) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Creates list of users with given input array * @@ -84,18 +98,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithArrayInput(body: kotlin.collections.List) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user/createWithArray", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUsersWithArrayInputRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -113,6 +119,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUsersWithArrayInput + * + * @param body List of user object + * @return RequestConfig + */ + fun createUsersWithArrayInputRequestConfig(body: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user/createWithArray", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Creates list of users with given input array * @@ -124,18 +152,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithListInput(body: kotlin.collections.List) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user/createWithList", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUsersWithListInputRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -153,6 +173,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUsersWithListInput + * + * @param body List of user object + * @return RequestConfig + */ + fun createUsersWithListInputRequestConfig(body: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user/createWithList", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Delete user * This can only be done by the logged in user. @@ -164,18 +206,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteUser(username: kotlin.String) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deleteUserRequestConfig(username = username) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -193,6 +227,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation deleteUser + * + * @param username The name that needs to be deleted + * @return RequestConfig + */ + fun deleteUserRequestConfig(username: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Get user by user name * @@ -205,18 +261,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getUserByName(username: kotlin.String) : User { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getUserByNameRequestConfig(username = username) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -234,6 +282,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation getUserByName + * + * @param username The name that needs to be fetched. Use user1 for testing. + * @return RequestConfig + */ + fun getUserByNameRequestConfig(username: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Logs user into the system * @@ -247,22 +317,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun loginUser(username: kotlin.String, password: kotlin.String) : kotlin.String { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("username", listOf(username.toString())) - put("password", listOf(password.toString())) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/login", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = loginUserRequestConfig(username = username, password = password) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -280,6 +338,33 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation loginUser + * + * @param username The user name for login + * @param password The password for login in clear text + * @return RequestConfig + */ + fun loginUserRequestConfig(username: kotlin.String, password: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("username", listOf(username.toString())) + put("password", listOf(password.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/login", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Logs out current logged in user session * @@ -290,18 +375,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun logoutUser() : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/logout", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = logoutUserRequestConfig() + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -319,6 +396,27 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation logoutUser + * + * @return RequestConfig + */ + fun logoutUserRequestConfig() : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/logout", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Updated user * This can only be done by the logged in user. @@ -331,18 +429,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updateUser(username: kotlin.String, body: User) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.PUT, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updateUserRequestConfig(username = username, body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -360,4 +450,27 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updateUser + * + * @param username name that need to be deleted + * @param body Updated user object + * @return RequestConfig + */ + fun updateUserRequestConfig(username: kotlin.String, body: User) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.PUT, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 5d64a9add42..bcbb1cf8627 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -137,7 +137,7 @@ open class ApiClient(val baseUrl: String) { } } - protected inline fun request(requestConfig: RequestConfig, body : Any? = null): ApiInfrastructureResponse { + protected inline fun request(requestConfig: RequestConfig): ApiInfrastructureResponse { val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") // take authMethod from operation @@ -174,12 +174,12 @@ open class ApiClient(val baseUrl: String) { val contentType = (headers[ContentType] as String).substringBefore(";").toLowerCase() val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(body, contentType)) + RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) RequestMethod.GET -> Request.Builder().url(url) RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(body, contentType)) + RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) + RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) + RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) }.apply { headers.forEach { header -> addHeader(header.key, header.value) } diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt index 9c22257e223..0f2790f370e 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt @@ -12,5 +12,6 @@ data class RequestConfig( val method: RequestMethod, val path: String, val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf() + val query: MutableMap> = mutableMapOf(), + val body: kotlin.Any? = null ) \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index e4f7f4eeae0..c8b93b33bf6 100644 --- a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -45,18 +45,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun addPet(body: Pet) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = addPetRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -74,6 +66,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation addPet + * + * @param body Pet object that needs to be added to the store + * @return RequestConfig + */ + fun addPetRequestConfig(body: Pet) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Deletes a pet * @@ -86,19 +100,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - apiKey?.apply { localVariableHeaders["api_key"] = this.toString() } - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deletePetRequestConfig(petId = petId, apiKey = apiKey) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -116,6 +121,30 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation deletePet + * + * @param petId Pet id to delete + * @param apiKey (optional) + * @return RequestConfig + */ + fun deletePetRequestConfig(petId: kotlin.Long, apiKey: kotlin.String?) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + apiKey?.apply { localVariableHeaders["api_key"] = this.toString() } + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -128,21 +157,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun findPetsByStatus(status: kotlin.collections.List) : kotlin.collections.List { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("status", toMultiValue(status.toList(), "csv")) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/findByStatus", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = findPetsByStatusRequestConfig(status = status) + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -160,6 +178,31 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation findPetsByStatus + * + * @param status Status values that need to be considered for filter + * @return RequestConfig + */ + fun findPetsByStatusRequestConfig(status: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("status", toMultiValue(status.toList(), "csv")) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/findByStatus", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -173,21 +216,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) @Deprecated(message = "This operation is deprecated.") fun findPetsByTags(tags: kotlin.collections.List) : kotlin.collections.List { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("tags", toMultiValue(tags.toList(), "csv")) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/findByTags", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = findPetsByTagsRequestConfig(tags = tags) + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -205,6 +237,32 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation findPetsByTags + * + * @param tags Tags to filter by + * @return RequestConfig + */ + @Deprecated(message = "This operation is deprecated.") + fun findPetsByTagsRequestConfig(tags: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("tags", toMultiValue(tags.toList(), "csv")) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/findByTags", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Find pet by ID * Returns a single pet @@ -217,18 +275,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getPetById(petId: kotlin.Long) : Pet { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getPetByIdRequestConfig(petId = petId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -246,6 +296,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation getPetById + * + * @param petId ID of pet to return + * @return RequestConfig + */ + fun getPetByIdRequestConfig(petId: kotlin.Long) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Update an existing pet * @@ -257,18 +329,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePet(body: Pet) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.PUT, - "/pet", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updatePetRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -286,6 +350,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updatePet + * + * @param body Pet object that needs to be added to the store + * @return RequestConfig + */ + fun updatePetRequestConfig(body: Pet) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.PUT, + path = "/pet", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Updates a pet in the store with form data * @@ -299,18 +385,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : Unit { - val localVariableBody: kotlin.Any? = mapOf("name" to name, "status" to status) - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -328,6 +406,30 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updatePetWithForm + * + * @param petId ID of pet that needs to be updated + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return RequestConfig + */ + fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig { + val localVariableBody: kotlin.Any? = mapOf("name" to name, "status" to status) + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * uploads an image * @@ -342,18 +444,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { - val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to additionalMetadata, "file" to file) - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -371,4 +465,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation uploadFile + * + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return RequestConfig + */ + fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig { + val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to additionalMetadata, "file" to file) + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 08822c67e32..215ed63420c 100644 --- a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -44,18 +44,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteOrder(orderId: kotlin.String) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deleteOrderRequestConfig(orderId = orderId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -73,6 +65,28 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation deleteOrder + * + * @param orderId ID of the order that needs to be deleted + * @return RequestConfig + */ + fun deleteOrderRequestConfig(orderId: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Returns pet inventories by status * Returns a map of status codes to quantities @@ -84,18 +98,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getInventory() : kotlin.collections.Map { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/store/inventory", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getInventoryRequestConfig() + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -113,6 +119,27 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation getInventory + * + * @return RequestConfig + */ + fun getInventoryRequestConfig() : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/store/inventory", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Find purchase order by ID * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -125,18 +152,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getOrderById(orderId: kotlin.Long) : Order { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getOrderByIdRequestConfig(orderId = orderId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -154,6 +173,28 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation getOrderById + * + * @param orderId ID of pet that needs to be fetched + * @return RequestConfig + */ + fun getOrderByIdRequestConfig(orderId: kotlin.Long) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Place an order for a pet * @@ -166,18 +207,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun placeOrder(body: Order) : Order { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/store/order", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = placeOrderRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -195,4 +228,26 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation placeOrder + * + * @param body order placed for purchasing the pet + * @return RequestConfig + */ + fun placeOrderRequestConfig(body: Order) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/store/order", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 258a2540e9e..53748b93463 100644 --- a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -44,18 +44,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUser(body: User) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUserRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -73,6 +65,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUser + * + * @param body Created user object + * @return RequestConfig + */ + fun createUserRequestConfig(body: User) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Creates list of users with given input array * @@ -84,18 +98,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithArrayInput(body: kotlin.collections.List) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user/createWithArray", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUsersWithArrayInputRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -113,6 +119,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUsersWithArrayInput + * + * @param body List of user object + * @return RequestConfig + */ + fun createUsersWithArrayInputRequestConfig(body: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user/createWithArray", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Creates list of users with given input array * @@ -124,18 +152,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithListInput(body: kotlin.collections.List) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user/createWithList", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUsersWithListInputRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -153,6 +173,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUsersWithListInput + * + * @param body List of user object + * @return RequestConfig + */ + fun createUsersWithListInputRequestConfig(body: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user/createWithList", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Delete user * This can only be done by the logged in user. @@ -164,18 +206,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteUser(username: kotlin.String) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deleteUserRequestConfig(username = username) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -193,6 +227,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation deleteUser + * + * @param username The name that needs to be deleted + * @return RequestConfig + */ + fun deleteUserRequestConfig(username: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Get user by user name * @@ -205,18 +261,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getUserByName(username: kotlin.String) : User { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getUserByNameRequestConfig(username = username) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -234,6 +282,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation getUserByName + * + * @param username The name that needs to be fetched. Use user1 for testing. + * @return RequestConfig + */ + fun getUserByNameRequestConfig(username: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Logs user into the system * @@ -247,22 +317,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun loginUser(username: kotlin.String, password: kotlin.String) : kotlin.String { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("username", listOf(username.toString())) - put("password", listOf(password.toString())) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/login", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = loginUserRequestConfig(username = username, password = password) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -280,6 +338,33 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation loginUser + * + * @param username The user name for login + * @param password The password for login in clear text + * @return RequestConfig + */ + fun loginUserRequestConfig(username: kotlin.String, password: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("username", listOf(username.toString())) + put("password", listOf(password.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/login", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Logs out current logged in user session * @@ -290,18 +375,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun logoutUser() : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/logout", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = logoutUserRequestConfig() + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -319,6 +396,27 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation logoutUser + * + * @return RequestConfig + */ + fun logoutUserRequestConfig() : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/logout", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Updated user * This can only be done by the logged in user. @@ -331,18 +429,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updateUser(username: kotlin.String, body: User) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.PUT, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updateUserRequestConfig(username = username, body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -360,4 +450,27 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updateUser + * + * @param username name that need to be deleted + * @param body Updated user object + * @return RequestConfig + */ + fun updateUserRequestConfig(username: kotlin.String, body: User) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.PUT, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 2c15d73b189..637ca64c247 100644 --- a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -137,7 +137,7 @@ open class ApiClient(val baseUrl: String) { } } - protected inline fun request(requestConfig: RequestConfig, body : Any? = null): ApiInfrastructureResponse { + protected inline fun request(requestConfig: RequestConfig): ApiInfrastructureResponse { val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") // take authMethod from operation @@ -174,12 +174,12 @@ open class ApiClient(val baseUrl: String) { val contentType = (headers[ContentType] as String).substringBefore(";").toLowerCase() val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(body, contentType)) + RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) RequestMethod.GET -> Request.Builder().url(url) RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(body, contentType)) + RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) + RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) + RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) }.apply { headers.forEach { header -> addHeader(header.key, header.value) } diff --git a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt index 9c22257e223..0f2790f370e 100644 --- a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt @@ -12,5 +12,6 @@ data class RequestConfig( val method: RequestMethod, val path: String, val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf() + val query: MutableMap> = mutableMapOf(), + val body: kotlin.Any? = null ) \ No newline at end of file diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index 6685f0a73d4..d939e3d5a43 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -45,18 +45,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun addPet(body: Pet) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = addPetRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -74,6 +66,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation addPet + * + * @param body Pet object that needs to be added to the store + * @return RequestConfig + */ + fun addPetRequestConfig(body: Pet) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Deletes a pet * @@ -86,19 +100,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - apiKey?.apply { localVariableHeaders["api_key"] = this.toString() } - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deletePetRequestConfig(petId = petId, apiKey = apiKey) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -116,6 +121,30 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation deletePet + * + * @param petId Pet id to delete + * @param apiKey (optional) + * @return RequestConfig + */ + fun deletePetRequestConfig(petId: kotlin.Long, apiKey: kotlin.String?) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + apiKey?.apply { localVariableHeaders["api_key"] = this.toString() } + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -129,21 +158,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) @Deprecated(message = "This operation is deprecated.") fun findPetsByTags(tags: kotlin.collections.List) : kotlin.collections.List { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("tags", toMultiValue(tags.toList(), "csv")) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/findByTags", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = findPetsByTagsRequestConfig(tags = tags) + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -161,6 +179,32 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation findPetsByTags + * + * @param tags Tags to filter by + * @return RequestConfig + */ + @Deprecated(message = "This operation is deprecated.") + fun findPetsByTagsRequestConfig(tags: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("tags", toMultiValue(tags.toList(), "csv")) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/findByTags", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Get all pets * @@ -173,23 +217,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getAllPets(lastUpdated: java.time.OffsetDateTime?) : kotlin.collections.List { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - if (lastUpdated != null) { - put("lastUpdated", listOf(parseDateToQueryString(lastUpdated))) - } - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/getAll", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getAllPetsRequestConfig(lastUpdated = lastUpdated) + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -207,6 +238,33 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation getAllPets + * + * @param lastUpdated When this endpoint was hit last to help indentify if the client already has the latest copy. (optional) + * @return RequestConfig + */ + fun getAllPetsRequestConfig(lastUpdated: java.time.OffsetDateTime?) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + if (lastUpdated != null) { + put("lastUpdated", listOf(parseDateToQueryString(lastUpdated))) + } + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/getAll", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Find pet by ID * Returns a single pet @@ -219,18 +277,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getPetById(petId: kotlin.Long) : Pet { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getPetByIdRequestConfig(petId = petId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -248,6 +298,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation getPetById + * + * @param petId ID of pet to return + * @return RequestConfig + */ + fun getPetByIdRequestConfig(petId: kotlin.Long) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Update an existing pet * @@ -259,18 +331,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePet(body: Pet) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.PUT, - "/pet", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updatePetRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -288,6 +352,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updatePet + * + * @param body Pet object that needs to be added to the store + * @return RequestConfig + */ + fun updatePetRequestConfig(body: Pet) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.PUT, + path = "/pet", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Updates a pet in the store with form data * @@ -301,18 +387,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : Unit { - val localVariableBody: kotlin.Any? = mapOf("name" to name, "status" to status) - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -330,6 +408,30 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updatePetWithForm + * + * @param petId ID of pet that needs to be updated + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return RequestConfig + */ + fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig { + val localVariableBody: kotlin.Any? = mapOf("name" to name, "status" to status) + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * uploads an image * @@ -344,18 +446,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { - val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to additionalMetadata, "file" to file) - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -373,4 +467,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation uploadFile + * + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return RequestConfig + */ + fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig { + val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to additionalMetadata, "file" to file) + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 08822c67e32..215ed63420c 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -44,18 +44,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteOrder(orderId: kotlin.String) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deleteOrderRequestConfig(orderId = orderId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -73,6 +65,28 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation deleteOrder + * + * @param orderId ID of the order that needs to be deleted + * @return RequestConfig + */ + fun deleteOrderRequestConfig(orderId: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Returns pet inventories by status * Returns a map of status codes to quantities @@ -84,18 +98,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getInventory() : kotlin.collections.Map { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/store/inventory", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getInventoryRequestConfig() + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -113,6 +119,27 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation getInventory + * + * @return RequestConfig + */ + fun getInventoryRequestConfig() : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/store/inventory", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Find purchase order by ID * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -125,18 +152,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getOrderById(orderId: kotlin.Long) : Order { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getOrderByIdRequestConfig(orderId = orderId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -154,6 +173,28 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation getOrderById + * + * @param orderId ID of pet that needs to be fetched + * @return RequestConfig + */ + fun getOrderByIdRequestConfig(orderId: kotlin.Long) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Place an order for a pet * @@ -166,18 +207,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun placeOrder(body: Order) : Order { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/store/order", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = placeOrderRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -195,4 +228,26 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation placeOrder + * + * @param body order placed for purchasing the pet + * @return RequestConfig + */ + fun placeOrderRequestConfig(body: Order) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/store/order", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 258a2540e9e..53748b93463 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -44,18 +44,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUser(body: User) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUserRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -73,6 +65,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUser + * + * @param body Created user object + * @return RequestConfig + */ + fun createUserRequestConfig(body: User) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Creates list of users with given input array * @@ -84,18 +98,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithArrayInput(body: kotlin.collections.List) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user/createWithArray", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUsersWithArrayInputRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -113,6 +119,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUsersWithArrayInput + * + * @param body List of user object + * @return RequestConfig + */ + fun createUsersWithArrayInputRequestConfig(body: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user/createWithArray", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Creates list of users with given input array * @@ -124,18 +152,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithListInput(body: kotlin.collections.List) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user/createWithList", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUsersWithListInputRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -153,6 +173,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUsersWithListInput + * + * @param body List of user object + * @return RequestConfig + */ + fun createUsersWithListInputRequestConfig(body: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user/createWithList", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Delete user * This can only be done by the logged in user. @@ -164,18 +206,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteUser(username: kotlin.String) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deleteUserRequestConfig(username = username) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -193,6 +227,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation deleteUser + * + * @param username The name that needs to be deleted + * @return RequestConfig + */ + fun deleteUserRequestConfig(username: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Get user by user name * @@ -205,18 +261,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getUserByName(username: kotlin.String) : User { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getUserByNameRequestConfig(username = username) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -234,6 +282,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation getUserByName + * + * @param username The name that needs to be fetched. Use user1 for testing. + * @return RequestConfig + */ + fun getUserByNameRequestConfig(username: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Logs user into the system * @@ -247,22 +317,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun loginUser(username: kotlin.String, password: kotlin.String) : kotlin.String { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("username", listOf(username.toString())) - put("password", listOf(password.toString())) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/login", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = loginUserRequestConfig(username = username, password = password) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -280,6 +338,33 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation loginUser + * + * @param username The user name for login + * @param password The password for login in clear text + * @return RequestConfig + */ + fun loginUserRequestConfig(username: kotlin.String, password: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("username", listOf(username.toString())) + put("password", listOf(password.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/login", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Logs out current logged in user session * @@ -290,18 +375,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun logoutUser() : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/logout", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = logoutUserRequestConfig() + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -319,6 +396,27 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation logoutUser + * + * @return RequestConfig + */ + fun logoutUserRequestConfig() : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/logout", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Updated user * This can only be done by the logged in user. @@ -331,18 +429,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updateUser(username: kotlin.String, body: User) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.PUT, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updateUserRequestConfig(username = username, body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -360,4 +450,27 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updateUser + * + * @param username name that need to be deleted + * @param body Updated user object + * @return RequestConfig + */ + fun updateUserRequestConfig(username: kotlin.String, body: User) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.PUT, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index a69de1961da..e1d5bc9c412 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -137,7 +137,7 @@ open class ApiClient(val baseUrl: String) { } } - protected inline fun request(requestConfig: RequestConfig, body : Any? = null): ApiInfrastructureResponse { + protected inline fun request(requestConfig: RequestConfig): ApiInfrastructureResponse { val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") // take authMethod from operation @@ -174,12 +174,12 @@ open class ApiClient(val baseUrl: String) { val contentType = (headers[ContentType] as String).substringBefore(";").toLowerCase() val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(body, contentType)) + RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) RequestMethod.GET -> Request.Builder().url(url) RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(body, contentType)) + RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) + RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) + RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) }.apply { headers.forEach { header -> addHeader(header.key, header.value) } diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt index 9c22257e223..0f2790f370e 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt @@ -12,5 +12,6 @@ data class RequestConfig( val method: RequestMethod, val path: String, val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf() + val query: MutableMap> = mutableMapOf(), + val body: kotlin.Any? = null ) \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index 1ca2057e217..78223583f64 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -45,18 +45,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) suspend fun addPet(body: Pet) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = addPetRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -74,6 +66,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation addPet + * + * @param body Pet object that needs to be added to the store + * @return RequestConfig + */ + fun addPetRequestConfig(body: Pet) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Deletes a pet * @@ -86,19 +100,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) suspend fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - apiKey?.apply { localVariableHeaders["api_key"] = this.toString() } - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deletePetRequestConfig(petId = petId, apiKey = apiKey) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -116,6 +121,30 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation deletePet + * + * @param petId Pet id to delete + * @param apiKey (optional) + * @return RequestConfig + */ + fun deletePetRequestConfig(petId: kotlin.Long, apiKey: kotlin.String?) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + apiKey?.apply { localVariableHeaders["api_key"] = this.toString() } + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -128,21 +157,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) suspend fun findPetsByStatus(status: kotlin.collections.List) : kotlin.collections.List { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("status", toMultiValue(status.toList(), "csv")) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/findByStatus", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = findPetsByStatusRequestConfig(status = status) + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -160,6 +178,31 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation findPetsByStatus + * + * @param status Status values that need to be considered for filter + * @return RequestConfig + */ + fun findPetsByStatusRequestConfig(status: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("status", toMultiValue(status.toList(), "csv")) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/findByStatus", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -173,21 +216,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) @Deprecated(message = "This operation is deprecated.") suspend fun findPetsByTags(tags: kotlin.collections.List) : kotlin.collections.List { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("tags", toMultiValue(tags.toList(), "csv")) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/findByTags", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = findPetsByTagsRequestConfig(tags = tags) + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -205,6 +237,32 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation findPetsByTags + * + * @param tags Tags to filter by + * @return RequestConfig + */ + @Deprecated(message = "This operation is deprecated.") + fun findPetsByTagsRequestConfig(tags: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("tags", toMultiValue(tags.toList(), "csv")) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/findByTags", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Find pet by ID * Returns a single pet @@ -217,18 +275,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) suspend fun getPetById(petId: kotlin.Long) : Pet { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getPetByIdRequestConfig(petId = petId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -246,6 +296,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation getPetById + * + * @param petId ID of pet to return + * @return RequestConfig + */ + fun getPetByIdRequestConfig(petId: kotlin.Long) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Update an existing pet * @@ -257,18 +329,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) suspend fun updatePet(body: Pet) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.PUT, - "/pet", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updatePetRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -286,6 +350,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updatePet + * + * @param body Pet object that needs to be added to the store + * @return RequestConfig + */ + fun updatePetRequestConfig(body: Pet) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.PUT, + path = "/pet", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Updates a pet in the store with form data * @@ -299,18 +385,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) suspend fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : Unit { - val localVariableBody: kotlin.Any? = mapOf("name" to name, "status" to status) - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -328,6 +406,30 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updatePetWithForm + * + * @param petId ID of pet that needs to be updated + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return RequestConfig + */ + fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig { + val localVariableBody: kotlin.Any? = mapOf("name" to name, "status" to status) + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * uploads an image * @@ -342,18 +444,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) suspend fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { - val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to additionalMetadata, "file" to file) - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -371,4 +465,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation uploadFile + * + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return RequestConfig + */ + fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig { + val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to additionalMetadata, "file" to file) + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index deb7ba6cf49..4ab794d6608 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -44,18 +44,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) suspend fun deleteOrder(orderId: kotlin.String) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deleteOrderRequestConfig(orderId = orderId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -73,6 +65,28 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation deleteOrder + * + * @param orderId ID of the order that needs to be deleted + * @return RequestConfig + */ + fun deleteOrderRequestConfig(orderId: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Returns pet inventories by status * Returns a map of status codes to quantities @@ -84,18 +98,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) suspend fun getInventory() : kotlin.collections.Map { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/store/inventory", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getInventoryRequestConfig() + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -113,6 +119,27 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation getInventory + * + * @return RequestConfig + */ + fun getInventoryRequestConfig() : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/store/inventory", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Find purchase order by ID * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -125,18 +152,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) suspend fun getOrderById(orderId: kotlin.Long) : Order { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getOrderByIdRequestConfig(orderId = orderId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -154,6 +173,28 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation getOrderById + * + * @param orderId ID of pet that needs to be fetched + * @return RequestConfig + */ + fun getOrderByIdRequestConfig(orderId: kotlin.Long) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Place an order for a pet * @@ -166,18 +207,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) suspend fun placeOrder(body: Order) : Order { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/store/order", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = placeOrderRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -195,4 +228,26 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation placeOrder + * + * @param body order placed for purchasing the pet + * @return RequestConfig + */ + fun placeOrderRequestConfig(body: Order) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/store/order", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 6494674c7f3..911bbee5b6b 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -44,18 +44,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) suspend fun createUser(body: User) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUserRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -73,6 +65,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUser + * + * @param body Created user object + * @return RequestConfig + */ + fun createUserRequestConfig(body: User) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Creates list of users with given input array * @@ -84,18 +98,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) suspend fun createUsersWithArrayInput(body: kotlin.collections.List) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user/createWithArray", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUsersWithArrayInputRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -113,6 +119,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUsersWithArrayInput + * + * @param body List of user object + * @return RequestConfig + */ + fun createUsersWithArrayInputRequestConfig(body: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user/createWithArray", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Creates list of users with given input array * @@ -124,18 +152,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) suspend fun createUsersWithListInput(body: kotlin.collections.List) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user/createWithList", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUsersWithListInputRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -153,6 +173,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUsersWithListInput + * + * @param body List of user object + * @return RequestConfig + */ + fun createUsersWithListInputRequestConfig(body: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user/createWithList", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Delete user * This can only be done by the logged in user. @@ -164,18 +206,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) suspend fun deleteUser(username: kotlin.String) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deleteUserRequestConfig(username = username) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -193,6 +227,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation deleteUser + * + * @param username The name that needs to be deleted + * @return RequestConfig + */ + fun deleteUserRequestConfig(username: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Get user by user name * @@ -205,18 +261,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) suspend fun getUserByName(username: kotlin.String) : User { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getUserByNameRequestConfig(username = username) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -234,6 +282,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation getUserByName + * + * @param username The name that needs to be fetched. Use user1 for testing. + * @return RequestConfig + */ + fun getUserByNameRequestConfig(username: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Logs user into the system * @@ -247,22 +317,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) suspend fun loginUser(username: kotlin.String, password: kotlin.String) : kotlin.String { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("username", listOf(username.toString())) - put("password", listOf(password.toString())) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/login", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = loginUserRequestConfig(username = username, password = password) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -280,6 +338,33 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation loginUser + * + * @param username The user name for login + * @param password The password for login in clear text + * @return RequestConfig + */ + fun loginUserRequestConfig(username: kotlin.String, password: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("username", listOf(username.toString())) + put("password", listOf(password.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/login", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Logs out current logged in user session * @@ -290,18 +375,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) suspend fun logoutUser() : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/logout", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = logoutUserRequestConfig() + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -319,6 +396,27 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation logoutUser + * + * @return RequestConfig + */ + fun logoutUserRequestConfig() : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/logout", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Updated user * This can only be done by the logged in user. @@ -331,18 +429,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) suspend fun updateUser(username: kotlin.String, body: User) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.PUT, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updateUserRequestConfig(username = username, body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -360,4 +450,27 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updateUser + * + * @param username name that need to be deleted + * @param body Updated user object + * @return RequestConfig + */ + fun updateUserRequestConfig(username: kotlin.String, body: User) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.PUT, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 5d64a9add42..bcbb1cf8627 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -137,7 +137,7 @@ open class ApiClient(val baseUrl: String) { } } - protected inline fun request(requestConfig: RequestConfig, body : Any? = null): ApiInfrastructureResponse { + protected inline fun request(requestConfig: RequestConfig): ApiInfrastructureResponse { val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") // take authMethod from operation @@ -174,12 +174,12 @@ open class ApiClient(val baseUrl: String) { val contentType = (headers[ContentType] as String).substringBefore(";").toLowerCase() val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(body, contentType)) + RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) RequestMethod.GET -> Request.Builder().url(url) RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(body, contentType)) + RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) + RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) + RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) }.apply { headers.forEach { header -> addHeader(header.key, header.value) } diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt index 9c22257e223..0f2790f370e 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt @@ -12,5 +12,6 @@ data class RequestConfig( val method: RequestMethod, val path: String, val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf() + val query: MutableMap> = mutableMapOf(), + val body: kotlin.Any? = null ) \ No newline at end of file diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index e4f7f4eeae0..c8b93b33bf6 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -45,18 +45,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun addPet(body: Pet) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = addPetRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -74,6 +66,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation addPet + * + * @param body Pet object that needs to be added to the store + * @return RequestConfig + */ + fun addPetRequestConfig(body: Pet) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Deletes a pet * @@ -86,19 +100,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - apiKey?.apply { localVariableHeaders["api_key"] = this.toString() } - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deletePetRequestConfig(petId = petId, apiKey = apiKey) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -116,6 +121,30 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation deletePet + * + * @param petId Pet id to delete + * @param apiKey (optional) + * @return RequestConfig + */ + fun deletePetRequestConfig(petId: kotlin.Long, apiKey: kotlin.String?) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + apiKey?.apply { localVariableHeaders["api_key"] = this.toString() } + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -128,21 +157,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun findPetsByStatus(status: kotlin.collections.List) : kotlin.collections.List { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("status", toMultiValue(status.toList(), "csv")) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/findByStatus", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = findPetsByStatusRequestConfig(status = status) + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -160,6 +178,31 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation findPetsByStatus + * + * @param status Status values that need to be considered for filter + * @return RequestConfig + */ + fun findPetsByStatusRequestConfig(status: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("status", toMultiValue(status.toList(), "csv")) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/findByStatus", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -173,21 +216,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) @Deprecated(message = "This operation is deprecated.") fun findPetsByTags(tags: kotlin.collections.List) : kotlin.collections.List { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("tags", toMultiValue(tags.toList(), "csv")) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/findByTags", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = findPetsByTagsRequestConfig(tags = tags) + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -205,6 +237,32 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation findPetsByTags + * + * @param tags Tags to filter by + * @return RequestConfig + */ + @Deprecated(message = "This operation is deprecated.") + fun findPetsByTagsRequestConfig(tags: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("tags", toMultiValue(tags.toList(), "csv")) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/findByTags", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Find pet by ID * Returns a single pet @@ -217,18 +275,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getPetById(petId: kotlin.Long) : Pet { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getPetByIdRequestConfig(petId = petId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -246,6 +296,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation getPetById + * + * @param petId ID of pet to return + * @return RequestConfig + */ + fun getPetByIdRequestConfig(petId: kotlin.Long) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Update an existing pet * @@ -257,18 +329,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePet(body: Pet) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.PUT, - "/pet", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updatePetRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -286,6 +350,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updatePet + * + * @param body Pet object that needs to be added to the store + * @return RequestConfig + */ + fun updatePetRequestConfig(body: Pet) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.PUT, + path = "/pet", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Updates a pet in the store with form data * @@ -299,18 +385,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : Unit { - val localVariableBody: kotlin.Any? = mapOf("name" to name, "status" to status) - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -328,6 +406,30 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updatePetWithForm + * + * @param petId ID of pet that needs to be updated + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return RequestConfig + */ + fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig { + val localVariableBody: kotlin.Any? = mapOf("name" to name, "status" to status) + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * uploads an image * @@ -342,18 +444,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { - val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to additionalMetadata, "file" to file) - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -371,4 +465,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation uploadFile + * + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return RequestConfig + */ + fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig { + val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to additionalMetadata, "file" to file) + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 08822c67e32..215ed63420c 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -44,18 +44,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteOrder(orderId: kotlin.String) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deleteOrderRequestConfig(orderId = orderId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -73,6 +65,28 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation deleteOrder + * + * @param orderId ID of the order that needs to be deleted + * @return RequestConfig + */ + fun deleteOrderRequestConfig(orderId: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Returns pet inventories by status * Returns a map of status codes to quantities @@ -84,18 +98,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getInventory() : kotlin.collections.Map { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/store/inventory", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getInventoryRequestConfig() + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -113,6 +119,27 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation getInventory + * + * @return RequestConfig + */ + fun getInventoryRequestConfig() : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/store/inventory", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Find purchase order by ID * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -125,18 +152,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getOrderById(orderId: kotlin.Long) : Order { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getOrderByIdRequestConfig(orderId = orderId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -154,6 +173,28 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation getOrderById + * + * @param orderId ID of pet that needs to be fetched + * @return RequestConfig + */ + fun getOrderByIdRequestConfig(orderId: kotlin.Long) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Place an order for a pet * @@ -166,18 +207,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun placeOrder(body: Order) : Order { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/store/order", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = placeOrderRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -195,4 +228,26 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation placeOrder + * + * @param body order placed for purchasing the pet + * @return RequestConfig + */ + fun placeOrderRequestConfig(body: Order) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/store/order", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 258a2540e9e..53748b93463 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -44,18 +44,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUser(body: User) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUserRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -73,6 +65,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUser + * + * @param body Created user object + * @return RequestConfig + */ + fun createUserRequestConfig(body: User) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Creates list of users with given input array * @@ -84,18 +98,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithArrayInput(body: kotlin.collections.List) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user/createWithArray", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUsersWithArrayInputRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -113,6 +119,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUsersWithArrayInput + * + * @param body List of user object + * @return RequestConfig + */ + fun createUsersWithArrayInputRequestConfig(body: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user/createWithArray", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Creates list of users with given input array * @@ -124,18 +152,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithListInput(body: kotlin.collections.List) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user/createWithList", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUsersWithListInputRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -153,6 +173,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUsersWithListInput + * + * @param body List of user object + * @return RequestConfig + */ + fun createUsersWithListInputRequestConfig(body: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user/createWithList", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Delete user * This can only be done by the logged in user. @@ -164,18 +206,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteUser(username: kotlin.String) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deleteUserRequestConfig(username = username) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -193,6 +227,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation deleteUser + * + * @param username The name that needs to be deleted + * @return RequestConfig + */ + fun deleteUserRequestConfig(username: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Get user by user name * @@ -205,18 +261,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getUserByName(username: kotlin.String) : User { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getUserByNameRequestConfig(username = username) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -234,6 +282,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation getUserByName + * + * @param username The name that needs to be fetched. Use user1 for testing. + * @return RequestConfig + */ + fun getUserByNameRequestConfig(username: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Logs user into the system * @@ -247,22 +317,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun loginUser(username: kotlin.String, password: kotlin.String) : kotlin.String { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("username", listOf(username.toString())) - put("password", listOf(password.toString())) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/login", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = loginUserRequestConfig(username = username, password = password) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -280,6 +338,33 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation loginUser + * + * @param username The user name for login + * @param password The password for login in clear text + * @return RequestConfig + */ + fun loginUserRequestConfig(username: kotlin.String, password: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("username", listOf(username.toString())) + put("password", listOf(password.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/login", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Logs out current logged in user session * @@ -290,18 +375,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun logoutUser() : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/logout", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = logoutUserRequestConfig() + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -319,6 +396,27 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation logoutUser + * + * @return RequestConfig + */ + fun logoutUserRequestConfig() : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/logout", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Updated user * This can only be done by the logged in user. @@ -331,18 +429,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updateUser(username: kotlin.String, body: User) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.PUT, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updateUserRequestConfig(username = username, body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -360,4 +450,27 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updateUser + * + * @param username name that need to be deleted + * @param body Updated user object + * @return RequestConfig + */ + fun updateUserRequestConfig(username: kotlin.String, body: User) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.PUT, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index e7f366d02cd..7a8dcc91cd4 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -137,7 +137,7 @@ open class ApiClient(val baseUrl: String) { } } - protected inline fun request(requestConfig: RequestConfig, body : Any? = null): ApiInfrastructureResponse { + protected inline fun request(requestConfig: RequestConfig): ApiInfrastructureResponse { val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") // take authMethod from operation @@ -174,12 +174,12 @@ open class ApiClient(val baseUrl: String) { val contentType = (headers[ContentType] as String).substringBefore(";").toLowerCase() val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(body, contentType)) + RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) RequestMethod.GET -> Request.Builder().url(url) RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(body, contentType)) + RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) + RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) + RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) }.apply { headers.forEach { header -> addHeader(header.key, header.value) } diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt index 9c22257e223..0f2790f370e 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt @@ -12,5 +12,6 @@ data class RequestConfig( val method: RequestMethod, val path: String, val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf() + val query: MutableMap> = mutableMapOf(), + val body: kotlin.Any? = null ) \ No newline at end of file diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt index 9c22257e223..0f2790f370e 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt @@ -12,5 +12,6 @@ data class RequestConfig( val method: RequestMethod, val path: String, val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf() + val query: MutableMap> = mutableMapOf(), + val body: kotlin.Any? = null ) \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index 69cb6b35ef2..b6b38fa42f3 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -45,18 +45,10 @@ internal class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(bas */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun addPet(body: Pet) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = addPetRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -74,6 +66,28 @@ internal class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(bas } } + /** + * To obtain the request config of the operation addPet + * + * @param body Pet object that needs to be added to the store + * @return RequestConfig + */ + fun addPetRequestConfig(body: Pet) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Deletes a pet * @@ -86,19 +100,10 @@ internal class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(bas */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - apiKey?.apply { localVariableHeaders["api_key"] = this.toString() } - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deletePetRequestConfig(petId = petId, apiKey = apiKey) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -116,6 +121,30 @@ internal class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(bas } } + /** + * To obtain the request config of the operation deletePet + * + * @param petId Pet id to delete + * @param apiKey (optional) + * @return RequestConfig + */ + fun deletePetRequestConfig(petId: kotlin.Long, apiKey: kotlin.String?) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + apiKey?.apply { localVariableHeaders["api_key"] = this.toString() } + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -128,21 +157,10 @@ internal class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(bas @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun findPetsByStatus(status: kotlin.collections.List) : kotlin.collections.List { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("status", toMultiValue(status.toList(), "csv")) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/findByStatus", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = findPetsByStatusRequestConfig(status = status) + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -160,6 +178,31 @@ internal class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(bas } } + /** + * To obtain the request config of the operation findPetsByStatus + * + * @param status Status values that need to be considered for filter + * @return RequestConfig + */ + fun findPetsByStatusRequestConfig(status: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("status", toMultiValue(status.toList(), "csv")) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/findByStatus", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -173,21 +216,10 @@ internal class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(bas @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) @Deprecated(message = "This operation is deprecated.") fun findPetsByTags(tags: kotlin.collections.List) : kotlin.collections.List { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("tags", toMultiValue(tags.toList(), "csv")) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/findByTags", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = findPetsByTagsRequestConfig(tags = tags) + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -205,6 +237,32 @@ internal class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(bas } } + /** + * To obtain the request config of the operation findPetsByTags + * + * @param tags Tags to filter by + * @return RequestConfig + */ + @Deprecated(message = "This operation is deprecated.") + fun findPetsByTagsRequestConfig(tags: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("tags", toMultiValue(tags.toList(), "csv")) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/findByTags", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Find pet by ID * Returns a single pet @@ -217,18 +275,10 @@ internal class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(bas @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getPetById(petId: kotlin.Long) : Pet { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getPetByIdRequestConfig(petId = petId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -246,6 +296,28 @@ internal class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(bas } } + /** + * To obtain the request config of the operation getPetById + * + * @param petId ID of pet to return + * @return RequestConfig + */ + fun getPetByIdRequestConfig(petId: kotlin.Long) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Update an existing pet * @@ -257,18 +329,10 @@ internal class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(bas */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePet(body: Pet) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.PUT, - "/pet", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updatePetRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -286,6 +350,28 @@ internal class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(bas } } + /** + * To obtain the request config of the operation updatePet + * + * @param body Pet object that needs to be added to the store + * @return RequestConfig + */ + fun updatePetRequestConfig(body: Pet) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.PUT, + path = "/pet", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Updates a pet in the store with form data * @@ -299,18 +385,10 @@ internal class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(bas */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : Unit { - val localVariableBody: kotlin.Any? = mapOf("name" to name, "status" to status) - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -328,6 +406,30 @@ internal class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(bas } } + /** + * To obtain the request config of the operation updatePetWithForm + * + * @param petId ID of pet that needs to be updated + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return RequestConfig + */ + fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig { + val localVariableBody: kotlin.Any? = mapOf("name" to name, "status" to status) + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * uploads an image * @@ -342,18 +444,10 @@ internal class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(bas @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { - val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to additionalMetadata, "file" to file) - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -371,4 +465,28 @@ internal class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(bas } } + /** + * To obtain the request config of the operation uploadFile + * + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return RequestConfig + */ + fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig { + val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to additionalMetadata, "file" to file) + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 4f8898adf9b..19b7acdbd31 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -44,18 +44,10 @@ internal class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(b */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteOrder(orderId: kotlin.String) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deleteOrderRequestConfig(orderId = orderId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -73,6 +65,28 @@ internal class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(b } } + /** + * To obtain the request config of the operation deleteOrder + * + * @param orderId ID of the order that needs to be deleted + * @return RequestConfig + */ + fun deleteOrderRequestConfig(orderId: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Returns pet inventories by status * Returns a map of status codes to quantities @@ -84,18 +98,10 @@ internal class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(b @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getInventory() : kotlin.collections.Map { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/store/inventory", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getInventoryRequestConfig() + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -113,6 +119,27 @@ internal class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(b } } + /** + * To obtain the request config of the operation getInventory + * + * @return RequestConfig + */ + fun getInventoryRequestConfig() : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/store/inventory", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Find purchase order by ID * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -125,18 +152,10 @@ internal class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(b @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getOrderById(orderId: kotlin.Long) : Order { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getOrderByIdRequestConfig(orderId = orderId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -154,6 +173,28 @@ internal class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(b } } + /** + * To obtain the request config of the operation getOrderById + * + * @param orderId ID of pet that needs to be fetched + * @return RequestConfig + */ + fun getOrderByIdRequestConfig(orderId: kotlin.Long) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Place an order for a pet * @@ -166,18 +207,10 @@ internal class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(b @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun placeOrder(body: Order) : Order { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/store/order", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = placeOrderRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -195,4 +228,26 @@ internal class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(b } } + /** + * To obtain the request config of the operation placeOrder + * + * @param body order placed for purchasing the pet + * @return RequestConfig + */ + fun placeOrderRequestConfig(body: Order) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/store/order", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 725b36b0106..979bb1b81f8 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -44,18 +44,10 @@ internal class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(ba */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUser(body: User) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUserRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -73,6 +65,28 @@ internal class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(ba } } + /** + * To obtain the request config of the operation createUser + * + * @param body Created user object + * @return RequestConfig + */ + fun createUserRequestConfig(body: User) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Creates list of users with given input array * @@ -84,18 +98,10 @@ internal class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(ba */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithArrayInput(body: kotlin.collections.List) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user/createWithArray", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUsersWithArrayInputRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -113,6 +119,28 @@ internal class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(ba } } + /** + * To obtain the request config of the operation createUsersWithArrayInput + * + * @param body List of user object + * @return RequestConfig + */ + fun createUsersWithArrayInputRequestConfig(body: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user/createWithArray", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Creates list of users with given input array * @@ -124,18 +152,10 @@ internal class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(ba */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithListInput(body: kotlin.collections.List) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user/createWithList", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUsersWithListInputRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -153,6 +173,28 @@ internal class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(ba } } + /** + * To obtain the request config of the operation createUsersWithListInput + * + * @param body List of user object + * @return RequestConfig + */ + fun createUsersWithListInputRequestConfig(body: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user/createWithList", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Delete user * This can only be done by the logged in user. @@ -164,18 +206,10 @@ internal class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(ba */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteUser(username: kotlin.String) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deleteUserRequestConfig(username = username) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -193,6 +227,28 @@ internal class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(ba } } + /** + * To obtain the request config of the operation deleteUser + * + * @param username The name that needs to be deleted + * @return RequestConfig + */ + fun deleteUserRequestConfig(username: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Get user by user name * @@ -205,18 +261,10 @@ internal class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(ba @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getUserByName(username: kotlin.String) : User { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getUserByNameRequestConfig(username = username) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -234,6 +282,28 @@ internal class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(ba } } + /** + * To obtain the request config of the operation getUserByName + * + * @param username The name that needs to be fetched. Use user1 for testing. + * @return RequestConfig + */ + fun getUserByNameRequestConfig(username: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Logs user into the system * @@ -247,22 +317,10 @@ internal class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(ba @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun loginUser(username: kotlin.String, password: kotlin.String) : kotlin.String { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("username", listOf(username.toString())) - put("password", listOf(password.toString())) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/login", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = loginUserRequestConfig(username = username, password = password) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -280,6 +338,33 @@ internal class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(ba } } + /** + * To obtain the request config of the operation loginUser + * + * @param username The user name for login + * @param password The password for login in clear text + * @return RequestConfig + */ + fun loginUserRequestConfig(username: kotlin.String, password: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("username", listOf(username.toString())) + put("password", listOf(password.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/login", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Logs out current logged in user session * @@ -290,18 +375,10 @@ internal class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(ba */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun logoutUser() : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/logout", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = logoutUserRequestConfig() + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -319,6 +396,27 @@ internal class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(ba } } + /** + * To obtain the request config of the operation logoutUser + * + * @return RequestConfig + */ + fun logoutUserRequestConfig() : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/logout", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Updated user * This can only be done by the logged in user. @@ -331,18 +429,10 @@ internal class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(ba */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updateUser(username: kotlin.String, body: User) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.PUT, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updateUserRequestConfig(username = username, body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -360,4 +450,27 @@ internal class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(ba } } + /** + * To obtain the request config of the operation updateUser + * + * @param username name that need to be deleted + * @param body Updated user object + * @return RequestConfig + */ + fun updateUserRequestConfig(username: kotlin.String, body: User) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.PUT, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 473b3fd42ce..c4da8e3989b 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -137,7 +137,7 @@ internal open class ApiClient(val baseUrl: String) { } } - protected inline fun request(requestConfig: RequestConfig, body : Any? = null): ApiInfrastructureResponse { + protected inline fun request(requestConfig: RequestConfig): ApiInfrastructureResponse { val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") // take authMethod from operation @@ -174,12 +174,12 @@ internal open class ApiClient(val baseUrl: String) { val contentType = (headers[ContentType] as String).substringBefore(";").toLowerCase() val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(body, contentType)) + RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) RequestMethod.GET -> Request.Builder().url(url) RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(body, contentType)) + RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) + RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) + RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) }.apply { headers.forEach { header -> addHeader(header.key, header.value) } diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt index 3e87d2c30f9..68f41c5497d 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt @@ -12,5 +12,6 @@ internal data class RequestConfig( val method: RequestMethod, val path: String, val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf() + val query: MutableMap> = mutableMapOf(), + val body: kotlin.Any? = null ) \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index ef80c520fd2..95f695cb9f4 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -45,18 +45,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun addPet(body: Pet) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = addPetRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -74,6 +66,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation addPet + * + * @param body Pet object that needs to be added to the store + * @return RequestConfig + */ + fun addPetRequestConfig(body: Pet) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Deletes a pet * @@ -86,19 +100,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - apiKey?.apply { localVariableHeaders["api_key"] = this.toString() } - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deletePetRequestConfig(petId = petId, apiKey = apiKey) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -116,6 +121,30 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation deletePet + * + * @param petId Pet id to delete + * @param apiKey (optional) + * @return RequestConfig + */ + fun deletePetRequestConfig(petId: kotlin.Long, apiKey: kotlin.String?) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + apiKey?.apply { localVariableHeaders["api_key"] = this.toString() } + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -128,21 +157,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun findPetsByStatus(status: kotlin.collections.List) : kotlin.collections.List? { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("status", toMultiValue(status.toList(), "csv")) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/findByStatus", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = findPetsByStatusRequestConfig(status = status) + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -160,6 +178,31 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation findPetsByStatus + * + * @param status Status values that need to be considered for filter + * @return RequestConfig + */ + fun findPetsByStatusRequestConfig(status: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("status", toMultiValue(status.toList(), "csv")) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/findByStatus", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -173,21 +216,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) @Deprecated(message = "This operation is deprecated.") fun findPetsByTags(tags: kotlin.collections.List) : kotlin.collections.List? { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("tags", toMultiValue(tags.toList(), "csv")) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/findByTags", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = findPetsByTagsRequestConfig(tags = tags) + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -205,6 +237,32 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation findPetsByTags + * + * @param tags Tags to filter by + * @return RequestConfig + */ + @Deprecated(message = "This operation is deprecated.") + fun findPetsByTagsRequestConfig(tags: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("tags", toMultiValue(tags.toList(), "csv")) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/findByTags", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Find pet by ID * Returns a single pet @@ -217,18 +275,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getPetById(petId: kotlin.Long) : Pet? { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getPetByIdRequestConfig(petId = petId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -246,6 +296,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation getPetById + * + * @param petId ID of pet to return + * @return RequestConfig + */ + fun getPetByIdRequestConfig(petId: kotlin.Long) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Update an existing pet * @@ -257,18 +329,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePet(body: Pet) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.PUT, - "/pet", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updatePetRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -286,6 +350,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updatePet + * + * @param body Pet object that needs to be added to the store + * @return RequestConfig + */ + fun updatePetRequestConfig(body: Pet) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.PUT, + path = "/pet", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Updates a pet in the store with form data * @@ -299,18 +385,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : Unit { - val localVariableBody: kotlin.Any? = mapOf("name" to name, "status" to status) - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -328,6 +406,30 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updatePetWithForm + * + * @param petId ID of pet that needs to be updated + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return RequestConfig + */ + fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig { + val localVariableBody: kotlin.Any? = mapOf("name" to name, "status" to status) + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * uploads an image * @@ -342,18 +444,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse? { - val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to additionalMetadata, "file" to file) - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -371,4 +465,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation uploadFile + * + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return RequestConfig + */ + fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig { + val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to additionalMetadata, "file" to file) + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index b9dd7b38f59..c442f866100 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -44,18 +44,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteOrder(orderId: kotlin.String) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deleteOrderRequestConfig(orderId = orderId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -73,6 +65,28 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation deleteOrder + * + * @param orderId ID of the order that needs to be deleted + * @return RequestConfig + */ + fun deleteOrderRequestConfig(orderId: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Returns pet inventories by status * Returns a map of status codes to quantities @@ -84,18 +98,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getInventory() : kotlin.collections.Map? { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/store/inventory", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getInventoryRequestConfig() + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -113,6 +119,27 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation getInventory + * + * @return RequestConfig + */ + fun getInventoryRequestConfig() : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/store/inventory", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Find purchase order by ID * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -125,18 +152,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getOrderById(orderId: kotlin.Long) : Order? { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getOrderByIdRequestConfig(orderId = orderId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -154,6 +173,28 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation getOrderById + * + * @param orderId ID of pet that needs to be fetched + * @return RequestConfig + */ + fun getOrderByIdRequestConfig(orderId: kotlin.Long) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Place an order for a pet * @@ -166,18 +207,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun placeOrder(body: Order) : Order? { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/store/order", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = placeOrderRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -195,4 +228,26 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation placeOrder + * + * @param body order placed for purchasing the pet + * @return RequestConfig + */ + fun placeOrderRequestConfig(body: Order) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/store/order", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 2ae5998489d..6e6c329144c 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -44,18 +44,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUser(body: User) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUserRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -73,6 +65,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUser + * + * @param body Created user object + * @return RequestConfig + */ + fun createUserRequestConfig(body: User) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Creates list of users with given input array * @@ -84,18 +98,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithArrayInput(body: kotlin.collections.List) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user/createWithArray", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUsersWithArrayInputRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -113,6 +119,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUsersWithArrayInput + * + * @param body List of user object + * @return RequestConfig + */ + fun createUsersWithArrayInputRequestConfig(body: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user/createWithArray", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Creates list of users with given input array * @@ -124,18 +152,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithListInput(body: kotlin.collections.List) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user/createWithList", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUsersWithListInputRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -153,6 +173,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUsersWithListInput + * + * @param body List of user object + * @return RequestConfig + */ + fun createUsersWithListInputRequestConfig(body: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user/createWithList", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Delete user * This can only be done by the logged in user. @@ -164,18 +206,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteUser(username: kotlin.String) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deleteUserRequestConfig(username = username) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -193,6 +227,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation deleteUser + * + * @param username The name that needs to be deleted + * @return RequestConfig + */ + fun deleteUserRequestConfig(username: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Get user by user name * @@ -205,18 +261,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getUserByName(username: kotlin.String) : User? { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getUserByNameRequestConfig(username = username) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -234,6 +282,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation getUserByName + * + * @param username The name that needs to be fetched. Use user1 for testing. + * @return RequestConfig + */ + fun getUserByNameRequestConfig(username: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Logs user into the system * @@ -247,22 +317,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun loginUser(username: kotlin.String, password: kotlin.String) : kotlin.String? { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("username", listOf(username.toString())) - put("password", listOf(password.toString())) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/login", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = loginUserRequestConfig(username = username, password = password) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -280,6 +338,33 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation loginUser + * + * @param username The user name for login + * @param password The password for login in clear text + * @return RequestConfig + */ + fun loginUserRequestConfig(username: kotlin.String, password: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("username", listOf(username.toString())) + put("password", listOf(password.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/login", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Logs out current logged in user session * @@ -290,18 +375,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun logoutUser() : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/logout", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = logoutUserRequestConfig() + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -319,6 +396,27 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation logoutUser + * + * @return RequestConfig + */ + fun logoutUserRequestConfig() : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/logout", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Updated user * This can only be done by the logged in user. @@ -331,18 +429,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updateUser(username: kotlin.String, body: User) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.PUT, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updateUserRequestConfig(username = username, body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -360,4 +450,27 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updateUser + * + * @param username name that need to be deleted + * @param body Updated user object + * @return RequestConfig + */ + fun updateUserRequestConfig(username: kotlin.String, body: User) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.PUT, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index e7f366d02cd..7a8dcc91cd4 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -137,7 +137,7 @@ open class ApiClient(val baseUrl: String) { } } - protected inline fun request(requestConfig: RequestConfig, body : Any? = null): ApiInfrastructureResponse { + protected inline fun request(requestConfig: RequestConfig): ApiInfrastructureResponse { val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") // take authMethod from operation @@ -174,12 +174,12 @@ open class ApiClient(val baseUrl: String) { val contentType = (headers[ContentType] as String).substringBefore(";").toLowerCase() val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(body, contentType)) + RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) RequestMethod.GET -> Request.Builder().url(url) RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(body, contentType)) + RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) + RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) + RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) }.apply { headers.forEach { header -> addHeader(header.key, header.value) } diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt index 9c22257e223..0f2790f370e 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt @@ -12,5 +12,6 @@ data class RequestConfig( val method: RequestMethod, val path: String, val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf() + val query: MutableMap> = mutableMapOf(), + val body: kotlin.Any? = null ) \ No newline at end of file diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index e4f7f4eeae0..c8b93b33bf6 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -45,18 +45,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun addPet(body: Pet) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = addPetRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -74,6 +66,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation addPet + * + * @param body Pet object that needs to be added to the store + * @return RequestConfig + */ + fun addPetRequestConfig(body: Pet) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Deletes a pet * @@ -86,19 +100,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - apiKey?.apply { localVariableHeaders["api_key"] = this.toString() } - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deletePetRequestConfig(petId = petId, apiKey = apiKey) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -116,6 +121,30 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation deletePet + * + * @param petId Pet id to delete + * @param apiKey (optional) + * @return RequestConfig + */ + fun deletePetRequestConfig(petId: kotlin.Long, apiKey: kotlin.String?) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + apiKey?.apply { localVariableHeaders["api_key"] = this.toString() } + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -128,21 +157,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun findPetsByStatus(status: kotlin.collections.List) : kotlin.collections.List { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("status", toMultiValue(status.toList(), "csv")) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/findByStatus", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = findPetsByStatusRequestConfig(status = status) + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -160,6 +178,31 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation findPetsByStatus + * + * @param status Status values that need to be considered for filter + * @return RequestConfig + */ + fun findPetsByStatusRequestConfig(status: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("status", toMultiValue(status.toList(), "csv")) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/findByStatus", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -173,21 +216,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) @Deprecated(message = "This operation is deprecated.") fun findPetsByTags(tags: kotlin.collections.List) : kotlin.collections.List { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("tags", toMultiValue(tags.toList(), "csv")) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/findByTags", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = findPetsByTagsRequestConfig(tags = tags) + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -205,6 +237,32 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation findPetsByTags + * + * @param tags Tags to filter by + * @return RequestConfig + */ + @Deprecated(message = "This operation is deprecated.") + fun findPetsByTagsRequestConfig(tags: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("tags", toMultiValue(tags.toList(), "csv")) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/findByTags", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Find pet by ID * Returns a single pet @@ -217,18 +275,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getPetById(petId: kotlin.Long) : Pet { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getPetByIdRequestConfig(petId = petId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -246,6 +296,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation getPetById + * + * @param petId ID of pet to return + * @return RequestConfig + */ + fun getPetByIdRequestConfig(petId: kotlin.Long) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Update an existing pet * @@ -257,18 +329,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePet(body: Pet) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.PUT, - "/pet", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updatePetRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -286,6 +350,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updatePet + * + * @param body Pet object that needs to be added to the store + * @return RequestConfig + */ + fun updatePetRequestConfig(body: Pet) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.PUT, + path = "/pet", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Updates a pet in the store with form data * @@ -299,18 +385,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : Unit { - val localVariableBody: kotlin.Any? = mapOf("name" to name, "status" to status) - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -328,6 +406,30 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updatePetWithForm + * + * @param petId ID of pet that needs to be updated + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return RequestConfig + */ + fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig { + val localVariableBody: kotlin.Any? = mapOf("name" to name, "status" to status) + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * uploads an image * @@ -342,18 +444,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { - val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to additionalMetadata, "file" to file) - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -371,4 +465,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation uploadFile + * + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return RequestConfig + */ + fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig { + val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to additionalMetadata, "file" to file) + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 08822c67e32..215ed63420c 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -44,18 +44,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteOrder(orderId: kotlin.String) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deleteOrderRequestConfig(orderId = orderId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -73,6 +65,28 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation deleteOrder + * + * @param orderId ID of the order that needs to be deleted + * @return RequestConfig + */ + fun deleteOrderRequestConfig(orderId: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Returns pet inventories by status * Returns a map of status codes to quantities @@ -84,18 +98,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getInventory() : kotlin.collections.Map { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/store/inventory", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getInventoryRequestConfig() + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -113,6 +119,27 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation getInventory + * + * @return RequestConfig + */ + fun getInventoryRequestConfig() : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/store/inventory", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Find purchase order by ID * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -125,18 +152,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getOrderById(orderId: kotlin.Long) : Order { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getOrderByIdRequestConfig(orderId = orderId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -154,6 +173,28 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation getOrderById + * + * @param orderId ID of pet that needs to be fetched + * @return RequestConfig + */ + fun getOrderByIdRequestConfig(orderId: kotlin.Long) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Place an order for a pet * @@ -166,18 +207,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun placeOrder(body: Order) : Order { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/store/order", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = placeOrderRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -195,4 +228,26 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation placeOrder + * + * @param body order placed for purchasing the pet + * @return RequestConfig + */ + fun placeOrderRequestConfig(body: Order) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/store/order", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 258a2540e9e..53748b93463 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -44,18 +44,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUser(body: User) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUserRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -73,6 +65,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUser + * + * @param body Created user object + * @return RequestConfig + */ + fun createUserRequestConfig(body: User) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Creates list of users with given input array * @@ -84,18 +98,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithArrayInput(body: kotlin.collections.List) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user/createWithArray", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUsersWithArrayInputRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -113,6 +119,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUsersWithArrayInput + * + * @param body List of user object + * @return RequestConfig + */ + fun createUsersWithArrayInputRequestConfig(body: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user/createWithArray", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Creates list of users with given input array * @@ -124,18 +152,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithListInput(body: kotlin.collections.List) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user/createWithList", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUsersWithListInputRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -153,6 +173,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUsersWithListInput + * + * @param body List of user object + * @return RequestConfig + */ + fun createUsersWithListInputRequestConfig(body: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user/createWithList", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Delete user * This can only be done by the logged in user. @@ -164,18 +206,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteUser(username: kotlin.String) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deleteUserRequestConfig(username = username) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -193,6 +227,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation deleteUser + * + * @param username The name that needs to be deleted + * @return RequestConfig + */ + fun deleteUserRequestConfig(username: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Get user by user name * @@ -205,18 +261,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getUserByName(username: kotlin.String) : User { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getUserByNameRequestConfig(username = username) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -234,6 +282,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation getUserByName + * + * @param username The name that needs to be fetched. Use user1 for testing. + * @return RequestConfig + */ + fun getUserByNameRequestConfig(username: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Logs user into the system * @@ -247,22 +317,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun loginUser(username: kotlin.String, password: kotlin.String) : kotlin.String { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("username", listOf(username.toString())) - put("password", listOf(password.toString())) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/login", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = loginUserRequestConfig(username = username, password = password) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -280,6 +338,33 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation loginUser + * + * @param username The user name for login + * @param password The password for login in clear text + * @return RequestConfig + */ + fun loginUserRequestConfig(username: kotlin.String, password: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("username", listOf(username.toString())) + put("password", listOf(password.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/login", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Logs out current logged in user session * @@ -290,18 +375,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun logoutUser() : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/logout", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = logoutUserRequestConfig() + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -319,6 +396,27 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation logoutUser + * + * @return RequestConfig + */ + fun logoutUserRequestConfig() : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/logout", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Updated user * This can only be done by the logged in user. @@ -331,18 +429,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updateUser(username: kotlin.String, body: User) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.PUT, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updateUserRequestConfig(username = username, body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -360,4 +450,27 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updateUser + * + * @param username name that need to be deleted + * @param body Updated user object + * @return RequestConfig + */ + fun updateUserRequestConfig(username: kotlin.String, body: User) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.PUT, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index f60e40309bc..9d526273d7a 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -135,7 +135,7 @@ open class ApiClient(val baseUrl: String) { } } - protected inline fun request(requestConfig: RequestConfig, body : Any? = null): ApiInfrastructureResponse { + protected inline fun request(requestConfig: RequestConfig): ApiInfrastructureResponse { val httpUrl = HttpUrl.parse(baseUrl) ?: throw IllegalStateException("baseUrl is invalid.") // take authMethod from operation @@ -172,12 +172,12 @@ open class ApiClient(val baseUrl: String) { val contentType = (headers[ContentType] as String).substringBefore(";").toLowerCase() val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(body, contentType)) + RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) RequestMethod.GET -> Request.Builder().url(url) RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(body, contentType)) + RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) + RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) + RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) }.apply { headers.forEach { header -> addHeader(header.key, header.value) } diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt index 9c22257e223..0f2790f370e 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt @@ -12,5 +12,6 @@ data class RequestConfig( val method: RequestMethod, val path: String, val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf() + val query: MutableMap> = mutableMapOf(), + val body: kotlin.Any? = null ) \ No newline at end of file diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index da9784198d1..4fbeccdbc00 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -45,18 +45,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun addPet(body: Pet) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = addPetRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -74,6 +66,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation addPet + * + * @param body Pet object that needs to be added to the store + * @return RequestConfig + */ + fun addPetRequestConfig(body: Pet) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Deletes a pet * @@ -86,19 +100,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deletePet(apiKey: kotlin.String?, petId: kotlin.Long) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - apiKey?.apply { localVariableHeaders["api_key"] = this.toString() } - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deletePetRequestConfig(apiKey = apiKey, petId = petId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -116,6 +121,30 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation deletePet + * + * @param apiKey (optional) + * @param petId Pet id to delete + * @return RequestConfig + */ + fun deletePetRequestConfig(apiKey: kotlin.String?, petId: kotlin.Long) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + apiKey?.apply { localVariableHeaders["api_key"] = this.toString() } + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -128,21 +157,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun findPetsByStatus(status: kotlin.collections.List) : kotlin.collections.List { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("status", toMultiValue(status.toList(), "csv")) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/findByStatus", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = findPetsByStatusRequestConfig(status = status) + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -160,6 +178,31 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation findPetsByStatus + * + * @param status Status values that need to be considered for filter + * @return RequestConfig + */ + fun findPetsByStatusRequestConfig(status: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("status", toMultiValue(status.toList(), "csv")) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/findByStatus", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -173,21 +216,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) @Deprecated(message = "This operation is deprecated.") fun findPetsByTags(tags: kotlin.collections.List) : kotlin.collections.List { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("tags", toMultiValue(tags.toList(), "csv")) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/findByTags", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = findPetsByTagsRequestConfig(tags = tags) + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -205,6 +237,32 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation findPetsByTags + * + * @param tags Tags to filter by + * @return RequestConfig + */ + @Deprecated(message = "This operation is deprecated.") + fun findPetsByTagsRequestConfig(tags: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("tags", toMultiValue(tags.toList(), "csv")) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/findByTags", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Find pet by ID * Returns a single pet @@ -217,18 +275,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getPetById(petId: kotlin.Long) : Pet { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getPetByIdRequestConfig(petId = petId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -246,6 +296,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation getPetById + * + * @param petId ID of pet to return + * @return RequestConfig + */ + fun getPetByIdRequestConfig(petId: kotlin.Long) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Update an existing pet * @@ -257,18 +329,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePet(body: Pet) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.PUT, - "/pet", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updatePetRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -286,6 +350,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updatePet + * + * @param body Pet object that needs to be added to the store + * @return RequestConfig + */ + fun updatePetRequestConfig(body: Pet) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.PUT, + path = "/pet", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Updates a pet in the store with form data * @@ -299,18 +385,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : Unit { - val localVariableBody: kotlin.Any? = mapOf("name" to name, "status" to status) - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -328,6 +406,30 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updatePetWithForm + * + * @param petId ID of pet that needs to be updated + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return RequestConfig + */ + fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig { + val localVariableBody: kotlin.Any? = mapOf("name" to name, "status" to status) + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * uploads an image * @@ -342,18 +444,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { - val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to additionalMetadata, "file" to file) - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -371,4 +465,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation uploadFile + * + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return RequestConfig + */ + fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig { + val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to additionalMetadata, "file" to file) + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 08822c67e32..215ed63420c 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -44,18 +44,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteOrder(orderId: kotlin.String) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deleteOrderRequestConfig(orderId = orderId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -73,6 +65,28 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation deleteOrder + * + * @param orderId ID of the order that needs to be deleted + * @return RequestConfig + */ + fun deleteOrderRequestConfig(orderId: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Returns pet inventories by status * Returns a map of status codes to quantities @@ -84,18 +98,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getInventory() : kotlin.collections.Map { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/store/inventory", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getInventoryRequestConfig() + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -113,6 +119,27 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation getInventory + * + * @return RequestConfig + */ + fun getInventoryRequestConfig() : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/store/inventory", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Find purchase order by ID * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -125,18 +152,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getOrderById(orderId: kotlin.Long) : Order { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getOrderByIdRequestConfig(orderId = orderId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -154,6 +173,28 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation getOrderById + * + * @param orderId ID of pet that needs to be fetched + * @return RequestConfig + */ + fun getOrderByIdRequestConfig(orderId: kotlin.Long) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Place an order for a pet * @@ -166,18 +207,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun placeOrder(body: Order) : Order { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/store/order", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = placeOrderRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -195,4 +228,26 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation placeOrder + * + * @param body order placed for purchasing the pet + * @return RequestConfig + */ + fun placeOrderRequestConfig(body: Order) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/store/order", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 258a2540e9e..53748b93463 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -44,18 +44,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUser(body: User) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUserRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -73,6 +65,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUser + * + * @param body Created user object + * @return RequestConfig + */ + fun createUserRequestConfig(body: User) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Creates list of users with given input array * @@ -84,18 +98,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithArrayInput(body: kotlin.collections.List) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user/createWithArray", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUsersWithArrayInputRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -113,6 +119,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUsersWithArrayInput + * + * @param body List of user object + * @return RequestConfig + */ + fun createUsersWithArrayInputRequestConfig(body: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user/createWithArray", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Creates list of users with given input array * @@ -124,18 +152,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithListInput(body: kotlin.collections.List) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user/createWithList", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUsersWithListInputRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -153,6 +173,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUsersWithListInput + * + * @param body List of user object + * @return RequestConfig + */ + fun createUsersWithListInputRequestConfig(body: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user/createWithList", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Delete user * This can only be done by the logged in user. @@ -164,18 +206,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteUser(username: kotlin.String) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deleteUserRequestConfig(username = username) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -193,6 +227,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation deleteUser + * + * @param username The name that needs to be deleted + * @return RequestConfig + */ + fun deleteUserRequestConfig(username: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Get user by user name * @@ -205,18 +261,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getUserByName(username: kotlin.String) : User { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getUserByNameRequestConfig(username = username) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -234,6 +282,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation getUserByName + * + * @param username The name that needs to be fetched. Use user1 for testing. + * @return RequestConfig + */ + fun getUserByNameRequestConfig(username: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Logs user into the system * @@ -247,22 +317,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun loginUser(username: kotlin.String, password: kotlin.String) : kotlin.String { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("username", listOf(username.toString())) - put("password", listOf(password.toString())) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/login", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = loginUserRequestConfig(username = username, password = password) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -280,6 +338,33 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation loginUser + * + * @param username The user name for login + * @param password The password for login in clear text + * @return RequestConfig + */ + fun loginUserRequestConfig(username: kotlin.String, password: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("username", listOf(username.toString())) + put("password", listOf(password.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/login", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Logs out current logged in user session * @@ -290,18 +375,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun logoutUser() : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/logout", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = logoutUserRequestConfig() + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -319,6 +396,27 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation logoutUser + * + * @return RequestConfig + */ + fun logoutUserRequestConfig() : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/logout", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Updated user * This can only be done by the logged in user. @@ -331,18 +429,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updateUser(username: kotlin.String, body: User) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.PUT, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updateUserRequestConfig(username = username, body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -360,4 +450,27 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updateUser + * + * @param username name that need to be deleted + * @param body Updated user object + * @return RequestConfig + */ + fun updateUserRequestConfig(username: kotlin.String, body: User) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.PUT, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index e7f366d02cd..7a8dcc91cd4 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -137,7 +137,7 @@ open class ApiClient(val baseUrl: String) { } } - protected inline fun request(requestConfig: RequestConfig, body : Any? = null): ApiInfrastructureResponse { + protected inline fun request(requestConfig: RequestConfig): ApiInfrastructureResponse { val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") // take authMethod from operation @@ -174,12 +174,12 @@ open class ApiClient(val baseUrl: String) { val contentType = (headers[ContentType] as String).substringBefore(";").toLowerCase() val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(body, contentType)) + RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) RequestMethod.GET -> Request.Builder().url(url) RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(body, contentType)) + RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) + RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) + RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) }.apply { headers.forEach { header -> addHeader(header.key, header.value) } diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt index 9c22257e223..0f2790f370e 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt @@ -12,5 +12,6 @@ data class RequestConfig( val method: RequestMethod, val path: String, val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf() + val query: MutableMap> = mutableMapOf(), + val body: kotlin.Any? = null ) \ No newline at end of file diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index e4f7f4eeae0..c8b93b33bf6 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -45,18 +45,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun addPet(body: Pet) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = addPetRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -74,6 +66,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation addPet + * + * @param body Pet object that needs to be added to the store + * @return RequestConfig + */ + fun addPetRequestConfig(body: Pet) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Deletes a pet * @@ -86,19 +100,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - apiKey?.apply { localVariableHeaders["api_key"] = this.toString() } - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deletePetRequestConfig(petId = petId, apiKey = apiKey) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -116,6 +121,30 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation deletePet + * + * @param petId Pet id to delete + * @param apiKey (optional) + * @return RequestConfig + */ + fun deletePetRequestConfig(petId: kotlin.Long, apiKey: kotlin.String?) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + apiKey?.apply { localVariableHeaders["api_key"] = this.toString() } + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -128,21 +157,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun findPetsByStatus(status: kotlin.collections.List) : kotlin.collections.List { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("status", toMultiValue(status.toList(), "csv")) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/findByStatus", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = findPetsByStatusRequestConfig(status = status) + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -160,6 +178,31 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation findPetsByStatus + * + * @param status Status values that need to be considered for filter + * @return RequestConfig + */ + fun findPetsByStatusRequestConfig(status: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("status", toMultiValue(status.toList(), "csv")) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/findByStatus", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -173,21 +216,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) @Deprecated(message = "This operation is deprecated.") fun findPetsByTags(tags: kotlin.collections.List) : kotlin.collections.List { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("tags", toMultiValue(tags.toList(), "csv")) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/findByTags", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = findPetsByTagsRequestConfig(tags = tags) + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -205,6 +237,32 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation findPetsByTags + * + * @param tags Tags to filter by + * @return RequestConfig + */ + @Deprecated(message = "This operation is deprecated.") + fun findPetsByTagsRequestConfig(tags: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("tags", toMultiValue(tags.toList(), "csv")) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/findByTags", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Find pet by ID * Returns a single pet @@ -217,18 +275,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getPetById(petId: kotlin.Long) : Pet { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getPetByIdRequestConfig(petId = petId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -246,6 +296,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation getPetById + * + * @param petId ID of pet to return + * @return RequestConfig + */ + fun getPetByIdRequestConfig(petId: kotlin.Long) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Update an existing pet * @@ -257,18 +329,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePet(body: Pet) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.PUT, - "/pet", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updatePetRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -286,6 +350,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updatePet + * + * @param body Pet object that needs to be added to the store + * @return RequestConfig + */ + fun updatePetRequestConfig(body: Pet) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.PUT, + path = "/pet", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Updates a pet in the store with form data * @@ -299,18 +385,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : Unit { - val localVariableBody: kotlin.Any? = mapOf("name" to name, "status" to status) - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -328,6 +406,30 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updatePetWithForm + * + * @param petId ID of pet that needs to be updated + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return RequestConfig + */ + fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig { + val localVariableBody: kotlin.Any? = mapOf("name" to name, "status" to status) + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * uploads an image * @@ -342,18 +444,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { - val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to additionalMetadata, "file" to file) - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -371,4 +465,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation uploadFile + * + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return RequestConfig + */ + fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig { + val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to additionalMetadata, "file" to file) + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 08822c67e32..215ed63420c 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -44,18 +44,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteOrder(orderId: kotlin.String) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deleteOrderRequestConfig(orderId = orderId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -73,6 +65,28 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation deleteOrder + * + * @param orderId ID of the order that needs to be deleted + * @return RequestConfig + */ + fun deleteOrderRequestConfig(orderId: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Returns pet inventories by status * Returns a map of status codes to quantities @@ -84,18 +98,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getInventory() : kotlin.collections.Map { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/store/inventory", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getInventoryRequestConfig() + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -113,6 +119,27 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation getInventory + * + * @return RequestConfig + */ + fun getInventoryRequestConfig() : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/store/inventory", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Find purchase order by ID * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -125,18 +152,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getOrderById(orderId: kotlin.Long) : Order { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getOrderByIdRequestConfig(orderId = orderId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -154,6 +173,28 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation getOrderById + * + * @param orderId ID of pet that needs to be fetched + * @return RequestConfig + */ + fun getOrderByIdRequestConfig(orderId: kotlin.Long) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Place an order for a pet * @@ -166,18 +207,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun placeOrder(body: Order) : Order { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/store/order", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = placeOrderRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -195,4 +228,26 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation placeOrder + * + * @param body order placed for purchasing the pet + * @return RequestConfig + */ + fun placeOrderRequestConfig(body: Order) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/store/order", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 258a2540e9e..53748b93463 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -44,18 +44,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUser(body: User) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUserRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -73,6 +65,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUser + * + * @param body Created user object + * @return RequestConfig + */ + fun createUserRequestConfig(body: User) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Creates list of users with given input array * @@ -84,18 +98,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithArrayInput(body: kotlin.collections.List) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user/createWithArray", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUsersWithArrayInputRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -113,6 +119,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUsersWithArrayInput + * + * @param body List of user object + * @return RequestConfig + */ + fun createUsersWithArrayInputRequestConfig(body: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user/createWithArray", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Creates list of users with given input array * @@ -124,18 +152,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithListInput(body: kotlin.collections.List) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user/createWithList", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUsersWithListInputRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -153,6 +173,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUsersWithListInput + * + * @param body List of user object + * @return RequestConfig + */ + fun createUsersWithListInputRequestConfig(body: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user/createWithList", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Delete user * This can only be done by the logged in user. @@ -164,18 +206,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteUser(username: kotlin.String) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deleteUserRequestConfig(username = username) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -193,6 +227,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation deleteUser + * + * @param username The name that needs to be deleted + * @return RequestConfig + */ + fun deleteUserRequestConfig(username: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Get user by user name * @@ -205,18 +261,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getUserByName(username: kotlin.String) : User { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getUserByNameRequestConfig(username = username) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -234,6 +282,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation getUserByName + * + * @param username The name that needs to be fetched. Use user1 for testing. + * @return RequestConfig + */ + fun getUserByNameRequestConfig(username: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Logs user into the system * @@ -247,22 +317,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun loginUser(username: kotlin.String, password: kotlin.String) : kotlin.String { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("username", listOf(username.toString())) - put("password", listOf(password.toString())) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/login", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = loginUserRequestConfig(username = username, password = password) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -280,6 +338,33 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation loginUser + * + * @param username The user name for login + * @param password The password for login in clear text + * @return RequestConfig + */ + fun loginUserRequestConfig(username: kotlin.String, password: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("username", listOf(username.toString())) + put("password", listOf(password.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/login", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Logs out current logged in user session * @@ -290,18 +375,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun logoutUser() : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/logout", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = logoutUserRequestConfig() + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -319,6 +396,27 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation logoutUser + * + * @return RequestConfig + */ + fun logoutUserRequestConfig() : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/logout", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Updated user * This can only be done by the logged in user. @@ -331,18 +429,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updateUser(username: kotlin.String, body: User) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.PUT, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updateUserRequestConfig(username = username, body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -360,4 +450,27 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updateUser + * + * @param username name that need to be deleted + * @param body Updated user object + * @return RequestConfig + */ + fun updateUserRequestConfig(username: kotlin.String, body: User) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.PUT, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index cb540f6ebd7..135bcdc790e 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -137,7 +137,7 @@ open class ApiClient(val baseUrl: String) { } } - protected inline fun request(requestConfig: RequestConfig, body : Any? = null): ApiInfrastructureResponse { + protected inline fun request(requestConfig: RequestConfig): ApiInfrastructureResponse { val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") // take authMethod from operation @@ -174,12 +174,12 @@ open class ApiClient(val baseUrl: String) { val contentType = (headers[ContentType] as String).substringBefore(";").toLowerCase() val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(body, contentType)) + RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) RequestMethod.GET -> Request.Builder().url(url) RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(body, contentType)) + RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) + RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) + RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) }.apply { headers.forEach { header -> addHeader(header.key, header.value) } diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt index 9c22257e223..0f2790f370e 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt @@ -12,5 +12,6 @@ data class RequestConfig( val method: RequestMethod, val path: String, val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf() + val query: MutableMap> = mutableMapOf(), + val body: kotlin.Any? = null ) \ No newline at end of file diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index e4f7f4eeae0..c8b93b33bf6 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -45,18 +45,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun addPet(body: Pet) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = addPetRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -74,6 +66,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation addPet + * + * @param body Pet object that needs to be added to the store + * @return RequestConfig + */ + fun addPetRequestConfig(body: Pet) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Deletes a pet * @@ -86,19 +100,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - apiKey?.apply { localVariableHeaders["api_key"] = this.toString() } - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deletePetRequestConfig(petId = petId, apiKey = apiKey) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -116,6 +121,30 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation deletePet + * + * @param petId Pet id to delete + * @param apiKey (optional) + * @return RequestConfig + */ + fun deletePetRequestConfig(petId: kotlin.Long, apiKey: kotlin.String?) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + apiKey?.apply { localVariableHeaders["api_key"] = this.toString() } + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -128,21 +157,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun findPetsByStatus(status: kotlin.collections.List) : kotlin.collections.List { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("status", toMultiValue(status.toList(), "csv")) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/findByStatus", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = findPetsByStatusRequestConfig(status = status) + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -160,6 +178,31 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation findPetsByStatus + * + * @param status Status values that need to be considered for filter + * @return RequestConfig + */ + fun findPetsByStatusRequestConfig(status: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("status", toMultiValue(status.toList(), "csv")) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/findByStatus", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -173,21 +216,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) @Deprecated(message = "This operation is deprecated.") fun findPetsByTags(tags: kotlin.collections.List) : kotlin.collections.List { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("tags", toMultiValue(tags.toList(), "csv")) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/findByTags", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = findPetsByTagsRequestConfig(tags = tags) + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -205,6 +237,32 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation findPetsByTags + * + * @param tags Tags to filter by + * @return RequestConfig + */ + @Deprecated(message = "This operation is deprecated.") + fun findPetsByTagsRequestConfig(tags: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("tags", toMultiValue(tags.toList(), "csv")) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/findByTags", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Find pet by ID * Returns a single pet @@ -217,18 +275,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getPetById(petId: kotlin.Long) : Pet { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getPetByIdRequestConfig(petId = petId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -246,6 +296,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation getPetById + * + * @param petId ID of pet to return + * @return RequestConfig + */ + fun getPetByIdRequestConfig(petId: kotlin.Long) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Update an existing pet * @@ -257,18 +329,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePet(body: Pet) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.PUT, - "/pet", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updatePetRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -286,6 +350,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updatePet + * + * @param body Pet object that needs to be added to the store + * @return RequestConfig + */ + fun updatePetRequestConfig(body: Pet) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.PUT, + path = "/pet", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Updates a pet in the store with form data * @@ -299,18 +385,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : Unit { - val localVariableBody: kotlin.Any? = mapOf("name" to name, "status" to status) - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updatePetWithFormRequestConfig(petId = petId, name = name, status = status) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -328,6 +406,30 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updatePetWithForm + * + * @param petId ID of pet that needs to be updated + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return RequestConfig + */ + fun updatePetWithFormRequestConfig(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?) : RequestConfig { + val localVariableBody: kotlin.Any? = mapOf("name" to name, "status" to status) + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded") + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet/{petId}".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * uploads an image * @@ -342,18 +444,10 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : ApiResponse { - val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to additionalMetadata, "file" to file) - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = uploadFileRequestConfig(petId = petId, additionalMetadata = additionalMetadata, file = file) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -371,4 +465,28 @@ class PetApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation uploadFile + * + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return RequestConfig + */ + fun uploadFileRequestConfig(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: java.io.File?) : RequestConfig { + val localVariableBody: kotlin.Any? = mapOf("additionalMetadata" to additionalMetadata, "file" to file) + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf("Content-Type" to "multipart/form-data") + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/pet/{petId}/uploadImage".replace("{"+"petId"+"}", "$petId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 08822c67e32..215ed63420c 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -44,18 +44,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteOrder(orderId: kotlin.String) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deleteOrderRequestConfig(orderId = orderId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -73,6 +65,28 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation deleteOrder + * + * @param orderId ID of the order that needs to be deleted + * @return RequestConfig + */ + fun deleteOrderRequestConfig(orderId: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Returns pet inventories by status * Returns a map of status codes to quantities @@ -84,18 +98,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getInventory() : kotlin.collections.Map { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/store/inventory", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getInventoryRequestConfig() + val localVarResponse = request>( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -113,6 +119,27 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation getInventory + * + * @return RequestConfig + */ + fun getInventoryRequestConfig() : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/store/inventory", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Find purchase order by ID * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -125,18 +152,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getOrderById(orderId: kotlin.Long) : Order { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getOrderByIdRequestConfig(orderId = orderId) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -154,6 +173,28 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation getOrderById + * + * @param orderId ID of pet that needs to be fetched + * @return RequestConfig + */ + fun getOrderByIdRequestConfig(orderId: kotlin.Long) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/store/order/{orderId}".replace("{"+"orderId"+"}", "$orderId"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Place an order for a pet * @@ -166,18 +207,10 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun placeOrder(body: Order) : Order { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/store/order", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = placeOrderRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -195,4 +228,26 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) } } + /** + * To obtain the request config of the operation placeOrder + * + * @param body order placed for purchasing the pet + * @return RequestConfig + */ + fun placeOrderRequestConfig(body: Order) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/store/order", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 258a2540e9e..53748b93463 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -44,18 +44,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUser(body: User) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUserRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -73,6 +65,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUser + * + * @param body Created user object + * @return RequestConfig + */ + fun createUserRequestConfig(body: User) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Creates list of users with given input array * @@ -84,18 +98,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithArrayInput(body: kotlin.collections.List) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user/createWithArray", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUsersWithArrayInputRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -113,6 +119,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUsersWithArrayInput + * + * @param body List of user object + * @return RequestConfig + */ + fun createUsersWithArrayInputRequestConfig(body: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user/createWithArray", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Creates list of users with given input array * @@ -124,18 +152,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun createUsersWithListInput(body: kotlin.collections.List) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.POST, - "/user/createWithList", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = createUsersWithListInputRequestConfig(body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -153,6 +173,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation createUsersWithListInput + * + * @param body List of user object + * @return RequestConfig + */ + fun createUsersWithListInputRequestConfig(body: kotlin.collections.List) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.POST, + path = "/user/createWithList", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Delete user * This can only be done by the logged in user. @@ -164,18 +206,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun deleteUser(username: kotlin.String) : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.DELETE, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = deleteUserRequestConfig(username = username) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -193,6 +227,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation deleteUser + * + * @param username The name that needs to be deleted + * @return RequestConfig + */ + fun deleteUserRequestConfig(username: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.DELETE, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Get user by user name * @@ -205,18 +261,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getUserByName(username: kotlin.String) : User { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getUserByNameRequestConfig(username = username) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -234,6 +282,28 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation getUserByName + * + * @param username The name that needs to be fetched. Use user1 for testing. + * @return RequestConfig + */ + fun getUserByNameRequestConfig(username: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Logs user into the system * @@ -247,22 +317,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun loginUser(username: kotlin.String, password: kotlin.String) : kotlin.String { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf>() - .apply { - put("username", listOf(username.toString())) - put("password", listOf(password.toString())) - } - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/login", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = loginUserRequestConfig(username = username, password = password) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -280,6 +338,33 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation loginUser + * + * @param username The user name for login + * @param password The password for login in clear text + * @return RequestConfig + */ + fun loginUserRequestConfig(username: kotlin.String, password: kotlin.String) : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("username", listOf(username.toString())) + put("password", listOf(password.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/login", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Logs out current logged in user session * @@ -290,18 +375,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun logoutUser() : Unit { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/user/logout", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = logoutUserRequestConfig() + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -319,6 +396,27 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation logoutUser + * + * @return RequestConfig + */ + fun logoutUserRequestConfig() : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/user/logout", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + /** * Updated user * This can only be done by the logged in user. @@ -331,18 +429,10 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { */ @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun updateUser(username: kotlin.String, body: User) : Unit { - val localVariableBody: kotlin.Any? = body - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.PUT, - "/user/{username}".replace("{"+"username"+"}", "$username"), - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = updateUserRequestConfig(username = username, body = body) + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -360,4 +450,27 @@ class UserApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation updateUser + * + * @param username name that need to be deleted + * @param body Updated user object + * @return RequestConfig + */ + fun updateUserRequestConfig(username: kotlin.String, body: User) : RequestConfig { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.PUT, + path = "/user/{username}".replace("{"+"username"+"}", "$username"), + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index e7f366d02cd..7a8dcc91cd4 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -137,7 +137,7 @@ open class ApiClient(val baseUrl: String) { } } - protected inline fun request(requestConfig: RequestConfig, body : Any? = null): ApiInfrastructureResponse { + protected inline fun request(requestConfig: RequestConfig): ApiInfrastructureResponse { val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") // take authMethod from operation @@ -174,12 +174,12 @@ open class ApiClient(val baseUrl: String) { val contentType = (headers[ContentType] as String).substringBefore(";").toLowerCase() val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(body, contentType)) + RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) RequestMethod.GET -> Request.Builder().url(url) RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(body, contentType)) + RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) + RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) + RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) }.apply { headers.forEach { header -> addHeader(header.key, header.value) } diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt index 9c22257e223..0f2790f370e 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt @@ -12,5 +12,6 @@ data class RequestConfig( val method: RequestMethod, val path: String, val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf() + val query: MutableMap> = mutableMapOf(), + val body: kotlin.Any? = null ) \ No newline at end of file From 97bf6d29dda213767050a072d606a152a1602235 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 10 Feb 2021 08:32:36 +0800 Subject: [PATCH 39/44] update doc --- docs/contributing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contributing.md b/docs/contributing.md index a6f32bc7063..a791b0d6f1b 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -73,7 +73,7 @@ Code change should conform to the programming style guide of the respective lang - Ruby: https://github.com/bbatsov/ruby-style-guide - Rust: https://github.com/rust-lang-nursery/fmt-rfcs/blob/master/guide/guide.md (the default [rustfmt](https://github.com/rust-lang-nursery/rustfmt) configuration) - Scala: http://docs.scala-lang.org/style/ -- Swift: https://swift.org/documentation/api-design-guidelines/ +- Swift: [Apple Developer](https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/TheBasics.html) - TypeScript: https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines For other languages, feel free to suggest. From 5193f975bc250e5da46971c135f758c5a7bc6cbb Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 10 Feb 2021 09:45:45 +0800 Subject: [PATCH 40/44] add lumeris to the user list (#8664) --- README.md | 1 + website/src/dynamic/users.yml | 5 +++++ website/static/img/companies/lumeris.png | Bin 0 -> 3771 bytes 3 files changed, 6 insertions(+) create mode 100644 website/static/img/companies/lumeris.png diff --git a/README.md b/README.md index 023df5f4e1a..2b436786cc6 100644 --- a/README.md +++ b/README.md @@ -616,6 +616,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - [Kubernetes](https://kubernetes.io) - [Linode](https://www.linode.com/) - [Logicdrop](https://www.logicdrop.com) +- [Lumeris](https://www.lumeris.com) - [LVM Versicherungen](https://www.lvm.de) - [MailSlurp](https://www.mailslurp.com) - [Médiavision](https://www.mediavision.fr/) diff --git a/website/src/dynamic/users.yml b/website/src/dynamic/users.yml index c8c0cc81f45..8a8398ab9f9 100644 --- a/website/src/dynamic/users.yml +++ b/website/src/dynamic/users.yml @@ -248,6 +248,11 @@ image: "img/companies/lvm_versicherungen.png" infoLink: "https://www.lvm.de" pinned: false +- + caption: "Lumeris" + image: "img/companies/lumeris.png" + infoLink: "https://www.lumeris.com" + pinned: false - caption: M3, Inc. image: "img/companies/m3.png" diff --git a/website/static/img/companies/lumeris.png b/website/static/img/companies/lumeris.png new file mode 100644 index 0000000000000000000000000000000000000000..de8a695ad79f34d412ad57ffbdcce609bfe6c569 GIT binary patch literal 3771 zcmV;s4n*;ZP)$O}?aSNHh%PES*OeSmLpb9i}tP*GJ_SzSj+O@xJr<>uyHUSi+h z;K9MdrlzQhi;c+0$*iodLPJQLouAg$*Y5A{)zr-|l*^NomAkvVgS+1U!~n9gv}R{( z*G2$YrqjaR?xf7-|NZvJ$GzFw+W*S{>gwz9`1{yR57FiF;O_Tpu-O0TqyO;5|N89z z?6LpZXp+R@=kxjFg=O1aE8u%us?g^|p3uJB?#|A|N}a*r(Ta zT85{T|M}zp>bU>XJ5!#%>cS`g*k8K0a{u+zz`Aa&xPrOL&vB`>;Kf$|&Mbtl#hbRn zX`8)!m$Fxu!HJBX$8}!MTsp;-h^2#s_SMS&?&ip7OYz0F>86q9m3!W9Meeqv=beU6 z^J4n|01Z1yL_t(|ob8=^d!k4dht(v2fFLR$7|}>f(#Blun|+Cyo^0QycV@CXJDKUd z^lrL)x~ISYCsoMh<20uJx~6KP*C_%r_QN5RTc_V-+;y^>#hOSTGVZiAFaC% zRBO#hdXs&(pschGlF*If~+)#`Lonvthn{Vmf`zcg37 zf41(rP_0nxs9gf+X;*)XGzQ=udr!^%?a{suzSO2o{`Tk`22Z>B+oMw${CM59p<1#C zV{eF*%7y7f8J_QoCDp)PFe>Bw!)w7s#h zjX6Z)xjf4Ozfp}ov0`>9Kt(;NjVpQ2` z27cqas6$7HTTkP;d}$7TV-R(01aelB=F8D|X502+b)UD5#Jn&Ht9um);ufA?n z847@p7{@uM@mzidz(wN;fe$%&EF8~0`<{HE zgUqT(m4#sNp@}*;p1b(VYuq&sE+0I9@$zoQHKkgvzJtIANASjQC;#dyNdDmR-Vb*l zzB$}+w6(SK=3dOLSfB;!xp>KJ#YQSoxmG}|e+Yk-==&}3)v|XW@&O0$3P?)+rZxJ6~md zVoj(Pu(3yp!0}wE{j-Dl@XgDI4)FkRPdi)BNnJhTsaZ>0ySWAxaaK^|V@|9~;!I5q z{k+;xiVVkbA|&U(qTK;>ShHN5e&+nSnw_C^BEQOkq0G-_A~n4{Qxu}gvK`wgIW1R2 z#kk3RjF2!|`riYBCojF&AfdLbn;JxC^3Jmjo?X)D$rH@xfQz{}J##9#;;Lk^(%z z!GqoU(#6jS$Zzeuyu{rH)NaM#YYKr9Bh{zpbR-dfM$mrNi`bKcWt%!$v>{>fk-)dg z_;QF+fiJ+_JTiiZ*!t45ACr*Z+IfiS>Ot*R3%<&ezq5*SZi9G=$Rl5;iM&TMvkuAm z7rvN?*b5ykir9M+__Bx;6LI2-sla0$yrVu${^C_4@Yt??P2l;s=E>ALP4XFB88U<| z=tUAGMz9Q{1IaKffrHwo2=$&d3A(1F2<5U6cJ3m;YZ7!vkuN*9#3^0eGsHP~r%01; z#~Ax*T(@)h^2OZ;k!^lG;I%*_n>SCSttl07n3Ei4k|Pdjw;W`#>wp5I7-n=mG#QlU zAm>~K@1SV+=HXj75(|T81;)Q4K3G^pHJChXEzU~_`M+VvJ5K)9o0l)1KX`rcl{t58 z*$2o-oS@FbHC5(0Dd;Y7oZK-@bKv}GJxf-gb}RY!02D-?@Ep3wnDP6GstvgFc#|9k z?|tH2EA2NIE9^MVUK?rje?JVj@tv!mp8s%pc|YzRYXLv>8$2fmd~8iXy}qEGG-Ys{ z>w!-J1%X(VhF4YsCe)NbQ9`o~g9klCnqV!d;BNjG_`suX31WZok6#ZxSixi6TAmPD_p&^|mh=q+k zx<>MJe>8F6&vh|*_3PD@gZ%F0>(_~y&$JfsmS=J~J*t53sEOfl-4W<0Y_GAkyaEcj zDxicQpY1I+6}J}fs{8e0tg8u{ zboB9>cf8^mY!5tBj;V`^1Arm%eQnY4J=!5d|=fMTuSargAP0^D&ARvPfbfi7?$WRR8yo@>u0i9 zZmr;(m=d1zEnyty)ZhoYY%@@x$TXJ*-gh*XEHF{m&SXXWR|(!5M3o|!7C^@nfNz;S znSnN~4l3=2 zreNFc;!9a9p~xlpp{Wau2oL^>lGD=bQSEYJ@P#ro(8P#nLdjf=(zwZR?yQ&peZGJ3 zXxY7d{=g4()#i|vE{ck!RWa6haqz8jd>RHTL&_QWB5dBdimk@_T{i(g z%?VV*xOOisOun|!0f~0u%@B_EC+?8_WSrg}R9(NJs1ip?}p zNwD1^PXCZJ*npC5g1<+!H-R@c9-XCh0&)nR;TT@+C4HQmf_D{o#aPF^1PLB7bH#XV zzlGQaLisafX5K+R>7JxvpEvLvCzX4H6b{vrz=y^9xqKDOKvawle#0+~K0&#=&3->Q z`kaBU^vDzPVPys$%Hre}o533+ODK>Qe-gs(vENI`{^sDx6WNYBD+C`iA0MF%!LtDT zA~SeLV>GuC9>O`AM1!BA?;Dv?3!?D_&W!FD=O2+P)d~$&2(Q}?Dr3W$udCA1*s)5s(6@X__ zhs;@m_fkMpgCAdnNJ1TV&=_FZlRP~r!@ZJjRGIa2A_?Kjzy@b2z&sr~>KlsUO{@V?=a(nd}h zf;YhWjZ|OkNw`JB+g#0Fi+1VlKOMcDCR&r(Uv#5ey>GCc`c?Rb*=i+CDu5P`6~!WN zHBhOtpfJ!9IVd@8`QZI^P$}Qu48ixnqbq4b<+EV-KJDNkc<1fXzyAH7cTc8z_wK`g zfA5D2_$4P}oV9O2_@>L$D!dv*7?AhPvNk+B!63_1gDc^tl>DA#`QS~+`ZQ7{Kx71- z)%@xDR718A9y>ZS*Khyt^X~EHOuLV-uiqC=r?WND+((4jn{r^`DicD8O0v9?=+eg+ z!LyUg2VXG!x;WKm_!!yXEnF15ZWFJMWCSE1A~}jM^AjY;_T=q{-Az}!AH7fax)IGj z=GREsavFZfnjtlLNe*5ckpXztM&93;%}JQ%jgu`K9PtM5qbE8X^YqTrtyxIG$i z8#OLrSH~r4v1eHFO%}K$3cfuG_tJm*9{u%=pMdIX5duCkuQo}8r~2j;`@1vO5g|O) zw=W-jFnV|O$&ck$T{o%>1;7WRcUSLyOCOBkslH`-;3K>D0_@shVmYdBQ*-cv!FfoV zfcw*x){81*&A{Ua-5}TQ&z07TDq~H-6Bb1KuHEt1_p2aOH_#M3rh6|?*DlBEwn_V2 zQP(cF>V^mBA$Q~XMF*dp1O895w8_=UTfIH8tI1#{T`mWb~zDWFX*=1925qG zA13r%yW`z2w87^@jdDSk*>a=MAnYRLW>p_Qrr2|%s-&5{Le0>EzqSqO{oKkwp@CeU zq)C<&&-I#wO^Bwh-SHFZ&gV>KS+Q-Kw4me3=JDnyYUT5%>VPGg`LLiH8t l@n@Q9bsP2mkL6qW{{v+`fODtl-rxWL002ovPDHLkV1f!6n@Rux literal 0 HcmV?d00001 From 47e697e492c944fbfba371c308f2bf0fccfb9a5b Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 10 Feb 2021 12:08:00 +0800 Subject: [PATCH 41/44] add sponsorship message to the lau generator (#8665) --- .../codegen/languages/LuaClientCodegen.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java index f69352db3a9..e295bf61693 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java @@ -581,4 +581,16 @@ public class LuaClientCodegen extends DefaultCodegen implements CodegenConfig { return name; } + + @Override + public void postProcess() { + System.out.println("################################################################################"); + System.out.println("# Thanks for using OpenAPI Generator. #"); + System.out.println("# Please consider donation to help us maintain this project \uD83D\uDE4F #"); + System.out.println("# https://opencollective.com/openapi_generator/donate #"); + System.out.println("# #"); + System.out.println("# This generator is contributed by daurnimator (https://github.com/daurnimator)#"); + System.out.println("# Pls support his work directly via https://github.com/sponsors/daurnimator \uD83D\uDE4F #"); + System.out.println("################################################################################"); + } } From 23de86a434b7f2ceb6b3c0d4cff0607239461451 Mon Sep 17 00:00:00 2001 From: Bruno Coelho <4brunu@users.noreply.github.com> Date: Thu, 11 Feb 2021 14:32:29 +0000 Subject: [PATCH 42/44] [kotlin][client] update dependencies (#8673) * [kotlin] update pom.xml * [kotlin] update pom.xml * [kotlin][client] update dependencies * [kotlin][client] restore gradle * [kotlin][client] try to fix CI * Revert "[kotlin][client] restore gradle" This reverts commit 20a2947447f5646ca4850304a26bdf76e630a497. * [kotlin][client] try to fix CI * [kotlin][client] try to fix CI * [kotlin][client] try to fix CI * install gradle * [kotlin][client] try to fix CI * [kotlin][client] try to fix CI * [kotlin][client] disable integration tests Co-authored-by: William Cheng --- .../{other => }/kotlin-uppercase-enum.yaml | 0 .../kotlin-client/build.gradle.mustache | 44 ++--- pom.xml | 22 ++- .../client/petstore/kotlin-gson/build.gradle | 9 +- samples/client/petstore/kotlin-gson/pom.xml | 17 +- .../petstore/kotlin-jackson/build.gradle | 10 +- .../client/petstore/kotlin-jackson/pom.xml | 17 +- .../kotlin-json-request-string/build.gradle | 11 +- .../kotlin-json-request-string/pom.xml | 17 +- .../build.gradle | 9 +- .../kotlin-jvm-okhttp4-coroutines/pom.xml | 59 ++++++ .../kotlin-moshi-codegen/build.gradle | 13 +- .../petstore/kotlin-moshi-codegen/pom.xml | 17 +- .../petstore/kotlin-nonpublic/build.gradle | 11 +- .../client/petstore/kotlin-nonpublic/pom.xml | 17 +- .../petstore/kotlin-nullable/build.gradle | 11 +- .../client/petstore/kotlin-nullable/pom.xml | 17 +- .../petstore/kotlin-okhttp3/build.gradle | 11 +- .../client/petstore/kotlin-okhttp3/pom.xml | 17 +- .../kotlin-retrofit2-rx3/build.gradle | 15 +- .../petstore/kotlin-retrofit2-rx3/pom.xml | 17 +- .../petstore/kotlin-retrofit2/build.gradle | 13 +- .../client/petstore/kotlin-retrofit2/pom.xml | 17 +- .../petstore/kotlin-string/build.gradle | 11 +- samples/client/petstore/kotlin-string/pom.xml | 2 + .../petstore/kotlin-threetenbp/build.gradle | 13 +- .../client/petstore/kotlin-threetenbp/pom.xml | 2 + .../.openapi-generator/VERSION | 2 +- .../kotlin-uppercase-enum/build.gradle | 11 +- .../petstore/kotlin-uppercase-enum/pom.xml | 59 ++++++ .../org/openapitools/client/apis/EnumApi.kt | 35 ++-- .../client/infrastructure/ApiClient.kt | 10 +- .../client/infrastructure/RequestConfig.kt | 3 +- samples/client/petstore/kotlin/build.gradle | 11 +- .../kotlin/gradle/wrapper/gradle-wrapper.jar | Bin 55190 -> 0 bytes .../gradle/wrapper/gradle-wrapper.properties | 5 - samples/client/petstore/kotlin/gradlew | 172 ------------------ samples/client/petstore/kotlin/gradlew.bat | 84 --------- samples/client/petstore/kotlin/pom.xml | 17 +- shippable.yml | 7 +- 40 files changed, 410 insertions(+), 425 deletions(-) rename bin/configs/{other => }/kotlin-uppercase-enum.yaml (100%) create mode 100644 samples/client/petstore/kotlin-jvm-okhttp4-coroutines/pom.xml create mode 100644 samples/client/petstore/kotlin-uppercase-enum/pom.xml delete mode 100644 samples/client/petstore/kotlin/gradle/wrapper/gradle-wrapper.jar delete mode 100644 samples/client/petstore/kotlin/gradle/wrapper/gradle-wrapper.properties delete mode 100755 samples/client/petstore/kotlin/gradlew delete mode 100644 samples/client/petstore/kotlin/gradlew.bat diff --git a/bin/configs/other/kotlin-uppercase-enum.yaml b/bin/configs/kotlin-uppercase-enum.yaml similarity index 100% rename from bin/configs/other/kotlin-uppercase-enum.yaml rename to bin/configs/kotlin-uppercase-enum.yaml diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache index 43730dc02e6..7e71248dd1c 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache @@ -2,23 +2,23 @@ group '{{groupId}}' version '{{artifactVersion}}' wrapper { - gradleVersion = '4.9' + gradleVersion = '6.8.2' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.3.61' + ext.kotlin_version = '1.4.20' {{#jvm-retrofit2}} - ext.retrofitVersion = '2.6.2' + ext.retrofitVersion = '2.7.2' {{/jvm-retrofit2}} {{#useRxJava}} ext.rxJavaVersion = '1.3.8' {{/useRxJava}} {{#useRxJava2}} - ext.rxJava2Version = '2.2.17' + ext.rxJava2Version = '2.2.20' {{/useRxJava2}} {{#useRxJava3}} - ext.rxJava3Version = '3.0.4' + ext.rxJava3Version = '3.0.10' {{/useRxJava3}} repositories { @@ -50,52 +50,36 @@ dependencies { {{#moshi}} {{^moshiCodeGen}} compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - compile "com.squareup.moshi:moshi-kotlin:1.9.2" + compile "com.squareup.moshi:moshi-kotlin:1.11.0" {{/moshiCodeGen}} - compile "com.squareup.moshi:moshi-adapters:1.9.2" {{#moshiCodeGen}} - compile "com.squareup.moshi:moshi:1.9.2" - kapt "com.squareup.moshi:moshi-kotlin-codegen:1.9.2" + compile "com.squareup.moshi:moshi:1.11.0" + kapt "com.squareup.moshi:moshi-kotlin-codegen:1.11.0" {{/moshiCodeGen}} {{/moshi}} {{#gson}} compile "com.google.code.gson:gson:2.8.6" {{/gson}} {{#jackson}} + compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "com.fasterxml.jackson.module:jackson-module-kotlin:2.10.2" compile "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.2" compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.2" {{/jackson}} {{#jvm-okhttp3}} - {{^moshi}} - compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - {{/moshi}} - {{#moshi}} - {{#modeCodeGen}} - compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - {{/modeCodeGen}} - {{/moshi}} - compile "com.squareup.okhttp3:okhttp:3.12.6" + compile "com.squareup.okhttp3:okhttp:3.12.13" {{/jvm-okhttp3}} {{#jvm-okhttp4}} - {{^moshi}} - compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - {{/moshi}} - {{#moshi}} - {{#modeCodeGen}} - compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - {{/modeCodeGen}} - {{/moshi}} - compile "com.squareup.okhttp3:okhttp:4.2.2" + compile "com.squareup.okhttp3:okhttp:4.9.0" {{/jvm-okhttp4}} {{#threetenbp}} - compile "org.threeten:threetenbp:1.4.0" + compile "org.threeten:threetenbp:1.5.0" {{/threetenbp}} {{#jvm-retrofit2}} {{#hasOAuthMethods}} compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.0" {{/hasOAuthMethods}} - compile "com.squareup.okhttp3:logging-interceptor:4.4.0" + compile "com.squareup.okhttp3:logging-interceptor:4.9.0" {{#useRxJava}} compile "io.reactivex:rxjava:$rxJavaVersion" compile "com.squareup.retrofit2:adapter-rxjava:$retrofitVersion" @@ -117,5 +101,5 @@ dependencies { {{/moshi}} compile "com.squareup.retrofit2:converter-scalars:$retrofitVersion" {{/jvm-retrofit2}} - testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" + testCompile "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/pom.xml b/pom.xml index 98bb2a42ea7..be57c37cbe1 100644 --- a/pom.xml +++ b/pom.xml @@ -1235,8 +1235,6 @@ samples/client/petstore/typescript-angular-v4.3/npm samples/client/petstore/typescript-angular-v6-provided-in-root samples/client/petstore/typescript-angular-v7-provided-in-root--> - samples/client/petstore/kotlin-threetenbp/ - samples/client/petstore/kotlin-string/ @@ -1377,17 +1375,21 @@ samples/client/petstore/erlang-client samples/client/petstore/erlang-proper + samples/client/petstore/kotlin + samples/client/petstore/kotlin-gson + samples/client/petstore/kotlin-jackson + samples/client/petstore/kotlin-json-request-string + samples/client/petstore/kotlin-jvm-okhttp4-coroutines + samples/client/petstore/kotlin-moshi-codegen samples/client/petstore/kotlin-multiplatform - + samples/client/petstore/kotlin-nonpublic + samples/client/petstore/kotlin-nullable + samples/client/petstore/kotlin-okhttp3 samples/client/petstore/kotlin-retrofit2 samples/client/petstore/kotlin-retrofit2-rx3 - samples/client/petstore/kotlin-jackson/ - samples/client/petstore/kotlin-gson/ - samples/client/petstore/kotlin-nonpublic/ - samples/client/petstore/kotlin-nullable/ - samples/client/petstore/kotlin-okhttp3/ - samples/client/petstore/kotlin-moshi-codegen/ - samples/client/petstore/kotlin-json-request-string/ + samples/client/petstore/kotlin-string + samples/client/petstore/kotlin-threetenbp + samples/client/petstore/kotlin-uppercase-enum diff --git a/samples/client/petstore/kotlin-gson/build.gradle b/samples/client/petstore/kotlin-gson/build.gradle index ce9cb568dd7..441c5a90c71 100644 --- a/samples/client/petstore/kotlin-gson/build.gradle +++ b/samples/client/petstore/kotlin-gson/build.gradle @@ -2,12 +2,12 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '4.9' + gradleVersion = '6.8.2' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.3.61' + ext.kotlin_version = '1.4.20' repositories { maven { url "https://repo1.maven.org/maven2" } @@ -30,7 +30,6 @@ test { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" compile "com.google.code.gson:gson:2.8.6" - compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - compile "com.squareup.okhttp3:okhttp:4.2.2" - testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" + compile "com.squareup.okhttp3:okhttp:4.9.0" + testCompile "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-gson/pom.xml b/samples/client/petstore/kotlin-gson/pom.xml index 56d7495846b..b2999f56e96 100644 --- a/samples/client/petstore/kotlin-gson/pom.xml +++ b/samples/client/petstore/kotlin-gson/pom.xml @@ -27,7 +27,7 @@ 1.2.1 - bundle-test + bundle-install integration-test exec @@ -35,7 +35,20 @@ gradle - test + wrapper + + + + + bundle-test + integration-test + + exec + + + ./gradlew + + build diff --git a/samples/client/petstore/kotlin-jackson/build.gradle b/samples/client/petstore/kotlin-jackson/build.gradle index c76aad33ca3..1153d5a2756 100644 --- a/samples/client/petstore/kotlin-jackson/build.gradle +++ b/samples/client/petstore/kotlin-jackson/build.gradle @@ -2,12 +2,12 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '4.9' + gradleVersion = '6.8.2' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.3.61' + ext.kotlin_version = '1.4.20' repositories { maven { url "https://repo1.maven.org/maven2" } @@ -29,10 +29,10 @@ test { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" + compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "com.fasterxml.jackson.module:jackson-module-kotlin:2.10.2" compile "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.2" compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.2" - compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - compile "com.squareup.okhttp3:okhttp:4.2.2" - testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" + compile "com.squareup.okhttp3:okhttp:4.9.0" + testCompile "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-jackson/pom.xml b/samples/client/petstore/kotlin-jackson/pom.xml index 76eedb89596..fef24af0786 100644 --- a/samples/client/petstore/kotlin-jackson/pom.xml +++ b/samples/client/petstore/kotlin-jackson/pom.xml @@ -27,7 +27,7 @@ 1.2.1 - bundle-test + bundle-install integration-test exec @@ -35,7 +35,20 @@ gradle - test + wrapper + + + + + bundle-test + integration-test + + exec + + + ./gradlew + + build diff --git a/samples/client/petstore/kotlin-json-request-string/build.gradle b/samples/client/petstore/kotlin-json-request-string/build.gradle index 56be0bd0dd8..0ac95190732 100644 --- a/samples/client/petstore/kotlin-json-request-string/build.gradle +++ b/samples/client/petstore/kotlin-json-request-string/build.gradle @@ -2,12 +2,12 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '4.9' + gradleVersion = '6.8.2' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.3.61' + ext.kotlin_version = '1.4.20' repositories { maven { url "https://repo1.maven.org/maven2" } @@ -30,8 +30,7 @@ test { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - compile "com.squareup.moshi:moshi-kotlin:1.9.2" - compile "com.squareup.moshi:moshi-adapters:1.9.2" - compile "com.squareup.okhttp3:okhttp:4.2.2" - testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" + compile "com.squareup.moshi:moshi-kotlin:1.11.0" + compile "com.squareup.okhttp3:okhttp:4.9.0" + testCompile "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-json-request-string/pom.xml b/samples/client/petstore/kotlin-json-request-string/pom.xml index 947997039a7..6d92abf383c 100644 --- a/samples/client/petstore/kotlin-json-request-string/pom.xml +++ b/samples/client/petstore/kotlin-json-request-string/pom.xml @@ -27,7 +27,7 @@ 1.2.1 - bundle-test + bundle-install integration-test exec @@ -35,7 +35,20 @@ gradle - test + wrapper + + + + + bundle-test + integration-test + + exec + + + ./gradlew + + build diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/build.gradle b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/build.gradle index ce9cb568dd7..441c5a90c71 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/build.gradle +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/build.gradle @@ -2,12 +2,12 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '4.9' + gradleVersion = '6.8.2' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.3.61' + ext.kotlin_version = '1.4.20' repositories { maven { url "https://repo1.maven.org/maven2" } @@ -30,7 +30,6 @@ test { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" compile "com.google.code.gson:gson:2.8.6" - compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - compile "com.squareup.okhttp3:okhttp:4.2.2" - testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" + compile "com.squareup.okhttp3:okhttp:4.9.0" + testCompile "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/pom.xml b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/pom.xml new file mode 100644 index 00000000000..293c81370f9 --- /dev/null +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/pom.xml @@ -0,0 +1,59 @@ + + 4.0.0 + org.openapitools + KotlinPetstoreOkhttp4CoroutinesTests + pom + 1.0-SNAPSHOT + kotlin-jvm-okhttp4-coroutines + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + bundle-install + integration-test + + exec + + + gradle + + wrapper + + + + + bundle-test + integration-test + + exec + + + ./gradlew + + build + + + + + + + + diff --git a/samples/client/petstore/kotlin-moshi-codegen/build.gradle b/samples/client/petstore/kotlin-moshi-codegen/build.gradle index 6b949799c39..556d33eefa1 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/build.gradle +++ b/samples/client/petstore/kotlin-moshi-codegen/build.gradle @@ -2,12 +2,12 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '4.9' + gradleVersion = '6.8.2' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.3.61' + ext.kotlin_version = '1.4.20' repositories { maven { url "https://repo1.maven.org/maven2" } @@ -30,9 +30,8 @@ test { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - compile "com.squareup.moshi:moshi-adapters:1.9.2" - compile "com.squareup.moshi:moshi:1.9.2" - kapt "com.squareup.moshi:moshi-kotlin-codegen:1.9.2" - compile "com.squareup.okhttp3:okhttp:4.2.2" - testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" + compile "com.squareup.moshi:moshi:1.11.0" + kapt "com.squareup.moshi:moshi-kotlin-codegen:1.11.0" + compile "com.squareup.okhttp3:okhttp:4.9.0" + testCompile "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-moshi-codegen/pom.xml b/samples/client/petstore/kotlin-moshi-codegen/pom.xml index 9cae12c1a8b..89b696800cc 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/pom.xml +++ b/samples/client/petstore/kotlin-moshi-codegen/pom.xml @@ -27,7 +27,7 @@ 1.2.1 - bundle-test + bundle-install integration-test exec @@ -35,7 +35,20 @@ gradle - test + wrapper + + + + + bundle-test + integration-test + + exec + + + ./gradlew + + build diff --git a/samples/client/petstore/kotlin-nonpublic/build.gradle b/samples/client/petstore/kotlin-nonpublic/build.gradle index 56be0bd0dd8..0ac95190732 100644 --- a/samples/client/petstore/kotlin-nonpublic/build.gradle +++ b/samples/client/petstore/kotlin-nonpublic/build.gradle @@ -2,12 +2,12 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '4.9' + gradleVersion = '6.8.2' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.3.61' + ext.kotlin_version = '1.4.20' repositories { maven { url "https://repo1.maven.org/maven2" } @@ -30,8 +30,7 @@ test { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - compile "com.squareup.moshi:moshi-kotlin:1.9.2" - compile "com.squareup.moshi:moshi-adapters:1.9.2" - compile "com.squareup.okhttp3:okhttp:4.2.2" - testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" + compile "com.squareup.moshi:moshi-kotlin:1.11.0" + compile "com.squareup.okhttp3:okhttp:4.9.0" + testCompile "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-nonpublic/pom.xml b/samples/client/petstore/kotlin-nonpublic/pom.xml index 2b400e564b9..4e8ba331eeb 100644 --- a/samples/client/petstore/kotlin-nonpublic/pom.xml +++ b/samples/client/petstore/kotlin-nonpublic/pom.xml @@ -27,7 +27,7 @@ 1.2.1 - bundle-test + bundle-install integration-test exec @@ -35,7 +35,20 @@ gradle - test + wrapper + + + + + bundle-test + integration-test + + exec + + + ./gradlew + + build diff --git a/samples/client/petstore/kotlin-nullable/build.gradle b/samples/client/petstore/kotlin-nullable/build.gradle index 56be0bd0dd8..0ac95190732 100644 --- a/samples/client/petstore/kotlin-nullable/build.gradle +++ b/samples/client/petstore/kotlin-nullable/build.gradle @@ -2,12 +2,12 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '4.9' + gradleVersion = '6.8.2' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.3.61' + ext.kotlin_version = '1.4.20' repositories { maven { url "https://repo1.maven.org/maven2" } @@ -30,8 +30,7 @@ test { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - compile "com.squareup.moshi:moshi-kotlin:1.9.2" - compile "com.squareup.moshi:moshi-adapters:1.9.2" - compile "com.squareup.okhttp3:okhttp:4.2.2" - testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" + compile "com.squareup.moshi:moshi-kotlin:1.11.0" + compile "com.squareup.okhttp3:okhttp:4.9.0" + testCompile "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-nullable/pom.xml b/samples/client/petstore/kotlin-nullable/pom.xml index 2bf0f9666d6..ce798389df1 100644 --- a/samples/client/petstore/kotlin-nullable/pom.xml +++ b/samples/client/petstore/kotlin-nullable/pom.xml @@ -27,7 +27,7 @@ 1.2.1 - bundle-test + bundle-install integration-test exec @@ -35,7 +35,20 @@ gradle - test + wrapper + + + + + bundle-test + integration-test + + exec + + + ./gradlew + + build diff --git a/samples/client/petstore/kotlin-okhttp3/build.gradle b/samples/client/petstore/kotlin-okhttp3/build.gradle index 662c2a62ce3..24dfdee4c0d 100644 --- a/samples/client/petstore/kotlin-okhttp3/build.gradle +++ b/samples/client/petstore/kotlin-okhttp3/build.gradle @@ -2,12 +2,12 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '4.9' + gradleVersion = '6.8.2' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.3.61' + ext.kotlin_version = '1.4.20' repositories { maven { url "https://repo1.maven.org/maven2" } @@ -30,8 +30,7 @@ test { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - compile "com.squareup.moshi:moshi-kotlin:1.9.2" - compile "com.squareup.moshi:moshi-adapters:1.9.2" - compile "com.squareup.okhttp3:okhttp:3.12.6" - testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" + compile "com.squareup.moshi:moshi-kotlin:1.11.0" + compile "com.squareup.okhttp3:okhttp:3.12.13" + testCompile "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-okhttp3/pom.xml b/samples/client/petstore/kotlin-okhttp3/pom.xml index 37cf659dcac..fe6f10eb6b7 100644 --- a/samples/client/petstore/kotlin-okhttp3/pom.xml +++ b/samples/client/petstore/kotlin-okhttp3/pom.xml @@ -27,7 +27,7 @@ 1.2.1 - bundle-test + bundle-install integration-test exec @@ -35,7 +35,20 @@ gradle - test + wrapper + + + + + bundle-test + integration-test + + exec + + + ./gradlew + + build diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/build.gradle b/samples/client/petstore/kotlin-retrofit2-rx3/build.gradle index a1c30b7a689..b706d945e82 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/build.gradle +++ b/samples/client/petstore/kotlin-retrofit2-rx3/build.gradle @@ -2,14 +2,14 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '4.9' + gradleVersion = '6.8.2' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.3.61' - ext.retrofitVersion = '2.6.2' - ext.rxJava3Version = '3.0.4' + ext.kotlin_version = '1.4.20' + ext.retrofitVersion = '2.7.2' + ext.rxJava3Version = '3.0.10' repositories { maven { url "https://repo1.maven.org/maven2" } @@ -32,14 +32,13 @@ test { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - compile "com.squareup.moshi:moshi-kotlin:1.9.2" - compile "com.squareup.moshi:moshi-adapters:1.9.2" + compile "com.squareup.moshi:moshi-kotlin:1.11.0" compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.0" - compile "com.squareup.okhttp3:logging-interceptor:4.4.0" + compile "com.squareup.okhttp3:logging-interceptor:4.9.0" compile "io.reactivex.rxjava3:rxjava:$rxJava3Version" compile "com.squareup.retrofit2:adapter-rxjava3:2.9.0" compile "com.squareup.retrofit2:retrofit:$retrofitVersion" compile "com.squareup.retrofit2:converter-moshi:$retrofitVersion" compile "com.squareup.retrofit2:converter-scalars:$retrofitVersion" - testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" + testCompile "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/pom.xml b/samples/client/petstore/kotlin-retrofit2-rx3/pom.xml index 1ee09680f37..053da87bc9b 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/pom.xml +++ b/samples/client/petstore/kotlin-retrofit2-rx3/pom.xml @@ -27,7 +27,7 @@ 1.2.1 - bundle-test + bundle-install integration-test exec @@ -35,7 +35,20 @@ gradle - test + wrapper + + + + + bundle-test + integration-test + + exec + + + ./gradlew + + build diff --git a/samples/client/petstore/kotlin-retrofit2/build.gradle b/samples/client/petstore/kotlin-retrofit2/build.gradle index 035dac36829..36168bc34c0 100644 --- a/samples/client/petstore/kotlin-retrofit2/build.gradle +++ b/samples/client/petstore/kotlin-retrofit2/build.gradle @@ -2,13 +2,13 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '4.9' + gradleVersion = '6.8.2' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.3.61' - ext.retrofitVersion = '2.6.2' + ext.kotlin_version = '1.4.20' + ext.retrofitVersion = '2.7.2' repositories { maven { url "https://repo1.maven.org/maven2" } @@ -31,12 +31,11 @@ test { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - compile "com.squareup.moshi:moshi-kotlin:1.9.2" - compile "com.squareup.moshi:moshi-adapters:1.9.2" + compile "com.squareup.moshi:moshi-kotlin:1.11.0" compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.0" - compile "com.squareup.okhttp3:logging-interceptor:4.4.0" + compile "com.squareup.okhttp3:logging-interceptor:4.9.0" compile "com.squareup.retrofit2:retrofit:$retrofitVersion" compile "com.squareup.retrofit2:converter-moshi:$retrofitVersion" compile "com.squareup.retrofit2:converter-scalars:$retrofitVersion" - testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" + testCompile "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-retrofit2/pom.xml b/samples/client/petstore/kotlin-retrofit2/pom.xml index a2a34c203fa..3c189e471de 100644 --- a/samples/client/petstore/kotlin-retrofit2/pom.xml +++ b/samples/client/petstore/kotlin-retrofit2/pom.xml @@ -27,7 +27,7 @@ 1.2.1 - bundle-test + bundle-install integration-test exec @@ -35,7 +35,20 @@ gradle - test + wrapper + + + + + bundle-test + integration-test + + exec + + + ./gradlew + + build diff --git a/samples/client/petstore/kotlin-string/build.gradle b/samples/client/petstore/kotlin-string/build.gradle index 56be0bd0dd8..0ac95190732 100644 --- a/samples/client/petstore/kotlin-string/build.gradle +++ b/samples/client/petstore/kotlin-string/build.gradle @@ -2,12 +2,12 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '4.9' + gradleVersion = '6.8.2' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.3.61' + ext.kotlin_version = '1.4.20' repositories { maven { url "https://repo1.maven.org/maven2" } @@ -30,8 +30,7 @@ test { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - compile "com.squareup.moshi:moshi-kotlin:1.9.2" - compile "com.squareup.moshi:moshi-adapters:1.9.2" - compile "com.squareup.okhttp3:okhttp:4.2.2" - testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" + compile "com.squareup.moshi:moshi-kotlin:1.11.0" + compile "com.squareup.okhttp3:okhttp:4.9.0" + testCompile "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-string/pom.xml b/samples/client/petstore/kotlin-string/pom.xml index 51365b8eae1..95cb3d84833 100644 --- a/samples/client/petstore/kotlin-string/pom.xml +++ b/samples/client/petstore/kotlin-string/pom.xml @@ -48,6 +48,8 @@ ./gradlew + build + -x test diff --git a/samples/client/petstore/kotlin-threetenbp/build.gradle b/samples/client/petstore/kotlin-threetenbp/build.gradle index 886101b0fbe..f1ae3b20265 100644 --- a/samples/client/petstore/kotlin-threetenbp/build.gradle +++ b/samples/client/petstore/kotlin-threetenbp/build.gradle @@ -2,12 +2,12 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '4.9' + gradleVersion = '6.8.2' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.3.61' + ext.kotlin_version = '1.4.20' repositories { maven { url "https://repo1.maven.org/maven2" } @@ -30,9 +30,8 @@ test { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - compile "com.squareup.moshi:moshi-kotlin:1.9.2" - compile "com.squareup.moshi:moshi-adapters:1.9.2" - compile "com.squareup.okhttp3:okhttp:4.2.2" - compile "org.threeten:threetenbp:1.4.0" - testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" + compile "com.squareup.moshi:moshi-kotlin:1.11.0" + compile "com.squareup.okhttp3:okhttp:4.9.0" + compile "org.threeten:threetenbp:1.5.0" + testCompile "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-threetenbp/pom.xml b/samples/client/petstore/kotlin-threetenbp/pom.xml index 6875e743294..fd0bb91eb29 100644 --- a/samples/client/petstore/kotlin-threetenbp/pom.xml +++ b/samples/client/petstore/kotlin-threetenbp/pom.xml @@ -48,6 +48,8 @@ ./gradlew + build + -x test diff --git a/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION b/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION index 3fa3b389a57..c30f0ec2be7 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.1-SNAPSHOT \ No newline at end of file +5.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-uppercase-enum/build.gradle b/samples/client/petstore/kotlin-uppercase-enum/build.gradle index 56be0bd0dd8..0ac95190732 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/build.gradle +++ b/samples/client/petstore/kotlin-uppercase-enum/build.gradle @@ -2,12 +2,12 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '4.9' + gradleVersion = '6.8.2' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.3.61' + ext.kotlin_version = '1.4.20' repositories { maven { url "https://repo1.maven.org/maven2" } @@ -30,8 +30,7 @@ test { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - compile "com.squareup.moshi:moshi-kotlin:1.9.2" - compile "com.squareup.moshi:moshi-adapters:1.9.2" - compile "com.squareup.okhttp3:okhttp:4.2.2" - testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" + compile "com.squareup.moshi:moshi-kotlin:1.11.0" + compile "com.squareup.okhttp3:okhttp:4.9.0" + testCompile "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-uppercase-enum/pom.xml b/samples/client/petstore/kotlin-uppercase-enum/pom.xml new file mode 100644 index 00000000000..3b7794fca34 --- /dev/null +++ b/samples/client/petstore/kotlin-uppercase-enum/pom.xml @@ -0,0 +1,59 @@ + + 4.0.0 + org.openapitools + KotlinPetstoreUppercaseEnumTests + pom + 1.0-SNAPSHOT + kotlin-uppercase-enum + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + bundle-install + integration-test + + exec + + + gradle + + wrapper + + + + + bundle-test + integration-test + + exec + + + ./gradlew + + build + + + + + + + + diff --git a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/apis/EnumApi.kt b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/apis/EnumApi.kt index ffe3e760317..e504c876ce6 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/apis/EnumApi.kt +++ b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/apis/EnumApi.kt @@ -44,18 +44,10 @@ class EnumApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { @Suppress("UNCHECKED_CAST") @Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class) fun getEnum() : PetEnum { - val localVariableBody: kotlin.Any? = null - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/enum", - query = localVariableQuery, - headers = localVariableHeaders - ) + val localVariableConfig = getEnumRequestConfig() + val localVarResponse = request( - localVariableConfig, - localVariableBody + localVariableConfig ) return when (localVarResponse.responseType) { @@ -73,4 +65,25 @@ class EnumApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) { } } + /** + * To obtain the request config of the operation getEnum + * + * @return RequestConfig + */ + fun getEnumRequestConfig() : RequestConfig { + val localVariableBody: kotlin.Any? = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + + val localVariableConfig = RequestConfig( + method = RequestMethod.GET, + path = "/enum", + query = localVariableQuery, + headers = localVariableHeaders, + body = localVariableBody + ) + + return localVariableConfig + } + } diff --git a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 76490dd26ce..c34e9e42d08 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -121,7 +121,7 @@ open class ApiClient(val baseUrl: String) { } - protected inline fun request(requestConfig: RequestConfig, body : Any? = null): ApiInfrastructureResponse { + protected inline fun request(requestConfig: RequestConfig): ApiInfrastructureResponse { val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") val url = httpUrl.newBuilder() @@ -155,12 +155,12 @@ open class ApiClient(val baseUrl: String) { val contentType = (headers[ContentType] as String).substringBefore(";").toLowerCase() val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(body, contentType)) + RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) RequestMethod.GET -> Request.Builder().url(url) RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(body, contentType)) + RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) + RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) + RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) }.apply { headers.forEach { header -> addHeader(header.key, header.value) } diff --git a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt index 9c22257e223..0f2790f370e 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt @@ -12,5 +12,6 @@ data class RequestConfig( val method: RequestMethod, val path: String, val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf() + val query: MutableMap> = mutableMapOf(), + val body: kotlin.Any? = null ) \ No newline at end of file diff --git a/samples/client/petstore/kotlin/build.gradle b/samples/client/petstore/kotlin/build.gradle index 56be0bd0dd8..0ac95190732 100644 --- a/samples/client/petstore/kotlin/build.gradle +++ b/samples/client/petstore/kotlin/build.gradle @@ -2,12 +2,12 @@ group 'org.openapitools' version '1.0.0' wrapper { - gradleVersion = '4.9' + gradleVersion = '6.8.2' distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" } buildscript { - ext.kotlin_version = '1.3.61' + ext.kotlin_version = '1.4.20' repositories { maven { url "https://repo1.maven.org/maven2" } @@ -30,8 +30,7 @@ test { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - compile "com.squareup.moshi:moshi-kotlin:1.9.2" - compile "com.squareup.moshi:moshi-adapters:1.9.2" - compile "com.squareup.okhttp3:okhttp:4.2.2" - testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" + compile "com.squareup.moshi:moshi-kotlin:1.11.0" + compile "com.squareup.okhttp3:okhttp:4.9.0" + testCompile "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/kotlin/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 87b738cbd051603d91cc39de6cb000dd98fe6b02..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 55190 zcmafaW0WS*vSoFbZQHhO+s0S6%`V%vZQJa!ZQHKus_B{g-pt%P_q|ywBQt-*Stldc z$+IJ3?^KWm27v+sf`9-50uuadKtMnL*BJ;1^6ynvR7H?hQcjE>7)art9Bu0Pcm@7C z@c%WG|JzYkP)<@zR9S^iR_sA`azaL$mTnGKnwDyMa;8yL_0^>Ba^)phg0L5rOPTbm7g*YIRLg-2^{qe^`rb!2KqS zk~5wEJtTdD?)3+}=eby3x6%i)sb+m??NHC^u=tcG8p$TzB<;FL(WrZGV&cDQb?O0GMe6PBV=V z?tTO*5_HTW$xea!nkc~Cnx#cL_rrUGWPRa6l+A{aiMY=<0@8y5OC#UcGeE#I>nWh}`#M#kIn-$A;q@u-p71b#hcSItS!IPw?>8 zvzb|?@Ahb22L(O4#2Sre&l9H(@TGT>#Py)D&eW-LNb!=S;I`ZQ{w;MaHW z#to!~TVLgho_Pm%zq@o{K3Xq?I|MVuVSl^QHnT~sHlrVxgsqD-+YD?Nz9@HA<;x2AQjxP)r6Femg+LJ-*)k%EZ}TTRw->5xOY z9#zKJqjZgC47@AFdk1$W+KhTQJKn7e>A&?@-YOy!v_(}GyV@9G#I?bsuto4JEp;5|N{orxi_?vTI4UF0HYcA( zKyGZ4<7Fk?&LZMQb6k10N%E*$gr#T&HsY4SPQ?yerqRz5c?5P$@6dlD6UQwZJ*Je9 z7n-@7!(OVdU-mg@5$D+R%gt82Lt%&n6Yr4=|q>XT%&^z_D*f*ug8N6w$`woqeS-+#RAOfSY&Rz z?1qYa5xi(7eTCrzCFJfCxc%j{J}6#)3^*VRKF;w+`|1n;Xaojr2DI{!<3CaP`#tXs z*`pBQ5k@JLKuCmovFDqh_`Q;+^@t_;SDm29 zCNSdWXbV?9;D4VcoV`FZ9Ggrr$i<&#Dx3W=8>bSQIU_%vf)#(M2Kd3=rN@^d=QAtC zI-iQ;;GMk|&A++W5#hK28W(YqN%?!yuW8(|Cf`@FOW5QbX|`97fxmV;uXvPCqxBD zJ9iI37iV)5TW1R+fV16y;6}2tt~|0J3U4E=wQh@sx{c_eu)t=4Yoz|%Vp<#)Qlh1V z0@C2ZtlT>5gdB6W)_bhXtcZS)`9A!uIOa`K04$5>3&8An+i9BD&GvZZ=7#^r=BN=k za+=Go;qr(M)B~KYAz|<^O3LJON}$Q6Yuqn8qu~+UkUKK~&iM%pB!BO49L+?AL7N7o z(OpM(C-EY753=G=WwJHE`h*lNLMNP^c^bBk@5MyP5{v7x>GNWH>QSgTe5 z!*GPkQ(lcbEs~)4ovCu!Zt&$${9$u(<4@9%@{U<-ksAqB?6F`bQ;o-mvjr)Jn7F&j$@`il1Mf+-HdBs<-`1FahTxmPMMI)@OtI&^mtijW6zGZ67O$UOv1Jj z;a3gmw~t|LjPkW3!EZ=)lLUhFzvO;Yvj9g`8hm%6u`;cuek_b-c$wS_0M4-N<@3l|88 z@V{Sd|M;4+H6guqMm4|v=C6B7mlpP(+It%0E;W`dxMOf9!jYwWj3*MRk`KpS_jx4c z=hrKBkFK;gq@;wUV2eqE3R$M+iUc+UD0iEl#-rECK+XmH9hLKrC={j@uF=f3UiceB zU5l$FF7#RKjx+6!JHMG5-!@zI-eG=a-!Bs^AFKqN_M26%cIIcSs61R$yuq@5a3c3& z4%zLs!g}+C5%`ja?F`?5-og0lv-;(^e<`r~p$x%&*89_Aye1N)9LNVk?9BwY$Y$$F^!JQAjBJvywXAesj7lTZ)rXuxv(FFNZVknJha99lN=^h`J2> zl5=~(tKwvHHvh|9-41@OV`c;Ws--PE%{7d2sLNbDp;A6_Ka6epzOSFdqb zBa0m3j~bT*q1lslHsHqaHIP%DF&-XMpCRL(v;MV#*>mB^&)a=HfLI7efblG z(@hzN`|n+oH9;qBklb=d^S0joHCsArnR1-h{*dIUThik>ot^!6YCNjg;J_i3h6Rl0ji)* zo(tQ~>xB!rUJ(nZjCA^%X;)H{@>uhR5|xBDA=d21p@iJ!cH?+%U|VSh2S4@gv`^)^ zNKD6YlVo$%b4W^}Rw>P1YJ|fTb$_(7C;hH+ z1XAMPb6*p^h8)e5nNPKfeAO}Ik+ZN_`NrADeeJOq4Ak;sD~ zTe77no{Ztdox56Xi4UE6S7wRVxJzWxKj;B%v7|FZ3cV9MdfFp7lWCi+W{}UqekdpH zdO#eoOuB3Fu!DU`ErfeoZWJbWtRXUeBzi zBTF-AI7yMC^ntG+8%mn(I6Dw}3xK8v#Ly{3w3_E?J4(Q5JBq~I>u3!CNp~Ekk&YH` z#383VO4O42NNtcGkr*K<+wYZ>@|sP?`AQcs5oqX@-EIqgK@Pmp5~p6O6qy4ml~N{D z{=jQ7k(9!CM3N3Vt|u@%ssTw~r~Z(}QvlROAkQQ?r8OQ3F0D$aGLh zny+uGnH5muJ<67Z=8uilKvGuANrg@s3Vu_lU2ajb?rIhuOd^E@l!Kl0hYIxOP1B~Q zggUmXbh$bKL~YQ#!4fos9UUVG#}HN$lIkM<1OkU@r>$7DYYe37cXYwfK@vrHwm;pg zbh(hEU|8{*d$q7LUm+x&`S@VbW*&p-sWrplWnRM|I{P;I;%U`WmYUCeJhYc|>5?&& zj}@n}w~Oo=l}iwvi7K6)osqa;M8>fRe}>^;bLBrgA;r^ZGgY@IC^ioRmnE&H4)UV5 zO{7egQ7sBAdoqGsso5q4R(4$4Tjm&&C|7Huz&5B0wXoJzZzNc5Bt)=SOI|H}+fbit z-PiF5(NHSy>4HPMrNc@SuEMDuKYMQ--G+qeUPqO_9mOsg%1EHpqoX^yNd~~kbo`cH zlV0iAkBFTn;rVb>EK^V6?T~t~3vm;csx+lUh_%ROFPy0(omy7+_wYjN!VRDtwDu^h4n|xpAMsLepm% zggvs;v8+isCW`>BckRz1MQ=l>K6k^DdT`~sDXTWQ<~+JtY;I~I>8XsAq3yXgxe>`O zZdF*{9@Z|YtS$QrVaB!8&`&^W->_O&-JXn1n&~}o3Z7FL1QE5R*W2W@=u|w~7%EeC1aRfGtJWxImfY-D3t!!nBkWM> zafu>^Lz-ONgT6ExjV4WhN!v~u{lt2-QBN&UxwnvdH|I%LS|J-D;o>@@sA62@&yew0 z)58~JSZP!(lX;da!3`d)D1+;K9!lyNlkF|n(UduR-%g>#{`pvrD^ClddhJyfL7C-(x+J+9&7EsC~^O`&}V%)Ut8^O_7YAXPDpzv8ir4 zl`d)(;imc6r16k_d^)PJZ+QPxxVJS5e^4wX9D=V2zH&wW0-p&OJe=}rX`*->XT=;_qI&)=WHkYnZx6bLoUh_)n-A}SF_ z9z7agNTM5W6}}ui=&Qs@pO5$zHsOWIbd_&%j^Ok5PJ3yUWQw*i4*iKO)_er2CDUME ztt+{Egod~W-fn^aLe)aBz)MOc_?i-stTj}~iFk7u^-gGSbU;Iem06SDP=AEw9SzuF zeZ|hKCG3MV(z_PJg0(JbqTRf4T{NUt%kz&}4S`)0I%}ZrG!jgW2GwP=WTtkWS?DOs znI9LY!dK+1_H0h+i-_~URb^M;4&AMrEO_UlDV8o?E>^3x%ZJyh$JuDMrtYL8|G3If zPf2_Qb_W+V?$#O; zydKFv*%O;Y@o_T_UAYuaqx1isMKZ^32JtgeceA$0Z@Ck0;lHbS%N5)zzAW9iz; z8tTKeK7&qw!8XVz-+pz>z-BeIzr*#r0nB^cntjQ9@Y-N0=e&ZK72vlzX>f3RT@i7@ z=z`m7jNk!9%^xD0ug%ptZnM>F;Qu$rlwo}vRGBIymPL)L|x}nan3uFUw(&N z24gdkcb7!Q56{0<+zu zEtc5WzG2xf%1<@vo$ZsuOK{v9gx^0`gw>@h>ZMLy*h+6ueoie{D#}}` zK2@6Xxq(uZaLFC%M!2}FX}ab%GQ8A0QJ?&!vaI8Gv=vMhd);6kGguDmtuOElru()) zuRk&Z{?Vp!G~F<1#s&6io1`poBqpRHyM^p;7!+L??_DzJ8s9mYFMQ0^%_3ft7g{PD zZd}8E4EV}D!>F?bzcX=2hHR_P`Xy6?FOK)mCj)Ym4s2hh z0OlOdQa@I;^-3bhB6mpw*X5=0kJv8?#XP~9){G-+0ST@1Roz1qi8PhIXp1D$XNqVG zMl>WxwT+K`SdO1RCt4FWTNy3!i?N>*-lbnn#OxFJrswgD7HjuKpWh*o@QvgF&j+CT z{55~ZsUeR1aB}lv#s_7~+9dCix!5(KR#c?K?e2B%P$fvrsZxy@GP#R#jwL{y#Ld$} z7sF>QT6m|}?V;msb?Nlohj7a5W_D$y+4O6eI;Zt$jVGymlzLKscqer9#+p2$0It&u zWY!dCeM6^B^Z;ddEmhi?8`scl=Lhi7W%2|pT6X6^%-=q90DS(hQ-%c+E*ywPvmoF(KqDoW4!*gmQIklm zk#!GLqv|cs(JRF3G?=AYY19{w@~`G3pa z@xR9S-Hquh*&5Yas*VI};(%9%PADn`kzm zeWMJVW=>>wap*9|R7n#!&&J>gq04>DTCMtj{P^d12|2wXTEKvSf?$AvnE!peqV7i4 zE>0G%CSn%WCW1yre?yi9*aFP{GvZ|R4JT}M%x_%Hztz2qw?&28l&qW<6?c6ym{f$d z5YCF+k#yEbjCN|AGi~-NcCG8MCF1!MXBFL{#7q z)HO+WW173?kuI}^Xat;Q^gb4Hi0RGyB}%|~j8>`6X4CPo+|okMbKy9PHkr58V4bX6<&ERU)QlF8%%huUz&f+dwTN|tk+C&&o@Q1RtG`}6&6;ncQuAcfHoxd5AgD7`s zXynq41Y`zRSiOY@*;&1%1z>oNcWTV|)sjLg1X8ijg1Y zbIGL0X*Sd}EXSQ2BXCKbJmlckY(@EWn~Ut2lYeuw1wg?hhj@K?XB@V_ZP`fyL~Yd3n3SyHU-RwMBr6t-QWE5TinN9VD4XVPU; zonIIR!&pGqrLQK)=#kj40Im%V@ij0&Dh0*s!lnTw+D`Dt-xmk-jmpJv$1-E-vfYL4 zqKr#}Gm}~GPE+&$PI@4ag@=M}NYi7Y&HW82Q`@Y=W&PE31D110@yy(1vddLt`P%N^ z>Yz195A%tnt~tvsSR2{m!~7HUc@x<&`lGX1nYeQUE(%sphTi>JsVqSw8xql*Ys@9B z>RIOH*rFi*C`ohwXjyeRBDt8p)-u{O+KWP;$4gg||%*u{$~yEj+Al zE(hAQRQ1k7MkCq9s4^N3ep*$h^L%2Vq?f?{+cicpS8lo)$Cb69b98au+m2J_e7nYwID0@`M9XIo1H~|eZFc8Hl!qly612ADCVpU zY8^*RTMX(CgehD{9v|^9vZ6Rab`VeZ2m*gOR)Mw~73QEBiktViBhR!_&3l$|be|d6 zupC`{g89Y|V3uxl2!6CM(RNpdtynaiJ~*DqSTq9Mh`ohZnb%^3G{k;6%n18$4nAqR zjPOrP#-^Y9;iw{J@XH9=g5J+yEVh|e=4UeY<^65`%gWtdQ=-aqSgtywM(1nKXh`R4 zzPP&7r)kv_uC7X9n=h=!Zrf<>X=B5f<9~Q>h#jYRD#CT7D~@6@RGNyO-#0iq0uHV1 zPJr2O4d_xLmg2^TmG7|dpfJ?GGa`0|YE+`2Rata9!?$j#e9KfGYuLL(*^z z!SxFA`$qm)q-YKh)WRJZ@S+-sD_1E$V?;(?^+F3tVcK6 z2fE=8hV*2mgiAbefU^uvcM?&+Y&E}vG=Iz!%jBF7iv){lyC`)*yyS~D8k+Mx|N3bm zI~L~Z$=W9&`x)JnO;8c>3LSDw!fzN#X3qi|0`sXY4?cz{*#xz!kvZ9bO=K3XbN z5KrgN=&(JbXH{Wsu9EdmQ-W`i!JWEmfI;yVTT^a-8Ch#D8xf2dtyi?7p z%#)W3n*a#ndFpd{qN|+9Jz++AJQO#-Y7Z6%*%oyEP5zs}d&kKIr`FVEY z;S}@d?UU=tCdw~EJ{b}=9x}S2iv!!8<$?d7VKDA8h{oeD#S-$DV)-vPdGY@x08n)@ zag?yLF_E#evvRTj4^CcrLvBL=fft&@HOhZ6Ng4`8ijt&h2y}fOTC~7GfJi4vpomA5 zOcOM)o_I9BKz}I`q)fu+Qnfy*W`|mY%LO>eF^a z;$)?T4F-(X#Q-m}!-k8L_rNPf`Mr<9IWu)f&dvt=EL+ESYmCvErd@8B9hd)afc(ZL94S z?rp#h&{7Ah5IJftK4VjATklo7@hm?8BX*~oBiz)jyc9FuRw!-V;Uo>p!CWpLaIQyt zAs5WN)1CCeux-qiGdmbIk8LR`gM+Qg=&Ve}w?zA6+sTL)abU=-cvU`3E?p5$Hpkxw znu0N659qR=IKnde*AEz_7z2pdi_Bh-sb3b=PdGO1Pdf_q2;+*Cx9YN7p_>rl``knY zRn%aVkcv1(W;`Mtp_DNOIECtgq%ufk-mu_<+Fu3Q17Tq4Rr(oeq)Yqk_CHA7LR@7@ zIZIDxxhS&=F2IQfusQ+Nsr%*zFK7S4g!U0y@3H^Yln|i;0a5+?RPG;ZSp6Tul>ezM z`40+516&719qT)mW|ArDSENle5hE2e8qY+zfeZoy12u&xoMgcP)4=&P-1Ib*-bAy` zlT?>w&B|ei-rCXO;sxo7*G;!)_p#%PAM-?m$JP(R%x1Hfas@KeaG%LO?R=lmkXc_MKZW}3f%KZ*rAN?HYvbu2L$ zRt_uv7~-IejlD1x;_AhwGXjB94Q=%+PbxuYzta*jw?S&%|qb=(JfJ?&6P=R7X zV%HP_!@-zO*zS}46g=J}#AMJ}rtWBr21e6hOn&tEmaM%hALH7nlm2@LP4rZ>2 zebe5aH@k!e?ij4Zwak#30|}>;`bquDQK*xmR=zc6vj0yuyC6+U=LusGnO3ZKFRpen z#pwzh!<+WBVp-!$MAc<0i~I%fW=8IO6K}bJ<-Scq>e+)951R~HKB?Mx2H}pxPHE@} zvqpq5j81_jtb_WneAvp<5kgdPKm|u2BdQx9%EzcCN&U{l+kbkhmV<1}yCTDv%&K^> zg;KCjwh*R1f_`6`si$h6`jyIKT7rTv5#k~x$mUyIw)_>Vr)D4fwIs@}{FSX|5GB1l z4vv;@oS@>Bu7~{KgUa_8eg#Lk6IDT2IY$41$*06{>>V;Bwa(-@N;ex4;D`(QK*b}{ z{#4$Hmt)FLqERgKz=3zXiV<{YX6V)lvYBr3V>N6ajeI~~hGR5Oe>W9r@sg)Na(a4- zxm%|1OKPN6^%JaD^^O~HbLSu=f`1px>RawOxLr+1b2^28U*2#h*W^=lSpSY4(@*^l z{!@9RSLG8Me&RJYLi|?$c!B0fP=4xAM4rerxX{xy{&i6=AqXueQAIBqO+pmuxy8Ib z4X^}r!NN3-upC6B#lt7&x0J;)nb9O~xjJMemm$_fHuP{DgtlU3xiW0UesTzS30L+U zQzDI3p&3dpONhd5I8-fGk^}@unluzu%nJ$9pzoO~Kk!>dLxw@M)M9?pNH1CQhvA`z zV;uacUtnBTdvT`M$1cm9`JrT3BMW!MNVBy%?@ZX%;(%(vqQAz<7I!hlDe|J3cn9=} zF7B;V4xE{Ss76s$W~%*$JviK?w8^vqCp#_G^jN0j>~Xq#Zru26e#l3H^{GCLEXI#n z?n~F-Lv#hU(bZS`EI9(xGV*jT=8R?CaK)t8oHc9XJ;UPY0Hz$XWt#QyLBaaz5+}xM zXk(!L_*PTt7gwWH*HLWC$h3Ho!SQ-(I||nn_iEC{WT3S{3V{8IN6tZ1C+DiFM{xlI zeMMk{o5;I6UvaC)@WKp9D+o?2Vd@4)Ue-nYci()hCCsKR`VD;hr9=vA!cgGL%3k^b(jADGyPi2TKr(JNh8mzlIR>n(F_hgiV(3@Ds(tjbNM7GoZ;T|3 zWzs8S`5PrA!9){jBJuX4y`f<4;>9*&NY=2Sq2Bp`M2(fox7ZhIDe!BaQUb@P(ub9D zlP8!p(AN&CwW!V&>H?yPFMJ)d5x#HKfwx;nS{Rr@oHqpktOg)%F+%1#tsPtq7zI$r zBo-Kflhq-=7_eW9B2OQv=@?|y0CKN77)N;z@tcg;heyW{wlpJ1t`Ap!O0`Xz{YHqO zI1${8Hag^r!kA<2_~bYtM=<1YzQ#GGP+q?3T7zYbIjN6Ee^V^b&9en$8FI*NIFg9G zPG$OXjT0Ku?%L7fat8Mqbl1`azf1ltmKTa(HH$Dqlav|rU{zP;Tbnk-XkGFQ6d+gi z-PXh?_kEJl+K98&OrmzgPIijB4!Pozbxd0H1;Usy!;V>Yn6&pu*zW8aYx`SC!$*ti zSn+G9p=~w6V(fZZHc>m|PPfjK6IN4(o=IFu?pC?+`UZAUTw!e`052{P=8vqT^(VeG z=psASIhCv28Y(;7;TuYAe>}BPk5Qg=8$?wZj9lj>h2kwEfF_CpK=+O6Rq9pLn4W)# zeXCKCpi~jsfqw7Taa0;!B5_C;B}e56W1s8@p*)SPzA;Fd$Slsn^=!_&!mRHV*Lmt| zBGIDPuR>CgS4%cQ4wKdEyO&Z>2aHmja;Pz+n|7(#l%^2ZLCix%>@_mbnyPEbyrHaz z>j^4SIv;ZXF-Ftzz>*t4wyq)ng8%0d;(Z_ExZ-cxwei=8{(br-`JYO(f23Wae_MqE z3@{Mlf^%M5G1SIN&en1*| zH~ANY1h3&WNsBy$G9{T=`kcxI#-X|>zLX2r*^-FUF+m0{k)n#GTG_mhG&fJfLj~K& zU~~6othMlvMm9<*SUD2?RD+R17|Z4mgR$L*R3;nBbo&Vm@39&3xIg;^aSxHS>}gwR zmzs?h8oPnNVgET&dx5^7APYx6Vv6eou07Zveyd+^V6_LzI$>ic+pxD_8s~ zC<}ucul>UH<@$KM zT4oI=62M%7qQO{}re-jTFqo9Z;rJKD5!X5$iwUsh*+kcHVhID08MB5cQD4TBWB(rI zuWc%CA}}v|iH=9gQ?D$1#Gu!y3o~p7416n54&Hif`U-cV?VrUMJyEqo_NC4#{puzU zzXEE@UppeeRlS9W*^N$zS`SBBi<@tT+<%3l@KhOy^%MWB9(A#*J~DQ;+MK*$rxo6f zcx3$3mcx{tly!q(p2DQrxcih|)0do_ZY77pyHGE#Q(0k*t!HUmmMcYFq%l$-o6%lS zDb49W-E?rQ#Hl``C3YTEdGZjFi3R<>t)+NAda(r~f1cT5jY}s7-2^&Kvo&2DLTPYP zhVVo-HLwo*vl83mtQ9)PR#VBg)FN}+*8c-p8j`LnNUU*Olm1O1Qqe62D#$CF#?HrM zy(zkX|1oF}Z=T#3XMLWDrm(|m+{1&BMxHY7X@hM_+cV$5-t!8HT(dJi6m9{ja53Yw z3f^`yb6Q;(e|#JQIz~B*=!-GbQ4nNL-NL z@^NWF_#w-Cox@h62;r^;Y`NX8cs?l^LU;5IWE~yvU8TqIHij!X8ydbLlT0gwmzS9} z@5BccG?vO;rvCs$mse1*ANi-cYE6Iauz$Fbn3#|ToAt5v7IlYnt6RMQEYLldva{~s zvr>1L##zmeoYgvIXJ#>bbuCVuEv2ZvZ8I~PQUN3wjP0UC)!U+wn|&`V*8?)` zMSCuvnuGec>QL+i1nCPGDAm@XSMIo?A9~C?g2&G8aNKjWd2pDX{qZ?04+2 zeyLw}iEd4vkCAWwa$ zbrHlEf3hfN7^1g~aW^XwldSmx1v~1z(s=1az4-wl} z`mM+G95*N*&1EP#u3}*KwNrPIgw8Kpp((rdEOO;bT1;6ea~>>sK+?!;{hpJ3rR<6UJb`O8P4@{XGgV%63_fs%cG8L zk9Fszbdo4tS$g0IWP1>t@0)E%-&9yj%Q!fiL2vcuL;90fPm}M==<>}Q)&sp@STFCY z^p!RzmN+uXGdtPJj1Y-khNyCb6Y$Vs>eZyW zPaOV=HY_T@FwAlleZCFYl@5X<<7%5DoO(7S%Lbl55?{2vIr_;SXBCbPZ(up;pC6Wx={AZL?shYOuFxLx1*>62;2rP}g`UT5+BHg(ju z&7n5QSvSyXbioB9CJTB#x;pexicV|9oaOpiJ9VK6EvKhl4^Vsa(p6cIi$*Zr0UxQ z;$MPOZnNae2Duuce~7|2MCfhNg*hZ9{+8H3?ts9C8#xGaM&sN;2lriYkn9W>&Gry! z3b(Xx1x*FhQkD-~V+s~KBfr4M_#0{`=Yrh90yj}Ph~)Nx;1Y^8<418tu!$1<3?T*~ z7Dl0P3Uok-7w0MPFQexNG1P5;y~E8zEvE49>$(f|XWtkW2Mj`udPn)pb%} zrA%wRFp*xvDgC767w!9`0vx1=q!)w!G+9(-w&p*a@WXg{?T&%;qaVcHo>7ca%KX$B z^7|KBPo<2;kM{2mRnF8vKm`9qGV%|I{y!pKm8B(q^2V;;x2r!1VJ^Zz8bWa)!-7a8 zSRf@dqEPlsj!7}oNvFFAA)75})vTJUwQ03hD$I*j6_5xbtd_JkE2`IJD_fQ;a$EkO z{fQ{~e%PKgPJsD&PyEvDmg+Qf&p*-qu!#;1k2r_(H72{^(Z)htgh@F?VIgK#_&eS- z$~(qInec>)XIkv@+{o6^DJLpAb>!d}l1DK^(l%#OdD9tKK6#|_R?-%0V!`<9Hj z3w3chDwG*SFte@>Iqwq`J4M&{aHXzyigT620+Vf$X?3RFfeTcvx_e+(&Q*z)t>c0e zpZH$1Z3X%{^_vylHVOWT6tno=l&$3 z9^eQ@TwU#%WMQaFvaYp_we%_2-9=o{+ck zF{cKJCOjpW&qKQquyp2BXCAP920dcrZ}T1@piukx_NY;%2W>@Wca%=Ch~x5Oj58Hv z;D-_ALOZBF(Mqbcqjd}P3iDbek#Dwzu`WRs`;hRIr*n0PV7vT+%Io(t}8KZ zpp?uc2eW!v28ipep0XNDPZt7H2HJ6oey|J3z!ng#1H~x_k%35P+Cp%mqXJ~cV0xdd z^4m5^K_dQ^Sg?$P`))ccV=O>C{Ds(C2WxX$LMC5vy=*44pP&)X5DOPYfqE${)hDg< z3hcG%U%HZ39=`#Ko4Uctg&@PQLf>?0^D|4J(_1*TFMOMB!Vv1_mnOq$BzXQdOGqgy zOp#LBZ!c>bPjY1NTXksZmbAl0A^Y&(%a3W-k>bE&>K?px5Cm%AT2E<&)Y?O*?d80d zgI5l~&Mve;iXm88Q+Fw7{+`PtN4G7~mJWR^z7XmYQ>uoiV!{tL)hp|= zS(M)813PM`d<501>{NqaPo6BZ^T{KBaqEVH(2^Vjeq zgeMeMpd*1tE@@);hGjuoVzF>Cj;5dNNwh40CnU+0DSKb~GEMb_# zT8Z&gz%SkHq6!;_6dQFYE`+b`v4NT7&@P>cA1Z1xmXy<2htaDhm@XXMp!g($ zw(7iFoH2}WR`UjqjaqOQ$ecNt@c|K1H1kyBArTTjLp%-M`4nzOhkfE#}dOpcd;b#suq8cPJ&bf5`6Tq>ND(l zib{VrPZ>{KuaIg}Y$W>A+nrvMg+l4)-@2jpAQ5h(Tii%Ni^-UPVg{<1KGU2EIUNGaXcEkOedJOusFT9X3%Pz$R+-+W+LlRaY-a$5r?4V zbPzgQl22IPG+N*iBRDH%l{Zh$fv9$RN1sU@Hp3m=M}{rX%y#;4(x1KR2yCO7Pzo>rw(67E{^{yUR`91nX^&MxY@FwmJJbyPAoWZ9Z zcBS$r)&ogYBn{DOtD~tIVJUiq|1foX^*F~O4hlLp-g;Y2wKLLM=?(r3GDqsPmUo*? zwKMEi*%f)C_@?(&&hk>;m07F$X7&i?DEK|jdRK=CaaNu-)pX>n3}@%byPKVkpLzBq z{+Py&!`MZ^4@-;iY`I4#6G@aWMv{^2VTH7|WF^u?3vsB|jU3LgdX$}=v7#EHRN(im zI(3q-eU$s~r=S#EWqa_2!G?b~ z<&brq1vvUTJH380=gcNntZw%7UT8tLAr-W49;9y^=>TDaTC|cKA<(gah#2M|l~j)w zY8goo28gj$n&zcNgqX1Qn6=<8?R0`FVO)g4&QtJAbW3G#D)uNeac-7cH5W#6i!%BH z=}9}-f+FrtEkkrQ?nkoMQ1o-9_b+&=&C2^h!&mWFga#MCrm85hW;)1pDt;-uvQG^D zntSB?XA*0%TIhtWDS!KcI}kp3LT>!(Nlc(lQN?k^bS8Q^GGMfo}^|%7s;#r+pybl@?KA++|FJ zr%se9(B|g*ERQU96az%@4gYrxRRxaM2*b}jNsG|0dQi;Rw{0WM0E>rko!{QYAJJKY z)|sX0N$!8d9E|kND~v|f>3YE|uiAnqbkMn)hu$if4kUkzKqoNoh8v|S>VY1EKmgO} zR$0UU2o)4i4yc1inx3}brso+sio{)gfbLaEgLahj8(_Z#4R-v) zglqwI%`dsY+589a8$Mu7#7_%kN*ekHupQ#48DIN^uhDxblDg3R1yXMr^NmkR z7J_NWCY~fhg}h!_aXJ#?wsZF$q`JH>JWQ9`jbZzOBpS`}-A$Vgkq7+|=lPx9H7QZG z8i8guMN+yc4*H*ANr$Q-3I{FQ-^;8ezWS2b8rERp9TMOLBxiG9J*g5=?h)mIm3#CGi4JSq1ohFrcrxx@`**K5%T}qbaCGldV!t zVeM)!U3vbf5FOy;(h08JnhSGxm)8Kqxr9PsMeWi=b8b|m_&^@#A3lL;bVKTBx+0v8 zLZeWAxJ~N27lsOT2b|qyp$(CqzqgW@tyy?CgwOe~^i;ZH zlL``i4r!>i#EGBNxV_P@KpYFQLz4Bdq{#zA&sc)*@7Mxsh9u%e6Ke`?5Yz1jkTdND zR8!u_yw_$weBOU}24(&^Bm|(dSJ(v(cBct}87a^X(v>nVLIr%%D8r|&)mi+iBc;B;x;rKq zd8*X`r?SZsTNCPQqoFOrUz8nZO?225Z#z(B!4mEp#ZJBzwd7jW1!`sg*?hPMJ$o`T zR?KrN6OZA1H{9pA;p0cSSu;@6->8aJm1rrO-yDJ7)lxuk#npUk7WNER1Wwnpy%u zF=t6iHzWU(L&=vVSSc^&D_eYP3TM?HN!Tgq$SYC;pSIPWW;zeNm7Pgub#yZ@7WPw#f#Kl)W4%B>)+8%gpfoH1qZ;kZ*RqfXYeGXJ_ zk>2otbp+1By`x^1V!>6k5v8NAK@T;89$`hE0{Pc@Q$KhG0jOoKk--Qx!vS~lAiypV zCIJ&6B@24`!TxhJ4_QS*S5;;Pk#!f(qIR7*(c3dN*POKtQe)QvR{O2@QsM%ujEAWEm) z+PM=G9hSR>gQ`Bv2(k}RAv2+$7qq(mU`fQ+&}*i%-RtSUAha>70?G!>?w%F(b4k!$ zvm;E!)2`I?etmSUFW7WflJ@8Nx`m_vE2HF#)_BiD#FaNT|IY@!uUbd4v$wTglIbIX zblRy5=wp)VQzsn0_;KdM%g<8@>#;E?vypTf=F?3f@SSdZ;XpX~J@l1;p#}_veWHp>@Iq_T z@^7|h;EivPYv1&u0~l9(a~>dV9Uw10QqB6Dzu1G~-l{*7IktljpK<_L8m0|7VV_!S zRiE{u97(%R-<8oYJ{molUd>vlGaE-C|^<`hppdDz<7OS13$#J zZ+)(*rZIDSt^Q$}CRk0?pqT5PN5TT`Ya{q(BUg#&nAsg6apPMhLTno!SRq1e60fl6GvpnwDD4N> z9B=RrufY8+g3_`@PRg+(+gs2(bd;5#{uTZk96CWz#{=&h9+!{_m60xJxC%r&gd_N! z>h5UzVX%_7@CUeAA1XFg_AF%(uS&^1WD*VPS^jcC!M2v@RHZML;e(H-=(4(3O&bX- zI6>usJOS+?W&^S&DL{l|>51ZvCXUKlH2XKJPXnHjs*oMkNM#ZDLx!oaM5(%^)5XaP zk6&+P16sA>vyFe9v`Cp5qnbE#r#ltR5E+O3!WnKn`56Grs2;sqr3r# zp@Zp<^q`5iq8OqOlJ`pIuyK@3zPz&iJ0Jcc`hDQ1bqos2;}O|$i#}e@ua*x5VCSx zJAp}+?Hz++tm9dh3Fvm_bO6mQo38al#>^O0g)Lh^&l82+&x)*<n7^Sw-AJo9tEzZDwyJ7L^i7|BGqHu+ea6(&7jKpBq>~V z8CJxurD)WZ{5D0?s|KMi=e7A^JVNM6sdwg@1Eg_+Bw=9j&=+KO1PG|y(mP1@5~x>d z=@c{EWU_jTSjiJl)d(>`qEJ;@iOBm}alq8;OK;p(1AdH$)I9qHNmxxUArdzBW0t+Qeyl)m3?D09770g z)hzXEOy>2_{?o%2B%k%z4d23!pZcoxyW1Ik{|m7Q1>fm4`wsRrl)~h z_=Z*zYL+EG@DV1{6@5@(Ndu!Q$l_6Qlfoz@79q)Kmsf~J7t1)tl#`MD<;1&CAA zH8;i+oBm89dTTDl{aH`cmTPTt@^K-%*sV+t4X9q0Z{A~vEEa!&rRRr=0Rbz4NFCJr zLg2u=0QK@w9XGE=6(-JgeP}G#WG|R&tfHRA3a9*zh5wNTBAD;@YYGx%#E4{C#Wlfo z%-JuW9=FA_T6mR2-Vugk1uGZvJbFvVVWT@QOWz$;?u6+CbyQsbK$>O1APk|xgnh_8 zc)s@Mw7#0^wP6qTtyNq2G#s?5j~REyoU6^lT7dpX{T-rhZWHD%dik*=EA7bIJgOVf_Ga!yC8V^tkTOEHe+JK@Fh|$kfNxO^= z#lpV^(ZQ-3!^_BhV>aXY~GC9{8%1lOJ}6vzXDvPhC>JrtXwFBC+!3a*Z-%#9}i z#<5&0LLIa{q!rEIFSFc9)>{-_2^qbOg5;_A9 ztQ))C6#hxSA{f9R3Eh^`_f${pBJNe~pIQ`tZVR^wyp}=gLK}e5_vG@w+-mp#Fu>e| z*?qBp5CQ5zu+Fi}xAs)YY1;bKG!htqR~)DB$ILN6GaChoiy%Bq@i+1ZnANC0U&D z_4k$=YP47ng+0NhuEt}6C;9-JDd8i5S>`Ml==9wHDQFOsAlmtrVwurYDw_)Ihfk35 zJDBbe!*LUpg%4n>BExWz>KIQ9vexUu^d!7rc_kg#Bf= z7TLz|l*y*3d2vi@c|pX*@ybf!+Xk|2*z$@F4K#MT8Dt4zM_EcFmNp31#7qT6(@GG? zdd;sSY9HHuDb=w&|K%sm`bYX#%UHKY%R`3aLMO?{T#EI@FNNFNO>p@?W*i0z(g2dt z{=9Ofh80Oxv&)i35AQN>TPMjR^UID-T7H5A?GI{MD_VeXZ%;uo41dVm=uT&ne2h0i zv*xI%9vPtdEK@~1&V%p1sFc2AA`9?H)gPnRdlO~URx!fiSV)j?Tf5=5F>hnO=$d$x zzaIfr*wiIc!U1K*$JO@)gP4%xp!<*DvJSv7p}(uTLUb=MSb@7_yO+IsCj^`PsxEl& zIxsi}s3L?t+p+3FXYqujGhGwTx^WXgJ1}a@Yq5mwP0PvGEr*qu7@R$9j>@-q1rz5T zriz;B^(ex?=3Th6h;7U`8u2sDlfS{0YyydK=*>-(NOm9>S_{U|eg(J~C7O zIe{|LK=Y`hXiF_%jOM8Haw3UtaE{hWdzo3BbD6ud7br4cODBtN(~Hl+odP0SSWPw;I&^m)yLw+nd#}3#z}?UIcX3=SssI}`QwY=% zAEXTODk|MqTx}2DVG<|~(CxgLyi*A{m>M@1h^wiC)4Hy>1K7@|Z&_VPJsaQoS8=ex zDL&+AZdQa>ylxhT_Q$q=60D5&%pi6+qlY3$3c(~rsITX?>b;({FhU!7HOOhSP7>bmTkC8KM%!LRGI^~y3Ug+gh!QM=+NZXznM)?L3G=4=IMvFgX3BAlyJ z`~jjA;2z+65D$j5xbv9=IWQ^&-K3Yh`vC(1Qz2h2`o$>Cej@XRGff!it$n{@WEJ^N z41qk%Wm=}mA*iwCqU_6}Id!SQd13aFER3unXaJJXIsSnxvG2(hSCP{i&QH$tL&TPx zDYJsuk+%laN&OvKb-FHK$R4dy%M7hSB*yj#-nJy?S9tVoxAuDei{s}@+pNT!vLOIC z8g`-QQW8FKp3cPsX%{)0B+x+OhZ1=L7F-jizt|{+f1Ga7%+!BXqjCjH&x|3%?UbN# zh?$I1^YokvG$qFz5ySK+Ja5=mkR&p{F}ev**rWdKMko+Gj^?Or=UH?SCg#0F(&a_y zXOh}dPv0D9l0RVedq1~jCNV=8?vZfU-Xi|nkeE->;ohG3U7z+^0+HV17~-_Mv#mV` zzvwUJJ15v5wwKPv-)i@dsEo@#WEO9zie7mdRAbgL2kjbW4&lk$vxkbq=w5mGKZK6@ zjXWctDkCRx58NJD_Q7e}HX`SiV)TZMJ}~zY6P1(LWo`;yDynY_5_L?N-P`>ALfmyl z8C$a~FDkcwtzK9m$tof>(`Vu3#6r#+v8RGy#1D2)F;vnsiL&P-c^PO)^B-4VeJteLlT@25sPa z%W~q5>YMjj!mhN})p$47VA^v$Jo6_s{!y?}`+h+VM_SN`!11`|;C;B};B&Z<@%FOG z_YQVN+zFF|q5zKab&e4GH|B;sBbKimHt;K@tCH+S{7Ry~88`si7}S)1E{21nldiu5 z_4>;XTJa~Yd$m4A9{Qbd)KUAm7XNbZ4xHbg3a8-+1uf*$1PegabbmCzgC~1WB2F(W zYj5XhVos!X!QHuZXCatkRsdEsSCc+D2?*S7a+(v%toqyxhjz|`zdrUvsxQS{J>?c& zvx*rHw^8b|v^7wq8KWVofj&VUitbm*a&RU_ln#ZFA^3AKEf<#T%8I!Lg3XEsdH(A5 zlgh&M_XEoal)i#0tcq8c%Gs6`xu;vvP2u)D9p!&XNt z!TdF_H~;`g@fNXkO-*t<9~;iEv?)Nee%hVe!aW`N%$cFJ(Dy9+Xk*odyFj72T!(b%Vo5zvCGZ%3tkt$@Wcx8BWEkefI1-~C_3y*LjlQ5%WEz9WD8i^ z2MV$BHD$gdPJV4IaV)G9CIFwiV=ca0cfXdTdK7oRf@lgyPx;_7*RRFk=?@EOb9Gcz zg~VZrzo*Snp&EE{$CWr)JZW)Gr;{B2ka6B!&?aknM-FENcl%45#y?oq9QY z3^1Y5yn&^D67Da4lI}ljDcphaEZw2;tlYuzq?uB4b9Mt6!KTW&ptxd^vF;NbX=00T z@nE1lIBGgjqs?ES#P{ZfRb6f!At51vk%<0X%d_~NL5b8UyfQMPDtfU@>ijA0NP3UU zh{lCf`Wu7cX!go`kUG`1K=7NN@SRGjUKuo<^;@GS!%iDXbJs`o6e`v3O8-+7vRkFm z)nEa$sD#-v)*Jb>&Me+YIW3PsR1)h=-Su)))>-`aRcFJG-8icomO4J@60 zw10l}BYxi{eL+Uu0xJYk-Vc~BcR49Qyyq!7)PR27D`cqGrik=?k1Of>gY7q@&d&Ds zt7&WixP`9~jjHO`Cog~RA4Q%uMg+$z^Gt&vn+d3&>Ux{_c zm|bc;k|GKbhZLr-%p_f%dq$eiZ;n^NxoS-Nu*^Nx5vm46)*)=-Bf<;X#?`YC4tLK; z?;u?shFbXeks+dJ?^o$l#tg*1NA?(1iFff@I&j^<74S!o;SWR^Xi);DM%8XiWpLi0 zQE2dL9^a36|L5qC5+&Pf0%>l&qQ&)OU4vjd)%I6{|H+pw<0(a``9w(gKD&+o$8hOC zNAiShtc}e~ob2`gyVZx59y<6Fpl*$J41VJ-H*e-yECWaDMmPQi-N8XI3 z%iI@ljc+d}_okL1CGWffeaejlxWFVDWu%e=>H)XeZ|4{HlbgC-Uvof4ISYQzZ0Um> z#Ov{k1c*VoN^f(gfiueuag)`TbjL$XVq$)aCUBL_M`5>0>6Ska^*Knk__pw{0I>jA zzh}Kzg{@PNi)fcAk7jMAdi-_RO%x#LQszDMS@_>iFoB+zJ0Q#CQJzFGa8;pHFdi`^ zxnTC`G$7Rctm3G8t8!SY`GwFi4gF|+dAk7rh^rA{NXzc%39+xSYM~($L(pJ(8Zjs* zYdN_R^%~LiGHm9|ElV4kVZGA*T$o@YY4qpJOxGHlUi*S*A(MrgQ{&xoZQo+#PuYRs zv3a$*qoe9gBqbN|y|eaH=w^LE{>kpL!;$wRahY(hhzRY;d33W)m*dfem@)>pR54Qy z ze;^F?mwdU?K+=fBabokSls^6_6At#1Sh7W*y?r6Ss*dmZP{n;VB^LDxM1QWh;@H0J z!4S*_5j_;+@-NpO1KfQd&;C7T`9ak;X8DTRz$hDNcjG}xAfg%gwZSb^zhE~O);NMO zn2$fl7Evn%=Lk!*xsM#(y$mjukN?A&mzEw3W5>_o+6oh62kq=4-`e3B^$rG=XG}Kd zK$blh(%!9;@d@3& zGFO60j1Vf54S}+XD?%*uk7wW$f`4U3F*p7@I4Jg7f`Il}2H<{j5h?$DDe%wG7jZQL zI{mj?t?Hu>$|2UrPr5&QyK2l3mas?zzOk0DV30HgOQ|~xLXDQ8M3o#;CNKO8RK+M; zsOi%)js-MU>9H4%Q)#K_me}8OQC1u;f4!LO%|5toa1|u5Q@#mYy8nE9IXmR}b#sZK z3sD395q}*TDJJA9Er7N`y=w*S&tA;mv-)Sx4(k$fJBxXva0_;$G6!9bGBw13c_Uws zXks4u(8JA@0O9g5f?#V~qR5*u5aIe2HQO^)RW9TTcJk28l`Syl>Q#ZveEE4Em+{?%iz6=V3b>rCm9F zPQQm@-(hfNdo2%n?B)u_&Qh7^^@U>0qMBngH8}H|v+Ejg*Dd(Y#|jgJ-A zQ_bQscil%eY}8oN7ZL+2r|qv+iJY?*l)&3W_55T3GU;?@Om*(M`u0DXAsQ7HSl56> z4P!*(%&wRCb?a4HH&n;lAmr4rS=kMZb74Akha2U~Ktni>>cD$6jpugjULq)D?ea%b zk;UW0pAI~TH59P+o}*c5Ei5L-9OE;OIBt>^(;xw`>cN2`({Rzg71qrNaE=cAH^$wP zNrK9Glp^3a%m+ilQj0SnGq`okjzmE7<3I{JLD6Jn^+oas=h*4>Wvy=KXqVBa;K&ri z4(SVmMXPG}0-UTwa2-MJ=MTfM3K)b~DzSVq8+v-a0&Dsv>4B65{dBhD;(d44CaHSM zb!0ne(*<^Q%|nuaL`Gb3D4AvyO8wyygm=1;9#u5x*k0$UOwx?QxR*6Od8>+ujfyo0 zJ}>2FgW_iv(dBK2OWC-Y=Tw!UwIeOAOUUC;h95&S1hn$G#if+d;*dWL#j#YWswrz_ zMlV=z+zjZJ%SlDhxf)vv@`%~$Afd)T+MS1>ZE7V$Rj#;J*<9Ld=PrK0?qrazRJWx) z(BTLF@Wk279nh|G%ZY7_lK7=&j;x`bMND=zgh_>>-o@6%8_#Bz!FnF*onB@_k|YCF z?vu!s6#h9bL3@tPn$1;#k5=7#s*L;FLK#=M89K^|$3LICYWIbd^qguQp02w5>8p-H z+@J&+pP_^iF4Xu>`D>DcCnl8BUwwOlq6`XkjHNpi@B?OOd`4{dL?kH%lt78(-L}eah8?36zw9d-dI6D{$s{f=M7)1 zRH1M*-82}DoFF^Mi$r}bTB5r6y9>8hjL54%KfyHxn$LkW=AZ(WkHWR;tIWWr@+;^^ zVomjAWT)$+rn%g`LHB6ZSO@M3KBA? z+W7ThSBgpk`jZHZUrp`F;*%6M5kLWy6AW#T{jFHTiKXP9ITrMlEdti7@&AT_a-BA!jc(Kt zWk>IdY-2Zbz?U1)tk#n_Lsl?W;0q`;z|t9*g-xE!(}#$fScX2VkjSiboKWE~afu5d z2B@9mvT=o2fB_>Mnie=TDJB+l`GMKCy%2+NcFsbpv<9jS@$X37K_-Y!cvF5NEY`#p z3sWEc<7$E*X*fp+MqsOyMXO=<2>o8)E(T?#4KVQgt=qa%5FfUG_LE`n)PihCz2=iNUt7im)s@;mOc9SR&{`4s9Q6)U31mn?}Y?$k3kU z#h??JEgH-HGt`~%)1ZBhT9~uRi8br&;a5Y3K_Bl1G)-y(ytx?ok9S*Tz#5Vb=P~xH z^5*t_R2It95=!XDE6X{MjLYn4Eszj9Y91T2SFz@eYlx9Z9*hWaS$^5r7=W5|>sY8}mS(>e9Ez2qI1~wtlA$yv2e-Hjn&K*P z2zWSrC~_8Wrxxf#%QAL&f8iH2%R)E~IrQLgWFg8>`Vnyo?E=uiALoRP&qT{V2{$79 z%9R?*kW-7b#|}*~P#cA@q=V|+RC9=I;aK7Pju$K-n`EoGV^-8Mk=-?@$?O37evGKn z3NEgpo_4{s>=FB}sqx21d3*=gKq-Zk)U+bM%Q_}0`XGkYh*+jRaP+aDnRv#Zz*n$pGp zEU9omuYVXH{AEx>=kk}h2iKt!yqX=EHN)LF}z1j zJx((`CesN1HxTFZ7yrvA2jTPmKYVij>45{ZH2YtsHuGzIRotIFj?(8T@ZWUv{_%AI zgMZlB03C&FtgJqv9%(acqt9N)`4jy4PtYgnhqev!r$GTIOvLF5aZ{tW5MN@9BDGu* zBJzwW3sEJ~Oy8is`l6Ly3an7RPtRr^1Iu(D!B!0O241Xua>Jee;Rc7tWvj!%#yX#m z&pU*?=rTVD7pF6va1D@u@b#V@bShFr3 zMyMbNCZwT)E-%L-{%$3?n}>EN>ai7b$zR_>=l59mW;tfKj^oG)>_TGCJ#HbLBsNy$ zqAqPagZ3uQ(Gsv_-VrZmG&hHaOD#RB#6J8&sL=^iMFB=gH5AIJ+w@sTf7xa&Cnl}@ zxrtzoNq>t?=(+8bS)s2p3>jW}tye0z2aY_Dh@(18-vdfvn;D?sv<>UgL{Ti08$1Q+ zZI3q}yMA^LK=d?YVg({|v?d1|R?5 zL0S3fw)BZazRNNX|7P4rh7!+3tCG~O8l+m?H} z(CB>8(9LtKYIu3ohJ-9ecgk+L&!FX~Wuim&;v$>M4 zUfvn<=Eok(63Ubc>mZrd8d7(>8bG>J?PtOHih_xRYFu1Hg{t;%+hXu2#x%a%qzcab zv$X!ccoj)exoOnaco_jbGw7KryOtuf(SaR-VJ0nAe(1*AA}#QV1lMhGtzD>RoUZ;WA?~!K{8%chYn?ttlz17UpDLlhTkGcVfHY6R<2r4E{mU zq-}D?+*2gAkQYAKrk*rB%4WFC-B!eZZLg4(tR#@kUQHIzEqV48$9=Q(~J_0 zy1%LSCbkoOhRO!J+Oh#;bGuXe;~(bIE*!J@i<%_IcB7wjhB5iF#jBn5+u~fEECN2* z!QFh!m<(>%49H12Y33+?$JxKV3xW{xSs=gxkxW-@Xds^|O1`AmorDKrE8N2-@ospk z=Au%h=f!`_X|G^A;XWL}-_L@D6A~*4Yf!5RTTm$!t8y&fp5_oqvBjW{FufS`!)5m% z2g(=9Ap6Y2y(9OYOWuUVGp-K=6kqQ)kM0P^TQT{X{V$*sN$wbFb-DaUuJF*!?EJPl zJev!UsOB^UHZ2KppYTELh+kqDw+5dPFv&&;;C~=u$Mt+Ywga!8YkL2~@g67}3wAQP zrx^RaXb1(c7vwU8a2se75X(cX^$M{FH4AHS7d2}heqqg4F0!1|Na>UtAdT%3JnS!B)&zelTEj$^b0>Oyfw=P-y-Wd^#dEFRUN*C{!`aJIHi<_YA2?piC%^ zj!p}+ZnBrM?ErAM+D97B*7L8U$K zo(IR-&LF(85p+fuct9~VTSdRjs`d-m|6G;&PoWvC&s8z`TotPSoksp;RsL4VL@CHf z_3|Tn%`ObgRhLmr60<;ya-5wbh&t z#ycN_)3P_KZN5CRyG%LRO4`Ot)3vY#dNX9!f!`_>1%4Q`81E*2BRg~A-VcN7pcX#j zrbl@7`V%n z6J53(m?KRzKb)v?iCuYWbH*l6M77dY4keS!%>}*8n!@ROE4!|7mQ+YS4dff1JJC(t z6Fnuf^=dajqHpH1=|pb(po9Fr8it^;2dEk|Ro=$fxqK$^Yix{G($0m-{RCFQJ~LqUnO7jJcjr zl*N*!6WU;wtF=dLCWzD6kW;y)LEo=4wSXQDIcq5WttgE#%@*m><@H;~Q&GniA-$in z`sjWFLgychS1kIJmPtd-w6%iKkj&dGhtB%0)pyy0M<4HZ@ZY0PWLAd7FCrj&i|NRh?>hZj*&FYnyu%Ur`JdiTu&+n z78d3n)Rl6q&NwVj_jcr#s5G^d?VtV8bkkYco5lV0LiT+t8}98LW>d)|v|V3++zLbHC(NC@X#Hx?21J0M*gP2V`Yd^DYvVIr{C zSc4V)hZKf|OMSm%FVqSRC!phWSyuUAu%0fredf#TDR$|hMZihJ__F!)Nkh6z)d=NC z3q4V*K3JTetxCPgB2_)rhOSWhuXzu+%&>}*ARxUaDeRy{$xK(AC0I=9%X7dmc6?lZNqe-iM(`?Xn3x2Ov>sej6YVQJ9Q42>?4lil?X zew-S>tm{=@QC-zLtg*nh5mQojYnvVzf3!4TpXPuobW_*xYJs;9AokrXcs!Ay z;HK>#;G$*TPN2M!WxdH>oDY6k4A6S>BM0Nimf#LfboKxJXVBC=RBuO&g-=+@O-#0m zh*aPG16zY^tzQLNAF7L(IpGPa+mDsCeAK3k=IL6^LcE8l0o&)k@?dz!79yxUquQIe($zm5DG z5RdXTv)AjHaOPv6z%99mPsa#8OD@9=URvHoJ1hYnV2bG*2XYBgB!-GEoP&8fLmWGg z9NG^xl5D&3L^io&3iYweV*qhc=m+r7C#Jppo$Ygg;jO2yaFU8+F*RmPL` zYxfGKla_--I}YUT353k}nF1zt2NO?+kofR8Efl$Bb^&llgq+HV_UYJUH7M5IoN0sT z4;wDA0gs55ZI|FmJ0}^Pc}{Ji-|#jdR$`!s)Di4^g3b_Qr<*Qu2rz}R6!B^;`Lj3sKWzjMYjexX)-;f5Y+HfkctE{PstO-BZan0zdXPQ=V8 zS8cBhnQyy4oN?J~oK0zl!#S|v6h-nx5to7WkdEk0HKBm;?kcNO*A+u=%f~l&aY*+J z>%^Dz`EQ6!+SEX$>?d(~|MNWU-}JTrk}&`IR|Ske(G^iMdk04)Cxd@}{1=P0U*%L5 zMFH_$R+HUGGv|ju2Z>5x(-aIbVJLcH1S+(E#MNe9g;VZX{5f%_|Kv7|UY-CM(>vf= z!4m?QS+AL+rUyfGJ;~uJGp4{WhOOc%2ybVP68@QTwI(8kDuYf?#^xv zBmOHCZU8O(x)=GVFn%tg@TVW1)qJJ_bU}4e7i>&V?r zh-03>d3DFj&@}6t1y3*yOzllYQ++BO-q!)zsk`D(z||)y&}o%sZ-tUF>0KsiYKFg6 zTONq)P+uL5Vm0w{D5Gms^>H1qa&Z##*X31=58*r%Z@Ko=IMXX{;aiMUp-!$As3{sq z0EEk02MOsgGm7$}E%H1ys2$yftNbB%1rdo@?6~0!a8Ym*1f;jIgfcYEF(I_^+;Xdr z2a>&oc^dF3pm(UNpazXgVzuF<2|zdPGjrNUKpdb$HOgNp*V56XqH`~$c~oSiqx;8_ zEz3fHoU*aJUbFJ&?W)sZB3qOSS;OIZ=n-*#q{?PCXi?Mq4aY@=XvlNQdA;yVC0Vy+ z{Zk6OO!lMYWd`T#bS8FV(`%flEA9El;~WjZKU1YmZpG#49`ku`oV{Bdtvzyz3{k&7 zlG>ik>eL1P93F zd&!aXluU_qV1~sBQf$F%sM4kTfGx5MxO0zJy<#5Z&qzNfull=k1_CZivd-WAuIQf> zBT3&WR|VD|=nKelnp3Q@A~^d_jN3@$x2$f@E~e<$dk$L@06Paw$);l*ewndzL~LuU zq`>vfKb*+=uw`}NsM}~oY}gW%XFwy&A>bi{7s>@(cu4NM;!%ieP$8r6&6jfoq756W z$Y<`J*d7nK4`6t`sZ;l%Oen|+pk|Ry2`p9lri5VD!Gq`U#Ms}pgX3ylAFr8(?1#&dxrtJgB>VqrlWZf61(r`&zMXsV~l{UGjI7R@*NiMJLUoK*kY&gY9kC@^}Fj* zd^l6_t}%Ku<0PY71%zQL`@}L}48M!@=r)Q^Ie5AWhv%#l+Rhu6fRpvv$28TH;N7Cl z%I^4ffBqx@Pxpq|rTJV)$CnxUPOIn`u278s9#ukn>PL25VMv2mff)-RXV&r`Dwid7}TEZxXX1q(h{R6v6X z&x{S_tW%f)BHc!jHNbnrDRjGB@cam{i#zZK*_*xlW@-R3VDmp)<$}S%t*@VmYX;1h zFWmpXt@1xJlc15Yjs2&e%)d`fimRfi?+fS^BoTcrsew%e@T^}wyVv6NGDyMGHSKIQ zC>qFr4GY?#S#pq!%IM_AOf`#}tPoMn7JP8dHXm(v3UTq!aOfEXNRtEJ^4ED@jx%le zvUoUs-d|2(zBsrN0wE(Pj^g5wx{1YPg9FL1)V1JupsVaXNzq4fX+R!oVX+q3tG?L= z>=s38J_!$eSzy0m?om6Wv|ZCbYVHDH*J1_Ndajoh&?L7h&(CVii&rmLu+FcI;1qd_ zHDb3Vk=(`WV?Uq;<0NccEh0s`mBXcEtmwt6oN99RQt7MNER3`{snV$qBTp={Hn!zz z1gkYi#^;P8s!tQl(Y>|lvz{5$uiXsitTD^1YgCp+1%IMIRLiSP`sJru0oY-p!FPbI)!6{XM%)(_Dolh1;$HlghB-&e><;zU&pc=ujpa-(+S&Jj zX1n4T#DJDuG7NP;F5TkoG#qjjZ8NdXxF0l58RK?XO7?faM5*Z17stidTP|a%_N z^e$D?@~q#Pf+708cLSWCK|toT1YSHfXVIs9Dnh5R(}(I;7KhKB7RD>f%;H2X?Z9eR z{lUMuO~ffT!^ew= z7u13>STI4tZpCQ?yb9;tSM-(EGb?iW$a1eBy4-PVejgMXFIV_Ha^XB|F}zK_gzdhM z!)($XfrFHPf&uyFQf$EpcAfk83}91Y`JFJOiQ;v5ca?)a!IxOi36tGkPk4S6EW~eq z>WiK`Vu3D1DaZ}515nl6>;3#xo{GQp1(=uTXl1~ z4gdWxr-8a$L*_G^UVd&bqW_nzMM&SlNW$8|$lAfo@zb+P>2q?=+T^qNwblP*RsN?N zdZE%^Zs;yAwero1qaoqMp~|KL=&npffh981>2om!fseU(CtJ=bW7c6l{U5(07*e0~ zJRbid6?&psp)ilmYYR3ZIg;t;6?*>hoZ3uq7dvyyq-yq$zH$yyImjfhpQb@WKENSP zl;KPCE+KXzU5!)mu12~;2trrLfs&nlEVOndh9&!SAOdeYd}ugwpE-9OF|yQs(w@C9 zoXVX`LP~V>%$<(%~tE*bsq(EFm zU5z{H@Fs^>nm%m%wZs*hRl=KD%4W3|(@j!nJr{Mmkl`e_uR9fZ-E{JY7#s6i()WXB0g-b`R{2r@K{2h3T+a>82>722+$RM*?W5;Bmo6$X3+Ieg9&^TU(*F$Q3 zT572!;vJeBr-)x?cP;^w1zoAM`nWYVz^<6N>SkgG3s4MrNtzQO|A?odKurb6DGZffo>DP_)S0$#gGQ_vw@a9JDXs2}hV&c>$ zUT0;1@cY5kozKOcbN6)n5v)l#>nLFL_x?2NQgurQH(KH@gGe>F|$&@ zq@2A!EXcIsDdzf@cWqElI5~t z4cL9gg7{%~4@`ANXnVAi=JvSsj95-7V& zME3o-%9~2?cvlH#twW~99=-$C=+b5^Yv}Zh4;Mg-!LS zw>gqc=}CzS9>v5C?#re>JsRY!w|Mtv#%O3%Ydn=S9cQarqkZwaM4z(gL~1&oJZ;t; zA5+g3O6itCsu93!G1J_J%Icku>b3O6qBW$1Ej_oUWc@MI)| zQ~eyS-EAAnVZp}CQnvG0N>Kc$h^1DRJkE7xZqJ0>p<>9*apXgBMI-v87E0+PeJ-K& z#(8>P_W^h_kBkI;&e_{~!M+TXt@z8Po*!L^8XBn{of)knd-xp{heZh~@EunB2W)gd zAVTw6ZZasTi>((qpBFh(r4)k zz&@Mc@ZcI-4d639AfcOgHOU+YtpZ)rC%Bc5gw5o~+E-i+bMm(A6!uE>=>1M;V!Wl4 z<#~muol$FsY_qQC{JDc8b=$l6Y_@_!$av^08`czSm!Xan{l$@GO-zPq1s>WF)G=wv zDD8j~Ht1pFj)*-b7h>W)@O&m&VyYci&}K|0_Z*w`L>1jnGfCf@6p}Ef*?wdficVe_ zmPRUZ(C+YJU+hIj@_#IiM7+$4kH#VS5tM!Ksz01siPc-WUe9Y3|pb4u2qnn zRavJiRpa zq?tr&YV?yKt<@-kAFl3s&Kq#jag$hN+Y%%kX_ytvpCsElgFoN3SsZLC>0f|m#&Jhu zp7c1dV$55$+k78FI2q!FT}r|}cIV;zp~#6X2&}22$t6cHx_95FL~T~1XW21VFuatb zpM@6w>c^SJ>Pq6{L&f9()uy)TAWf;6LyHH3BUiJ8A4}od)9sriz~e7}l7Vr0e%(=>KG1Jay zW0azuWC`(|B?<6;R)2}aU`r@mt_#W2VrO{LcX$Hg9f4H#XpOsAOX02x^w9+xnLVAt z^~hv2guE-DElBG+`+`>PwXn5kuP_ZiOO3QuwoEr)ky;o$n7hFoh}Aq0@Ar<8`H!n} zspCC^EB=6>$q*gf&M2wj@zzfBl(w_@0;h^*fC#PW9!-kT-dt*e7^)OIU{Uw%U4d#g zL&o>6`hKQUps|G4F_5AuFU4wI)(%9(av7-u40(IaI|%ir@~w9-rLs&efOR@oQy)}{ z&T#Qf`!|52W0d+>G!h~5A}7VJky`C3^fkJzt3|M&xW~x-8rSi-uz=qBsgODqbl(W#f{Ew#ui(K)(Hr&xqZs` zfrK^2)tF#|U=K|_U@|r=M_Hb;qj1GJG=O=d`~#AFAccecIaq3U`(Ds1*f*TIs=IGL zp_vlaRUtFNK8(k;JEu&|i_m39c(HblQkF8g#l|?hPaUzH2kAAF1>>Yykva0;U@&oRV8w?5yEK??A0SBgh?@Pd zJg{O~4xURt7!a;$rz9%IMHQeEZHR8KgFQixarg+MfmM_OeX#~#&?mx44qe!wt`~dd zqyt^~ML>V>2Do$huU<7}EF2wy9^kJJSm6HoAD*sRz%a|aJWz_n6?bz99h)jNMp}3k ztPVbos1$lC1nX_OK0~h>=F&v^IfgBF{#BIi&HTL}O7H-t4+wwa)kf3AE2-Dx@#mTA z!0f`>vz+d3AF$NH_-JqkuK1C+5>yns0G;r5ApsU|a-w9^j4c+FS{#+7- zH%skr+TJ~W_8CK_j$T1b;$ql_+;q6W|D^BNK*A+W5XQBbJy|)(IDA=L9d>t1`KX2b zOX(Ffv*m?e>! zS3lc>XC@IqPf1g-%^4XyGl*1v0NWnwZTW?z4Y6sncXkaA{?NYna3(n@(+n+#sYm}A zGQS;*Li$4R(Ff{obl3#6pUsA0fKuWurQo$mWXMNPV5K66V!XYOyc})^>889Hg3I<{V^Lj9($B4Zu$xRr=89-lDz9x`+I8q(vEAimx1K{sTbs|5x7S zZ+7o$;9&9>@3K;5-DVzGw=kp7ez%1*kxhGytdLS>Q)=xUWv3k_x(IsS8we39Tijvr z`GKk>gkZTHSht;5q%fh9z?vk%sWO}KR04G9^jleJ^@ovWrob7{1xy7V=;S~dDVt%S za$Q#Th%6g1(hiP>hDe}7lcuI94K-2~Q0R3A1nsb7Y*Z!DtQ(Ic<0;TDKvc6%1kBdJ z$hF!{uALB0pa?B^TC}#N5gZ|CKjy|BnT$7eaKj;f>Alqdb_FA3yjZ4CCvm)D&ibL) zZRi91HC!TIAUl<|`rK_6avGh`!)TKk=j|8*W|!vb9>HLv^E%t$`@r@piI(6V8pqDG zBON7~=cf1ZWF6jc{qkKm;oYBtUpIdau6s+<-o^5qNi-p%L%xAtn9OktFd{@EjVAT% z#?-MJ5}Q9QiK_jYYWs+;I4&!N^(mb!%4zx7qO6oCEDn=8oL6#*9XIJ&iJ30O`0vsFy|fEVkw}*jd&B6!IYi+~Y)qv6QlM&V9g0 zh)@^BVDB|P&#X{31>G*nAT}Mz-j~zd>L{v{9AxrxKFw8j;ccQ$NE0PZCc(7fEt1xd z`(oR2!gX6}R+Z77VkDz^{I)@%&HQT5q+1xlf*3R^U8q%;IT8-B53&}dNA7GW`Ki&= z$lrdH zDCu;j$GxW<&v_4Te7=AE2J0u1NM_7Hl9$u{z(8#%8vvrx2P#R7AwnY|?#LbWmROa; zOJzU_*^+n(+k;Jd{e~So9>OF>fPx$Hb$?~K1ul2xr>>o@**n^6IMu8+o3rDp(X$cC z`wQt9qIS>yjA$K~bg{M%kJ00A)U4L+#*@$8UlS#lN3YA{R{7{-zu#n1>0@(#^eb_% zY|q}2)jOEM8t~9p$X5fpT7BZQ1bND#^Uyaa{mNcFWL|MoYb@>y`d{VwmsF&haoJuS2W7azZU0{tu#Jj_-^QRc35tjW~ae&zhKk!wD}#xR1WHu z_7Fys#bp&R?VXy$WYa$~!dMxt2@*(>@xS}5f-@6eoT%rwH zv_6}M?+piNE;BqaKzm1kK@?fTy$4k5cqYdN8x-<(o6KelwvkTqC3VW5HEnr+WGQlF zs`lcYEm=HPpmM4;Ich7A3a5Mb3YyQs7(Tuz-k4O0*-YGvl+2&V(B&L1F8qfR0@vQM-rF<2h-l9T12eL}3LnNAVyY_z51xVr$%@VQ-lS~wf3mnHc zoM({3Z<3+PpTFCRn_Y6cbxu9v>_>eTN0>hHPl_NQQuaK^Mhrv zX{q#80ot;ptt3#js3>kD&uNs{G0mQp>jyc0GG?=9wb33hm z`y2jL=J)T1JD7eX3xa4h$bG}2ev=?7f>-JmCj6){Upo&$k{2WA=%f;KB;X5e;JF3IjQBa4e-Gp~xv- z|In&Rad7LjJVz*q*+splCj|{7=kvQLw0F@$vPuw4m^z=B^7=A4asK_`%lEf_oIJ-O z{L)zi4bd#&g0w{p1$#I&@bz3QXu%Y)j46HAJKWVfRRB*oXo4lIy7BcVl4hRs<%&iQ zr|)Z^LUJ>qn>{6y`JdabfNNFPX7#3`x|uw+z@h<`x{J4&NlDjnknMf(VW_nKWT!Jh zo1iWBqT6^BR-{T=4Ybe+?6zxP_;A5Uo{}Xel%*=|zRGm1)pR43K39SZ=%{MDCS2d$~}PE-xPw4ZK6)H;Zc&0D5p!vjCn0wCe&rVIhchR9ql!p2`g0b@JsC^J#n_r*4lZ~u0UHKwo(HaHUJDHf^gdJhTdTW z3i7Zp_`xyKC&AI^#~JMVZj^9WsW}UR#nc#o+ifY<4`M+?Y9NTBT~p`ONtAFf8(ltr*ER-Ig!yRs2xke#NN zkyFcaQKYv>L8mQdrL+#rjgVY>Z2_$bIUz(kaqL}cYENh-2S6BQK-a(VNDa_UewSW` zMgHi<3`f!eHsyL6*^e^W7#l?V|42CfAjsgyiJsA`yNfAMB*lAsJj^K3EcCzm1KT zDU2+A5~X%ax-JJ@&7>m`T;;}(-e%gcYQtj}?ic<*gkv)X2-QJI5I0tA2`*zZRX(;6 zJ0dYfMbQ+{9Rn3T@Iu4+imx3Y%bcf2{uT4j-msZ~eO)5Z_T7NC|Nr3)|NWjomhv=E zXaVin)MY)`1QtDyO7mUCjG{5+o1jD_anyKn73uflH*ASA8rm+S=gIfgJ);>Zx*hNG z!)8DDCNOrbR#9M7Ud_1kf6BP)x^p(|_VWCJ+(WGDbYmnMLWc?O4zz#eiP3{NfP1UV z(n3vc-axE&vko^f+4nkF=XK-mnHHQ7>w05$Q}iv(kJc4O3TEvuIDM<=U9@`~WdKN* zp4e4R1ncR_kghW}>aE$@OOc~*aH5OOwB5U*Z)%{LRlhtHuigxH8KuDwvq5{3Zg{Vr zrd@)KPwVKFP2{rXho(>MTZZfkr$*alm_lltPob4N4MmhEkv`J(9NZFzA>q0Ch;!Ut zi@jS_=0%HAlN+$-IZGPi_6$)ap>Z{XQGt&@ZaJ(es!Po5*3}>R4x66WZNsjE4BVgn z>}xm=V?F#tx#e+pimNPH?Md5hV7>0pAg$K!?mpt@pXg6UW9c?gvzlNe0 z3QtIWmw$0raJkjQcbv-7Ri&eX6Ks@@EZ&53N|g7HU<;V1pkc&$3D#8k!coJ=^{=vf z-pCP;vr2#A+i#6VA?!hs6A4P@mN62XYY$#W9;MwNia~89i`=1GoFESI+%Mbrmwg*0 zbBq4^bA^XT#1MAOum)L&ARDXJ6S#G>&*72f50M1r5JAnM1p7GFIv$Kf9eVR(u$KLt z9&hQ{t^i16zL1c(tRa~?qr?lbSN;1k;%;p*#gw_BwHJRjcYPTj6>y-rw*dFTnEs95 z`%-AoPL!P16{=#RI0 zUb6#`KR|v^?6uNnY`zglZ#Wd|{*rZ(x&Hk8N6ob6mpX~e^qu5kxvh$2TLJA$M=rx zc!#ot+sS+-!O<0KR6+Lx&~zgEhCsbFY{i_DQCihspM?e z-V}HemMAvFzXR#fV~a=Xf-;tJ1edd}Mry@^=9BxON;dYr8vDEK<<{ zW~rg(ZspxuC&aJo$GTM!9_sXu(EaQJNkV9AC(ob#uA=b4*!Uf}B*@TK=*dBvKKPAF z%14J$S)s-ws9~qKsf>DseEW(ssVQ9__YNg}r9GGx3AJiZR@w_QBlGP>yYh0lQCBtf zx+G;mP+cMAg&b^7J!`SiBwC81M_r0X9kAr2y$0(Lf1gZK#>i!cbww(hn$;fLIxRf? z!AtkSZc-h76KGSGz%48Oe`8ZBHkSXeVb!TJt_VC>$m<#}(Z}!(3h631ltKb3CDMw^fTRy%Ia!b&at`^g7Ew-%WLT9(#V0OP9CE?uj62s>`GI3NA z!`$U+i<`;IQyNBkou4|-7^9^ylac-Xu!M+V5p5l0Ve?J0wTSV+$gYtoc=+Ve*OJUJ z$+uIGALW?}+M!J9+M&#bT=Hz@{R2o>NtNGu1yS({pyteyb>*sg4N`KAD?`u3F#C1y z2K4FKOAPASGZTep54PqyCG(h3?kqQQAxDSW@>T2d!n;9C8NGS;3A8YMRcL>b=<<%M zMiWf$jY;`Ojq5S{kA!?28o)v$;)5bTL<4eM-_^h4)F#eeC2Dj*S`$jl^yn#NjJOYT zx%yC5Ww@eX*zsM)P(5#wRd=0+3~&3pdIH7CxF_2iZSw@>kCyd z%M}$1p((Bidw4XNtk&`BTkU{-PG)SXIZ)yQ!Iol6u8l*SQ1^%zC72FP zLvG>_Z0SReMvB%)1@+et0S{<3hV@^SY3V~5IY(KUtTR{*^xJ^2NN{sIMD9Mr9$~(C$GLNlSpzS=fsbw-DtHb_T|{s z9OR|sx!{?F``H!gVUltY7l~dx^a(2;OUV^)7 z%@hg`8+r&xIxmzZ;Q&v0X%9P)U0SE@r@(lKP%TO(>6I_iF{?PX(bez6v8Gp!W_nd5 z<8)`1jcT)ImNZp-9rr4_1MQ|!?#8sJQx{`~7)QZ75I=DPAFD9Mt{zqFrcrXCU9MG8 zEuGcy;nZ?J#M3!3DWW?Zqv~dnN6ijlIjPfJx(#S0cs;Z=jDjKY|$w2s4*Xa1Iz953sN2Lt!Vmk|%ZwOOqj`sA--5Hiaq8!C%LV zvWZ=bxeRV(&%BffMJ_F~~*FdcjhRVNUXu)MS(S#67rDe%Ler=GS+WysC1I2=Bmbh3s6wdS}o$0 zz%H08#SPFY9JPdL6blGD$D-AaYi;X!#zqib`(XX*i<*eh+2UEPzU4}V4RlC3{<>-~ zadGA8lSm>b7Z!q;D_f9DT4i)Q_}ByElGl*Cy~zX%IzHp)@g-itZB6xM70psn z;AY8II99e6P2drgtTG5>`^|7qg`9MTp%T~|1N3tBqV}2zgow3TFAH{XPor0%=HrkXnKyxyozHlJ6 zd3}OWkl?H$l#yZqOzZbMI+lDLoH48;s10!m1!K87g;t}^+A3f3e&w{EYhVPR0Km*- zh5-ku$Z|Ss{2?4pGm(Rz!0OQb^_*N`)rW{z)^Cw_`a(_L9j=&HEJl(!4rQy1IS)>- zeTIr>hOii`gc(fgYF(cs$R8l@q{mJzpoB5`5r>|sG zBpsY}RkY(g5`bj~D>(;F8v*DyjX(#nVLSs>)XneWI&%Wo>a0u#4A?N<1SK4D}&V1oN)76 z%S>a2n3n>G`YY1>0Hvn&AMtMuI_?`5?4y3w2Hnq4Qa2YH5 zxKdfM;k467djL31Y$0kd9FCPbU=pHBp@zaIi`Xkd80;%&66zvSqsq6%aY)jZacfvw ztkWE{ZV6V2WL9e}Dvz|!d96KqVkJU@5ryp#rReeWu>mSrOJxY^tWC9wd0)$+lZc%{ zY=c4#%OSyQJvQUuy^u}s8DN8|8T%TajOuaY^)R-&8s@r9D`(Ic4NmEu)fg1f!u`xUb;9t#rM z>}cY=648@d5(9A;J)d{a^*ORdVtJrZ77!g~^lZ9@)|-ojvW#>)Jhe8$7W3mhmQh@S zU=CSO+1gSsQ+Tv=x-BD}*py_Ox@;%#hPb&tqXqyUW9jV+fonnuCyVw=?HR>dAB~Fg z^vl*~y*4|)WUW*9RC%~O1gHW~*tJb^a-j;ae2LRNo|0S2`RX>MYqGKB^_ng7YRc@! zFxg1X!VsvXkNuv^3mI`F2=x6$(pZdw=jfYt1ja3FY7a41T07FPdCqFhU6%o|Yb6Z4 zpBGa=(ao3vvhUv#*S{li|EyujXQPUV;0sa5!0Ut)>tPWyC9e0_9(=v*z`TV5OUCcx zT=w=^8#5u~7<}8Mepqln4lDv*-~g^VoV{(+*4w(q{At6d^E-Usa2`JXty++Oh~on^ z;;WHkJsk2jvh#N|?(2PLl+g!M0#z_A;(#Uy=TzL&{Ei5G9#V{JbhKV$Qmkm%5tn!CMA? z@hM=b@2DZWTQ6>&F6WCq6;~~WALiS#@{|I+ucCmD6|tBf&e;$_)%JL8$oIQ%!|Xih1v4A$=7xNO zZVz$G8;G5)rxyD+M0$20L$4yukA_D+)xmK3DMTH3Q+$N&L%qB)XwYx&s1gkh=%qGCCPwnwhbT4p%*3R)I}S#w7HK3W^E%4w z2+7ctHPx3Q97MFYB48HfD!xKKb(U^K_4)Bz(5dvwyl*R?)k;uHEYVi|{^rvh)w7}t z`tnH{v9nlVHj2ign|1an_wz0vO)*`3RaJc#;(W-Q6!P&>+@#fptCgtUSn4!@b7tW0&pE2Qj@7}f#ugu4*C)8_}AMRuz^WG zc)XDcOPQjRaGptRD^57B83B-2NKRo!j6TBAJntJPHNQG;^Oz}zt5F^kId~miK3J@l ztc-IKp6qL!?u~q?qfGP0I~$5gvq#-0;R(oLU@sYayr*QH95fnrYA*E|n%&FP@Cz`a zSdJ~(c@O^>qaO`m9IQ8sd8!L<+)GPJDrL7{4{ko2gWOZel^3!($Gjt|B&$4dtfTmBmC>V`R&&6$wpgvdmns zxcmfS%9_ZoN>F~azvLFtA(9Q5HYT#A(byGkESnt{$Tu<73$W~reB4&KF^JBsoqJ6b zS?$D7DoUgzLO-?P`V?5_ub$nf1p0mF?I)StvPomT{uYjy!w&z$t~j&en=F~hw|O(1 zlV9$arQmKTc$L)Kupwz_zA~deT+-0WX6NzFPh&d+ly*3$%#?Ca9Z9lOJsGVoQ&1HNg+)tJ_sw)%oo*DK)iU~n zvL``LqTe=r=7SwZ@LB)9|3QB5`0(B9r(iR}0nUwJss-v=dXnwMRQFYSRK1blS#^g(3@z{`=8_CGDm!LESTWig zzm1{?AG&7`uYJ;PoFO$o8RWuYsV26V{>D-iYTnvq7igWx9@w$EC*FV^vpvDl@i9yp zPIqiX@hEZF4VqzI3Y)CHhR`xKN8poL&~ak|wgbE4zR%Dm(a@?bw%(7(!^>CM!^4@J z6Z)KhoQP;WBq_Z_&<@i2t2&xq>N>b;Np2rX?yK|-!14iE2T}E|jC+=wYe~`y38g3J z8QGZquvqBaG!vw&VtdXWX5*i5*% zJP~7h{?&E|<#l{klGPaun`IgAJ4;RlbRqgJz5rmHF>MtJHbfqyyZi53?Lhj=(Ku#& z__ubmZIxzSq3F90Xur!1)Vqe6b@!ueHA!93H~jdHmaS5Q^CULso}^poy)0Op6!{^9 zWyCyyIrdBP4fkliZ%*g+J-A!6VFSRF6Liu6G^^=W>cn81>4&7(c7(6vCGSAJ zQZ|S3mb|^Wf=yJ(h~rq`iiW~|n#$+KcblIR<@|lDtm!&NBzSG-1;7#YaU+-@=xIm4 zE}edTYd~e&_%+`dIqqgFntL-FxL3!m4yTNt<(^Vt9c6F(`?9`u>$oNxoKB29<}9FE zgf)VK!*F}nW?}l95%RRk8N4^Rf8)Xf;drT4<|lUDLPj^NPMrBPL;MX&0oGCsS za3}vWcF(IPx&W6{s%zwX{UxHX2&xLGfT{d9bWP!g;Lg#etpuno$}tHoG<4Kd*=kpU z;4%y(<^yj(UlG%l-7E9z_Kh2KoQ19qT3CR@Ghr>BAgr3Vniz3LmpC4g=g|A3968yD2KD$P7v$ zx9Q8`2&qH3&y-iv0#0+jur@}k`6C%7fKbCr|tHX2&O%r?rBpg`YNy~2m+ z*L7dP$RANzVUsG_Lb>=__``6vA*xpUecuGsL+AW?BeSwyoQfDlXe8R1*R1M{0#M?M zF+m19`3<`gM{+GpgW^=UmuK*yMh3}x)7P738wL8r@(Na6%ULPgbPVTa6gh5Q(SR0f znr6kdRpe^(LVM;6Rt(Z@Lsz3EX*ry6(WZ?w>#ZRelx)N%sE+MN>5G|Z8{%@b&D+Ov zPU{shc9}%;G7l;qbonIb_1m^Qc8ez}gTC-k02G8Rl?7={9zBz8uRX2{XJQ{vZhs67avlRn| zgRtWl0Lhjet&!YC47GIm%1gdq%T24_^@!W3pCywc89X4I5pnBCZDn(%!$lOGvS*`0!AoMtqxNPFgaMR zwoW$p;8l6v%a)vaNsesED3f}$%(>zICnoE|5JwP&+0XI}JxPccd+D^gx`g`=GsUc0 z9Uad|C+_@_0%JmcObGnS@3+J^0P!tg+fUZ_w#4rk#TlJYPXJiO>SBxzs9(J;XV9d{ zmTQE1(K8EYaz9p^XLbdWudyIPJlGPo0U*)fAh-jnbfm@SYD_2+?|DJ-^P+ojG{2{6 z>HJtedEjO@j_tqZ4;Zq1t5*5cWm~W?HGP!@_f6m#btM@46cEMhhK{(yI&jG)fwL1W z^n_?o@G8a-jYt!}$H*;{0#z8lANlo!9b@!c5K8<(#lPlpE!z86Yq#>WT&2} z;;G1$pD%iNoj#Z=&kij5&V1KHIhN-h<;{HC5wD)PvkF>CzlQOEx_0;-TJ*!#&{Wzt zKcvq^SZIdop}y~iouNqtU7K7+?eIz-v_rfNM>t#i+dD$s_`M;sjGubTdP)WI*uL@xPOLHt#~T<@Yz>xt50ZoTw;a(a}lNiDN-J${gOdE zx?8LOA|tv{Mb}=TTR=LcqMqbCJkKj+@;4Mu)Cu0{`~ohix6E$g&tff)aHeUAQQ%M? zIN4uSUTzC1iMEWL*W-in1y)C`E+R8j?4_?X4&2Zv5?QdkNMz(k} zw##^Ikx`#_s>i&CO_mu@vJJ*|3ePRDl5pq$9V^>D;g0R%l>lw;ttyM6Sy`NBF{)Lr zSk)V>mZr96+aHY%vTLLt%vO-+juw6^SO_ zYGJaGeWX6W(TOQx=5oTGXOFqMMU*uZyt>MR-Y`vxW#^&)H zk0!F8f*@v6NO@Z*@Qo)+hlX40EWcj~j9dGrLaq%1;DE_%#lffXCcJ;!ZyyyZTz74Q zb2WSly6sX{`gQeToQsi1-()5EJ1nJ*kXGD`xpXr~?F#V^sxE3qSOwRSaC9x9oa~jJ zTG9`E|q zC5Qs1xh}jzb5UPYF`3N9YuMnI7xsZ41P;?@c|%w zl=OxLr6sMGR+`LStLvh)g?fA5p|xbUD;yFAMQg&!PEDYxVYDfA>oTY;CFt`cg?Li1 z0b})!9Rvw&j#*&+D2))kXLL z0+j=?7?#~_}N-qdEIP>DQaZh#F(#e0WNLzwUAj@r694VJ8?Dr5_io2X49XYsG^ zREt0$HiNI~6VV!ycvao+0v7uT$_ilKCvsC+VDNg7yG1X+eNe^3D^S==F3ByiW0T^F zH6EsH^}Uj^VPIE&m)xlmOScYR(w750>hclqH~~dM2+;%GDXT`u4zG!p((*`Hwx41M z4KB+`hfT(YA%W)Ve(n+Gu9kuXWKzxg{1ff^xNQw>w%L-)RySTk9kAS92(X0Shg^Q? zx1YXg_TLC^?h6!4mBqZ9pKhXByu|u~gF%`%`vdoaGBN3^j4l!4x?Bw4Jd)Z4^di}! zXlG1;hFvc>H?bmmu1E7Vx=%vahd!P1#ZGJOJYNbaek^$DHt`EOE|Hlij+hX>ocQFSLVu|wz`|KVl@Oa;m2k6b*mNK2Vo{~l9>Qa3@B7G7#k?)aLx;w6U ze8bBq%vF?5v>#TspEoaII!N}sRT~>bh-VWJ7Q*1qsz%|G)CFmnttbq$Ogb{~YK_=! z{{0vhlW@g!$>|}$&4E3@k`KPElW6x#tSX&dfle>o!irek$NAbDzdd2pVeNzk4&qgJ zXvNF0$R96~g0x+R1igR=Xu&X_Hc5;!Ze&C)eUTB$9wW&?$&o8Yxhm5s(S`;?{> z*F?9Gr0|!OiKA>Rq-ae=_okB6&yMR?!JDer{@iQgIn=cGxs-u^!8Q$+N&pfg2WM&Z zulHu=Uh~U>fS{=Nm0x>ACvG*4R`Dx^kJ65&Vvfj`rSCV$5>c04N26Rt2S?*kh3JKq z9(3}5T?*x*AP(X2Ukftym0XOvg~r6Ms$2x&R&#}Sz23aMGU&7sU-cFvE3Eq`NBJe84VoftWF#v7PDAp`@V zRFCS24_k~;@~R*L)eCx@Q9EYmM)Sn}HLbVMyxx%{XnMBDc-YZ<(DXDBYUt8$u5Zh} zBK~=M9cG$?_m_M61YG+#|9Vef7LfbH>(C21&aC)x$^Lg}fa#SF){RX|?-xZjSOrn# z2ZAwUF)$VB<&S;R3FhNSQOV~8w%A`V9dWyLiy zgt7G=Z4t|zU3!dh5|s(@XyS|waBr$>@=^Dspmem8)@L`Ns{xl%rGdX!R(BiC5C7Vo zXetb$oC_iXS}2x_Hy}T(hUUNbO47Q@+^4Q`h>(R-;OxCyW#eoOeC51jzxnM1yxBrp zz6}z`(=cngs6X05e79o_B7@3K|Qpe3n38Py_~ zpi?^rj!`pq!7PHGliC$`-8A^Ib?2qgJJCW+(&TfOnFGJ+@-<<~`7BR0f4oSINBq&R z2CM`0%WLg_Duw^1SPwj-{?BUl2Y=M4e+7yL1{C&&f&zjF06#xf>VdLozgNye(BNgSD`=fFbBy0HIosLl@JwCQl^s;eTnc( z3!r8G=K>zb`|bLLI0N|eFJk%s)B>oJ^M@AQzqR;HUjLsOqW<0v>1ksT_#24*U@R3HJu*A^#1o#P3%3_jq>icD@<`tqU6ICEgZrME(xX#?i^Z z%Id$_uyQGlFD-CcaiRtRdGn|K`Lq5L-rx7`vYYGH7I=eLfHRozPiUtSe~Tt;IN2^gCXmf2#D~g2@9bhzK}3nphhG%d?V7+Zq{I2?Gt*!NSn_r~dd$ zqkUOg{U=MI?Ehx@`(X%rQB?LP=CjJ*V!rec{#0W2WshH$X#9zep!K)tzZoge*LYd5 z@g?-j5_mtMp>_WW`p*UNUZTFN{_+#m*bJzt{hvAdkF{W40{#L3w6gzPztnsA_4?&0 z(+>pv!zB16rR-(nm(^c>Z(its{ny677vT8sF564^mlZvJ!h65}OW%Hn|2OXbOQM%b z{6C54Z2v;^hyMQ;UH+HwFD2!F!VlQ}6Z{L0_9g5~CH0@Mqz?ZC`^QkhOU#$Lx<4`B zyZsa9uPF!rZDo8ZVfzzR#raQ>5|)k~_Ef*wDqG^76o)j!C4 zykvT*o$!-MBko@?{b~*Zf2*YMlImrK`cEp|#D7f%Twm<|C|dWD \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save ( ) { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - -exec "$JAVACMD" "$@" diff --git a/samples/client/petstore/kotlin/gradlew.bat b/samples/client/petstore/kotlin/gradlew.bat deleted file mode 100644 index f9553162f12..00000000000 --- a/samples/client/petstore/kotlin/gradlew.bat +++ /dev/null @@ -1,84 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/samples/client/petstore/kotlin/pom.xml b/samples/client/petstore/kotlin/pom.xml index e52f9e969b0..f63bbc34b4f 100644 --- a/samples/client/petstore/kotlin/pom.xml +++ b/samples/client/petstore/kotlin/pom.xml @@ -27,7 +27,7 @@ 1.2.1 - bundle-test + bundle-install integration-test exec @@ -35,6 +35,21 @@ gradle + wrapper + + + + + bundle-test + integration-test + + exec + + + ./gradlew + + build + -x test diff --git a/shippable.yml b/shippable.yml index e3caac860c1..5dc40c6fa41 100644 --- a/shippable.yml +++ b/shippable.yml @@ -14,7 +14,12 @@ build: - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 23E7166788B63E1E 6A030B21BA07F4FB 4B8EC3BAABDC4346 EB3E94ADBE1229CF 960B2B2623A0BD5D 6B05F25D762E3157 #- rm /etc/apt/sources.list.d/jonathonf-ubuntu-backports-xenial.list - rm /etc/apt/sources.list.d/basho_riak.list - # + # install gradle 5.6.4 + - wget https://services.gradle.org/distributions/gradle-5.6.4-bin.zip + - sudo mkdir /opt/gradle + - unzip -d /opt/gradle gradle-5.6.4-bin.zip + - export PATH=/opt/gradle/gradle-5.6.4/bin:$PATH + - gradle -v - java -version - mvn --no-snapshot-updates --quiet clean install -Dmaven.javadoc.skip=true # ensure all modifications created by 'mature' generators are in the git repo From 3c4b1a0c4cdb84ab84ed696e6bf29760b48e2b63 Mon Sep 17 00:00:00 2001 From: miyucy Date: Fri, 12 Feb 2021 00:43:19 +0900 Subject: [PATCH 43/44] Fix syntax error (#8675) Added missing closing brace in list_invalid_properties model method. --- .../partial_model_generic.mustache | 4 ++-- ...ith-fake-endpoints-models-for-testing.yaml | 2 ++ .../src/Org.OpenAPITools/Model/ArrayTest.cs | 2 ++ .../OpenAPIClient-php/lib/Model/ArrayTest.php | 15 ++++++++++++ .../lib/petstore/models/array_test.rb | 24 +++++++++++++++++++ .../ruby/lib/petstore/models/array_test.rb | 24 +++++++++++++++++++ .../petstore_api/models/array_test.py | 6 +++++ .../org/openapitools/model/ArrayTest.java | 2 +- 8 files changed, 76 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/ruby-client/partial_model_generic.mustache b/modules/openapi-generator/src/main/resources/ruby-client/partial_model_generic.mustache index 9963d883d6c..647963b4745 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/partial_model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/partial_model_generic.mustache @@ -197,13 +197,13 @@ {{/pattern}} {{#maxItems}} if {{^required}}!@{{{name}}}.nil? && {{/required}}@{{{name}}}.length > {{{maxItems}}} - invalid_properties.push('invalid value for "{{{name}}}", number of items must be less than or equal to {{{maxItems}}}.' + invalid_properties.push('invalid value for "{{{name}}}", number of items must be less than or equal to {{{maxItems}}}.') end {{/maxItems}} {{#minItems}} if {{^required}}!@{{{name}}}.nil? && {{/required}}@{{{name}}}.length < {{{minItems}}} - invalid_properties.push('invalid value for "{{{name}}}", number of items must be greater than or equal to {{{minItems}}}.' + invalid_properties.push('invalid value for "{{{name}}}", number of items must be greater than or equal to {{{minItems}}}.') end {{/minItems}} diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml index 9ab686484d1..4b984814471 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml @@ -1627,6 +1627,8 @@ components: type: array items: type: string + minItems: 0 + maxItems: 3 array_array_of_integer: type: array items: diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayTest.cs index a35f9d88d0e..df3b17ce6b4 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -152,6 +152,8 @@ namespace Org.OpenAPITools.Model /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { + + yield break; } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php index c7d68a151f4..1f9aad2fbd5 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php @@ -206,6 +206,14 @@ class ArrayTest implements ModelInterface, ArrayAccess, \JsonSerializable { $invalidProperties = []; + if (!is_null($this->container['array_of_string']) && (count($this->container['array_of_string']) > 3)) { + $invalidProperties[] = "invalid value for 'array_of_string', number of items must be less than or equal to 3."; + } + + if (!is_null($this->container['array_of_string']) && (count($this->container['array_of_string']) < 0)) { + $invalidProperties[] = "invalid value for 'array_of_string', number of items must be greater than or equal to 0."; + } + return $invalidProperties; } @@ -240,6 +248,13 @@ class ArrayTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setArrayOfString($array_of_string) { + + if (!is_null($array_of_string) && (count($array_of_string) > 3)) { + throw new \InvalidArgumentException('invalid value for $array_of_string when calling ArrayTest., number of items must be less than or equal to 3.'); + } + if (!is_null($array_of_string) && (count($array_of_string) < 0)) { + throw new \InvalidArgumentException('invalid length for $array_of_string when calling ArrayTest., number of items must be greater than or equal to 0.'); + } $this->container['array_of_string'] = $array_of_string; return $this; diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb index 5d06f0aa33b..4e59c89b166 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb @@ -88,15 +88,39 @@ module Petstore # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new + if !@array_of_string.nil? && @array_of_string.length > 3 + invalid_properties.push('invalid value for "array_of_string", number of items must be less than or equal to 3.') + end + + if !@array_of_string.nil? && @array_of_string.length < 0 + invalid_properties.push('invalid value for "array_of_string", number of items must be greater than or equal to 0.') + end + invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return false if !@array_of_string.nil? && @array_of_string.length > 3 + return false if !@array_of_string.nil? && @array_of_string.length < 0 true end + # Custom attribute writer method with validation + # @param [Object] array_of_string Value to be assigned + def array_of_string=(array_of_string) + if !array_of_string.nil? && array_of_string.length > 3 + fail ArgumentError, 'invalid value for "array_of_string", number of items must be less than or equal to 3.' + end + + if !array_of_string.nil? && array_of_string.length < 0 + fail ArgumentError, 'invalid value for "array_of_string", number of items must be greater than or equal to 0.' + end + + @array_of_string = array_of_string + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb index 5d06f0aa33b..4e59c89b166 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb @@ -88,15 +88,39 @@ module Petstore # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new + if !@array_of_string.nil? && @array_of_string.length > 3 + invalid_properties.push('invalid value for "array_of_string", number of items must be less than or equal to 3.') + end + + if !@array_of_string.nil? && @array_of_string.length < 0 + invalid_properties.push('invalid value for "array_of_string", number of items must be greater than or equal to 0.') + end + invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return false if !@array_of_string.nil? && @array_of_string.length > 3 + return false if !@array_of_string.nil? && @array_of_string.length < 0 true end + # Custom attribute writer method with validation + # @param [Object] array_of_string Value to be assigned + def array_of_string=(array_of_string) + if !array_of_string.nil? && array_of_string.length > 3 + fail ArgumentError, 'invalid value for "array_of_string", number of items must be less than or equal to 3.' + end + + if !array_of_string.nil? && array_of_string.length < 0 + fail ArgumentError, 'invalid value for "array_of_string", number of items must be greater than or equal to 0.' + end + + @array_of_string = array_of_string + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/samples/openapi3/client/petstore/python-legacy/petstore_api/models/array_test.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/models/array_test.py index 04d2cb6ec60..0e0c17ef190 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/models/array_test.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/models/array_test.py @@ -80,6 +80,12 @@ class ArrayTest(object): :param array_of_string: The array_of_string of this ArrayTest. # noqa: E501 :type array_of_string: list[str] """ + if (self.local_vars_configuration.client_side_validation and + array_of_string is not None and len(array_of_string) > 3): + raise ValueError("Invalid value for `array_of_string`, number of items must be less than or equal to `3`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + array_of_string is not None and len(array_of_string) < 0): + raise ValueError("Invalid value for `array_of_string`, number of items must be greater than or equal to `0`") # noqa: E501 self._array_of_string = array_of_string diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ArrayTest.java index 738fa858e7e..7fdd2b52d24 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ArrayTest.java @@ -66,7 +66,7 @@ public class ArrayTest { **/ @JsonProperty("array_of_string") @ApiModelProperty(value = "") - + @Size(min=0,max=3) public List getArrayOfString() { return arrayOfString; } From 0e16eba06acb431471c905225fcfbd184a7de94f Mon Sep 17 00:00:00 2001 From: Gary Blaser <50057217+glblaser@users.noreply.github.com> Date: Fri, 12 Feb 2021 02:01:40 -0600 Subject: [PATCH 44/44] typescript-node: bug in models.mustache with for...in on an empty array. (#8575) * Fixed typescript bug in models.mustache with for...in on an empty array. When an empty array comes in, the current for...in syntax results in creating an empty object being created and added to the array. This is the output from receiving an empty array that gets deserialized, resulting in an object with undefined values. Switching to a for i < array.length loop fixes this issue. ``` body: [ GroupCustomResource { apiVersion: undefined, kind: undefined, spec: undefined, metadata: undefined, status: undefined, '': undefined } ] ``` * Fixed typescript deserialization bug that was adding non-existent entries to objects during deserialization. When an object comes in, the current for...in syntax results in adding an undefined key/value pair to each nested object, with key being empty string and value being undefined. This is the output from receiving an object that gets deserialized. Adding a check to see if attributeType.name exists before adding it to the deserialized object fixes this. ``` res.body of listGroup for saved group is [ GroupCustomResource { apiVersion: 'v1', kind: 'Group', spec: GroupSpec { name: 'TestDeploymentGroup67264', tenancyId: 'tenancy', description: 'TestGroup description', '': undefined }, metadata: { additionalProp1: {}, spectra: [Object] }, status: undefined, '': undefined } ] ``` * Fixed for array for loop in serialize and added truth check for deserialize * Made for...in loop a for loop; gets rid of the need for the truth check * Fixed serialze/deserialize for loops for arrays Co-authored-by: Gary Blaser --- .../resources/typescript-node/models.mustache | 16 ++++++++-------- .../typescript-node/default/model/models.ts | 16 ++++++++-------- .../petstore/typescript-node/npm/model/models.ts | 16 ++++++++-------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-node/models.mustache b/modules/openapi-generator/src/main/resources/typescript-node/models.mustache index 93f3790d667..e803dfeb664 100644 --- a/modules/openapi-generator/src/main/resources/typescript-node/models.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-node/models.mustache @@ -113,9 +113,9 @@ export class ObjectSerializer { let subType: string = type.replace("Array<", ""); // Array => Type> subType = subType.substring(0, subType.length - 1); // Type> => Type let transformedData: any[] = []; - for (let index in data) { - let date = data[index]; - transformedData.push(ObjectSerializer.serialize(date, subType)); + for (let index = 0; index < data.length; index++) { + let datum = data[index]; + transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; } else if (type === "Date") { @@ -134,7 +134,7 @@ export class ObjectSerializer { // get the map for the correct type. let attributeTypes = typeMap[type].getAttributeTypeMap(); let instance: {[index: string]: any} = {}; - for (let index in attributeTypes) { + for (let index = 0; index < attributeTypes.length; index++) { let attributeType = attributeTypes[index]; instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type); } @@ -153,9 +153,9 @@ export class ObjectSerializer { let subType: string = type.replace("Array<", ""); // Array => Type> subType = subType.substring(0, subType.length - 1); // Type> => Type let transformedData: any[] = []; - for (let index in data) { - let date = data[index]; - transformedData.push(ObjectSerializer.deserialize(date, subType)); + for (let index = 0; index < data.length; index++) { + let datum = data[index]; + transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; } else if (type === "Date") { @@ -170,7 +170,7 @@ export class ObjectSerializer { } let instance = new typeMap[type](); let attributeTypes = typeMap[type].getAttributeTypeMap(); - for (let index in attributeTypes) { + for (let index = 0; index < attributeTypes.length; index++) { let attributeType = attributeTypes[index]; instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type); } diff --git a/samples/client/petstore/typescript-node/default/model/models.ts b/samples/client/petstore/typescript-node/default/model/models.ts index ba05217de7e..4e9ba21b4e7 100644 --- a/samples/client/petstore/typescript-node/default/model/models.ts +++ b/samples/client/petstore/typescript-node/default/model/models.ts @@ -98,9 +98,9 @@ export class ObjectSerializer { let subType: string = type.replace("Array<", ""); // Array => Type> subType = subType.substring(0, subType.length - 1); // Type> => Type let transformedData: any[] = []; - for (let index in data) { - let date = data[index]; - transformedData.push(ObjectSerializer.serialize(date, subType)); + for (let index = 0; index < data.length; index++) { + let datum = data[index]; + transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; } else if (type === "Date") { @@ -119,7 +119,7 @@ export class ObjectSerializer { // get the map for the correct type. let attributeTypes = typeMap[type].getAttributeTypeMap(); let instance: {[index: string]: any} = {}; - for (let index in attributeTypes) { + for (let index = 0; index < attributeTypes.length; index++) { let attributeType = attributeTypes[index]; instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type); } @@ -138,9 +138,9 @@ export class ObjectSerializer { let subType: string = type.replace("Array<", ""); // Array => Type> subType = subType.substring(0, subType.length - 1); // Type> => Type let transformedData: any[] = []; - for (let index in data) { - let date = data[index]; - transformedData.push(ObjectSerializer.deserialize(date, subType)); + for (let index = 0; index < data.length; index++) { + let datum = data[index]; + transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; } else if (type === "Date") { @@ -155,7 +155,7 @@ export class ObjectSerializer { } let instance = new typeMap[type](); let attributeTypes = typeMap[type].getAttributeTypeMap(); - for (let index in attributeTypes) { + for (let index = 0; index < attributeTypes.length; index++) { let attributeType = attributeTypes[index]; instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type); } diff --git a/samples/client/petstore/typescript-node/npm/model/models.ts b/samples/client/petstore/typescript-node/npm/model/models.ts index ba05217de7e..4e9ba21b4e7 100644 --- a/samples/client/petstore/typescript-node/npm/model/models.ts +++ b/samples/client/petstore/typescript-node/npm/model/models.ts @@ -98,9 +98,9 @@ export class ObjectSerializer { let subType: string = type.replace("Array<", ""); // Array => Type> subType = subType.substring(0, subType.length - 1); // Type> => Type let transformedData: any[] = []; - for (let index in data) { - let date = data[index]; - transformedData.push(ObjectSerializer.serialize(date, subType)); + for (let index = 0; index < data.length; index++) { + let datum = data[index]; + transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; } else if (type === "Date") { @@ -119,7 +119,7 @@ export class ObjectSerializer { // get the map for the correct type. let attributeTypes = typeMap[type].getAttributeTypeMap(); let instance: {[index: string]: any} = {}; - for (let index in attributeTypes) { + for (let index = 0; index < attributeTypes.length; index++) { let attributeType = attributeTypes[index]; instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type); } @@ -138,9 +138,9 @@ export class ObjectSerializer { let subType: string = type.replace("Array<", ""); // Array => Type> subType = subType.substring(0, subType.length - 1); // Type> => Type let transformedData: any[] = []; - for (let index in data) { - let date = data[index]; - transformedData.push(ObjectSerializer.deserialize(date, subType)); + for (let index = 0; index < data.length; index++) { + let datum = data[index]; + transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; } else if (type === "Date") { @@ -155,7 +155,7 @@ export class ObjectSerializer { } let instance = new typeMap[type](); let attributeTypes = typeMap[type].getAttributeTypeMap(); - for (let index in attributeTypes) { + for (let index = 0; index < attributeTypes.length; index++) { let attributeType = attributeTypes[index]; instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type); }