diff --git a/docs/generators/aspnetcore.md b/docs/generators/aspnetcore.md index c4dc4acb6d5959a0212b9bf51ff743f188808533..f8a95fbb59717041a508efb428972526060040e8 100644 --- a/docs/generators/aspnetcore.md +++ b/docs/generators/aspnetcore.md @@ -41,7 +41,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |packageName|C# package name (convention: Title.Case).| |Org.OpenAPITools| |packageTitle|Specifies an AssemblyTitle for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |OpenAPI Library| |packageVersion|C# package version.| |1.0.0| -|pocoModels|Build POCO Models| |false| |returnICollection|Return ICollection<T> instead of the concrete type.| |false| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src| diff --git a/docs/generators/perl.md b/docs/generators/perl.md index 090ccadf1427f9384488208302749a30646358f9..34b9e1354a2ec208f11a243afc5a0737a87f3c36 100644 --- a/docs/generators/perl.md +++ b/docs/generators/perl.md @@ -41,8 +41,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl <ul class="column-ul"> <li>ARRAY</li> -<li>DATE</li> -<li>DATE_TIME</li> +<li>DateTime</li> <li>HASH</li> <li>boolean</li> <li>double</li> diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index 2556ed2edf3eb74140a997f0503c219c24d00bfb..9556498b2526886738cb11634db56f672f3b0400 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -129,6 +129,9 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code protected AnnotationLibrary annotationLibrary; protected boolean implicitHeaders = false; protected String implicitHeadersRegex = null; + + // A cache to efficiently lookup schema `toModelName()` based on the schema Key + private Map<String, String> schemaKeyToModelNameCache = new HashMap<>(); public AbstractJavaCodegen() { super(); @@ -829,6 +832,12 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code if (schemaMapping.containsKey(name)) { return schemaMapping.get(name); } + + // memoization + String origName = name; + if (schemaKeyToModelNameCache.containsKey(origName)) { + return schemaKeyToModelNameCache.get(origName); + } final String sanitizedName = sanitizeName(name); @@ -846,6 +855,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code // camelize the model name // phone_number => PhoneNumber final String camelizedName = camelize(nameWithPrefixSuffix); + schemaKeyToModelNameCache.put(origName, camelizedName); // model name cannot use reserved keyword, e.g. return if (isReservedWord(camelizedName)) { diff --git a/samples/client/petstore/R/.openapi-generator/FILES b/samples/client/petstore/R/.openapi-generator/FILES index 7a05f5fdda5dbbde42ae3565c4036e12210a069c..3046316ea30be2d290a204e4119b9b5c4cf6366b 100644 --- a/samples/client/petstore/R/.openapi-generator/FILES +++ b/samples/client/petstore/R/.openapi-generator/FILES @@ -1,7 +1,5 @@ .Rbuildignore -.github/workflows/r-client.yaml .gitignore -.lintr .travis.yml DESCRIPTION NAMESPACE diff --git a/samples/client/petstore/R/R/animal.R b/samples/client/petstore/R/R/animal.R index bd8d7deba7b5efce71bcf4fd44d3f9d4acd6ef9d..ad9daf1c61f00d30875ef8a35af7553e6cda2b59 100644 --- a/samples/client/petstore/R/R/animal.R +++ b/samples/client/petstore/R/R/animal.R @@ -26,11 +26,11 @@ Animal <- R6::R6Class( #' Initialize a new Animal class. #' #' @param className className - #' @param color color. Default to "red". + #' @param color color. Default to 'red'. #' @param ... Other optional arguments. #' @export initialize = function( - `className`, `color` = "red", ... + `className`, `color` = 'red', ... ) { if (!missing(`className`)) { stopifnot(is.character(`className`), length(`className`) == 1) diff --git a/samples/client/petstore/R/R/cat.R b/samples/client/petstore/R/R/cat.R index 42772a1cac61384e9cbaf8338dba33009d2a4222..aa353182f78362924c8dd05ef46c83e2abeef8b2 100644 --- a/samples/client/petstore/R/R/cat.R +++ b/samples/client/petstore/R/R/cat.R @@ -29,12 +29,12 @@ Cat <- R6::R6Class( #' Initialize a new Cat class. #' #' @param className className - #' @param color color. Default to "red". + #' @param color color. Default to 'red'. #' @param declawed declawed #' @param ... Other optional arguments. #' @export initialize = function( - `className`, `color` = "red", `declawed` = NULL, ... + `className`, `color` = 'red', `declawed` = NULL, ... ) { if (!missing(`className`)) { stopifnot(is.character(`className`), length(`className`) == 1) diff --git a/samples/client/petstore/R/R/dog.R b/samples/client/petstore/R/R/dog.R index dea850f7659362708ced6abfef8aae6808cc483d..d2f5a1959c480c096ec5a4c64523ebea51746a14 100644 --- a/samples/client/petstore/R/R/dog.R +++ b/samples/client/petstore/R/R/dog.R @@ -29,12 +29,12 @@ Dog <- R6::R6Class( #' Initialize a new Dog class. #' #' @param className className - #' @param color color. Default to "red". + #' @param color color. Default to 'red'. #' @param breed breed #' @param ... Other optional arguments. #' @export initialize = function( - `className`, `color` = "red", `breed` = NULL, ... + `className`, `color` = 'red', `breed` = NULL, ... ) { if (!missing(`className`)) { stopifnot(is.character(`className`), length(`className`) == 1) diff --git a/samples/client/petstore/R/R/fake_api.R b/samples/client/petstore/R/R/fake_api.R index d48ae15c566f00253b2b8b355966e2f359539939..a6c705051d345630b8caf7be17e61c20666943fd 100644 --- a/samples/client/petstore/R/R/fake_api.R +++ b/samples/client/petstore/R/R/fake_api.R @@ -41,8 +41,8 @@ #' #################### FakeDataFile #################### #' #' library(petstore) -#' var.dummy <- "dummy_example" # character | dummy required parameter -#' var.var_data_file <- "var_data_file_example" # character | header data file +#' var.dummy <- 'dummy_example' # character | dummy required parameter +#' var.var_data_file <- 'var_data_file_example' # character | header data file #' #' #test data_file to ensure it's escaped correctly #' api.instance <- FakeApi$new() diff --git a/samples/client/petstore/R/R/pet_api.R b/samples/client/petstore/R/R/pet_api.R index 37a27ce94084f48c938da0ccd333141d21fa0bcd..edb3e18579cbf8a7ea5a29e0828db1471a7d2107 100644 --- a/samples/client/petstore/R/R/pet_api.R +++ b/samples/client/petstore/R/R/pet_api.R @@ -286,7 +286,7 @@ #' #' library(petstore) #' var.pet_id <- 56 # integer | Pet id to delete -#' var.api_key <- "api_key_example" # character | +#' var.api_key <- 'api_key_example' # character | #' #' #Deletes a pet #' api.instance <- PetApi$new() @@ -312,7 +312,7 @@ #' #################### FindPetsByStatus #################### #' #' library(petstore) -#' var.status <- ["status_example"] # array[character] | Status values that need to be considered for filter +#' var.status <- ['status_example'] # array[character] | Status values that need to be considered for filter #' #' #Finds Pets by status #' api.instance <- PetApi$new() @@ -340,7 +340,7 @@ #' #################### FindPetsByTags #################### #' #' library(petstore) -#' var.tags <- ["tags_example"] # array[character] | Tags to filter by +#' var.tags <- ['tags_example'] # array[character] | Tags to filter by #' #' #Finds Pets by tags #' api.instance <- PetApi$new() @@ -453,8 +453,8 @@ #' #' library(petstore) #' var.pet_id <- 56 # integer | ID of pet that needs to be updated -#' var.name <- "name_example" # character | Updated name of the pet -#' var.status <- "status_example" # character | Updated status of the pet +#' var.name <- 'name_example' # character | Updated name of the pet +#' var.status <- 'status_example' # character | Updated status of the pet #' #' #Updates a pet in the store with form data #' api.instance <- PetApi$new() @@ -481,7 +481,7 @@ #' #' library(petstore) #' var.pet_id <- 56 # integer | ID of pet to update -#' var.additional_metadata <- "additional_metadata_example" # character | Additional data to pass to server +#' var.additional_metadata <- 'additional_metadata_example' # character | Additional data to pass to server #' var.file <- File.new('/path/to/file') # data.frame | file to upload #' #' #uploads an image diff --git a/samples/client/petstore/R/R/store_api.R b/samples/client/petstore/R/R/store_api.R index 584646fc43158b37d67cec6284a0b446dd4f453a..9dea7619bc6aecdca76f2ad2cc117889d2784f24 100644 --- a/samples/client/petstore/R/R/store_api.R +++ b/samples/client/petstore/R/R/store_api.R @@ -119,7 +119,7 @@ #' #################### DeleteOrder #################### #' #' library(petstore) -#' var.order_id <- "order_id_example" # character | ID of the order that needs to be deleted +#' var.order_id <- 'order_id_example' # character | ID of the order that needs to be deleted #' #' #Delete purchase order by ID #' api.instance <- StoreApi$new() diff --git a/samples/client/petstore/R/R/user_api.R b/samples/client/petstore/R/R/user_api.R index 10dead6d87c9681ac0d00ec01637445f427a37e0..de6ab7011a43aa11b0071c4e12569e4e86763400 100644 --- a/samples/client/petstore/R/R/user_api.R +++ b/samples/client/petstore/R/R/user_api.R @@ -276,7 +276,7 @@ #' #################### DeleteUser #################### #' #' library(petstore) -#' var.username <- "username_example" # character | The name that needs to be deleted +#' var.username <- 'username_example' # character | The name that needs to be deleted #' #' #Delete user #' api.instance <- UserApi$new() @@ -302,7 +302,7 @@ #' #################### GetUserByName #################### #' #' library(petstore) -#' var.username <- "username_example" # character | The name that needs to be fetched. Use user1 for testing. +#' var.username <- 'username_example' # character | The name that needs to be fetched. Use user1 for testing. #' #' #Get user by user name #' api.instance <- UserApi$new() @@ -327,8 +327,8 @@ #' #################### LoginUser #################### #' #' library(petstore) -#' var.username <- "username_example" # character | The user name for login -#' var.password <- "password_example" # character | The password for login in clear text +#' var.username <- 'username_example' # character | The user name for login +#' var.password <- 'password_example' # character | The password for login in clear text #' #' #Logs user into the system #' api.instance <- UserApi$new() @@ -378,7 +378,7 @@ #' #################### UpdateUser #################### #' #' library(petstore) -#' var.username <- "username_example" # character | name that need to be deleted +#' var.username <- 'username_example' # character | name that need to be deleted #' var.user <- User$new() # User | Updated user object #' #' #Updated user diff --git a/samples/client/petstore/R/docs/Animal.md b/samples/client/petstore/R/docs/Animal.md index 5cb0eb8bbf27b83fb5480f2f8f7a0c79b37db836..f21cc2147b6b457f9c8658974c28c5fa8a437ed3 100644 --- a/samples/client/petstore/R/docs/Animal.md +++ b/samples/client/petstore/R/docs/Animal.md @@ -5,6 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **className** | **character** | | -**color** | **character** | | [optional] [default to "red"] +**color** | **character** | | [optional] [default to 'red'] diff --git a/samples/client/petstore/R/docs/Cat.md b/samples/client/petstore/R/docs/Cat.md index ba23ea86a33efe7849a96082c6e1446725493287..d6e99c85c69df79948b8ed76a673abc0fc239749 100644 --- a/samples/client/petstore/R/docs/Cat.md +++ b/samples/client/petstore/R/docs/Cat.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **className** | **character** | | -**color** | **character** | | [optional] [default to "red"] +**color** | **character** | | [optional] [default to 'red'] **declawed** | **character** | | [optional] diff --git a/samples/client/petstore/R/docs/Dog.md b/samples/client/petstore/R/docs/Dog.md index b2e732df451b9e92459a7e3a21c6c5a431593098..6a7c1f53a14a98416a98cf12f185e3252a4eb799 100644 --- a/samples/client/petstore/R/docs/Dog.md +++ b/samples/client/petstore/R/docs/Dog.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **className** | **character** | | -**color** | **character** | | [optional] [default to "red"] +**color** | **character** | | [optional] [default to 'red'] **breed** | **character** | | [optional] diff --git a/samples/client/petstore/R/docs/FakeApi.md b/samples/client/petstore/R/docs/FakeApi.md index 484ca98a1d6262d267206098779645349d7472c7..55132bdfcf70af28da2c755dbd7a6d45c2e2a715 100644 --- a/samples/client/petstore/R/docs/FakeApi.md +++ b/samples/client/petstore/R/docs/FakeApi.md @@ -18,8 +18,8 @@ test data_file to ensure it's escaped correctly ```R library(petstore) -var_dummy <- "dummy_example" # character | dummy required parameter -var_var_data_file <- "var_data_file_example" # character | header data file +var_dummy <- 'dummy_example' # character | dummy required parameter +var_var_data_file <- 'var_data_file_example' # character | header data file #test data_file to ensure it's escaped correctly api_instance <- FakeApi$new() diff --git a/samples/client/petstore/R/docs/PetApi.md b/samples/client/petstore/R/docs/PetApi.md index a89cf8fac8f391f66b1dfd211e47a4f4ce71fa52..7211545a44b74cda9c4c2788eefa2d58ac728c24 100644 --- a/samples/client/petstore/R/docs/PetApi.md +++ b/samples/client/petstore/R/docs/PetApi.md @@ -88,7 +88,7 @@ Deletes a pet library(petstore) var_pet_id <- 56 # integer | Pet id to delete -var_api_key <- "api_key_example" # character | +var_api_key <- 'api_key_example' # character | #Deletes a pet api_instance <- PetApi$new() @@ -457,8 +457,8 @@ Updates a pet in the store with form data library(petstore) var_pet_id <- 56 # integer | ID of pet that needs to be updated -var_name <- "name_example" # character | Updated name of the pet -var_status <- "status_example" # character | Updated status of the pet +var_name <- 'name_example' # character | Updated name of the pet +var_status <- 'status_example' # character | Updated status of the pet #Updates a pet in the store with form data api_instance <- PetApi$new() @@ -517,7 +517,7 @@ uploads an image library(petstore) var_pet_id <- 56 # integer | ID of pet to update -var_additional_metadata <- "additional_metadata_example" # character | Additional data to pass to server +var_additional_metadata <- 'additional_metadata_example' # character | Additional data to pass to server var_file <- File.new('/path/to/file') # data.frame | file to upload #uploads an image diff --git a/samples/client/petstore/R/docs/StoreApi.md b/samples/client/petstore/R/docs/StoreApi.md index 31343a84ea0125efea0c11a53e8f4c7b27dbfe65..2caef65f3d29f8625a382d1310ea13c43a66b243 100644 --- a/samples/client/petstore/R/docs/StoreApi.md +++ b/samples/client/petstore/R/docs/StoreApi.md @@ -21,7 +21,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non ```R library(petstore) -var_order_id <- "order_id_example" # character | ID of the order that needs to be deleted +var_order_id <- 'order_id_example' # character | ID of the order that needs to be deleted #Delete purchase order by ID api_instance <- StoreApi$new() diff --git a/samples/client/petstore/R/docs/UserApi.md b/samples/client/petstore/R/docs/UserApi.md index 3382f734cef2b3e669a609aa7c4e9a37cc592f26..d292094b7e8fe063331b1e2bc95011ce1fef7a67 100644 --- a/samples/client/petstore/R/docs/UserApi.md +++ b/samples/client/petstore/R/docs/UserApi.md @@ -193,7 +193,7 @@ This can only be done by the logged in user. ```R library(petstore) -var_username <- "username_example" # character | The name that needs to be deleted +var_username <- 'username_example' # character | The name that needs to be deleted #Delete user api_instance <- UserApi$new() @@ -250,7 +250,7 @@ Get user by user name ```R library(petstore) -var_username <- "username_example" # character | The name that needs to be fetched. Use user1 for testing. +var_username <- 'username_example' # character | The name that needs to be fetched. Use user1 for testing. #Get user by user name api_instance <- UserApi$new() @@ -310,8 +310,8 @@ Logs user into the system ```R library(petstore) -var_username <- "username_example" # character | The user name for login -var_password <- "password_example" # character | The password for login in clear text +var_username <- 'username_example' # character | The user name for login +var_password <- 'password_example' # character | The password for login in clear text #Logs user into the system api_instance <- UserApi$new() @@ -423,7 +423,7 @@ This can only be done by the logged in user. ```R library(petstore) -var_username <- "username_example" # character | name that need to be deleted +var_username <- 'username_example' # character | name that need to be deleted var_user <- User$new(123, "username_example", "firstName_example", "lastName_example", "email_example", "password_example", "phone_example", 123) # User | Updated user object #Updated user diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/ChildCat.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/ChildCat.md index 072ad05b36d234558f9941277e7a69fe44263eb6..8ce6449e5f2247bd36e04d3003e127397180ca3c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/ChildCat.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/ChildCat.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | | [optional] -**PetType** | **string** | | [optional] [default to PetTypeEnum.ChildCat] +**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-ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCat.cs index e5f952880eb274685be5c5af43c46817dc4224bc..6358e859ce1745fbbf71bdf3ce479a74c07a96c9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCat.cs @@ -53,8 +53,8 @@ namespace Org.OpenAPITools.Model /// Gets or Sets PetType /// </summary> - [DataMember(Name = "pet_type", EmitDefaultValue = false)] - public PetTypeEnum? PetType + [DataMember(Name = "pet_type", IsRequired = true, EmitDefaultValue = false)] + public PetTypeEnum PetType { get{ return _PetType;} set @@ -63,7 +63,7 @@ namespace Org.OpenAPITools.Model _flagPetType = true; } } - private PetTypeEnum? _PetType; + private PetTypeEnum _PetType; private bool _flagPetType; /// <summary> @@ -86,9 +86,10 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the <see cref="ChildCat" /> class. /// </summary> /// <param name="name">name.</param> - /// <param name="petType">petType (default to PetTypeEnum.ChildCat).</param> - public ChildCat(string name = default(string), PetTypeEnum? petType = PetTypeEnum.ChildCat) : base() + /// <param name="petType">petType (required) (default to PetTypeEnum.ChildCat).</param> + public ChildCat(string name = default(string), PetTypeEnum petType = PetTypeEnum.ChildCat) : base() { + this._PetType = petType; this._Name = name; if (this.Name != null) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/ChildCat.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/ChildCat.md index 072ad05b36d234558f9941277e7a69fe44263eb6..8ce6449e5f2247bd36e04d3003e127397180ca3c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/ChildCat.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/ChildCat.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | | [optional] -**PetType** | **string** | | [optional] [default to PetTypeEnum.ChildCat] +**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-httpclient/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/ChildCat.cs index 2420d1295542d655292a4c007b397a19529811ec..a6603b7cb85824f3b38deeb4811c84ef050df016 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/ChildCat.cs @@ -53,8 +53,8 @@ namespace Org.OpenAPITools.Model /// <summary> /// Gets or Sets PetType /// </summary> - [DataMember(Name = "pet_type", EmitDefaultValue = false)] - public PetTypeEnum? PetType { get; set; } + [DataMember(Name = "pet_type", IsRequired = true, EmitDefaultValue = false)] + public PetTypeEnum PetType { get; set; } /// <summary> /// Initializes a new instance of the <see cref="ChildCat" /> class. /// </summary> @@ -67,11 +67,11 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the <see cref="ChildCat" /> class. /// </summary> /// <param name="name">name.</param> - /// <param name="petType">petType (default to PetTypeEnum.ChildCat).</param> - public ChildCat(string name = default(string), PetTypeEnum? petType = PetTypeEnum.ChildCat) : base() + /// <param name="petType">petType (required) (default to PetTypeEnum.ChildCat).</param> + public ChildCat(string name = default(string), PetTypeEnum petType = PetTypeEnum.ChildCat) : base() { - this.Name = name; this.PetType = petType; + this.Name = name; this.AdditionalProperties = new Dictionary<string, object>(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/ChildCat.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/ChildCat.md index 072ad05b36d234558f9941277e7a69fe44263eb6..8ce6449e5f2247bd36e04d3003e127397180ca3c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/ChildCat.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/ChildCat.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | | [optional] -**PetType** | **string** | | [optional] [default to PetTypeEnum.ChildCat] +**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-net47/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/ChildCat.cs index 4c60ed776cdac3e392f5d2eea31890a3bd0dd65e..7a15a5297df2b604f05d96541c3ce8f8ba3a5ecb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/ChildCat.cs @@ -52,8 +52,8 @@ namespace Org.OpenAPITools.Model /// <summary> /// Gets or Sets PetType /// </summary> - [DataMember(Name = "pet_type", EmitDefaultValue = false)] - public PetTypeEnum? PetType { get; set; } + [DataMember(Name = "pet_type", IsRequired = true, EmitDefaultValue = false)] + public PetTypeEnum PetType { get; set; } /// <summary> /// Initializes a new instance of the <see cref="ChildCat" /> class. /// </summary> @@ -66,11 +66,11 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the <see cref="ChildCat" /> class. /// </summary> /// <param name="name">name.</param> - /// <param name="petType">petType (default to PetTypeEnum.ChildCat).</param> - public ChildCat(string name = default(string), PetTypeEnum? petType = PetTypeEnum.ChildCat) : base() + /// <param name="petType">petType (required) (default to PetTypeEnum.ChildCat).</param> + public ChildCat(string name = default(string), PetTypeEnum petType = PetTypeEnum.ChildCat) : base() { - this.Name = name; this.PetType = petType; + this.Name = name; this.AdditionalProperties = new Dictionary<string, object>(); } 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 index 072ad05b36d234558f9941277e7a69fe44263eb6..8ce6449e5f2247bd36e04d3003e127397180ca3c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ChildCat.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/ChildCat.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | | [optional] -**PetType** | **string** | | [optional] [default to PetTypeEnum.ChildCat] +**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/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/ChildCat.cs index 4c60ed776cdac3e392f5d2eea31890a3bd0dd65e..7a15a5297df2b604f05d96541c3ce8f8ba3a5ecb 100644 --- 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 @@ -52,8 +52,8 @@ namespace Org.OpenAPITools.Model /// <summary> /// Gets or Sets PetType /// </summary> - [DataMember(Name = "pet_type", EmitDefaultValue = false)] - public PetTypeEnum? PetType { get; set; } + [DataMember(Name = "pet_type", IsRequired = true, EmitDefaultValue = false)] + public PetTypeEnum PetType { get; set; } /// <summary> /// Initializes a new instance of the <see cref="ChildCat" /> class. /// </summary> @@ -66,11 +66,11 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the <see cref="ChildCat" /> class. /// </summary> /// <param name="name">name.</param> - /// <param name="petType">petType (default to PetTypeEnum.ChildCat).</param> - public ChildCat(string name = default(string), PetTypeEnum? petType = PetTypeEnum.ChildCat) : base() + /// <param name="petType">petType (required) (default to PetTypeEnum.ChildCat).</param> + public ChildCat(string name = default(string), PetTypeEnum petType = PetTypeEnum.ChildCat) : base() { - this.Name = name; this.PetType = petType; + this.Name = name; this.AdditionalProperties = new Dictionary<string, object>(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/ChildCat.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/ChildCat.md index 072ad05b36d234558f9941277e7a69fe44263eb6..8ce6449e5f2247bd36e04d3003e127397180ca3c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/ChildCat.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/ChildCat.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | | [optional] -**PetType** | **string** | | [optional] [default to PetTypeEnum.ChildCat] +**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/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ChildCat.cs index 4c60ed776cdac3e392f5d2eea31890a3bd0dd65e..7a15a5297df2b604f05d96541c3ce8f8ba3a5ecb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ChildCat.cs @@ -52,8 +52,8 @@ namespace Org.OpenAPITools.Model /// <summary> /// Gets or Sets PetType /// </summary> - [DataMember(Name = "pet_type", EmitDefaultValue = false)] - public PetTypeEnum? PetType { get; set; } + [DataMember(Name = "pet_type", IsRequired = true, EmitDefaultValue = false)] + public PetTypeEnum PetType { get; set; } /// <summary> /// Initializes a new instance of the <see cref="ChildCat" /> class. /// </summary> @@ -66,11 +66,11 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the <see cref="ChildCat" /> class. /// </summary> /// <param name="name">name.</param> - /// <param name="petType">petType (default to PetTypeEnum.ChildCat).</param> - public ChildCat(string name = default(string), PetTypeEnum? petType = PetTypeEnum.ChildCat) : base() + /// <param name="petType">petType (required) (default to PetTypeEnum.ChildCat).</param> + public ChildCat(string name = default(string), PetTypeEnum petType = PetTypeEnum.ChildCat) : base() { - this.Name = name; this.PetType = petType; + this.Name = name; this.AdditionalProperties = new Dictionary<string, object>(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/ChildCat.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/ChildCat.md index 072ad05b36d234558f9941277e7a69fe44263eb6..8ce6449e5f2247bd36e04d3003e127397180ca3c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/ChildCat.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/ChildCat.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | | [optional] -**PetType** | **string** | | [optional] [default to PetTypeEnum.ChildCat] +**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/OpenAPIClientCore/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/ChildCat.cs index c6c7222d7a653088fe963d7bccc6b51a76b2bf3b..d2b819278854b3af080919b1f4c3813cc00a5ce2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/ChildCat.cs @@ -52,8 +52,8 @@ namespace Org.OpenAPITools.Model /// <summary> /// Gets or Sets PetType /// </summary> - [DataMember(Name = "pet_type", EmitDefaultValue = false)] - public PetTypeEnum? PetType { get; set; } + [DataMember(Name = "pet_type", IsRequired = true, EmitDefaultValue = false)] + public PetTypeEnum PetType { get; set; } /// <summary> /// Initializes a new instance of the <see cref="ChildCat" /> class. /// </summary> @@ -63,11 +63,11 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the <see cref="ChildCat" /> class. /// </summary> /// <param name="name">name.</param> - /// <param name="petType">petType (default to PetTypeEnum.ChildCat).</param> - public ChildCat(string name = default(string), PetTypeEnum? petType = PetTypeEnum.ChildCat) : base() + /// <param name="petType">petType (required) (default to PetTypeEnum.ChildCat).</param> + public ChildCat(string name = default(string), PetTypeEnum petType = PetTypeEnum.ChildCat) : base() { - this.Name = name; this.PetType = petType; + this.Name = name; } /// <summary> diff --git a/samples/client/petstore/java/jersey3/docs/ChildCat.md b/samples/client/petstore/java/jersey3/docs/ChildCat.md index 3f39832529b9475c23d3830e1332f683aa79a154..6a114cc4ffb3b5c0c2c84ffdd4a11bba88369b27 100644 --- a/samples/client/petstore/java/jersey3/docs/ChildCat.md +++ b/samples/client/petstore/java/jersey3/docs/ChildCat.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**name** | **String** | | [optional] | -|**petType** | [**String**](#String) | | [optional] | +|**petType** | [**String**](#String) | | | diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ChildCat.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ChildCat.java index e0ce86c3f9143c0cc56fcf7c98bf6fdd628a5cca..8e16e6fedd225d769e8b698c8fc36b584296103d 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ChildCat.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ChildCat.java @@ -105,10 +105,10 @@ public class ChildCat extends ParentPet { * Get petType * @return petType **/ - @jakarta.annotation.Nullable - @ApiModelProperty(value = "") + @jakarta.annotation.Nonnull + @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_PET_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getPetType() { return petType; @@ -116,7 +116,7 @@ public class ChildCat extends ParentPet { @JsonProperty(JSON_PROPERTY_PET_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setPetType(String petType) { if (!PET_TYPE_VALUES.contains(petType)) { throw new IllegalArgumentException(petType + " is invalid. Possible values for petType: " + String.join(", ", PET_TYPE_VALUES)); diff --git a/samples/client/petstore/perl/docs/FakeApi.md b/samples/client/petstore/perl/docs/FakeApi.md index e028d69b6c3abe7f62a55839751a8a99d8ac92c3..fbd1c1d042f9c9c69df985b564c05221c7b9cfe7 100644 --- a/samples/client/petstore/perl/docs/FakeApi.md +++ b/samples/client/petstore/perl/docs/FakeApi.md @@ -558,8 +558,8 @@ my $int64 = 789; # int | None my $float = 3.4; # double | None my $string = "string_example"; # string | None my $binary = "/path/to/file"; # string | None -my $date = DateTime->from_epoch(epoch => str2time('null')); # DATE | None -my $date_time = DateTime->from_epoch(epoch => str2time('null')); # DATE_TIME | None +my $date = DateTime->from_epoch(epoch => str2time('null')); # DateTime | None +my $date_time = DateTime->from_epoch(epoch => str2time('null')); # DateTime | None my $password = "password_example"; # string | None my $callback = "callback_example"; # string | None @@ -585,8 +585,8 @@ Name | Type | Description | Notes **float** | **double**| None | [optional] **string** | **string**| None | [optional] **binary** | **string****string**| None | [optional] - **date** | **DATE**| None | [optional] - **date_time** | **DATE_TIME**| None | [optional] + **date** | **DateTime**| None | [optional] + **date_time** | **DateTime**| None | [optional] **password** | **string**| None | [optional] **callback** | **string**| None | [optional] diff --git a/samples/client/petstore/perl/docs/FormatTest.md b/samples/client/petstore/perl/docs/FormatTest.md index bd9dd2565c24a1af4252978817f0e6bbbd2f5ce4..886a93b4fed492645d42b0a62df3252cc51ab312 100644 --- a/samples/client/petstore/perl/docs/FormatTest.md +++ b/samples/client/petstore/perl/docs/FormatTest.md @@ -14,12 +14,12 @@ Name | Type | Description | Notes **number** | **double** | | **float** | **double** | | [optional] **double** | **double** | | [optional] -**decimal** | **double** | | [optional] +**decimal** | [**Decimal**](Decimal.md) | | [optional] **string** | **string** | | [optional] **byte** | **string** | | **binary** | **string** | | [optional] -**date** | **DATE** | | -**date_time** | **DATE_TIME** | | [optional] +**date** | **DateTime** | | +**date_time** | **DateTime** | | [optional] **uuid** | **string** | | [optional] **password** | **string** | | **pattern_with_digits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional] diff --git a/samples/client/petstore/perl/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/perl/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 9fe5279da09ca07400e266456ed619553ab77da7..f2720cf57b5b184fe20467339953a6ce669362bd 100644 --- a/samples/client/petstore/perl/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/perl/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -9,7 +9,7 @@ use WWW::OpenAPIClient::Object::MixedPropertiesAndAdditionalPropertiesClass; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uuid** | **string** | | [optional] -**date_time** | **DATE_TIME** | | [optional] +**date_time** | **DateTime** | | [optional] **map** | [**HASH[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/perl/docs/NullableClass.md b/samples/client/petstore/perl/docs/NullableClass.md index 200aaa3d783524361a79f0a1506b057c03f4a46f..326c42317cb8ed857d1ccdfe7da66095cabf8551 100644 --- a/samples/client/petstore/perl/docs/NullableClass.md +++ b/samples/client/petstore/perl/docs/NullableClass.md @@ -12,8 +12,8 @@ Name | Type | Description | Notes **number_prop** | **double** | | [optional] **boolean_prop** | **boolean** | | [optional] **string_prop** | **string** | | [optional] -**date_prop** | **DATE** | | [optional] -**datetime_prop** | **DATE_TIME** | | [optional] +**date_prop** | **DateTime** | | [optional] +**datetime_prop** | **DateTime** | | [optional] **array_nullable_prop** | **ARRAY[object]** | | [optional] **array_and_items_nullable_prop** | **ARRAY[object]** | | [optional] **array_items_nullable** | **ARRAY[object]** | | [optional] diff --git a/samples/client/petstore/perl/docs/Order.md b/samples/client/petstore/perl/docs/Order.md index 2b33f1d4d7f615aed97ebc27429e0c2e30b571eb..356ad67f45d76e92cf6ead378b24c50a908f307a 100644 --- a/samples/client/petstore/perl/docs/Order.md +++ b/samples/client/petstore/perl/docs/Order.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **id** | **int** | | [optional] **pet_id** | **int** | | [optional] **quantity** | **int** | | [optional] -**ship_date** | **DATE_TIME** | | [optional] +**ship_date** | **DateTime** | | [optional] **status** | **string** | Order Status | [optional] **complete** | **boolean** | | [optional] [default to false] diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm index 2712407215f0aec8d743fb46a7e44f4b6d71ac52..9c702e1c1d65769fb758ac8e084383b563b53c6b 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm @@ -759,8 +759,8 @@ sub test_client_model { # @param double $float None (optional) # @param string $string None (optional) # @param string $binary None (optional) -# @param DATE $date None (optional) -# @param DATE_TIME $date_time None (optional) +# @param DateTime $date None (optional) +# @param DateTime $date_time None (optional) # @param string $password None (optional) # @param string $callback None (optional) { @@ -816,12 +816,12 @@ sub test_client_model { required => '0', }, 'date' => { - data_type => 'DATE', + data_type => 'DateTime', description => 'None', required => '0', }, 'date_time' => { - data_type => 'DATE_TIME', + data_type => 'DateTime', description => 'None', required => '0', }, diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm index d0ad7e619ff513dbf330070e023871051c5904dd..dd65f853a924801b0d74cf11c9624d64c503a101 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm @@ -30,6 +30,7 @@ use Log::Any qw($log); use Date::Parse; use DateTime; +use WWW::OpenAPIClient::Object::Decimal; use base ("Class::Accessor", "Class::Data::Inheritable"); @@ -256,7 +257,7 @@ __PACKAGE__->method_documentation({ read_only => '', }, 'decimal' => { - datatype => 'double', + datatype => 'Decimal', base_name => 'decimal', description => '', format => '', @@ -284,14 +285,14 @@ __PACKAGE__->method_documentation({ read_only => '', }, 'date' => { - datatype => 'DATE', + datatype => 'DateTime', base_name => 'date', description => '', format => '', read_only => '', }, 'date_time' => { - datatype => 'DATE_TIME', + datatype => 'DateTime', base_name => 'dateTime', description => '', format => '', @@ -334,12 +335,12 @@ __PACKAGE__->openapi_types( { 'number' => 'double', 'float' => 'double', 'double' => 'double', - 'decimal' => 'double', + 'decimal' => 'Decimal', 'string' => 'string', 'byte' => 'string', 'binary' => 'string', - 'date' => 'DATE', - 'date_time' => 'DATE_TIME', + 'date' => 'DateTime', + 'date_time' => 'DateTime', 'uuid' => 'string', 'password' => 'string', 'pattern_with_digits' => 'string', diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MixedPropertiesAndAdditionalPropertiesClass.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MixedPropertiesAndAdditionalPropertiesClass.pm index b39798d87ecff5cf11b08eadf317c7f18a90b3cb..88be77650ec0548fef7cf85fddf38bfe5a0810ad 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MixedPropertiesAndAdditionalPropertiesClass.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MixedPropertiesAndAdditionalPropertiesClass.pm @@ -222,7 +222,7 @@ __PACKAGE__->method_documentation({ read_only => '', }, 'date_time' => { - datatype => 'DATE_TIME', + datatype => 'DateTime', base_name => 'dateTime', description => '', format => '', @@ -239,7 +239,7 @@ __PACKAGE__->method_documentation({ __PACKAGE__->openapi_types( { 'uuid' => 'string', - 'date_time' => 'DATE_TIME', + 'date_time' => 'DateTime', 'map' => 'HASH[string,Animal]' } ); diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NullableClass.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NullableClass.pm index e83d3d247ea633a21c6a416455679c818a54cd53..92ece221b8d6635e9c8a182a6fdc02e4902e8829 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NullableClass.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NullableClass.pm @@ -242,14 +242,14 @@ __PACKAGE__->method_documentation({ read_only => '', }, 'date_prop' => { - datatype => 'DATE', + datatype => 'DateTime', base_name => 'date_prop', description => '', format => '', read_only => '', }, 'datetime_prop' => { - datatype => 'DATE_TIME', + datatype => 'DateTime', base_name => 'datetime_prop', description => '', format => '', @@ -304,8 +304,8 @@ __PACKAGE__->openapi_types( { 'number_prop' => 'double', 'boolean_prop' => 'boolean', 'string_prop' => 'string', - 'date_prop' => 'DATE', - 'datetime_prop' => 'DATE_TIME', + 'date_prop' => 'DateTime', + 'datetime_prop' => 'DateTime', 'array_nullable_prop' => 'ARRAY[object]', 'array_and_items_nullable_prop' => 'ARRAY[object]', 'array_items_nullable' => 'ARRAY[object]', diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Order.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Order.pm index 546fa99bd5effd23d0005482ea7a4a70497a5244..e206f876157623c231ad24754069b0086d452dac 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Order.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Order.pm @@ -235,7 +235,7 @@ __PACKAGE__->method_documentation({ read_only => '', }, 'ship_date' => { - datatype => 'DATE_TIME', + datatype => 'DateTime', base_name => 'shipDate', description => '', format => '', @@ -261,7 +261,7 @@ __PACKAGE__->openapi_types( { 'id' => 'int', 'pet_id' => 'int', 'quantity' => 'int', - 'ship_date' => 'DATE_TIME', + 'ship_date' => 'DateTime', 'status' => 'string', 'complete' => 'boolean' } ); diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts b/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts index 0d480e40bc03fe05f90b6289711aceffea266578..572cae522364d9e7ca8993e791976bf6749d602a 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts @@ -359,7 +359,7 @@ export interface ChildCat extends ParentPet { * @type {string} * @memberof ChildCat */ - 'pet_type'?: ChildCatPetTypeEnum; + 'pet_type': ChildCatPetTypeEnum; } export const ChildCatPetTypeEnum = { diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/additionalproperties_should_not_look_in_applicators.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/additionalproperties_should_not_look_in_applicators.py index 5f2482fc088f042f8055f512c004945aac69ca02..11a38935e5db534d15e79fde75c300939edf2580 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/additionalproperties_should_not_look_in_applicators.py +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/additionalproperties_should_not_look_in_applicators.py @@ -89,27 +89,7 @@ class AdditionalpropertiesShouldNotLookInApplicators( # code would be run when this module is imported, and these composed # classes don't exist yet because their module has not finished # loading - - - class allOf_0( - AnyTypeSchema - ): - foo = AnyTypeSchema - - def __new__( - cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], - foo: typing.Union[foo, Unset] = unset, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'allOf_0': - return super().__new__( - cls, - *args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) + allOf_0 = AnyTypeSchema return { 'allOf': [ allOf_0, diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/allof.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/allof.py index 51d4cec94c31e80f75e07e34a280e39562eb0516..d6175f9fe968db7592edcdc4187a037d10fd8ebb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/allof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/allof.py @@ -88,54 +88,8 @@ class Allof( # code would be run when this module is imported, and these composed # classes don't exist yet because their module has not finished # loading - - - class allOf_0( - AnyTypeSchema - ): - _required_property_names = set(( - 'bar', - )) - bar = IntSchema - - def __new__( - cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], - bar: bar, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'allOf_0': - return super().__new__( - cls, - *args, - bar=bar, - _configuration=_configuration, - **kwargs, - ) - - - class allOf_1( - AnyTypeSchema - ): - _required_property_names = set(( - 'foo', - )) - foo = StrSchema - - def __new__( - cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], - foo: foo, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'allOf_1': - return super().__new__( - cls, - *args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) + allOf_0 = AnyTypeSchema + allOf_1 = AnyTypeSchema return { 'allOf': [ allOf_0, diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/allof_with_base_schema.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/allof_with_base_schema.py index b0a4665f9b312f58cf719938b5b6a87920a3cea4..86b47bc86dd6c904399b939f8c11bdcad502e75d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/allof_with_base_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/allof_with_base_schema.py @@ -92,54 +92,8 @@ class AllofWithBaseSchema( # code would be run when this module is imported, and these composed # classes don't exist yet because their module has not finished # loading - - - class allOf_0( - AnyTypeSchema - ): - _required_property_names = set(( - 'foo', - )) - foo = StrSchema - - def __new__( - cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], - foo: foo, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'allOf_0': - return super().__new__( - cls, - *args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) - - - class allOf_1( - AnyTypeSchema - ): - _required_property_names = set(( - 'baz', - )) - baz = NoneSchema - - def __new__( - cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], - baz: baz, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'allOf_1': - return super().__new__( - cls, - *args, - baz=baz, - _configuration=_configuration, - **kwargs, - ) + allOf_0 = AnyTypeSchema + allOf_1 = AnyTypeSchema return { 'allOf': [ allOf_0, diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/anyof_complex_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/anyof_complex_types.py index 918cb35d65c33d2e8e3ec7fbdbd2b4e935a04a7d..151ce57c3c7beee268e096046df7e2148c632e46 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/anyof_complex_types.py +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/anyof_complex_types.py @@ -88,54 +88,8 @@ class AnyofComplexTypes( # code would be run when this module is imported, and these composed # classes don't exist yet because their module has not finished # loading - - - class anyOf_0( - AnyTypeSchema - ): - _required_property_names = set(( - 'bar', - )) - bar = IntSchema - - def __new__( - cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], - bar: bar, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'anyOf_0': - return super().__new__( - cls, - *args, - bar=bar, - _configuration=_configuration, - **kwargs, - ) - - - class anyOf_1( - AnyTypeSchema - ): - _required_property_names = set(( - 'foo', - )) - foo = StrSchema - - def __new__( - cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], - foo: foo, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'anyOf_1': - return super().__new__( - cls, - *args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) + anyOf_0 = AnyTypeSchema + anyOf_1 = AnyTypeSchema return { 'allOf': [ ], diff --git a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/oneof_complex_types.py b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/oneof_complex_types.py index e3c9861ad4927468390f3f493d76a2da5e9a6772..162d76e60285be8ef5135aa83e18120c7468fd9c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/oneof_complex_types.py +++ b/samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/model/oneof_complex_types.py @@ -88,54 +88,8 @@ class OneofComplexTypes( # code would be run when this module is imported, and these composed # classes don't exist yet because their module has not finished # loading - - - class oneOf_0( - AnyTypeSchema - ): - _required_property_names = set(( - 'bar', - )) - bar = IntSchema - - def __new__( - cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], - bar: bar, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'oneOf_0': - return super().__new__( - cls, - *args, - bar=bar, - _configuration=_configuration, - **kwargs, - ) - - - class oneOf_1( - AnyTypeSchema - ): - _required_property_names = set(( - 'foo', - )) - foo = StrSchema - - def __new__( - cls, - *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes], - foo: foo, - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Type[Schema], - ) -> 'oneOf_1': - return super().__new__( - cls, - *args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) + oneOf_0 = AnyTypeSchema + oneOf_1 = AnyTypeSchema return { 'allOf': [ ], diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ChildCat.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ChildCat.md index 3f39832529b9475c23d3830e1332f683aa79a154..6a114cc4ffb3b5c0c2c84ffdd4a11bba88369b27 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ChildCat.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ChildCat.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**name** | **String** | | [optional] | -|**petType** | [**String**](#String) | | [optional] | +|**petType** | [**String**](#String) | | | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ChildCat.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ChildCat.java index ae123669a7da502ce5c51dd75aa9a16302b17b12..0e2970ef036105eaa621d0c66604ebe344fb0040 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ChildCat.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ChildCat.java @@ -105,10 +105,10 @@ public class ChildCat extends ParentPet { * Get petType * @return petType **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_PET_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getPetType() { return petType; @@ -116,7 +116,7 @@ public class ChildCat extends ParentPet { @JsonProperty(JSON_PROPERTY_PET_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setPetType(String petType) { if (!PET_TYPE_VALUES.contains(petType)) { throw new IllegalArgumentException(petType + " is invalid. Possible values for petType: " + String.join(", ", PET_TYPE_VALUES)); diff --git a/samples/openapi3/client/petstore/python-experimental/docs/PetApi.md b/samples/openapi3/client/petstore/python-experimental/docs/PetApi.md index d8ee4cb32fc8f6cf5343cba5c738c6e8fb4ee2df..7b9ab23bc5db99d419df25457c996f4082d2dc2c 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/PetApi.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/PetApi.md @@ -1315,7 +1315,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **additionalMetadata** | **str** | Additional data to pass to server | [optional] -**file** | **file_type** | file to upload | [optional] +**file** | **file_type** | file to upload | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] ### path_params diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py index d4bfb218fd0d059677e5e318b317495464475ec1..666b832fc7c8500663c217ad4b9f4af8e763fc27 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py @@ -73,10 +73,6 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( DictSchema ): _required_property_names = set(( - 'number', - 'double', - 'pattern_without_delimiter', - 'byte', )) @@ -175,10 +171,6 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( def __new__( cls, *args: typing.Union[dict, frozendict, ], - number: number, - double: double, - pattern_without_delimiter: pattern_without_delimiter, - byte: byte, integer: typing.Union[integer, Unset] = unset, int32: typing.Union[int32, Unset] = unset, int64: typing.Union[int64, Unset] = unset, @@ -194,10 +186,6 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( return super().__new__( cls, *args, - number=number, - double=double, - pattern_without_delimiter=pattern_without_delimiter, - byte=byte, integer=integer, int32=int32, int64=int64, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py index ce7e5851c6afd99e675274e492eeff1c89b4e43b..34dfe5627cecc4b79b76518820420b4a27ea2fc8 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py @@ -73,8 +73,6 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( DictSchema ): _required_property_names = set(( - 'param', - 'param2', )) param = StrSchema param2 = StrSchema @@ -83,16 +81,12 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( def __new__( cls, *args: typing.Union[dict, frozendict, ], - param: param, - param2: param2, _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Type[Schema], ) -> 'SchemaForRequestBodyApplicationXWwwFormUrlencoded': return super().__new__( cls, *args, - param=param, - param2=param2, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py index c8c8a179a5344c17b0beeb7cb29c5ff703e8471b..e308b76b1f2456ea64222161034e76bb27bf09a9 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py @@ -75,7 +75,6 @@ class SchemaForRequestBodyMultipartFormData( DictSchema ): _required_property_names = set(( - 'file', )) additionalMetadata = StrSchema file = BinarySchema @@ -84,7 +83,6 @@ class SchemaForRequestBodyMultipartFormData( def __new__( cls, *args: typing.Union[dict, frozendict, ], - file: file, additionalMetadata: typing.Union[additionalMetadata, Unset] = unset, _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Type[Schema], @@ -92,7 +90,6 @@ class SchemaForRequestBodyMultipartFormData( return super().__new__( cls, *args, - file=file, additionalMetadata=additionalMetadata, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py index fb1375c1b8a614922e10e1eae12c4d88e6fed9b5..689f54addd2a51099cf131e58d2d35dda82c8adb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py @@ -101,7 +101,6 @@ class SchemaForRequestBodyMultipartFormData( DictSchema ): _required_property_names = set(( - 'requiredFile', )) additionalMetadata = StrSchema requiredFile = BinarySchema @@ -110,7 +109,6 @@ class SchemaForRequestBodyMultipartFormData( def __new__( cls, *args: typing.Union[dict, frozendict, ], - requiredFile: requiredFile, additionalMetadata: typing.Union[additionalMetadata, Unset] = unset, _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Type[Schema], @@ -118,7 +116,6 @@ class SchemaForRequestBodyMultipartFormData( return super().__new__( cls, *args, - requiredFile=requiredFile, additionalMetadata=additionalMetadata, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py index 20bb010ae19be459562d145f7d1210809c83766d..70cce044b135472d9d633260bb44dc6a4f33626e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py @@ -108,7 +108,6 @@ class SchemaForRequestBodyMultipartFormData( cls, *args: typing.Union[dict, frozendict, ], additionalMetadata: typing.Union[additionalMetadata, Unset] = unset, - file: typing.Union[file, Unset] = unset, _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Type[Schema], ) -> 'SchemaForRequestBodyMultipartFormData': @@ -116,7 +115,6 @@ class SchemaForRequestBodyMultipartFormData( cls, *args, additionalMetadata=additionalMetadata, - file=file, _configuration=_configuration, **kwargs, ) diff --git a/samples/server/petstore/haskell-servant/lib/OpenAPIPetstore/Types.hs b/samples/server/petstore/haskell-servant/lib/OpenAPIPetstore/Types.hs index 9a4bfb851ec94dda989472860ba4444bfad10b05..7c19368f7c23f85b10a8a468133785b6b2663f90 100644 --- a/samples/server/petstore/haskell-servant/lib/OpenAPIPetstore/Types.hs +++ b/samples/server/petstore/haskell-servant/lib/OpenAPIPetstore/Types.hs @@ -193,7 +193,6 @@ removeFieldLabelPrefix forParsing prefix = , ("<=", "'Less_Than_Or_Equal_To") , (">=", "'Greater_Than_Or_Equal_To") , ("!=", "'Not_Equal") - , ("<>", "'Not_Equal") , ("~=", "'Tilde_Equal") , ("\\", "'Back_Slash") , ("\"", "'Double_Quote") diff --git a/samples/server/petstore/haskell-yesod/src/OpenAPIPetstore/Types.hs b/samples/server/petstore/haskell-yesod/src/OpenAPIPetstore/Types.hs index 5e9b72c8facf8f857e86909317469210f50e51a7..7057e0e55dacd472cb4d23eaf27b59bd1da1087d 100644 --- a/samples/server/petstore/haskell-yesod/src/OpenAPIPetstore/Types.hs +++ b/samples/server/petstore/haskell-yesod/src/OpenAPIPetstore/Types.hs @@ -163,7 +163,6 @@ removeFieldLabelPrefix forParsing prefix = , ("<=", "'Less_Than_Or_Equal_To") , (">=", "'Greater_Than_Or_Equal_To") , ("!=", "'Not_Equal") - , ("<>", "'Not_Equal") , ("~=", "'Tilde_Equal") , ("\\", "'Back_Slash") , ("\"", "'Double_Quote")