From 78b3f7b713f0b8874269842224318e63ff1d1e9c Mon Sep 17 00:00:00 2001 From: Morten Jansrud Date: Tue, 16 Jul 2024 14:48:18 +0200 Subject: [PATCH 01/21] feat: add scope for oauth2 --- .../src/main/resources/csharp/ApiClient.mustache | 1 + .../src/main/resources/csharp/Configuration.mustache | 7 +++++++ .../resources/csharp/IReadableConfiguration.mustache | 6 ++++++ .../csharp/auth/OAuthAuthenticator.mustache | 11 +++++++++++ .../Client/Auth/OAuthAuthenticator.cs | 10 ++++++++++ .../src/Org.OpenAPITools/Client/Configuration.cs | 6 ++++++ .../Client/Auth/OAuthAuthenticator.cs | 10 ++++++++++ .../src/Org.OpenAPITools/Client/Configuration.cs | 6 ++++++ .../Client/Auth/OAuthAuthenticator.cs | 10 ++++++++++ .../src/Org.OpenAPITools/Client/Configuration.cs | 6 ++++++ .../Client/Auth/OAuthAuthenticator.cs | 12 +++++++++++- .../src/Org.OpenAPITools/Client/Configuration.cs | 6 ++++++ .../Client/Auth/OAuthAuthenticator.cs | 10 ++++++++++ .../src/Org.OpenAPITools/Client/Configuration.cs | 6 ++++++ .../Client/Auth/OAuthAuthenticator.cs | 10 ++++++++++ .../src/Org.OpenAPITools/Client/Configuration.cs | 6 ++++++ .../Client/Auth/OAuthAuthenticator.cs | 10 ++++++++++ .../src/Org.OpenAPITools/Client/Configuration.cs | 6 ++++++ 18 files changed, 138 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache b/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache index eb5be40d3ae2..0d826c87c9d0 100644 --- a/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache @@ -474,6 +474,7 @@ namespace {{packageName}}.Client configuration.OAuthTokenUrl, configuration.OAuthClientId, configuration.OAuthClientSecret, + configuration.OAuthScope, configuration.OAuthFlow, SerializerSettings, configuration); diff --git a/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache b/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache index a765ebf138d1..937aa247a122 100644 --- a/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache @@ -366,6 +366,12 @@ namespace {{packageName}}.Client /// The OAuth Client Secret. public virtual string OAuthClientSecret { get; set; } + /// + /// Gets or sets the client scope for OAuth2 authentication. + /// + /// The OAuth Client Scope. + public virtual string OAuthScope { get; set; } + /// /// Gets or sets the flow for OAuth2 authentication. /// @@ -711,6 +717,7 @@ namespace {{packageName}}.Client OAuthTokenUrl = second.OAuthTokenUrl ?? first.OAuthTokenUrl, OAuthClientId = second.OAuthClientId ?? first.OAuthClientId, OAuthClientSecret = second.OAuthClientSecret ?? first.OAuthClientSecret, + OAuthScope = second.OAuthScope ?? first.OAuthScope, OAuthFlow = second.OAuthFlow ?? first.OAuthFlow, {{/hasOAuthMethods}} {{/useRestSharp}} diff --git a/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache b/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache index 78c998b34585..d0c03240e061 100644 --- a/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache @@ -43,6 +43,12 @@ namespace {{packageName}}.Client /// OAuth Client Secret. string OAuthClientSecret { get; } + /// + /// Gets the OAuth token scope. + /// + /// OAuth Token scope. + string OAuthScope { get; } + /// /// Gets the OAuth flow. /// diff --git a/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache b/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache index ae8f3c753915..4086ff2d9584 100644 --- a/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache @@ -16,6 +16,7 @@ namespace {{packageName}}.Client.Auth readonly string _tokenUrl; readonly string _clientId; readonly string _clientSecret; + readonly string _scope; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -27,6 +28,7 @@ namespace {{packageName}}.Client.Auth string tokenUrl, string clientId, string clientSecret, + string scope, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -34,6 +36,7 @@ namespace {{packageName}}.Client.Auth _tokenUrl = tokenUrl; _clientId = clientId; _clientSecret = clientSecret; + _scope = scope; _serializerSettings = serializerSettings; _configuration = configuration; @@ -80,6 +83,14 @@ namespace {{packageName}}.Client.Auth .AddParameter("grant_type", _grantType) .AddParameter("client_id", _clientId) .AddParameter("client_secret", _clientSecret); + + if (_scope != null) + { + request.AddParameter("scope", _scope); + } + + request.AlwaysMultipartFormData = true; + var response = await client.PostAsync(request).ConfigureAwait(false); // RFC6749 - token_type is case insensitive. diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index b0da60f1df68..de165eeeaecf 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -24,6 +24,7 @@ public class OAuthAuthenticator : AuthenticatorBase readonly string _tokenUrl; readonly string _clientId; readonly string _clientSecret; + readonly string _scope; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -35,6 +36,7 @@ public OAuthAuthenticator( string tokenUrl, string clientId, string clientSecret, + string scope, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -88,6 +90,14 @@ async Task GetToken() .AddParameter("grant_type", _grantType) .AddParameter("client_id", _clientId) .AddParameter("client_secret", _clientSecret); + + if (_scope != null) + { + request.AddParameter("scope", _scope); + } + + request.AlwaysMultipartFormData = true; + var response = await client.PostAsync(request).ConfigureAwait(false); // RFC6749 - token_type is case insensitive. diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Configuration.cs index b79f1a1a38c5..9551180660f7 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Configuration.cs @@ -294,6 +294,12 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// The OAuth Client Secret. public virtual string OAuthClientSecret { get; set; } + /// + /// Gets or sets the client scope for OAuth2 authentication. + /// + /// The OAuth Client Scope. + public virtual string OAuthScope { get; set; } + /// /// Gets or sets the flow for OAuth2 authentication. /// diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index f900e716ae8d..6df0c8ea1b8a 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -24,6 +24,7 @@ public class OAuthAuthenticator : AuthenticatorBase readonly string _tokenUrl; readonly string _clientId; readonly string _clientSecret; + readonly string _scope; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -35,6 +36,7 @@ public OAuthAuthenticator( string tokenUrl, string clientId, string clientSecret, + string scope, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -88,6 +90,14 @@ async Task GetToken() .AddParameter("grant_type", _grantType) .AddParameter("client_id", _clientId) .AddParameter("client_secret", _clientSecret); + + if (_scope != null) + { + request.AddParameter("scope", _scope); + } + + request.AlwaysMultipartFormData = true; + var response = await client.PostAsync(request).ConfigureAwait(false); // RFC6749 - token_type is case insensitive. diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs index f27abb3d78be..4b916f90dc03 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs @@ -399,6 +399,12 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// The OAuth Client Secret. public virtual string OAuthClientSecret { get; set; } + /// + /// Gets or sets the client scope for OAuth2 authentication. + /// + /// The OAuth Client Scope. + public virtual string OAuthScope { get; set; } + /// /// Gets or sets the flow for OAuth2 authentication. /// diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index f900e716ae8d..6df0c8ea1b8a 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -24,6 +24,7 @@ public class OAuthAuthenticator : AuthenticatorBase readonly string _tokenUrl; readonly string _clientId; readonly string _clientSecret; + readonly string _scope; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -35,6 +36,7 @@ public OAuthAuthenticator( string tokenUrl, string clientId, string clientSecret, + string scope, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -88,6 +90,14 @@ async Task GetToken() .AddParameter("grant_type", _grantType) .AddParameter("client_id", _clientId) .AddParameter("client_secret", _clientSecret); + + if (_scope != null) + { + request.AddParameter("scope", _scope); + } + + request.AlwaysMultipartFormData = true; + var response = await client.PostAsync(request).ConfigureAwait(false); // RFC6749 - token_type is case insensitive. diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Configuration.cs index f27abb3d78be..4b916f90dc03 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Configuration.cs @@ -399,6 +399,12 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// The OAuth Client Secret. public virtual string OAuthClientSecret { get; set; } + /// + /// Gets or sets the client scope for OAuth2 authentication. + /// + /// The OAuth Client Scope. + public virtual string OAuthScope { get; set; } + /// /// Gets or sets the flow for OAuth2 authentication. /// diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index f900e716ae8d..da598a3c5235 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -24,6 +24,7 @@ public class OAuthAuthenticator : AuthenticatorBase readonly string _tokenUrl; readonly string _clientId; readonly string _clientSecret; + readonly string _scope; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -35,6 +36,7 @@ public OAuthAuthenticator( string tokenUrl, string clientId, string clientSecret, + string scope, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -88,8 +90,16 @@ async Task GetToken() .AddParameter("grant_type", _grantType) .AddParameter("client_id", _clientId) .AddParameter("client_secret", _clientSecret); + + if (_scope != null) + { + request.AddParameter("scope", _scope); + } + + request.AlwaysMultipartFormData = true; + var response = await client.PostAsync(request).ConfigureAwait(false); - + // RFC6749 - token_type is case insensitive. // RFC6750 - In Authorization header Bearer should be capitalized. // Fix the capitalization irrespective of token_type casing. diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Configuration.cs index f27abb3d78be..4b916f90dc03 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Configuration.cs @@ -399,6 +399,12 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// The OAuth Client Secret. public virtual string OAuthClientSecret { get; set; } + /// + /// Gets or sets the client scope for OAuth2 authentication. + /// + /// The OAuth Client Scope. + public virtual string OAuthScope { get; set; } + /// /// Gets or sets the flow for OAuth2 authentication. /// diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index f900e716ae8d..6df0c8ea1b8a 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -24,6 +24,7 @@ public class OAuthAuthenticator : AuthenticatorBase readonly string _tokenUrl; readonly string _clientId; readonly string _clientSecret; + readonly string _scope; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -35,6 +36,7 @@ public OAuthAuthenticator( string tokenUrl, string clientId, string clientSecret, + string scope, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -88,6 +90,14 @@ async Task GetToken() .AddParameter("grant_type", _grantType) .AddParameter("client_id", _clientId) .AddParameter("client_secret", _clientSecret); + + if (_scope != null) + { + request.AddParameter("scope", _scope); + } + + request.AlwaysMultipartFormData = true; + var response = await client.PostAsync(request).ConfigureAwait(false); // RFC6749 - token_type is case insensitive. diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs index f27abb3d78be..4b916f90dc03 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs @@ -399,6 +399,12 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// The OAuth Client Secret. public virtual string OAuthClientSecret { get; set; } + /// + /// Gets or sets the client scope for OAuth2 authentication. + /// + /// The OAuth Client Scope. + public virtual string OAuthScope { get; set; } + /// /// Gets or sets the flow for OAuth2 authentication. /// diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index f900e716ae8d..6df0c8ea1b8a 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -24,6 +24,7 @@ public class OAuthAuthenticator : AuthenticatorBase readonly string _tokenUrl; readonly string _clientId; readonly string _clientSecret; + readonly string _scope; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -35,6 +36,7 @@ public OAuthAuthenticator( string tokenUrl, string clientId, string clientSecret, + string scope, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -88,6 +90,14 @@ async Task GetToken() .AddParameter("grant_type", _grantType) .AddParameter("client_id", _clientId) .AddParameter("client_secret", _clientSecret); + + if (_scope != null) + { + request.AddParameter("scope", _scope); + } + + request.AlwaysMultipartFormData = true; + var response = await client.PostAsync(request).ConfigureAwait(false); // RFC6749 - token_type is case insensitive. diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs index 672bff291b88..f339a99cee7b 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs @@ -394,6 +394,12 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// The OAuth Client Secret. public virtual string OAuthClientSecret { get; set; } + /// + /// Gets or sets the client scope for OAuth2 authentication. + /// + /// The OAuth Client Scope. + public virtual string OAuthScope { get; set; } + /// /// Gets or sets the flow for OAuth2 authentication. /// diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index f900e716ae8d..6df0c8ea1b8a 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -24,6 +24,7 @@ public class OAuthAuthenticator : AuthenticatorBase readonly string _tokenUrl; readonly string _clientId; readonly string _clientSecret; + readonly string _scope; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -35,6 +36,7 @@ public OAuthAuthenticator( string tokenUrl, string clientId, string clientSecret, + string scope, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -88,6 +90,14 @@ async Task GetToken() .AddParameter("grant_type", _grantType) .AddParameter("client_id", _clientId) .AddParameter("client_secret", _clientSecret); + + if (_scope != null) + { + request.AddParameter("scope", _scope); + } + + request.AlwaysMultipartFormData = true; + var response = await client.PostAsync(request).ConfigureAwait(false); // RFC6749 - token_type is case insensitive. diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Configuration.cs index 672bff291b88..f339a99cee7b 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Configuration.cs @@ -394,6 +394,12 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// The OAuth Client Secret. public virtual string OAuthClientSecret { get; set; } + /// + /// Gets or sets the client scope for OAuth2 authentication. + /// + /// The OAuth Client Scope. + public virtual string OAuthScope { get; set; } + /// /// Gets or sets the flow for OAuth2 authentication. /// From e64153bf95e278457fadf22fedd4d4c5960b404e Mon Sep 17 00:00:00 2001 From: Morten Jansrud Date: Tue, 16 Jul 2024 15:37:28 +0200 Subject: [PATCH 02/21] fix: add parameter AlwaysMultipartFormData --- .../src/main/resources/csharp/ApiClient.mustache | 1 + .../main/resources/csharp/Configuration.mustache | 7 +++++++ .../csharp/IReadableConfiguration.mustache | 6 ++++++ .../csharp/auth/OAuthAuthenticator.mustache | 12 +++++++++--- .../src/Org.OpenAPITools/Client/ApiClient.cs | 2 ++ .../Client/Auth/OAuthAuthenticator.cs | 11 ++++++++--- .../src/Org.OpenAPITools/Client/Configuration.cs | 8 ++++++++ .../Client/IReadableConfiguration.cs | 12 ++++++++++++ .../src/Org.OpenAPITools/Client/ApiClient.cs | 2 ++ .../Client/Auth/OAuthAuthenticator.cs | 13 ++++++++++--- .../src/Org.OpenAPITools/Client/Configuration.cs | 8 ++++++++ .../Client/IReadableConfiguration.cs | 12 ++++++++++++ .../src/Org.OpenAPITools/Client/ApiClient.cs | 2 ++ .../Client/Auth/OAuthAuthenticator.cs | 13 ++++++++++--- .../src/Org.OpenAPITools/Client/Configuration.cs | 8 ++++++++ .../Client/IReadableConfiguration.cs | 12 ++++++++++++ .../src/Org.OpenAPITools/Client/ApiClient.cs | 2 ++ .../Client/Auth/OAuthAuthenticator.cs | 13 ++++++++++--- .../src/Org.OpenAPITools/Client/Configuration.cs | 8 ++++++++ .../Client/IReadableConfiguration.cs | 12 ++++++++++++ .../src/Org.OpenAPITools/Client/ApiClient.cs | 2 ++ .../Client/Auth/OAuthAuthenticator.cs | 13 ++++++++++--- .../src/Org.OpenAPITools/Client/Configuration.cs | 8 ++++++++ .../Client/IReadableConfiguration.cs | 12 ++++++++++++ .../src/Org.OpenAPITools/Client/ApiClient.cs | 2 ++ .../Client/Auth/OAuthAuthenticator.cs | 13 ++++++++++--- .../src/Org.OpenAPITools/Client/Configuration.cs | 8 ++++++++ .../Client/IReadableConfiguration.cs | 12 ++++++++++++ .../src/Org.OpenAPITools/Client/ApiClient.cs | 2 ++ .../Client/Auth/OAuthAuthenticator.cs | 13 ++++++++++--- .../src/Org.OpenAPITools/Client/Configuration.cs | 8 ++++++++ .../Client/IReadableConfiguration.cs | 12 ++++++++++++ 32 files changed, 245 insertions(+), 24 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache b/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache index 0d826c87c9d0..2a4e1f2fc452 100644 --- a/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache @@ -475,6 +475,7 @@ namespace {{packageName}}.Client configuration.OAuthClientId, configuration.OAuthClientSecret, configuration.OAuthScope, + configuration.OAuthMultipartFormData, configuration.OAuthFlow, SerializerSettings, configuration); diff --git a/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache b/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache index 937aa247a122..1c1adf6065c4 100644 --- a/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache @@ -372,6 +372,12 @@ namespace {{packageName}}.Client /// The OAuth Client Scope. public virtual string OAuthScope { get; set; } + /// + /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. + /// + /// Send OAuth request as MultipartFormData. + public virtual bool OAuthMultipartFormData { get; set; } + /// /// Gets or sets the flow for OAuth2 authentication. /// @@ -718,6 +724,7 @@ namespace {{packageName}}.Client OAuthClientId = second.OAuthClientId ?? first.OAuthClientId, OAuthClientSecret = second.OAuthClientSecret ?? first.OAuthClientSecret, OAuthScope = second.OAuthScope ?? first.OAuthScope, + OAuthMultipartFormData = second.OAuthMultipartFormData ?? first.OAuthMultipartFormData, OAuthFlow = second.OAuthFlow ?? first.OAuthFlow, {{/hasOAuthMethods}} {{/useRestSharp}} diff --git a/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache b/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache index d0c03240e061..49087346dc9d 100644 --- a/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache @@ -49,6 +49,12 @@ namespace {{packageName}}.Client /// OAuth Token scope. string OAuthScope { get; } + /// + /// Gets OAuthMultipartFormData. + /// + /// Send OAuth request as MultipartFormData. + string OAuthMultipartFormData { get; } + /// /// Gets the OAuth flow. /// diff --git a/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache b/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache index 4086ff2d9584..7912b6749a57 100644 --- a/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache @@ -16,7 +16,8 @@ namespace {{packageName}}.Client.Auth readonly string _tokenUrl; readonly string _clientId; readonly string _clientSecret; - readonly string _scope; + readonly string? _scope; + readonly bool? _multipartFormData; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -28,7 +29,8 @@ namespace {{packageName}}.Client.Auth string tokenUrl, string clientId, string clientSecret, - string scope, + string? scope, + bool? multipartFormData, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -37,6 +39,7 @@ namespace {{packageName}}.Client.Auth _clientId = clientId; _clientSecret = clientSecret; _scope = scope; + _multipartFormData = multipartFormData; _serializerSettings = serializerSettings; _configuration = configuration; @@ -89,7 +92,10 @@ namespace {{packageName}}.Client.Auth request.AddParameter("scope", _scope); } - request.AlwaysMultipartFormData = true; + if (_multipartFormData) + { + request.AlwaysMultipartFormData = true; + } var response = await client.PostAsync(request).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/ApiClient.cs index 7f9fc8d8a175..d5df7e77938a 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/ApiClient.cs @@ -474,6 +474,8 @@ private ApiResponse ExecClient(Func> getRespon configuration.OAuthTokenUrl, configuration.OAuthClientId, configuration.OAuthClientSecret, + configuration.OAuthScope, + configuration.OAuthMultipartFormData, configuration.OAuthFlow, SerializerSettings, configuration); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index de165eeeaecf..1047d7e42016 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -24,7 +24,8 @@ public class OAuthAuthenticator : AuthenticatorBase readonly string _tokenUrl; readonly string _clientId; readonly string _clientSecret; - readonly string _scope; + readonly string? _scope; + readonly bool? _multipartFormData; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -36,7 +37,8 @@ public OAuthAuthenticator( string tokenUrl, string clientId, string clientSecret, - string scope, + string? scope, + bool? multipartFormData, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -96,7 +98,10 @@ async Task GetToken() request.AddParameter("scope", _scope); } - request.AlwaysMultipartFormData = true; + if (_multipartFormData) + { + request.AlwaysMultipartFormData = true; + } var response = await client.PostAsync(request).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Configuration.cs index 9551180660f7..68363f5be965 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Configuration.cs @@ -300,6 +300,12 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// The OAuth Client Scope. public virtual string OAuthScope { get; set; } + /// + /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. + /// + /// Send OAuth request as MultipartFormData. + public virtual bool OAuthMultipartFormData { get; set; } + /// /// Gets or sets the flow for OAuth2 authentication. /// @@ -628,6 +634,8 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration OAuthTokenUrl = second.OAuthTokenUrl ?? first.OAuthTokenUrl, OAuthClientId = second.OAuthClientId ?? first.OAuthClientId, OAuthClientSecret = second.OAuthClientSecret ?? first.OAuthClientSecret, + OAuthScope = second.OAuthScope ?? first.OAuthScope, + OAuthMultipartFormData = second.OAuthMultipartFormData ?? first.OAuthMultipartFormData, OAuthFlow = second.OAuthFlow ?? first.OAuthFlow, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index cc6fc6c592ca..7068a98a4ec1 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -46,6 +46,18 @@ public interface IReadableConfiguration /// OAuth Client Secret. string OAuthClientSecret { get; } + /// + /// Gets the OAuth token scope. + /// + /// OAuth Token scope. + string OAuthScope { get; } + + /// + /// Gets OAuthMultipartFormData. + /// + /// Send OAuth request as MultipartFormData. + string OAuthMultipartFormData { get; } + /// /// Gets the OAuth flow. /// diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs index 0ad9a7e2d52c..59fd6d5a2bf2 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs @@ -474,6 +474,8 @@ private ApiResponse ExecClient(Func> getRespon configuration.OAuthTokenUrl, configuration.OAuthClientId, configuration.OAuthClientSecret, + configuration.OAuthScope, + configuration.OAuthMultipartFormData, configuration.OAuthFlow, SerializerSettings, configuration); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index 6df0c8ea1b8a..cd76871d1094 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -24,7 +24,8 @@ public class OAuthAuthenticator : AuthenticatorBase readonly string _tokenUrl; readonly string _clientId; readonly string _clientSecret; - readonly string _scope; + readonly string? _scope; + readonly bool? _multipartFormData; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -36,7 +37,8 @@ public OAuthAuthenticator( string tokenUrl, string clientId, string clientSecret, - string scope, + string? scope, + bool? multipartFormData, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -44,6 +46,8 @@ public OAuthAuthenticator( _tokenUrl = tokenUrl; _clientId = clientId; _clientSecret = clientSecret; + _scope = scope; + _multipartFormData = multipartFormData; _serializerSettings = serializerSettings; _configuration = configuration; @@ -96,7 +100,10 @@ async Task GetToken() request.AddParameter("scope", _scope); } - request.AlwaysMultipartFormData = true; + if (_multipartFormData) + { + request.AlwaysMultipartFormData = true; + } var response = await client.PostAsync(request).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs index 4b916f90dc03..28172b15799e 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs @@ -405,6 +405,12 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// The OAuth Client Scope. public virtual string OAuthScope { get; set; } + /// + /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. + /// + /// Send OAuth request as MultipartFormData. + public virtual bool OAuthMultipartFormData { get; set; } + /// /// Gets or sets the flow for OAuth2 authentication. /// @@ -742,6 +748,8 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration OAuthTokenUrl = second.OAuthTokenUrl ?? first.OAuthTokenUrl, OAuthClientId = second.OAuthClientId ?? first.OAuthClientId, OAuthClientSecret = second.OAuthClientSecret ?? first.OAuthClientSecret, + OAuthScope = second.OAuthScope ?? first.OAuthScope, + OAuthMultipartFormData = second.OAuthMultipartFormData ?? first.OAuthMultipartFormData, OAuthFlow = second.OAuthFlow ?? first.OAuthFlow, HttpSigningConfiguration = second.HttpSigningConfiguration ?? first.HttpSigningConfiguration, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 90ec4a6f1937..dc2cd5a77146 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -46,6 +46,18 @@ public interface IReadableConfiguration /// OAuth Client Secret. string OAuthClientSecret { get; } + /// + /// Gets the OAuth token scope. + /// + /// OAuth Token scope. + string OAuthScope { get; } + + /// + /// Gets OAuthMultipartFormData. + /// + /// Send OAuth request as MultipartFormData. + string OAuthMultipartFormData { get; } + /// /// Gets the OAuth flow. /// diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs index 0ad9a7e2d52c..59fd6d5a2bf2 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs @@ -474,6 +474,8 @@ private ApiResponse ExecClient(Func> getRespon configuration.OAuthTokenUrl, configuration.OAuthClientId, configuration.OAuthClientSecret, + configuration.OAuthScope, + configuration.OAuthMultipartFormData, configuration.OAuthFlow, SerializerSettings, configuration); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index 6df0c8ea1b8a..cd76871d1094 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -24,7 +24,8 @@ public class OAuthAuthenticator : AuthenticatorBase readonly string _tokenUrl; readonly string _clientId; readonly string _clientSecret; - readonly string _scope; + readonly string? _scope; + readonly bool? _multipartFormData; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -36,7 +37,8 @@ public OAuthAuthenticator( string tokenUrl, string clientId, string clientSecret, - string scope, + string? scope, + bool? multipartFormData, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -44,6 +46,8 @@ public OAuthAuthenticator( _tokenUrl = tokenUrl; _clientId = clientId; _clientSecret = clientSecret; + _scope = scope; + _multipartFormData = multipartFormData; _serializerSettings = serializerSettings; _configuration = configuration; @@ -96,7 +100,10 @@ async Task GetToken() request.AddParameter("scope", _scope); } - request.AlwaysMultipartFormData = true; + if (_multipartFormData) + { + request.AlwaysMultipartFormData = true; + } var response = await client.PostAsync(request).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Configuration.cs index 4b916f90dc03..28172b15799e 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Configuration.cs @@ -405,6 +405,12 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// The OAuth Client Scope. public virtual string OAuthScope { get; set; } + /// + /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. + /// + /// Send OAuth request as MultipartFormData. + public virtual bool OAuthMultipartFormData { get; set; } + /// /// Gets or sets the flow for OAuth2 authentication. /// @@ -742,6 +748,8 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration OAuthTokenUrl = second.OAuthTokenUrl ?? first.OAuthTokenUrl, OAuthClientId = second.OAuthClientId ?? first.OAuthClientId, OAuthClientSecret = second.OAuthClientSecret ?? first.OAuthClientSecret, + OAuthScope = second.OAuthScope ?? first.OAuthScope, + OAuthMultipartFormData = second.OAuthMultipartFormData ?? first.OAuthMultipartFormData, OAuthFlow = second.OAuthFlow ?? first.OAuthFlow, HttpSigningConfiguration = second.HttpSigningConfiguration ?? first.HttpSigningConfiguration, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 90ec4a6f1937..dc2cd5a77146 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -46,6 +46,18 @@ public interface IReadableConfiguration /// OAuth Client Secret. string OAuthClientSecret { get; } + /// + /// Gets the OAuth token scope. + /// + /// OAuth Token scope. + string OAuthScope { get; } + + /// + /// Gets OAuthMultipartFormData. + /// + /// Send OAuth request as MultipartFormData. + string OAuthMultipartFormData { get; } + /// /// Gets the OAuth flow. /// diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/ApiClient.cs index 69279ed569c7..417a63a3410c 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/ApiClient.cs @@ -473,6 +473,8 @@ private ApiResponse ExecClient(Func> getRespon configuration.OAuthTokenUrl, configuration.OAuthClientId, configuration.OAuthClientSecret, + configuration.OAuthScope, + configuration.OAuthMultipartFormData, configuration.OAuthFlow, SerializerSettings, configuration); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index da598a3c5235..cccd8c11691e 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -24,7 +24,8 @@ public class OAuthAuthenticator : AuthenticatorBase readonly string _tokenUrl; readonly string _clientId; readonly string _clientSecret; - readonly string _scope; + readonly string? _scope; + readonly bool? _multipartFormData; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -36,7 +37,8 @@ public OAuthAuthenticator( string tokenUrl, string clientId, string clientSecret, - string scope, + string? scope, + bool? multipartFormData, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -44,6 +46,8 @@ public OAuthAuthenticator( _tokenUrl = tokenUrl; _clientId = clientId; _clientSecret = clientSecret; + _scope = scope; + _multipartFormData = multipartFormData; _serializerSettings = serializerSettings; _configuration = configuration; @@ -96,7 +100,10 @@ async Task GetToken() request.AddParameter("scope", _scope); } - request.AlwaysMultipartFormData = true; + if (_multipartFormData) + { + request.AlwaysMultipartFormData = true; + } var response = await client.PostAsync(request).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Configuration.cs index 4b916f90dc03..28172b15799e 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Configuration.cs @@ -405,6 +405,12 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// The OAuth Client Scope. public virtual string OAuthScope { get; set; } + /// + /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. + /// + /// Send OAuth request as MultipartFormData. + public virtual bool OAuthMultipartFormData { get; set; } + /// /// Gets or sets the flow for OAuth2 authentication. /// @@ -742,6 +748,8 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration OAuthTokenUrl = second.OAuthTokenUrl ?? first.OAuthTokenUrl, OAuthClientId = second.OAuthClientId ?? first.OAuthClientId, OAuthClientSecret = second.OAuthClientSecret ?? first.OAuthClientSecret, + OAuthScope = second.OAuthScope ?? first.OAuthScope, + OAuthMultipartFormData = second.OAuthMultipartFormData ?? first.OAuthMultipartFormData, OAuthFlow = second.OAuthFlow ?? first.OAuthFlow, HttpSigningConfiguration = second.HttpSigningConfiguration ?? first.HttpSigningConfiguration, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 90ec4a6f1937..dc2cd5a77146 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -46,6 +46,18 @@ public interface IReadableConfiguration /// OAuth Client Secret. string OAuthClientSecret { get; } + /// + /// Gets the OAuth token scope. + /// + /// OAuth Token scope. + string OAuthScope { get; } + + /// + /// Gets OAuthMultipartFormData. + /// + /// Send OAuth request as MultipartFormData. + string OAuthMultipartFormData { get; } + /// /// Gets the OAuth flow. /// diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs index 69279ed569c7..417a63a3410c 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs @@ -473,6 +473,8 @@ private ApiResponse ExecClient(Func> getRespon configuration.OAuthTokenUrl, configuration.OAuthClientId, configuration.OAuthClientSecret, + configuration.OAuthScope, + configuration.OAuthMultipartFormData, configuration.OAuthFlow, SerializerSettings, configuration); diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index 6df0c8ea1b8a..cd76871d1094 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -24,7 +24,8 @@ public class OAuthAuthenticator : AuthenticatorBase readonly string _tokenUrl; readonly string _clientId; readonly string _clientSecret; - readonly string _scope; + readonly string? _scope; + readonly bool? _multipartFormData; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -36,7 +37,8 @@ public OAuthAuthenticator( string tokenUrl, string clientId, string clientSecret, - string scope, + string? scope, + bool? multipartFormData, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -44,6 +46,8 @@ public OAuthAuthenticator( _tokenUrl = tokenUrl; _clientId = clientId; _clientSecret = clientSecret; + _scope = scope; + _multipartFormData = multipartFormData; _serializerSettings = serializerSettings; _configuration = configuration; @@ -96,7 +100,10 @@ async Task GetToken() request.AddParameter("scope", _scope); } - request.AlwaysMultipartFormData = true; + if (_multipartFormData) + { + request.AlwaysMultipartFormData = true; + } var response = await client.PostAsync(request).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs index 4b916f90dc03..28172b15799e 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs @@ -405,6 +405,12 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// The OAuth Client Scope. public virtual string OAuthScope { get; set; } + /// + /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. + /// + /// Send OAuth request as MultipartFormData. + public virtual bool OAuthMultipartFormData { get; set; } + /// /// Gets or sets the flow for OAuth2 authentication. /// @@ -742,6 +748,8 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration OAuthTokenUrl = second.OAuthTokenUrl ?? first.OAuthTokenUrl, OAuthClientId = second.OAuthClientId ?? first.OAuthClientId, OAuthClientSecret = second.OAuthClientSecret ?? first.OAuthClientSecret, + OAuthScope = second.OAuthScope ?? first.OAuthScope, + OAuthMultipartFormData = second.OAuthMultipartFormData ?? first.OAuthMultipartFormData, OAuthFlow = second.OAuthFlow ?? first.OAuthFlow, HttpSigningConfiguration = second.HttpSigningConfiguration ?? first.HttpSigningConfiguration, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 90ec4a6f1937..dc2cd5a77146 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -46,6 +46,18 @@ public interface IReadableConfiguration /// OAuth Client Secret. string OAuthClientSecret { get; } + /// + /// Gets the OAuth token scope. + /// + /// OAuth Token scope. + string OAuthScope { get; } + + /// + /// Gets OAuthMultipartFormData. + /// + /// Send OAuth request as MultipartFormData. + string OAuthMultipartFormData { get; } + /// /// Gets the OAuth flow. /// diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/ApiClient.cs index 0ad9a7e2d52c..59fd6d5a2bf2 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/ApiClient.cs @@ -474,6 +474,8 @@ private ApiResponse ExecClient(Func> getRespon configuration.OAuthTokenUrl, configuration.OAuthClientId, configuration.OAuthClientSecret, + configuration.OAuthScope, + configuration.OAuthMultipartFormData, configuration.OAuthFlow, SerializerSettings, configuration); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index 6df0c8ea1b8a..cd76871d1094 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -24,7 +24,8 @@ public class OAuthAuthenticator : AuthenticatorBase readonly string _tokenUrl; readonly string _clientId; readonly string _clientSecret; - readonly string _scope; + readonly string? _scope; + readonly bool? _multipartFormData; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -36,7 +37,8 @@ public OAuthAuthenticator( string tokenUrl, string clientId, string clientSecret, - string scope, + string? scope, + bool? multipartFormData, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -44,6 +46,8 @@ public OAuthAuthenticator( _tokenUrl = tokenUrl; _clientId = clientId; _clientSecret = clientSecret; + _scope = scope; + _multipartFormData = multipartFormData; _serializerSettings = serializerSettings; _configuration = configuration; @@ -96,7 +100,10 @@ async Task GetToken() request.AddParameter("scope", _scope); } - request.AlwaysMultipartFormData = true; + if (_multipartFormData) + { + request.AlwaysMultipartFormData = true; + } var response = await client.PostAsync(request).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs index f339a99cee7b..d9b40219f6ed 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs @@ -400,6 +400,12 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// The OAuth Client Scope. public virtual string OAuthScope { get; set; } + /// + /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. + /// + /// Send OAuth request as MultipartFormData. + public virtual bool OAuthMultipartFormData { get; set; } + /// /// Gets or sets the flow for OAuth2 authentication. /// @@ -737,6 +743,8 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration OAuthTokenUrl = second.OAuthTokenUrl ?? first.OAuthTokenUrl, OAuthClientId = second.OAuthClientId ?? first.OAuthClientId, OAuthClientSecret = second.OAuthClientSecret ?? first.OAuthClientSecret, + OAuthScope = second.OAuthScope ?? first.OAuthScope, + OAuthMultipartFormData = second.OAuthMultipartFormData ?? first.OAuthMultipartFormData, OAuthFlow = second.OAuthFlow ?? first.OAuthFlow, HttpSigningConfiguration = second.HttpSigningConfiguration ?? first.HttpSigningConfiguration, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 90ec4a6f1937..dc2cd5a77146 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -46,6 +46,18 @@ public interface IReadableConfiguration /// OAuth Client Secret. string OAuthClientSecret { get; } + /// + /// Gets the OAuth token scope. + /// + /// OAuth Token scope. + string OAuthScope { get; } + + /// + /// Gets OAuthMultipartFormData. + /// + /// Send OAuth request as MultipartFormData. + string OAuthMultipartFormData { get; } + /// /// Gets the OAuth flow. /// diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs index 0ad9a7e2d52c..59fd6d5a2bf2 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs @@ -474,6 +474,8 @@ private ApiResponse ExecClient(Func> getRespon configuration.OAuthTokenUrl, configuration.OAuthClientId, configuration.OAuthClientSecret, + configuration.OAuthScope, + configuration.OAuthMultipartFormData, configuration.OAuthFlow, SerializerSettings, configuration); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index 6df0c8ea1b8a..cd76871d1094 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -24,7 +24,8 @@ public class OAuthAuthenticator : AuthenticatorBase readonly string _tokenUrl; readonly string _clientId; readonly string _clientSecret; - readonly string _scope; + readonly string? _scope; + readonly bool? _multipartFormData; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -36,7 +37,8 @@ public OAuthAuthenticator( string tokenUrl, string clientId, string clientSecret, - string scope, + string? scope, + bool? multipartFormData, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -44,6 +46,8 @@ public OAuthAuthenticator( _tokenUrl = tokenUrl; _clientId = clientId; _clientSecret = clientSecret; + _scope = scope; + _multipartFormData = multipartFormData; _serializerSettings = serializerSettings; _configuration = configuration; @@ -96,7 +100,10 @@ async Task GetToken() request.AddParameter("scope", _scope); } - request.AlwaysMultipartFormData = true; + if (_multipartFormData) + { + request.AlwaysMultipartFormData = true; + } var response = await client.PostAsync(request).ConfigureAwait(false); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Configuration.cs index f339a99cee7b..d9b40219f6ed 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Configuration.cs @@ -400,6 +400,12 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// The OAuth Client Scope. public virtual string OAuthScope { get; set; } + /// + /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. + /// + /// Send OAuth request as MultipartFormData. + public virtual bool OAuthMultipartFormData { get; set; } + /// /// Gets or sets the flow for OAuth2 authentication. /// @@ -737,6 +743,8 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration OAuthTokenUrl = second.OAuthTokenUrl ?? first.OAuthTokenUrl, OAuthClientId = second.OAuthClientId ?? first.OAuthClientId, OAuthClientSecret = second.OAuthClientSecret ?? first.OAuthClientSecret, + OAuthScope = second.OAuthScope ?? first.OAuthScope, + OAuthMultipartFormData = second.OAuthMultipartFormData ?? first.OAuthMultipartFormData, OAuthFlow = second.OAuthFlow ?? first.OAuthFlow, HttpSigningConfiguration = second.HttpSigningConfiguration ?? first.HttpSigningConfiguration, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 90ec4a6f1937..dc2cd5a77146 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -46,6 +46,18 @@ public interface IReadableConfiguration /// OAuth Client Secret. string OAuthClientSecret { get; } + /// + /// Gets the OAuth token scope. + /// + /// OAuth Token scope. + string OAuthScope { get; } + + /// + /// Gets OAuthMultipartFormData. + /// + /// Send OAuth request as MultipartFormData. + string OAuthMultipartFormData { get; } + /// /// Gets the OAuth flow. /// From a9c2fe9089b076bb879a87aab02e176cc78e178b Mon Sep 17 00:00:00 2001 From: Morten Jansrud Date: Tue, 16 Jul 2024 15:51:47 +0200 Subject: [PATCH 03/21] fix: string to boolean --- .../src/main/resources/csharp/IReadableConfiguration.mustache | 4 ++-- .../src/Org.OpenAPITools/Client/IReadableConfiguration.cs | 4 ++-- .../src/Org.OpenAPITools/Client/IReadableConfiguration.cs | 4 ++-- .../src/Org.OpenAPITools/Client/IReadableConfiguration.cs | 4 ++-- .../src/Org.OpenAPITools/Client/IReadableConfiguration.cs | 4 ++-- .../src/Org.OpenAPITools/Client/IReadableConfiguration.cs | 4 ++-- .../src/Org.OpenAPITools/Client/IReadableConfiguration.cs | 4 ++-- .../src/Org.OpenAPITools/Client/IReadableConfiguration.cs | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache b/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache index 49087346dc9d..6e1785e27d3e 100644 --- a/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache @@ -50,10 +50,10 @@ namespace {{packageName}}.Client string OAuthScope { get; } /// - /// Gets OAuthMultipartFormData. + /// Gets OAuthMultipartFormData value. /// /// Send OAuth request as MultipartFormData. - string OAuthMultipartFormData { get; } + bool? OAuthMultipartFormData { get; } /// /// Gets the OAuth flow. diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 7068a98a4ec1..8b09c74097fc 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -53,10 +53,10 @@ public interface IReadableConfiguration string OAuthScope { get; } /// - /// Gets OAuthMultipartFormData. + /// Gets OAuthMultipartFormData value. /// /// Send OAuth request as MultipartFormData. - string OAuthMultipartFormData { get; } + bool? OAuthMultipartFormData { get; } /// /// Gets the OAuth flow. diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index dc2cd5a77146..08c477ccadc8 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -53,10 +53,10 @@ public interface IReadableConfiguration string OAuthScope { get; } /// - /// Gets OAuthMultipartFormData. + /// Gets OAuthMultipartFormData value. /// /// Send OAuth request as MultipartFormData. - string OAuthMultipartFormData { get; } + bool? OAuthMultipartFormData { get; } /// /// Gets the OAuth flow. diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index dc2cd5a77146..08c477ccadc8 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -53,10 +53,10 @@ public interface IReadableConfiguration string OAuthScope { get; } /// - /// Gets OAuthMultipartFormData. + /// Gets OAuthMultipartFormData value. /// /// Send OAuth request as MultipartFormData. - string OAuthMultipartFormData { get; } + bool? OAuthMultipartFormData { get; } /// /// Gets the OAuth flow. diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index dc2cd5a77146..08c477ccadc8 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -53,10 +53,10 @@ public interface IReadableConfiguration string OAuthScope { get; } /// - /// Gets OAuthMultipartFormData. + /// Gets OAuthMultipartFormData value. /// /// Send OAuth request as MultipartFormData. - string OAuthMultipartFormData { get; } + bool? OAuthMultipartFormData { get; } /// /// Gets the OAuth flow. diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index dc2cd5a77146..08c477ccadc8 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -53,10 +53,10 @@ public interface IReadableConfiguration string OAuthScope { get; } /// - /// Gets OAuthMultipartFormData. + /// Gets OAuthMultipartFormData value. /// /// Send OAuth request as MultipartFormData. - string OAuthMultipartFormData { get; } + bool? OAuthMultipartFormData { get; } /// /// Gets the OAuth flow. diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index dc2cd5a77146..08c477ccadc8 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -53,10 +53,10 @@ public interface IReadableConfiguration string OAuthScope { get; } /// - /// Gets OAuthMultipartFormData. + /// Gets OAuthMultipartFormData value. /// /// Send OAuth request as MultipartFormData. - string OAuthMultipartFormData { get; } + bool? OAuthMultipartFormData { get; } /// /// Gets the OAuth flow. diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index dc2cd5a77146..08c477ccadc8 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -53,10 +53,10 @@ public interface IReadableConfiguration string OAuthScope { get; } /// - /// Gets OAuthMultipartFormData. + /// Gets OAuthMultipartFormData value. /// /// Send OAuth request as MultipartFormData. - string OAuthMultipartFormData { get; } + bool? OAuthMultipartFormData { get; } /// /// Gets the OAuth flow. From c2eab568ea7472b7a98913826f55d559e7e4aad6 Mon Sep 17 00:00:00 2001 From: Morten Jansrud Date: Tue, 16 Jul 2024 16:03:59 +0200 Subject: [PATCH 04/21] fix: optional bool --- .../src/main/resources/csharp/Configuration.mustache | 2 +- .../src/Org.OpenAPITools/Client/Configuration.cs | 2 +- .../Petstore/src/Org.OpenAPITools/Client/Configuration.cs | 2 +- .../Petstore/src/Org.OpenAPITools/Client/Configuration.cs | 2 +- .../EnumMappings/src/Org.OpenAPITools/Client/Configuration.cs | 2 +- .../net7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs | 2 +- .../src/Org.OpenAPITools/Client/Configuration.cs | 2 +- .../Petstore/src/Org.OpenAPITools/Client/Configuration.cs | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache b/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache index 1c1adf6065c4..6c5d7526269c 100644 --- a/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache @@ -376,7 +376,7 @@ namespace {{packageName}}.Client /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. /// /// Send OAuth request as MultipartFormData. - public virtual bool OAuthMultipartFormData { get; set; } + public virtual bool? OAuthMultipartFormData { get; set; } /// /// Gets or sets the flow for OAuth2 authentication. diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Configuration.cs index 68363f5be965..a71501b679ac 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Configuration.cs @@ -304,7 +304,7 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. /// /// Send OAuth request as MultipartFormData. - public virtual bool OAuthMultipartFormData { get; set; } + public virtual bool? OAuthMultipartFormData { get; set; } /// /// Gets or sets the flow for OAuth2 authentication. diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs index 28172b15799e..9097c1c8f0a8 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs @@ -409,7 +409,7 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. /// /// Send OAuth request as MultipartFormData. - public virtual bool OAuthMultipartFormData { get; set; } + public virtual bool? OAuthMultipartFormData { get; set; } /// /// Gets or sets the flow for OAuth2 authentication. diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Configuration.cs index 28172b15799e..9097c1c8f0a8 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Configuration.cs @@ -409,7 +409,7 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. /// /// Send OAuth request as MultipartFormData. - public virtual bool OAuthMultipartFormData { get; set; } + public virtual bool? OAuthMultipartFormData { get; set; } /// /// Gets or sets the flow for OAuth2 authentication. diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Configuration.cs index 28172b15799e..9097c1c8f0a8 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Configuration.cs @@ -409,7 +409,7 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. /// /// Send OAuth request as MultipartFormData. - public virtual bool OAuthMultipartFormData { get; set; } + public virtual bool? OAuthMultipartFormData { get; set; } /// /// Gets or sets the flow for OAuth2 authentication. diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs index 28172b15799e..9097c1c8f0a8 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs @@ -409,7 +409,7 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. /// /// Send OAuth request as MultipartFormData. - public virtual bool OAuthMultipartFormData { get; set; } + public virtual bool? OAuthMultipartFormData { get; set; } /// /// Gets or sets the flow for OAuth2 authentication. diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs index d9b40219f6ed..4306c6af611c 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs @@ -404,7 +404,7 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. /// /// Send OAuth request as MultipartFormData. - public virtual bool OAuthMultipartFormData { get; set; } + public virtual bool? OAuthMultipartFormData { get; set; } /// /// Gets or sets the flow for OAuth2 authentication. diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Configuration.cs index d9b40219f6ed..4306c6af611c 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Configuration.cs @@ -404,7 +404,7 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. /// /// Send OAuth request as MultipartFormData. - public virtual bool OAuthMultipartFormData { get; set; } + public virtual bool? OAuthMultipartFormData { get; set; } /// /// Gets or sets the flow for OAuth2 authentication. From babbf905cc4bf93610ea0a9d54c546071367c41a Mon Sep 17 00:00:00 2001 From: Morten Jansrud Date: Tue, 16 Jul 2024 16:17:50 +0200 Subject: [PATCH 05/21] fix: null checks --- .../src/main/resources/csharp/auth/OAuthAuthenticator.mustache | 2 +- .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 2 +- .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 2 +- .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 2 +- .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 2 +- .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 2 +- .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 2 +- .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache b/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache index 7912b6749a57..83dc13b38e58 100644 --- a/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache @@ -92,7 +92,7 @@ namespace {{packageName}}.Client.Auth request.AddParameter("scope", _scope); } - if (_multipartFormData) + if (_multipartFormData == true) { request.AlwaysMultipartFormData = true; } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index 1047d7e42016..2e1e22475086 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -98,7 +98,7 @@ async Task GetToken() request.AddParameter("scope", _scope); } - if (_multipartFormData) + if (_multipartFormData == true) { request.AlwaysMultipartFormData = true; } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index cd76871d1094..4051ad6a7d71 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -100,7 +100,7 @@ async Task GetToken() request.AddParameter("scope", _scope); } - if (_multipartFormData) + if (_multipartFormData == true) { request.AlwaysMultipartFormData = true; } diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index cd76871d1094..4051ad6a7d71 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -100,7 +100,7 @@ async Task GetToken() request.AddParameter("scope", _scope); } - if (_multipartFormData) + if (_multipartFormData == true) { request.AlwaysMultipartFormData = true; } diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index cccd8c11691e..a34e74940892 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -100,7 +100,7 @@ async Task GetToken() request.AddParameter("scope", _scope); } - if (_multipartFormData) + if (_multipartFormData == true) { request.AlwaysMultipartFormData = true; } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index cd76871d1094..4051ad6a7d71 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -100,7 +100,7 @@ async Task GetToken() request.AddParameter("scope", _scope); } - if (_multipartFormData) + if (_multipartFormData == true) { request.AlwaysMultipartFormData = true; } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index cd76871d1094..4051ad6a7d71 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -100,7 +100,7 @@ async Task GetToken() request.AddParameter("scope", _scope); } - if (_multipartFormData) + if (_multipartFormData == true) { request.AlwaysMultipartFormData = true; } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index cd76871d1094..4051ad6a7d71 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -100,7 +100,7 @@ async Task GetToken() request.AddParameter("scope", _scope); } - if (_multipartFormData) + if (_multipartFormData == true) { request.AlwaysMultipartFormData = true; } From a1276468879954b16aaf7ffb6aaf1a90dc470f76 Mon Sep 17 00:00:00 2001 From: Morten Jansrud Date: Tue, 16 Jul 2024 16:24:18 +0200 Subject: [PATCH 06/21] Optional string --- .../src/main/resources/csharp/Configuration.mustache | 2 +- .../src/main/resources/csharp/IReadableConfiguration.mustache | 2 +- .../src/Org.OpenAPITools/Client/Configuration.cs | 2 +- .../src/Org.OpenAPITools/Client/IReadableConfiguration.cs | 2 +- .../Petstore/src/Org.OpenAPITools/Client/Configuration.cs | 2 +- .../src/Org.OpenAPITools/Client/IReadableConfiguration.cs | 2 +- .../Petstore/src/Org.OpenAPITools/Client/Configuration.cs | 2 +- .../src/Org.OpenAPITools/Client/IReadableConfiguration.cs | 2 +- .../EnumMappings/src/Org.OpenAPITools/Client/Configuration.cs | 2 +- .../src/Org.OpenAPITools/Client/IReadableConfiguration.cs | 2 +- .../net7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs | 2 +- .../src/Org.OpenAPITools/Client/IReadableConfiguration.cs | 2 +- .../src/Org.OpenAPITools/Client/Configuration.cs | 2 +- .../src/Org.OpenAPITools/Client/IReadableConfiguration.cs | 2 +- .../Petstore/src/Org.OpenAPITools/Client/Configuration.cs | 2 +- .../src/Org.OpenAPITools/Client/IReadableConfiguration.cs | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache b/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache index 6c5d7526269c..fcd4ddc13c0d 100644 --- a/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache @@ -370,7 +370,7 @@ namespace {{packageName}}.Client /// Gets or sets the client scope for OAuth2 authentication. /// /// The OAuth Client Scope. - public virtual string OAuthScope { get; set; } + public virtual string? OAuthScope { get; set; } /// /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. diff --git a/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache b/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache index 6e1785e27d3e..d005782328cd 100644 --- a/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache @@ -47,7 +47,7 @@ namespace {{packageName}}.Client /// Gets the OAuth token scope. /// /// OAuth Token scope. - string OAuthScope { get; } + string? OAuthScope { get; } /// /// Gets OAuthMultipartFormData value. diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Configuration.cs index a71501b679ac..2845d3972d8a 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Configuration.cs @@ -298,7 +298,7 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// Gets or sets the client scope for OAuth2 authentication. /// /// The OAuth Client Scope. - public virtual string OAuthScope { get; set; } + public virtual string? OAuthScope { get; set; } /// /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 8b09c74097fc..c89d6d36d543 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -50,7 +50,7 @@ public interface IReadableConfiguration /// Gets the OAuth token scope. /// /// OAuth Token scope. - string OAuthScope { get; } + string? OAuthScope { get; } /// /// Gets OAuthMultipartFormData value. diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs index 9097c1c8f0a8..e12cceea4903 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs @@ -403,7 +403,7 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// Gets or sets the client scope for OAuth2 authentication. /// /// The OAuth Client Scope. - public virtual string OAuthScope { get; set; } + public virtual string? OAuthScope { get; set; } /// /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 08c477ccadc8..07025f52b03a 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -50,7 +50,7 @@ public interface IReadableConfiguration /// Gets the OAuth token scope. /// /// OAuth Token scope. - string OAuthScope { get; } + string? OAuthScope { get; } /// /// Gets OAuthMultipartFormData value. diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Configuration.cs index 9097c1c8f0a8..e12cceea4903 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Configuration.cs @@ -403,7 +403,7 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// Gets or sets the client scope for OAuth2 authentication. /// /// The OAuth Client Scope. - public virtual string OAuthScope { get; set; } + public virtual string? OAuthScope { get; set; } /// /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 08c477ccadc8..07025f52b03a 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -50,7 +50,7 @@ public interface IReadableConfiguration /// Gets the OAuth token scope. /// /// OAuth Token scope. - string OAuthScope { get; } + string? OAuthScope { get; } /// /// Gets OAuthMultipartFormData value. diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Configuration.cs index 9097c1c8f0a8..e12cceea4903 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Configuration.cs @@ -403,7 +403,7 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// Gets or sets the client scope for OAuth2 authentication. /// /// The OAuth Client Scope. - public virtual string OAuthScope { get; set; } + public virtual string? OAuthScope { get; set; } /// /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 08c477ccadc8..07025f52b03a 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -50,7 +50,7 @@ public interface IReadableConfiguration /// Gets the OAuth token scope. /// /// OAuth Token scope. - string OAuthScope { get; } + string? OAuthScope { get; } /// /// Gets OAuthMultipartFormData value. diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs index 9097c1c8f0a8..e12cceea4903 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs @@ -403,7 +403,7 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// Gets or sets the client scope for OAuth2 authentication. /// /// The OAuth Client Scope. - public virtual string OAuthScope { get; set; } + public virtual string? OAuthScope { get; set; } /// /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 08c477ccadc8..07025f52b03a 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -50,7 +50,7 @@ public interface IReadableConfiguration /// Gets the OAuth token scope. /// /// OAuth Token scope. - string OAuthScope { get; } + string? OAuthScope { get; } /// /// Gets OAuthMultipartFormData value. diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs index 4306c6af611c..a01444b41b21 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs @@ -398,7 +398,7 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// Gets or sets the client scope for OAuth2 authentication. /// /// The OAuth Client Scope. - public virtual string OAuthScope { get; set; } + public virtual string? OAuthScope { get; set; } /// /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 08c477ccadc8..07025f52b03a 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -50,7 +50,7 @@ public interface IReadableConfiguration /// Gets the OAuth token scope. /// /// OAuth Token scope. - string OAuthScope { get; } + string? OAuthScope { get; } /// /// Gets OAuthMultipartFormData value. diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Configuration.cs index 4306c6af611c..a01444b41b21 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Configuration.cs @@ -398,7 +398,7 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// Gets or sets the client scope for OAuth2 authentication. /// /// The OAuth Client Scope. - public virtual string OAuthScope { get; set; } + public virtual string? OAuthScope { get; set; } /// /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 08c477ccadc8..07025f52b03a 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -50,7 +50,7 @@ public interface IReadableConfiguration /// Gets the OAuth token scope. /// /// OAuth Token scope. - string OAuthScope { get; } + string? OAuthScope { get; } /// /// Gets OAuthMultipartFormData value. From bcc94f9f2f26df63767edeb88b81bfd5b42aefbf Mon Sep 17 00:00:00 2001 From: Morten Jansrud Date: Tue, 16 Jul 2024 16:42:18 +0200 Subject: [PATCH 07/21] Remove all references to OAuthMultipartFormData --- .../src/main/resources/csharp/ApiClient.mustache | 1 - .../src/main/resources/csharp/Configuration.mustache | 7 ------- .../main/resources/csharp/IReadableConfiguration.mustache | 6 ------ .../main/resources/csharp/auth/OAuthAuthenticator.mustache | 7 ------- .../src/Org.OpenAPITools/Client/ApiClient.cs | 1 - .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 7 ------- .../src/Org.OpenAPITools/Client/Configuration.cs | 7 ------- .../src/Org.OpenAPITools/Client/IReadableConfiguration.cs | 6 ------ .../Petstore/src/Org.OpenAPITools/Client/ApiClient.cs | 1 - .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 7 ------- .../Petstore/src/Org.OpenAPITools/Client/Configuration.cs | 7 ------- .../src/Org.OpenAPITools/Client/IReadableConfiguration.cs | 6 ------ .../Petstore/src/Org.OpenAPITools/Client/ApiClient.cs | 1 - .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 7 ------- .../Petstore/src/Org.OpenAPITools/Client/Configuration.cs | 7 ------- .../src/Org.OpenAPITools/Client/IReadableConfiguration.cs | 6 ------ .../EnumMappings/src/Org.OpenAPITools/Client/ApiClient.cs | 1 - .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 7 ------- .../src/Org.OpenAPITools/Client/Configuration.cs | 7 ------- .../src/Org.OpenAPITools/Client/IReadableConfiguration.cs | 6 ------ .../net7/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs | 1 - .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 7 ------- .../Petstore/src/Org.OpenAPITools/Client/Configuration.cs | 7 ------- .../src/Org.OpenAPITools/Client/IReadableConfiguration.cs | 6 ------ .../src/Org.OpenAPITools/Client/ApiClient.cs | 1 - .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 7 ------- .../src/Org.OpenAPITools/Client/Configuration.cs | 7 ------- .../src/Org.OpenAPITools/Client/IReadableConfiguration.cs | 6 ------ .../Petstore/src/Org.OpenAPITools/Client/ApiClient.cs | 1 - .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 7 ------- .../Petstore/src/Org.OpenAPITools/Client/Configuration.cs | 7 ------- .../src/Org.OpenAPITools/Client/IReadableConfiguration.cs | 6 ------ 32 files changed, 168 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache b/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache index 2a4e1f2fc452..0d826c87c9d0 100644 --- a/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache @@ -475,7 +475,6 @@ namespace {{packageName}}.Client configuration.OAuthClientId, configuration.OAuthClientSecret, configuration.OAuthScope, - configuration.OAuthMultipartFormData, configuration.OAuthFlow, SerializerSettings, configuration); diff --git a/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache b/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache index fcd4ddc13c0d..6b934af5f0de 100644 --- a/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache @@ -372,12 +372,6 @@ namespace {{packageName}}.Client /// The OAuth Client Scope. public virtual string? OAuthScope { get; set; } - /// - /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. - /// - /// Send OAuth request as MultipartFormData. - public virtual bool? OAuthMultipartFormData { get; set; } - /// /// Gets or sets the flow for OAuth2 authentication. /// @@ -724,7 +718,6 @@ namespace {{packageName}}.Client OAuthClientId = second.OAuthClientId ?? first.OAuthClientId, OAuthClientSecret = second.OAuthClientSecret ?? first.OAuthClientSecret, OAuthScope = second.OAuthScope ?? first.OAuthScope, - OAuthMultipartFormData = second.OAuthMultipartFormData ?? first.OAuthMultipartFormData, OAuthFlow = second.OAuthFlow ?? first.OAuthFlow, {{/hasOAuthMethods}} {{/useRestSharp}} diff --git a/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache b/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache index d005782328cd..94db1ef06b78 100644 --- a/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache @@ -49,12 +49,6 @@ namespace {{packageName}}.Client /// OAuth Token scope. string? OAuthScope { get; } - /// - /// Gets OAuthMultipartFormData value. - /// - /// Send OAuth request as MultipartFormData. - bool? OAuthMultipartFormData { get; } - /// /// Gets the OAuth flow. /// diff --git a/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache b/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache index 83dc13b38e58..b4e5b6057b3b 100644 --- a/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache @@ -17,7 +17,6 @@ namespace {{packageName}}.Client.Auth readonly string _clientId; readonly string _clientSecret; readonly string? _scope; - readonly bool? _multipartFormData; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -30,7 +29,6 @@ namespace {{packageName}}.Client.Auth string clientId, string clientSecret, string? scope, - bool? multipartFormData, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -92,11 +90,6 @@ namespace {{packageName}}.Client.Auth request.AddParameter("scope", _scope); } - if (_multipartFormData == true) - { - request.AlwaysMultipartFormData = true; - } - var response = await client.PostAsync(request).ConfigureAwait(false); // RFC6749 - token_type is case insensitive. diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/ApiClient.cs index d5df7e77938a..7d3e7d96adf3 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/ApiClient.cs @@ -475,7 +475,6 @@ private ApiResponse ExecClient(Func> getRespon configuration.OAuthClientId, configuration.OAuthClientSecret, configuration.OAuthScope, - configuration.OAuthMultipartFormData, configuration.OAuthFlow, SerializerSettings, configuration); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index 2e1e22475086..e38cdb565be0 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -25,7 +25,6 @@ public class OAuthAuthenticator : AuthenticatorBase readonly string _clientId; readonly string _clientSecret; readonly string? _scope; - readonly bool? _multipartFormData; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -38,7 +37,6 @@ public OAuthAuthenticator( string clientId, string clientSecret, string? scope, - bool? multipartFormData, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -98,11 +96,6 @@ async Task GetToken() request.AddParameter("scope", _scope); } - if (_multipartFormData == true) - { - request.AlwaysMultipartFormData = true; - } - var response = await client.PostAsync(request).ConfigureAwait(false); // RFC6749 - token_type is case insensitive. diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Configuration.cs index 2845d3972d8a..6cdf335b5126 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Configuration.cs @@ -300,12 +300,6 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// The OAuth Client Scope. public virtual string? OAuthScope { get; set; } - /// - /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. - /// - /// Send OAuth request as MultipartFormData. - public virtual bool? OAuthMultipartFormData { get; set; } - /// /// Gets or sets the flow for OAuth2 authentication. /// @@ -635,7 +629,6 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration OAuthClientId = second.OAuthClientId ?? first.OAuthClientId, OAuthClientSecret = second.OAuthClientSecret ?? first.OAuthClientSecret, OAuthScope = second.OAuthScope ?? first.OAuthScope, - OAuthMultipartFormData = second.OAuthMultipartFormData ?? first.OAuthMultipartFormData, OAuthFlow = second.OAuthFlow ?? first.OAuthFlow, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index c89d6d36d543..d1a3cd4ef9f4 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -52,12 +52,6 @@ public interface IReadableConfiguration /// OAuth Token scope. string? OAuthScope { get; } - /// - /// Gets OAuthMultipartFormData value. - /// - /// Send OAuth request as MultipartFormData. - bool? OAuthMultipartFormData { get; } - /// /// Gets the OAuth flow. /// diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs index 59fd6d5a2bf2..a55d7f34afc6 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs @@ -475,7 +475,6 @@ private ApiResponse ExecClient(Func> getRespon configuration.OAuthClientId, configuration.OAuthClientSecret, configuration.OAuthScope, - configuration.OAuthMultipartFormData, configuration.OAuthFlow, SerializerSettings, configuration); diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index 4051ad6a7d71..e476e5d43482 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -25,7 +25,6 @@ public class OAuthAuthenticator : AuthenticatorBase readonly string _clientId; readonly string _clientSecret; readonly string? _scope; - readonly bool? _multipartFormData; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -38,7 +37,6 @@ public OAuthAuthenticator( string clientId, string clientSecret, string? scope, - bool? multipartFormData, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -100,11 +98,6 @@ async Task GetToken() request.AddParameter("scope", _scope); } - if (_multipartFormData == true) - { - request.AlwaysMultipartFormData = true; - } - var response = await client.PostAsync(request).ConfigureAwait(false); // RFC6749 - token_type is case insensitive. diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs index e12cceea4903..ee437ae11e5d 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs @@ -405,12 +405,6 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// The OAuth Client Scope. public virtual string? OAuthScope { get; set; } - /// - /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. - /// - /// Send OAuth request as MultipartFormData. - public virtual bool? OAuthMultipartFormData { get; set; } - /// /// Gets or sets the flow for OAuth2 authentication. /// @@ -749,7 +743,6 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration OAuthClientId = second.OAuthClientId ?? first.OAuthClientId, OAuthClientSecret = second.OAuthClientSecret ?? first.OAuthClientSecret, OAuthScope = second.OAuthScope ?? first.OAuthScope, - OAuthMultipartFormData = second.OAuthMultipartFormData ?? first.OAuthMultipartFormData, OAuthFlow = second.OAuthFlow ?? first.OAuthFlow, HttpSigningConfiguration = second.HttpSigningConfiguration ?? first.HttpSigningConfiguration, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 07025f52b03a..986123acb8c6 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -52,12 +52,6 @@ public interface IReadableConfiguration /// OAuth Token scope. string? OAuthScope { get; } - /// - /// Gets OAuthMultipartFormData value. - /// - /// Send OAuth request as MultipartFormData. - bool? OAuthMultipartFormData { get; } - /// /// Gets the OAuth flow. /// diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs index 59fd6d5a2bf2..a55d7f34afc6 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs @@ -475,7 +475,6 @@ private ApiResponse ExecClient(Func> getRespon configuration.OAuthClientId, configuration.OAuthClientSecret, configuration.OAuthScope, - configuration.OAuthMultipartFormData, configuration.OAuthFlow, SerializerSettings, configuration); diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index 4051ad6a7d71..e476e5d43482 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -25,7 +25,6 @@ public class OAuthAuthenticator : AuthenticatorBase readonly string _clientId; readonly string _clientSecret; readonly string? _scope; - readonly bool? _multipartFormData; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -38,7 +37,6 @@ public OAuthAuthenticator( string clientId, string clientSecret, string? scope, - bool? multipartFormData, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -100,11 +98,6 @@ async Task GetToken() request.AddParameter("scope", _scope); } - if (_multipartFormData == true) - { - request.AlwaysMultipartFormData = true; - } - var response = await client.PostAsync(request).ConfigureAwait(false); // RFC6749 - token_type is case insensitive. diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Configuration.cs index e12cceea4903..ee437ae11e5d 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Configuration.cs @@ -405,12 +405,6 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// The OAuth Client Scope. public virtual string? OAuthScope { get; set; } - /// - /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. - /// - /// Send OAuth request as MultipartFormData. - public virtual bool? OAuthMultipartFormData { get; set; } - /// /// Gets or sets the flow for OAuth2 authentication. /// @@ -749,7 +743,6 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration OAuthClientId = second.OAuthClientId ?? first.OAuthClientId, OAuthClientSecret = second.OAuthClientSecret ?? first.OAuthClientSecret, OAuthScope = second.OAuthScope ?? first.OAuthScope, - OAuthMultipartFormData = second.OAuthMultipartFormData ?? first.OAuthMultipartFormData, OAuthFlow = second.OAuthFlow ?? first.OAuthFlow, HttpSigningConfiguration = second.HttpSigningConfiguration ?? first.HttpSigningConfiguration, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 07025f52b03a..986123acb8c6 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -52,12 +52,6 @@ public interface IReadableConfiguration /// OAuth Token scope. string? OAuthScope { get; } - /// - /// Gets OAuthMultipartFormData value. - /// - /// Send OAuth request as MultipartFormData. - bool? OAuthMultipartFormData { get; } - /// /// Gets the OAuth flow. /// diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/ApiClient.cs index 417a63a3410c..05e2ddb4de86 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/ApiClient.cs @@ -474,7 +474,6 @@ private ApiResponse ExecClient(Func> getRespon configuration.OAuthClientId, configuration.OAuthClientSecret, configuration.OAuthScope, - configuration.OAuthMultipartFormData, configuration.OAuthFlow, SerializerSettings, configuration); diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index a34e74940892..8aac2e3dad8f 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -25,7 +25,6 @@ public class OAuthAuthenticator : AuthenticatorBase readonly string _clientId; readonly string _clientSecret; readonly string? _scope; - readonly bool? _multipartFormData; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -38,7 +37,6 @@ public OAuthAuthenticator( string clientId, string clientSecret, string? scope, - bool? multipartFormData, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -100,11 +98,6 @@ async Task GetToken() request.AddParameter("scope", _scope); } - if (_multipartFormData == true) - { - request.AlwaysMultipartFormData = true; - } - var response = await client.PostAsync(request).ConfigureAwait(false); // RFC6749 - token_type is case insensitive. diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Configuration.cs index e12cceea4903..ee437ae11e5d 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Configuration.cs @@ -405,12 +405,6 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// The OAuth Client Scope. public virtual string? OAuthScope { get; set; } - /// - /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. - /// - /// Send OAuth request as MultipartFormData. - public virtual bool? OAuthMultipartFormData { get; set; } - /// /// Gets or sets the flow for OAuth2 authentication. /// @@ -749,7 +743,6 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration OAuthClientId = second.OAuthClientId ?? first.OAuthClientId, OAuthClientSecret = second.OAuthClientSecret ?? first.OAuthClientSecret, OAuthScope = second.OAuthScope ?? first.OAuthScope, - OAuthMultipartFormData = second.OAuthMultipartFormData ?? first.OAuthMultipartFormData, OAuthFlow = second.OAuthFlow ?? first.OAuthFlow, HttpSigningConfiguration = second.HttpSigningConfiguration ?? first.HttpSigningConfiguration, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 07025f52b03a..986123acb8c6 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -52,12 +52,6 @@ public interface IReadableConfiguration /// OAuth Token scope. string? OAuthScope { get; } - /// - /// Gets OAuthMultipartFormData value. - /// - /// Send OAuth request as MultipartFormData. - bool? OAuthMultipartFormData { get; } - /// /// Gets the OAuth flow. /// diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs index 417a63a3410c..05e2ddb4de86 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs @@ -474,7 +474,6 @@ private ApiResponse ExecClient(Func> getRespon configuration.OAuthClientId, configuration.OAuthClientSecret, configuration.OAuthScope, - configuration.OAuthMultipartFormData, configuration.OAuthFlow, SerializerSettings, configuration); diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index 4051ad6a7d71..e476e5d43482 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -25,7 +25,6 @@ public class OAuthAuthenticator : AuthenticatorBase readonly string _clientId; readonly string _clientSecret; readonly string? _scope; - readonly bool? _multipartFormData; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -38,7 +37,6 @@ public OAuthAuthenticator( string clientId, string clientSecret, string? scope, - bool? multipartFormData, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -100,11 +98,6 @@ async Task GetToken() request.AddParameter("scope", _scope); } - if (_multipartFormData == true) - { - request.AlwaysMultipartFormData = true; - } - var response = await client.PostAsync(request).ConfigureAwait(false); // RFC6749 - token_type is case insensitive. diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs index e12cceea4903..ee437ae11e5d 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Configuration.cs @@ -405,12 +405,6 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// The OAuth Client Scope. public virtual string? OAuthScope { get; set; } - /// - /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. - /// - /// Send OAuth request as MultipartFormData. - public virtual bool? OAuthMultipartFormData { get; set; } - /// /// Gets or sets the flow for OAuth2 authentication. /// @@ -749,7 +743,6 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration OAuthClientId = second.OAuthClientId ?? first.OAuthClientId, OAuthClientSecret = second.OAuthClientSecret ?? first.OAuthClientSecret, OAuthScope = second.OAuthScope ?? first.OAuthScope, - OAuthMultipartFormData = second.OAuthMultipartFormData ?? first.OAuthMultipartFormData, OAuthFlow = second.OAuthFlow ?? first.OAuthFlow, HttpSigningConfiguration = second.HttpSigningConfiguration ?? first.HttpSigningConfiguration, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 07025f52b03a..986123acb8c6 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -52,12 +52,6 @@ public interface IReadableConfiguration /// OAuth Token scope. string? OAuthScope { get; } - /// - /// Gets OAuthMultipartFormData value. - /// - /// Send OAuth request as MultipartFormData. - bool? OAuthMultipartFormData { get; } - /// /// Gets the OAuth flow. /// diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/ApiClient.cs index 59fd6d5a2bf2..a55d7f34afc6 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/ApiClient.cs @@ -475,7 +475,6 @@ private ApiResponse ExecClient(Func> getRespon configuration.OAuthClientId, configuration.OAuthClientSecret, configuration.OAuthScope, - configuration.OAuthMultipartFormData, configuration.OAuthFlow, SerializerSettings, configuration); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index 4051ad6a7d71..e476e5d43482 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -25,7 +25,6 @@ public class OAuthAuthenticator : AuthenticatorBase readonly string _clientId; readonly string _clientSecret; readonly string? _scope; - readonly bool? _multipartFormData; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -38,7 +37,6 @@ public OAuthAuthenticator( string clientId, string clientSecret, string? scope, - bool? multipartFormData, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -100,11 +98,6 @@ async Task GetToken() request.AddParameter("scope", _scope); } - if (_multipartFormData == true) - { - request.AlwaysMultipartFormData = true; - } - var response = await client.PostAsync(request).ConfigureAwait(false); // RFC6749 - token_type is case insensitive. diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs index a01444b41b21..57d2d494d1e0 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs @@ -400,12 +400,6 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// The OAuth Client Scope. public virtual string? OAuthScope { get; set; } - /// - /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. - /// - /// Send OAuth request as MultipartFormData. - public virtual bool? OAuthMultipartFormData { get; set; } - /// /// Gets or sets the flow for OAuth2 authentication. /// @@ -744,7 +738,6 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration OAuthClientId = second.OAuthClientId ?? first.OAuthClientId, OAuthClientSecret = second.OAuthClientSecret ?? first.OAuthClientSecret, OAuthScope = second.OAuthScope ?? first.OAuthScope, - OAuthMultipartFormData = second.OAuthMultipartFormData ?? first.OAuthMultipartFormData, OAuthFlow = second.OAuthFlow ?? first.OAuthFlow, HttpSigningConfiguration = second.HttpSigningConfiguration ?? first.HttpSigningConfiguration, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 07025f52b03a..986123acb8c6 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -52,12 +52,6 @@ public interface IReadableConfiguration /// OAuth Token scope. string? OAuthScope { get; } - /// - /// Gets OAuthMultipartFormData value. - /// - /// Send OAuth request as MultipartFormData. - bool? OAuthMultipartFormData { get; } - /// /// Gets the OAuth flow. /// diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs index 59fd6d5a2bf2..a55d7f34afc6 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs @@ -475,7 +475,6 @@ private ApiResponse ExecClient(Func> getRespon configuration.OAuthClientId, configuration.OAuthClientSecret, configuration.OAuthScope, - configuration.OAuthMultipartFormData, configuration.OAuthFlow, SerializerSettings, configuration); diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index 4051ad6a7d71..e476e5d43482 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -25,7 +25,6 @@ public class OAuthAuthenticator : AuthenticatorBase readonly string _clientId; readonly string _clientSecret; readonly string? _scope; - readonly bool? _multipartFormData; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -38,7 +37,6 @@ public OAuthAuthenticator( string clientId, string clientSecret, string? scope, - bool? multipartFormData, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -100,11 +98,6 @@ async Task GetToken() request.AddParameter("scope", _scope); } - if (_multipartFormData == true) - { - request.AlwaysMultipartFormData = true; - } - var response = await client.PostAsync(request).ConfigureAwait(false); // RFC6749 - token_type is case insensitive. diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Configuration.cs index a01444b41b21..57d2d494d1e0 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Configuration.cs @@ -400,12 +400,6 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// The OAuth Client Scope. public virtual string? OAuthScope { get; set; } - /// - /// Gets or sets OAuthMultipartFormData for OAuth2 authentication. - /// - /// Send OAuth request as MultipartFormData. - public virtual bool? OAuthMultipartFormData { get; set; } - /// /// Gets or sets the flow for OAuth2 authentication. /// @@ -744,7 +738,6 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration OAuthClientId = second.OAuthClientId ?? first.OAuthClientId, OAuthClientSecret = second.OAuthClientSecret ?? first.OAuthClientSecret, OAuthScope = second.OAuthScope ?? first.OAuthScope, - OAuthMultipartFormData = second.OAuthMultipartFormData ?? first.OAuthMultipartFormData, OAuthFlow = second.OAuthFlow ?? first.OAuthFlow, HttpSigningConfiguration = second.HttpSigningConfiguration ?? first.HttpSigningConfiguration, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 07025f52b03a..986123acb8c6 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -52,12 +52,6 @@ public interface IReadableConfiguration /// OAuth Token scope. string? OAuthScope { get; } - /// - /// Gets OAuthMultipartFormData value. - /// - /// Send OAuth request as MultipartFormData. - bool? OAuthMultipartFormData { get; } - /// /// Gets the OAuth flow. /// From 3fc87cee94f147d82c62e974dcfa72fe9d27961d Mon Sep 17 00:00:00 2001 From: Morten Jansrud Date: Tue, 16 Jul 2024 16:42:55 +0200 Subject: [PATCH 08/21] Remove _multipartFormData = multipartFormData; --- .../src/main/resources/csharp/auth/OAuthAuthenticator.mustache | 1 - .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 2 +- .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 1 - .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 1 - .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 1 - .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 1 - .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 1 - .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 1 - 8 files changed, 1 insertion(+), 8 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache b/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache index b4e5b6057b3b..ab5b1f432f71 100644 --- a/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache @@ -37,7 +37,6 @@ namespace {{packageName}}.Client.Auth _clientId = clientId; _clientSecret = clientSecret; _scope = scope; - _multipartFormData = multipartFormData; _serializerSettings = serializerSettings; _configuration = configuration; diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index e38cdb565be0..e9cc8a411eb8 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -20,7 +20,7 @@ namespace Org.OpenAPITools.Client.Auth /// An authenticator for OAuth2 authentication flows /// public class OAuthAuthenticator : AuthenticatorBase - { + {g readonly string _tokenUrl; readonly string _clientId; readonly string _clientSecret; diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index e476e5d43482..bcebd8c10482 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -45,7 +45,6 @@ public OAuthAuthenticator( _clientId = clientId; _clientSecret = clientSecret; _scope = scope; - _multipartFormData = multipartFormData; _serializerSettings = serializerSettings; _configuration = configuration; diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index e476e5d43482..bcebd8c10482 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -45,7 +45,6 @@ public OAuthAuthenticator( _clientId = clientId; _clientSecret = clientSecret; _scope = scope; - _multipartFormData = multipartFormData; _serializerSettings = serializerSettings; _configuration = configuration; diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index 8aac2e3dad8f..24a87bd34345 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -45,7 +45,6 @@ public OAuthAuthenticator( _clientId = clientId; _clientSecret = clientSecret; _scope = scope; - _multipartFormData = multipartFormData; _serializerSettings = serializerSettings; _configuration = configuration; diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index e476e5d43482..bcebd8c10482 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -45,7 +45,6 @@ public OAuthAuthenticator( _clientId = clientId; _clientSecret = clientSecret; _scope = scope; - _multipartFormData = multipartFormData; _serializerSettings = serializerSettings; _configuration = configuration; diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index e476e5d43482..bcebd8c10482 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -45,7 +45,6 @@ public OAuthAuthenticator( _clientId = clientId; _clientSecret = clientSecret; _scope = scope; - _multipartFormData = multipartFormData; _serializerSettings = serializerSettings; _configuration = configuration; diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index e476e5d43482..bcebd8c10482 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -45,7 +45,6 @@ public OAuthAuthenticator( _clientId = clientId; _clientSecret = clientSecret; _scope = scope; - _multipartFormData = multipartFormData; _serializerSettings = serializerSettings; _configuration = configuration; From 312742c25fc173880a93b452db0d2ec739c02d98 Mon Sep 17 00:00:00 2001 From: Morten Jansrud Date: Tue, 16 Jul 2024 16:44:54 +0200 Subject: [PATCH 09/21] Remove typo --- .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index e9cc8a411eb8..e38cdb565be0 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -20,7 +20,7 @@ namespace Org.OpenAPITools.Client.Auth /// An authenticator for OAuth2 authentication flows /// public class OAuthAuthenticator : AuthenticatorBase - {g + { readonly string _tokenUrl; readonly string _clientId; readonly string _clientSecret; From f051f268a564e6487626b0e0a9a5cebc6d198dc0 Mon Sep 17 00:00:00 2001 From: Morten Jansrud Date: Tue, 16 Jul 2024 19:44:01 +0200 Subject: [PATCH 10/21] Run generate-samples and export_docs_generators --- .../FormModels/.openapi-generator/FILES | 2 - .../net4.7/FormModels/api/openapi.yaml | 20 ++-- .../net4.7/FormModels/docs/models/EnumTest.md | 2 +- .../Org.OpenAPITools/Client/ClientUtils.cs | 2 - .../Client/HostConfiguration.cs | 2 - .../src/Org.OpenAPITools/Model/EnumTest.cs | 12 +-- .../Model/EnumTestEnumIntegerOnly.cs | 12 +-- ...iredClassRequiredNotnullableEnumInteger.cs | 12 +-- ...ClassRequiredNotnullableEnumIntegerOnly.cs | 12 +-- ...equiredClassRequiredNullableEnumInteger.cs | 12 +-- ...redClassRequiredNullableEnumIntegerOnly.cs | 12 +-- ...EnumParametersEnumQueryIntegerParameter.cs | 12 +-- .../net4.7/Petstore/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 24 ++--- .../Org.OpenAPITools/Model/RequiredClass.cs | 96 +++++++++---------- .../FormModels/.openapi-generator/FILES | 2 - .../net4.8/FormModels/api/openapi.yaml | 20 ++-- .../net4.8/FormModels/docs/models/EnumTest.md | 2 +- .../Org.OpenAPITools/Client/ClientUtils.cs | 2 - .../Client/HostConfiguration.cs | 2 - .../src/Org.OpenAPITools/Model/EnumTest.cs | 12 +-- .../Model/EnumTestEnumIntegerOnly.cs | 12 +-- ...iredClassRequiredNotnullableEnumInteger.cs | 12 +-- ...ClassRequiredNotnullableEnumIntegerOnly.cs | 12 +-- ...equiredClassRequiredNullableEnumInteger.cs | 12 +-- ...redClassRequiredNullableEnumIntegerOnly.cs | 12 +-- ...EnumParametersEnumQueryIntegerParameter.cs | 12 +-- .../net4.8/Petstore/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 24 ++--- .../Org.OpenAPITools/Model/RequiredClass.cs | 96 +++++++++---------- .../net8/FormModels/.openapi-generator/FILES | 2 - .../net8/FormModels/api/openapi.yaml | 20 ++-- .../net8/FormModels/docs/models/EnumTest.md | 2 +- .../Org.OpenAPITools/Client/ClientUtils.cs | 2 - .../Client/HostConfiguration.cs | 2 - .../src/Org.OpenAPITools/Model/EnumTest.cs | 12 +-- .../Model/EnumTestEnumIntegerOnly.cs | 12 +-- ...iredClassRequiredNotnullableEnumInteger.cs | 12 +-- ...ClassRequiredNotnullableEnumIntegerOnly.cs | 12 +-- ...equiredClassRequiredNullableEnumInteger.cs | 12 +-- ...redClassRequiredNullableEnumIntegerOnly.cs | 12 +-- ...EnumParametersEnumQueryIntegerParameter.cs | 12 +-- .../net8/NullReferenceTypes/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 24 ++--- .../Org.OpenAPITools/Model/RequiredClass.cs | 96 +++++++++---------- .../net8/Petstore/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 24 ++--- .../Org.OpenAPITools/Model/RequiredClass.cs | 96 +++++++++---------- .../net8/SourceGeneration/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 24 ++--- .../Org.OpenAPITools/Model/RequiredClass.cs | 96 +++++++++---------- .../standard2.0/Petstore/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 24 ++--- .../Org.OpenAPITools/Model/RequiredClass.cs | 96 +++++++++---------- .../standard2.0/Petstore/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 8 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 32 +++---- .../Client/Auth/OAuthAuthenticator.cs | 1 + .../net4.7/Petstore/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 8 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 32 +++---- .../net4.8/Petstore/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 8 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 32 +++---- .../net7/EnumMappings/api/openapi.yaml | 22 ++--- .../Client/Auth/OAuthAuthenticator.cs | 2 +- .../src/Org.OpenAPITools/Model/EnumTest.cs | 8 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 32 +++---- .../restsharp/net7/Petstore/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 8 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 32 +++---- .../ConditionalSerialization/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 8 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 32 +++---- .../standard2.0/Petstore/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 8 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 32 +++---- .../standard2.0/Petstore/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 8 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 32 +++---- .../petstore/go/go-petstore/api/openapi.yaml | 8 +- .../lib/OpenAPIPetstore/Model.hs | 36 +------ .../petstore/haskell-http-client/openapi.yaml | 10 +- .../haskell-http-client/tests/Instances.hs | 3 - .../v3/mp/docs/EnumTest.md | 2 +- .../java-helidon-client/v3/mp/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 2 +- .../v3/se/docs/EnumTest.md | 2 +- .../java-helidon-client/v3/se/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 2 +- .../v4/mp/docs/EnumTest.md | 2 +- .../java-helidon-client/v4/mp/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 2 +- .../docs/apis/FakeApi.md | 2 +- .../java/apache-httpclient/api/openapi.yaml | 4 +- .../java/apache-httpclient/docs/EnumTest.md | 2 +- .../java/apache-httpclient/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 2 +- .../java/feign-no-nullable/api/openapi.yaml | 8 +- .../petstore/java/feign/api/openapi.yaml | 4 +- .../openapitools/client/model/EnumTest.java | 2 +- .../java/google-api-client/api/openapi.yaml | 8 +- .../java/google-api-client/docs/FakeApi.md | 2 +- .../api/openapi.yaml | 8 +- .../docs/FakeApi.md | 2 +- .../java/jersey2-java8/api/openapi.yaml | 8 +- .../java/jersey2-java8/docs/FakeApi.md | 2 +- .../petstore/java/jersey3/api/openapi.yaml | 6 +- .../petstore/java/jersey3/docs/EnumTest.md | 4 +- .../petstore/java/jersey3/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 4 +- .../java/native-async/api/openapi.yaml | 6 +- .../java/native-async/docs/EnumTest.md | 4 +- .../java/native-async/docs/FakeApi.md | 4 +- .../openapitools/client/model/EnumTest.java | 4 +- .../petstore/java/native/api/openapi.yaml | 6 +- .../petstore/java/native/docs/EnumTest.md | 4 +- .../petstore/java/native/docs/FakeApi.md | 4 +- .../openapitools/client/model/EnumTest.java | 4 +- .../docs/FakeApi.md | 2 +- .../src/main/resources/openapi/openapi.yaml | 8 +- .../api/openapi.yaml | 8 +- .../docs/FakeApi.md | 2 +- .../java/okhttp-gson/api/openapi.yaml | 6 +- .../java/okhttp-gson/docs/EnumTest.md | 4 +- .../petstore/java/okhttp-gson/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 4 +- .../rest-assured-jackson/api/openapi.yaml | 8 +- .../java/rest-assured-jackson/docs/FakeApi.md | 2 +- .../java/rest-assured/api/openapi.yaml | 8 +- .../java/rest-assured/docs/FakeApi.md | 2 +- .../java/restclient-swagger2/api/openapi.yaml | 4 +- .../java/restclient-swagger2/docs/EnumTest.md | 2 +- .../java/restclient-swagger2/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 2 +- .../petstore/java/restclient/api/openapi.yaml | 4 +- .../petstore/java/restclient/docs/EnumTest.md | 2 +- .../petstore/java/restclient/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 2 +- .../petstore/java/resteasy/api/openapi.yaml | 4 +- .../petstore/java/resteasy/docs/EnumTest.md | 2 +- .../petstore/java/resteasy/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 2 +- .../resttemplate-withXml/api/openapi.yaml | 4 +- .../resttemplate-withXml/docs/EnumTest.md | 2 +- .../java/resttemplate-withXml/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 4 +- .../java/resttemplate/api/openapi.yaml | 4 +- .../java/resttemplate/docs/EnumTest.md | 2 +- .../java/resttemplate/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 2 +- .../java/retrofit2-play26/api/openapi.yaml | 8 +- .../java/retrofit2-play26/docs/FakeApi.md | 2 +- .../petstore/java/retrofit2/api/openapi.yaml | 8 +- .../petstore/java/retrofit2/docs/FakeApi.md | 2 +- .../java/retrofit2rx2/api/openapi.yaml | 8 +- .../java/retrofit2rx2/docs/FakeApi.md | 2 +- .../java/retrofit2rx3/api/openapi.yaml | 8 +- .../java/retrofit2rx3/docs/FakeApi.md | 2 +- .../java/vertx-no-nullable/api/openapi.yaml | 8 +- .../java/vertx-no-nullable/docs/FakeApi.md | 2 +- .../petstore/java/vertx/api/openapi.yaml | 4 +- .../petstore/java/vertx/docs/EnumTest.md | 2 +- .../petstore/java/vertx/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 2 +- .../java/webclient-jakarta/api/openapi.yaml | 4 +- .../java/webclient-jakarta/docs/EnumTest.md | 2 +- .../java/webclient-jakarta/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 2 +- .../java/webclient-swagger2/api/openapi.yaml | 4 +- .../java/webclient-swagger2/docs/EnumTest.md | 2 +- .../java/webclient-swagger2/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 2 +- .../petstore/java/webclient/api/openapi.yaml | 4 +- .../petstore/java/webclient/docs/EnumTest.md | 2 +- .../petstore/java/webclient/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 2 +- .../javascript-apollo/docs/EnumTest.md | 2 +- .../javascript-apollo/src/model/EnumTest.js | 4 +- .../petstore/javascript-es6/docs/EnumTest.md | 2 +- .../javascript-es6/src/model/EnumTest.js | 4 +- .../javascript-promise-es6/docs/EnumTest.md | 2 +- .../src/model/EnumTest.js | 4 +- .../OpenAPIClient-php/src/Model/EnumTest.php | 4 +- .../OpenAPIClient-php/lib/Model/EnumTest.php | 4 +- .../php/psr-18/lib/Model/EnumTest.php | 4 +- .../src/PSPetstore/Api/PSFakeApi.ps1 | 2 +- .../src/PSPetstore/Model/EnumTest.ps1 | 4 +- .../lib/petstore/api/fake_api.rb | 2 +- .../lib/petstore/models/enum_test.rb | 4 +- .../ruby-faraday/lib/petstore/api/fake_api.rb | 2 +- .../lib/petstore/models/enum_test.rb | 4 +- .../ruby-httpx/lib/petstore/api/fake_api.rb | 2 +- .../lib/petstore/models/enum_test.rb | 4 +- .../ruby/lib/petstore/api/fake_api.rb | 2 +- .../ruby/lib/petstore/models/enum_test.rb | 4 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../org/openapitools/model/EnumTestDto.java | 2 +- .../model/TypeHolderDefaultDto.java | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 2 +- .../Sources/PetstoreClient/APIs/FakeAPI.swift | 2 +- .../Sources/PetstoreClient/APIs/FakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 2 +- .../lib/src/model/enum_test.dart | 4 +- .../lib/src/model/enum_test.dart | 6 +- .../lib/model/enum_test.dart | 6 +- .../petstore/go/go-petstore/api/openapi.yaml | 4 +- .../java/jersey2-java8/api/openapi.yaml | 6 +- .../java/jersey2-java8/docs/EnumTest.md | 4 +- .../java/jersey2-java8/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 4 +- .../docs/OuterEnumIntegerDefaultValue.md | 2 +- .../petstore_api/models/enum_test.py | 4 +- .../outer_enum_integer_default_value.py | 2 +- .../docs/OuterEnumIntegerDefaultValue.md | 2 +- .../petstore_api/models/enum_test.py | 4 +- .../outer_enum_integer_default_value.py | 2 +- .../docs/OuterEnumIntegerDefaultValue.md | 2 +- .../petstore_api/models/enum_test.py | 4 +- .../outer_enum_integer_default_value.py | 2 +- .../docs/OuterEnumIntegerDefaultValue.md | 2 +- .../python/petstore_api/models/enum_test.py | 4 +- .../outer_enum_integer_default_value.py | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 11 +-- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 11 +-- .../schema/petstore/mysql/mysql_schema.sql | 2 +- .../generated/3_0/model/Enum_Test.cpp | 2 +- .../openapitools/server/model/EnumTest.java | 2 +- .../src/main/resources/META-INF/openapi.yml | 4 +- .../openapitools/server/model/EnumTest.java | 2 +- .../src/main/resources/META-INF/openapi.yml | 4 +- .../openapitools/server/model/EnumTest.java | 2 +- .../src/main/resources/META-INF/openapi.yml | 4 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../public/openapi.json | 8 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/openapi/openapi.yaml | 8 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/openapi/openapi.yaml | 8 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/openapi/openapi.yaml | 8 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/META-INF/openapi.yaml | 8 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../src/main/resources/META-INF/openapi.yaml | 4 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../jaxrs-spec/src/main/openapi/openapi.yaml | 4 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../api/openapi.yaml | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 11 +-- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 11 +-- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 11 +-- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 11 +-- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 11 +-- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 11 +-- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 11 +-- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 10 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 10 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 10 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 10 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 11 +-- .../virtualan/model/EnumTest.java | 2 +- .../virtualan/model/TypeHolderDefault.java | 2 +- .../virtualan/model/TypeHolderExample.java | 2 +- .../openapitools/virtualan/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 11 +-- .../java/org/openapitools/api/FakeApi.java | 2 +- .../org/openapitools/model/EnumTestDto.java | 2 +- .../model/TypeHolderDefaultDto.java | 2 +- .../model/TypeHolderExampleDto.java | 2 +- .../org/openapitools/model/XmlItemDto.java | 10 +- .../src/main/resources/openapi.yaml | 11 +-- 375 files changed, 1308 insertions(+), 1602 deletions(-) diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/.openapi-generator/FILES b/samples/client/petstore/csharp/generichost/net4.7/FormModels/.openapi-generator/FILES index 45c476af3183..d135101ac61c 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/.openapi-generator/FILES @@ -40,7 +40,6 @@ docs/models/EnumArraysArrayEnumInner.md docs/models/EnumArraysJustSymbol.md docs/models/EnumClass.md docs/models/EnumTest.md -docs/models/EnumTestEnumInteger.md docs/models/EnumTestEnumIntegerOnly.md docs/models/EnumTestEnumString.md docs/models/EquilateralTriangle.md @@ -197,7 +196,6 @@ src/Org.OpenAPITools/Model/EnumArraysArrayEnumInner.cs src/Org.OpenAPITools/Model/EnumArraysJustSymbol.cs src/Org.OpenAPITools/Model/EnumClass.cs src/Org.OpenAPITools/Model/EnumTest.cs -src/Org.OpenAPITools/Model/EnumTestEnumInteger.cs src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs src/Org.OpenAPITools/Model/EnumTestEnumString.cs src/Org.OpenAPITools/Model/EquilateralTriangle.cs diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml index c64890a06346..ba5a4a0ad9ef 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml @@ -1676,7 +1676,7 @@ components: enum_string_required: $ref: '#/components/schemas/Enum_Test_enum_string' enum_integer: - $ref: '#/components/schemas/Enum_Test_enum_integer' + $ref: '#/components/schemas/testEnumParameters_enum_query_integer_parameter' enum_integer_only: $ref: '#/components/schemas/Enum_Test_enum_integer_only' enum_number: @@ -2740,7 +2740,7 @@ components: testEnumParameters_enum_query_integer_parameter: enum: - 1 - - -2 + - null format: int32 type: integer testEnumParameters_enum_query_double_parameter: @@ -2895,16 +2895,10 @@ components: value - "Duplicate\r\nvalue" type: string - Enum_Test_enum_integer: - enum: - - 1 - - -1 - format: int32 - type: integer Enum_Test_enum_integer_only: enum: - 2 - - -2 + - null type: integer MapTest_map_of_enum_string_value: enum: @@ -2924,27 +2918,27 @@ components: RequiredClass_required_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer RequiredClass_required_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer RequiredClass_required_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer RequiredClass_required_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer RequiredClass_required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/models/EnumTest.md b/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/models/EnumTest.md index 898c1ea1fb69..c38d85092517 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/models/EnumTest.md +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/models/EnumTest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **EnumStringRequired** | **EnumTestEnumString** | | -**EnumInteger** | **EnumTestEnumInteger** | | [optional] +**EnumInteger** | **TestEnumParametersEnumQueryIntegerParameter** | | [optional] **EnumIntegerOnly** | **EnumTestEnumIntegerOnly** | | [optional] **EnumNumber** | **TestEnumParametersEnumQueryDoubleParameter** | | [optional] **EnumString** | **EnumTestEnumString** | | [optional] diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs index efff79097e03..6de077dc8c4c 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -175,8 +175,6 @@ public static string ParameterToString(object obj, string format = ISO8601_DATET return EnumArraysJustSymbolValueConverter.ToJsonValue(enumArraysJustSymbol); if (obj is EnumClass enumClass) return EnumClassValueConverter.ToJsonValue(enumClass); - if (obj is EnumTestEnumInteger enumTestEnumInteger) - return EnumTestEnumIntegerValueConverter.ToJsonValue(enumTestEnumInteger).ToString(); if (obj is EnumTestEnumIntegerOnly enumTestEnumIntegerOnly) return EnumTestEnumIntegerOnlyValueConverter.ToJsonValue(enumTestEnumIntegerOnly).ToString(); if (obj is EnumTestEnumString enumTestEnumString) diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs index c706302171c4..0ac6f2ab5715 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -73,8 +73,6 @@ public HostConfiguration(IServiceCollection services) _jsonOptions.Converters.Add(new EnumClassJsonConverter()); _jsonOptions.Converters.Add(new EnumClassNullableJsonConverter()); _jsonOptions.Converters.Add(new EnumTestJsonConverter()); - _jsonOptions.Converters.Add(new EnumTestEnumIntegerJsonConverter()); - _jsonOptions.Converters.Add(new EnumTestEnumIntegerNullableJsonConverter()); _jsonOptions.Converters.Add(new EnumTestEnumIntegerOnlyJsonConverter()); _jsonOptions.Converters.Add(new EnumTestEnumIntegerOnlyNullableJsonConverter()); _jsonOptions.Converters.Add(new EnumTestEnumStringJsonConverter()); diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs index 48e1f8c6e676..477f11fcf539 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs @@ -42,7 +42,7 @@ public partial class EnumTest : IValidatableObject /// outerEnumInteger /// outerEnumIntegerDefaultValue [JsonConstructor] - public EnumTest(EnumTestEnumString enumStringRequired, Option enumInteger = default, Option enumIntegerOnly = default, Option enumNumber = default, Option enumString = default, Option outerEnum = default, Option outerEnumDefaultValue = default, Option outerEnumInteger = default, Option outerEnumIntegerDefaultValue = default) + public EnumTest(EnumTestEnumString enumStringRequired, Option enumInteger = default, Option enumIntegerOnly = default, Option enumNumber = default, Option enumString = default, Option outerEnum = default, Option outerEnumDefaultValue = default, Option outerEnumInteger = default, Option outerEnumIntegerDefaultValue = default) { EnumStringRequired = enumStringRequired; EnumIntegerOption = enumInteger; @@ -69,13 +69,13 @@ public EnumTest(EnumTestEnumString enumStringRequired, Option [JsonIgnore] [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public Option EnumIntegerOption { get; private set; } + public Option EnumIntegerOption { get; private set; } /// /// Gets or Sets EnumInteger /// [JsonPropertyName("enum_integer")] - public EnumTestEnumInteger? EnumInteger { get { return this.EnumIntegerOption; } set { this.EnumIntegerOption = new Option(value); } } + public TestEnumParametersEnumQueryIntegerParameter? EnumInteger { get { return this.EnumIntegerOption; } set { this.EnumIntegerOption = new Option(value); } } /// /// Used to track the state of EnumIntegerOnly @@ -230,7 +230,7 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv JsonTokenType startingTokenType = utf8JsonReader.TokenType; Option enumStringRequired = default; - Option enumInteger = default; + Option enumInteger = default; Option enumIntegerOnly = default; Option enumNumber = default; Option enumString = default; @@ -262,7 +262,7 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv case "enum_integer": string enumIntegerRawValue = utf8JsonReader.GetString(); if (enumIntegerRawValue != null) - enumInteger = new Option(EnumTestEnumIntegerValueConverter.FromStringOrDefault(enumIntegerRawValue)); + enumInteger = new Option(TestEnumParametersEnumQueryIntegerParameterValueConverter.FromStringOrDefault(enumIntegerRawValue)); break; case "enum_integer_only": string enumIntegerOnlyRawValue = utf8JsonReader.GetString(); @@ -364,7 +364,7 @@ public void WriteProperties(Utf8JsonWriter writer, EnumTest enumTest, JsonSerial if (enumTest.EnumIntegerOption.IsSet) { - var enumIntegerRawValue = EnumTestEnumIntegerValueConverter.ToJsonValue(enumTest.EnumInteger.Value); + var enumIntegerRawValue = TestEnumParametersEnumQueryIntegerParameterValueConverter.ToJsonValue(enumTest.EnumInteger.Value); writer.WriteNumber("enum_integer", enumIntegerRawValue); } if (enumTest.EnumIntegerOnlyOption.IsSet) diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs index cd0add6cf3ce..25a25e10ca12 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs @@ -35,9 +35,9 @@ public enum EnumTestEnumIntegerOnly NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -55,8 +55,8 @@ public static EnumTestEnumIntegerOnly FromString(string value) if (value.Equals((2).ToString())) return EnumTestEnumIntegerOnly.NUMBER_2; - if (value.Equals((-2).ToString())) - return EnumTestEnumIntegerOnly.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return EnumTestEnumIntegerOnly.NUMBER_null; throw new NotImplementedException($"Could not convert value to type EnumTestEnumIntegerOnly: '{value}'"); } @@ -71,8 +71,8 @@ public static EnumTestEnumIntegerOnly FromString(string value) if (value.Equals((2).ToString())) return EnumTestEnumIntegerOnly.NUMBER_2; - if (value.Equals((-2).ToString())) - return EnumTestEnumIntegerOnly.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return EnumTestEnumIntegerOnly.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumInteger.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumInteger.cs index 04988ef3ee99..24a8c58d4c5f 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumInteger.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumInteger.cs @@ -35,9 +35,9 @@ public enum RequiredClassRequiredNotnullableEnumInteger NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -55,8 +55,8 @@ public static RequiredClassRequiredNotnullableEnumInteger FromString(string valu if (value.Equals((1).ToString())) return RequiredClassRequiredNotnullableEnumInteger.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredClassRequiredNotnullableEnumInteger.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredClassRequiredNotnullableEnumInteger.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredClassRequiredNotnullableEnumInteger: '{value}'"); } @@ -71,8 +71,8 @@ public static RequiredClassRequiredNotnullableEnumInteger FromString(string valu if (value.Equals((1).ToString())) return RequiredClassRequiredNotnullableEnumInteger.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredClassRequiredNotnullableEnumInteger.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredClassRequiredNotnullableEnumInteger.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumIntegerOnly.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumIntegerOnly.cs index 775aba4f6af0..2de2614bb04e 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumIntegerOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumIntegerOnly.cs @@ -35,9 +35,9 @@ public enum RequiredClassRequiredNotnullableEnumIntegerOnly NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -55,8 +55,8 @@ public static RequiredClassRequiredNotnullableEnumIntegerOnly FromString(string if (value.Equals((2).ToString())) return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredClassRequiredNotnullableEnumIntegerOnly: '{value}'"); } @@ -71,8 +71,8 @@ public static RequiredClassRequiredNotnullableEnumIntegerOnly FromString(string if (value.Equals((2).ToString())) return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumInteger.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumInteger.cs index 365504a241bf..fc8d5b7483cc 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumInteger.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumInteger.cs @@ -35,9 +35,9 @@ public enum RequiredClassRequiredNullableEnumInteger NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -55,8 +55,8 @@ public static RequiredClassRequiredNullableEnumInteger FromString(string value) if (value.Equals((1).ToString())) return RequiredClassRequiredNullableEnumInteger.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredClassRequiredNullableEnumInteger.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredClassRequiredNullableEnumInteger.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredClassRequiredNullableEnumInteger: '{value}'"); } @@ -71,8 +71,8 @@ public static RequiredClassRequiredNullableEnumInteger FromString(string value) if (value.Equals((1).ToString())) return RequiredClassRequiredNullableEnumInteger.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredClassRequiredNullableEnumInteger.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredClassRequiredNullableEnumInteger.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumIntegerOnly.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumIntegerOnly.cs index 4c5f2c56ba58..91fa7c4493e9 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumIntegerOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumIntegerOnly.cs @@ -35,9 +35,9 @@ public enum RequiredClassRequiredNullableEnumIntegerOnly NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -55,8 +55,8 @@ public static RequiredClassRequiredNullableEnumIntegerOnly FromString(string val if (value.Equals((2).ToString())) return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredClassRequiredNullableEnumIntegerOnly: '{value}'"); } @@ -71,8 +71,8 @@ public static RequiredClassRequiredNullableEnumIntegerOnly FromString(string val if (value.Equals((2).ToString())) return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestEnumParametersEnumQueryIntegerParameter.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestEnumParametersEnumQueryIntegerParameter.cs index 33ff2ce2cc21..1c4aec36c25b 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestEnumParametersEnumQueryIntegerParameter.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestEnumParametersEnumQueryIntegerParameter.cs @@ -35,9 +35,9 @@ public enum TestEnumParametersEnumQueryIntegerParameter NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -55,8 +55,8 @@ public static TestEnumParametersEnumQueryIntegerParameter FromString(string valu if (value.Equals((1).ToString())) return TestEnumParametersEnumQueryIntegerParameter.NUMBER_1; - if (value.Equals((-2).ToString())) - return TestEnumParametersEnumQueryIntegerParameter.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return TestEnumParametersEnumQueryIntegerParameter.NUMBER_null; throw new NotImplementedException($"Could not convert value to type TestEnumParametersEnumQueryIntegerParameter: '{value}'"); } @@ -71,8 +71,8 @@ public static TestEnumParametersEnumQueryIntegerParameter FromString(string valu if (value.Equals((1).ToString())) return TestEnumParametersEnumQueryIntegerParameter.NUMBER_1; - if (value.Equals((-2).ToString())) - return TestEnumParametersEnumQueryIntegerParameter.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return TestEnumParametersEnumQueryIntegerParameter.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml index f772773afefa..56dffed232dc 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1741,13 +1741,13 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_integer_only: enum: - 2 - - -2 + - null type: integer enum_number: enum: @@ -2119,53 +2119,53 @@ components: required_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 0d657779fdc9..6330b46aa33c 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -225,9 +225,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -241,8 +241,8 @@ public static EnumIntegerEnum EnumIntegerEnumFromString(string value) if (value.Equals((1).ToString())) return EnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return EnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return EnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type EnumIntegerEnum: '{value}'"); } @@ -257,8 +257,8 @@ public static EnumIntegerEnum EnumIntegerEnumFromString(string value) if (value.Equals((1).ToString())) return EnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return EnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return EnumIntegerEnum.NUMBER_null; return null; } @@ -297,9 +297,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -313,8 +313,8 @@ public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) if (value.Equals((2).ToString())) return EnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return EnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return EnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type EnumIntegerOnlyEnum: '{value}'"); } @@ -329,8 +329,8 @@ public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) if (value.Equals((2).ToString())) return EnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return EnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return EnumIntegerOnlyEnum.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index fdc63ca701d5..5fdf36da7b50 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -139,9 +139,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -155,8 +155,8 @@ public static RequiredNotnullableEnumIntegerEnum RequiredNotnullableEnumIntegerE if (value.Equals((1).ToString())) return RequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredNotnullableEnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredNotnullableEnumIntegerEnum: '{value}'"); } @@ -171,8 +171,8 @@ public static RequiredNotnullableEnumIntegerEnum RequiredNotnullableEnumIntegerE if (value.Equals((1).ToString())) return RequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredNotnullableEnumIntegerEnum.NUMBER_null; return null; } @@ -204,9 +204,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -220,8 +220,8 @@ public static RequiredNotnullableEnumIntegerOnlyEnum RequiredNotnullableEnumInte if (value.Equals((2).ToString())) return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredNotnullableEnumIntegerOnlyEnum: '{value}'"); } @@ -236,8 +236,8 @@ public static RequiredNotnullableEnumIntegerOnlyEnum RequiredNotnullableEnumInte if (value.Equals((2).ToString())) return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; return null; } @@ -431,9 +431,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -447,8 +447,8 @@ public static NotrequiredNotnullableEnumIntegerEnum NotrequiredNotnullableEnumIn if (value.Equals((1).ToString())) return NotrequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return NotrequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return NotrequiredNotnullableEnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type NotrequiredNotnullableEnumIntegerEnum: '{value}'"); } @@ -463,8 +463,8 @@ public static NotrequiredNotnullableEnumIntegerEnum NotrequiredNotnullableEnumIn if (value.Equals((1).ToString())) return NotrequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return NotrequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return NotrequiredNotnullableEnumIntegerEnum.NUMBER_null; return null; } @@ -503,9 +503,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -519,8 +519,8 @@ public static NotrequiredNotnullableEnumIntegerOnlyEnum NotrequiredNotnullableEn if (value.Equals((2).ToString())) return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type NotrequiredNotnullableEnumIntegerOnlyEnum: '{value}'"); } @@ -535,8 +535,8 @@ public static NotrequiredNotnullableEnumIntegerOnlyEnum NotrequiredNotnullableEn if (value.Equals((2).ToString())) return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; return null; } @@ -751,9 +751,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -767,8 +767,8 @@ public static NotrequiredNullableEnumIntegerEnum NotrequiredNullableEnumIntegerE if (value.Equals((1).ToString())) return NotrequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return NotrequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return NotrequiredNullableEnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type NotrequiredNullableEnumIntegerEnum: '{value}'"); } @@ -783,8 +783,8 @@ public static NotrequiredNullableEnumIntegerEnum NotrequiredNullableEnumIntegerE if (value.Equals((1).ToString())) return NotrequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return NotrequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return NotrequiredNullableEnumIntegerEnum.NUMBER_null; return null; } @@ -823,9 +823,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -839,8 +839,8 @@ public static NotrequiredNullableEnumIntegerOnlyEnum NotrequiredNullableEnumInte if (value.Equals((2).ToString())) return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type NotrequiredNullableEnumIntegerOnlyEnum: '{value}'"); } @@ -855,8 +855,8 @@ public static NotrequiredNullableEnumIntegerOnlyEnum NotrequiredNullableEnumInte if (value.Equals((2).ToString())) return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_null; return null; } @@ -1074,9 +1074,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -1090,8 +1090,8 @@ public static RequiredNullableEnumIntegerEnum RequiredNullableEnumIntegerEnumFro if (value.Equals((1).ToString())) return RequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredNullableEnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredNullableEnumIntegerEnum: '{value}'"); } @@ -1106,8 +1106,8 @@ public static RequiredNullableEnumIntegerEnum RequiredNullableEnumIntegerEnumFro if (value.Equals((1).ToString())) return RequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredNullableEnumIntegerEnum.NUMBER_null; return null; } @@ -1139,9 +1139,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -1155,8 +1155,8 @@ public static RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnl if (value.Equals((2).ToString())) return RequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredNullableEnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredNullableEnumIntegerOnlyEnum: '{value}'"); } @@ -1171,8 +1171,8 @@ public static RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnl if (value.Equals((2).ToString())) return RequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredNullableEnumIntegerOnlyEnum.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/.openapi-generator/FILES b/samples/client/petstore/csharp/generichost/net4.8/FormModels/.openapi-generator/FILES index 45c476af3183..d135101ac61c 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/.openapi-generator/FILES @@ -40,7 +40,6 @@ docs/models/EnumArraysArrayEnumInner.md docs/models/EnumArraysJustSymbol.md docs/models/EnumClass.md docs/models/EnumTest.md -docs/models/EnumTestEnumInteger.md docs/models/EnumTestEnumIntegerOnly.md docs/models/EnumTestEnumString.md docs/models/EquilateralTriangle.md @@ -197,7 +196,6 @@ src/Org.OpenAPITools/Model/EnumArraysArrayEnumInner.cs src/Org.OpenAPITools/Model/EnumArraysJustSymbol.cs src/Org.OpenAPITools/Model/EnumClass.cs src/Org.OpenAPITools/Model/EnumTest.cs -src/Org.OpenAPITools/Model/EnumTestEnumInteger.cs src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs src/Org.OpenAPITools/Model/EnumTestEnumString.cs src/Org.OpenAPITools/Model/EquilateralTriangle.cs diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml index c64890a06346..ba5a4a0ad9ef 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml @@ -1676,7 +1676,7 @@ components: enum_string_required: $ref: '#/components/schemas/Enum_Test_enum_string' enum_integer: - $ref: '#/components/schemas/Enum_Test_enum_integer' + $ref: '#/components/schemas/testEnumParameters_enum_query_integer_parameter' enum_integer_only: $ref: '#/components/schemas/Enum_Test_enum_integer_only' enum_number: @@ -2740,7 +2740,7 @@ components: testEnumParameters_enum_query_integer_parameter: enum: - 1 - - -2 + - null format: int32 type: integer testEnumParameters_enum_query_double_parameter: @@ -2895,16 +2895,10 @@ components: value - "Duplicate\r\nvalue" type: string - Enum_Test_enum_integer: - enum: - - 1 - - -1 - format: int32 - type: integer Enum_Test_enum_integer_only: enum: - 2 - - -2 + - null type: integer MapTest_map_of_enum_string_value: enum: @@ -2924,27 +2918,27 @@ components: RequiredClass_required_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer RequiredClass_required_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer RequiredClass_required_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer RequiredClass_required_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer RequiredClass_required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/models/EnumTest.md b/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/models/EnumTest.md index 898c1ea1fb69..c38d85092517 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/models/EnumTest.md +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/models/EnumTest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **EnumStringRequired** | **EnumTestEnumString** | | -**EnumInteger** | **EnumTestEnumInteger** | | [optional] +**EnumInteger** | **TestEnumParametersEnumQueryIntegerParameter** | | [optional] **EnumIntegerOnly** | **EnumTestEnumIntegerOnly** | | [optional] **EnumNumber** | **TestEnumParametersEnumQueryDoubleParameter** | | [optional] **EnumString** | **EnumTestEnumString** | | [optional] diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs index efff79097e03..6de077dc8c4c 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -175,8 +175,6 @@ public static string ParameterToString(object obj, string format = ISO8601_DATET return EnumArraysJustSymbolValueConverter.ToJsonValue(enumArraysJustSymbol); if (obj is EnumClass enumClass) return EnumClassValueConverter.ToJsonValue(enumClass); - if (obj is EnumTestEnumInteger enumTestEnumInteger) - return EnumTestEnumIntegerValueConverter.ToJsonValue(enumTestEnumInteger).ToString(); if (obj is EnumTestEnumIntegerOnly enumTestEnumIntegerOnly) return EnumTestEnumIntegerOnlyValueConverter.ToJsonValue(enumTestEnumIntegerOnly).ToString(); if (obj is EnumTestEnumString enumTestEnumString) diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs index c706302171c4..0ac6f2ab5715 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -73,8 +73,6 @@ public HostConfiguration(IServiceCollection services) _jsonOptions.Converters.Add(new EnumClassJsonConverter()); _jsonOptions.Converters.Add(new EnumClassNullableJsonConverter()); _jsonOptions.Converters.Add(new EnumTestJsonConverter()); - _jsonOptions.Converters.Add(new EnumTestEnumIntegerJsonConverter()); - _jsonOptions.Converters.Add(new EnumTestEnumIntegerNullableJsonConverter()); _jsonOptions.Converters.Add(new EnumTestEnumIntegerOnlyJsonConverter()); _jsonOptions.Converters.Add(new EnumTestEnumIntegerOnlyNullableJsonConverter()); _jsonOptions.Converters.Add(new EnumTestEnumStringJsonConverter()); diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs index 48e1f8c6e676..477f11fcf539 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs @@ -42,7 +42,7 @@ public partial class EnumTest : IValidatableObject /// outerEnumInteger /// outerEnumIntegerDefaultValue [JsonConstructor] - public EnumTest(EnumTestEnumString enumStringRequired, Option enumInteger = default, Option enumIntegerOnly = default, Option enumNumber = default, Option enumString = default, Option outerEnum = default, Option outerEnumDefaultValue = default, Option outerEnumInteger = default, Option outerEnumIntegerDefaultValue = default) + public EnumTest(EnumTestEnumString enumStringRequired, Option enumInteger = default, Option enumIntegerOnly = default, Option enumNumber = default, Option enumString = default, Option outerEnum = default, Option outerEnumDefaultValue = default, Option outerEnumInteger = default, Option outerEnumIntegerDefaultValue = default) { EnumStringRequired = enumStringRequired; EnumIntegerOption = enumInteger; @@ -69,13 +69,13 @@ public EnumTest(EnumTestEnumString enumStringRequired, Option [JsonIgnore] [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public Option EnumIntegerOption { get; private set; } + public Option EnumIntegerOption { get; private set; } /// /// Gets or Sets EnumInteger /// [JsonPropertyName("enum_integer")] - public EnumTestEnumInteger? EnumInteger { get { return this.EnumIntegerOption; } set { this.EnumIntegerOption = new Option(value); } } + public TestEnumParametersEnumQueryIntegerParameter? EnumInteger { get { return this.EnumIntegerOption; } set { this.EnumIntegerOption = new Option(value); } } /// /// Used to track the state of EnumIntegerOnly @@ -230,7 +230,7 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv JsonTokenType startingTokenType = utf8JsonReader.TokenType; Option enumStringRequired = default; - Option enumInteger = default; + Option enumInteger = default; Option enumIntegerOnly = default; Option enumNumber = default; Option enumString = default; @@ -262,7 +262,7 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv case "enum_integer": string enumIntegerRawValue = utf8JsonReader.GetString(); if (enumIntegerRawValue != null) - enumInteger = new Option(EnumTestEnumIntegerValueConverter.FromStringOrDefault(enumIntegerRawValue)); + enumInteger = new Option(TestEnumParametersEnumQueryIntegerParameterValueConverter.FromStringOrDefault(enumIntegerRawValue)); break; case "enum_integer_only": string enumIntegerOnlyRawValue = utf8JsonReader.GetString(); @@ -364,7 +364,7 @@ public void WriteProperties(Utf8JsonWriter writer, EnumTest enumTest, JsonSerial if (enumTest.EnumIntegerOption.IsSet) { - var enumIntegerRawValue = EnumTestEnumIntegerValueConverter.ToJsonValue(enumTest.EnumInteger.Value); + var enumIntegerRawValue = TestEnumParametersEnumQueryIntegerParameterValueConverter.ToJsonValue(enumTest.EnumInteger.Value); writer.WriteNumber("enum_integer", enumIntegerRawValue); } if (enumTest.EnumIntegerOnlyOption.IsSet) diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs index cd0add6cf3ce..25a25e10ca12 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs @@ -35,9 +35,9 @@ public enum EnumTestEnumIntegerOnly NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -55,8 +55,8 @@ public static EnumTestEnumIntegerOnly FromString(string value) if (value.Equals((2).ToString())) return EnumTestEnumIntegerOnly.NUMBER_2; - if (value.Equals((-2).ToString())) - return EnumTestEnumIntegerOnly.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return EnumTestEnumIntegerOnly.NUMBER_null; throw new NotImplementedException($"Could not convert value to type EnumTestEnumIntegerOnly: '{value}'"); } @@ -71,8 +71,8 @@ public static EnumTestEnumIntegerOnly FromString(string value) if (value.Equals((2).ToString())) return EnumTestEnumIntegerOnly.NUMBER_2; - if (value.Equals((-2).ToString())) - return EnumTestEnumIntegerOnly.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return EnumTestEnumIntegerOnly.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumInteger.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumInteger.cs index 04988ef3ee99..24a8c58d4c5f 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumInteger.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumInteger.cs @@ -35,9 +35,9 @@ public enum RequiredClassRequiredNotnullableEnumInteger NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -55,8 +55,8 @@ public static RequiredClassRequiredNotnullableEnumInteger FromString(string valu if (value.Equals((1).ToString())) return RequiredClassRequiredNotnullableEnumInteger.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredClassRequiredNotnullableEnumInteger.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredClassRequiredNotnullableEnumInteger.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredClassRequiredNotnullableEnumInteger: '{value}'"); } @@ -71,8 +71,8 @@ public static RequiredClassRequiredNotnullableEnumInteger FromString(string valu if (value.Equals((1).ToString())) return RequiredClassRequiredNotnullableEnumInteger.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredClassRequiredNotnullableEnumInteger.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredClassRequiredNotnullableEnumInteger.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumIntegerOnly.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumIntegerOnly.cs index 775aba4f6af0..2de2614bb04e 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumIntegerOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumIntegerOnly.cs @@ -35,9 +35,9 @@ public enum RequiredClassRequiredNotnullableEnumIntegerOnly NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -55,8 +55,8 @@ public static RequiredClassRequiredNotnullableEnumIntegerOnly FromString(string if (value.Equals((2).ToString())) return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredClassRequiredNotnullableEnumIntegerOnly: '{value}'"); } @@ -71,8 +71,8 @@ public static RequiredClassRequiredNotnullableEnumIntegerOnly FromString(string if (value.Equals((2).ToString())) return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumInteger.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumInteger.cs index 365504a241bf..fc8d5b7483cc 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumInteger.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumInteger.cs @@ -35,9 +35,9 @@ public enum RequiredClassRequiredNullableEnumInteger NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -55,8 +55,8 @@ public static RequiredClassRequiredNullableEnumInteger FromString(string value) if (value.Equals((1).ToString())) return RequiredClassRequiredNullableEnumInteger.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredClassRequiredNullableEnumInteger.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredClassRequiredNullableEnumInteger.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredClassRequiredNullableEnumInteger: '{value}'"); } @@ -71,8 +71,8 @@ public static RequiredClassRequiredNullableEnumInteger FromString(string value) if (value.Equals((1).ToString())) return RequiredClassRequiredNullableEnumInteger.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredClassRequiredNullableEnumInteger.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredClassRequiredNullableEnumInteger.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumIntegerOnly.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumIntegerOnly.cs index 4c5f2c56ba58..91fa7c4493e9 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumIntegerOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumIntegerOnly.cs @@ -35,9 +35,9 @@ public enum RequiredClassRequiredNullableEnumIntegerOnly NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -55,8 +55,8 @@ public static RequiredClassRequiredNullableEnumIntegerOnly FromString(string val if (value.Equals((2).ToString())) return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredClassRequiredNullableEnumIntegerOnly: '{value}'"); } @@ -71,8 +71,8 @@ public static RequiredClassRequiredNullableEnumIntegerOnly FromString(string val if (value.Equals((2).ToString())) return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestEnumParametersEnumQueryIntegerParameter.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestEnumParametersEnumQueryIntegerParameter.cs index 33ff2ce2cc21..1c4aec36c25b 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestEnumParametersEnumQueryIntegerParameter.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestEnumParametersEnumQueryIntegerParameter.cs @@ -35,9 +35,9 @@ public enum TestEnumParametersEnumQueryIntegerParameter NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -55,8 +55,8 @@ public static TestEnumParametersEnumQueryIntegerParameter FromString(string valu if (value.Equals((1).ToString())) return TestEnumParametersEnumQueryIntegerParameter.NUMBER_1; - if (value.Equals((-2).ToString())) - return TestEnumParametersEnumQueryIntegerParameter.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return TestEnumParametersEnumQueryIntegerParameter.NUMBER_null; throw new NotImplementedException($"Could not convert value to type TestEnumParametersEnumQueryIntegerParameter: '{value}'"); } @@ -71,8 +71,8 @@ public static TestEnumParametersEnumQueryIntegerParameter FromString(string valu if (value.Equals((1).ToString())) return TestEnumParametersEnumQueryIntegerParameter.NUMBER_1; - if (value.Equals((-2).ToString())) - return TestEnumParametersEnumQueryIntegerParameter.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return TestEnumParametersEnumQueryIntegerParameter.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml index f772773afefa..56dffed232dc 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1741,13 +1741,13 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_integer_only: enum: - 2 - - -2 + - null type: integer enum_number: enum: @@ -2119,53 +2119,53 @@ components: required_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 0d657779fdc9..6330b46aa33c 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -225,9 +225,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -241,8 +241,8 @@ public static EnumIntegerEnum EnumIntegerEnumFromString(string value) if (value.Equals((1).ToString())) return EnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return EnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return EnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type EnumIntegerEnum: '{value}'"); } @@ -257,8 +257,8 @@ public static EnumIntegerEnum EnumIntegerEnumFromString(string value) if (value.Equals((1).ToString())) return EnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return EnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return EnumIntegerEnum.NUMBER_null; return null; } @@ -297,9 +297,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -313,8 +313,8 @@ public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) if (value.Equals((2).ToString())) return EnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return EnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return EnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type EnumIntegerOnlyEnum: '{value}'"); } @@ -329,8 +329,8 @@ public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) if (value.Equals((2).ToString())) return EnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return EnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return EnumIntegerOnlyEnum.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index fdc63ca701d5..5fdf36da7b50 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -139,9 +139,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -155,8 +155,8 @@ public static RequiredNotnullableEnumIntegerEnum RequiredNotnullableEnumIntegerE if (value.Equals((1).ToString())) return RequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredNotnullableEnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredNotnullableEnumIntegerEnum: '{value}'"); } @@ -171,8 +171,8 @@ public static RequiredNotnullableEnumIntegerEnum RequiredNotnullableEnumIntegerE if (value.Equals((1).ToString())) return RequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredNotnullableEnumIntegerEnum.NUMBER_null; return null; } @@ -204,9 +204,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -220,8 +220,8 @@ public static RequiredNotnullableEnumIntegerOnlyEnum RequiredNotnullableEnumInte if (value.Equals((2).ToString())) return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredNotnullableEnumIntegerOnlyEnum: '{value}'"); } @@ -236,8 +236,8 @@ public static RequiredNotnullableEnumIntegerOnlyEnum RequiredNotnullableEnumInte if (value.Equals((2).ToString())) return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; return null; } @@ -431,9 +431,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -447,8 +447,8 @@ public static NotrequiredNotnullableEnumIntegerEnum NotrequiredNotnullableEnumIn if (value.Equals((1).ToString())) return NotrequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return NotrequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return NotrequiredNotnullableEnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type NotrequiredNotnullableEnumIntegerEnum: '{value}'"); } @@ -463,8 +463,8 @@ public static NotrequiredNotnullableEnumIntegerEnum NotrequiredNotnullableEnumIn if (value.Equals((1).ToString())) return NotrequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return NotrequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return NotrequiredNotnullableEnumIntegerEnum.NUMBER_null; return null; } @@ -503,9 +503,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -519,8 +519,8 @@ public static NotrequiredNotnullableEnumIntegerOnlyEnum NotrequiredNotnullableEn if (value.Equals((2).ToString())) return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type NotrequiredNotnullableEnumIntegerOnlyEnum: '{value}'"); } @@ -535,8 +535,8 @@ public static NotrequiredNotnullableEnumIntegerOnlyEnum NotrequiredNotnullableEn if (value.Equals((2).ToString())) return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; return null; } @@ -751,9 +751,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -767,8 +767,8 @@ public static NotrequiredNullableEnumIntegerEnum NotrequiredNullableEnumIntegerE if (value.Equals((1).ToString())) return NotrequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return NotrequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return NotrequiredNullableEnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type NotrequiredNullableEnumIntegerEnum: '{value}'"); } @@ -783,8 +783,8 @@ public static NotrequiredNullableEnumIntegerEnum NotrequiredNullableEnumIntegerE if (value.Equals((1).ToString())) return NotrequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return NotrequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return NotrequiredNullableEnumIntegerEnum.NUMBER_null; return null; } @@ -823,9 +823,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -839,8 +839,8 @@ public static NotrequiredNullableEnumIntegerOnlyEnum NotrequiredNullableEnumInte if (value.Equals((2).ToString())) return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type NotrequiredNullableEnumIntegerOnlyEnum: '{value}'"); } @@ -855,8 +855,8 @@ public static NotrequiredNullableEnumIntegerOnlyEnum NotrequiredNullableEnumInte if (value.Equals((2).ToString())) return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_null; return null; } @@ -1074,9 +1074,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -1090,8 +1090,8 @@ public static RequiredNullableEnumIntegerEnum RequiredNullableEnumIntegerEnumFro if (value.Equals((1).ToString())) return RequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredNullableEnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredNullableEnumIntegerEnum: '{value}'"); } @@ -1106,8 +1106,8 @@ public static RequiredNullableEnumIntegerEnum RequiredNullableEnumIntegerEnumFro if (value.Equals((1).ToString())) return RequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredNullableEnumIntegerEnum.NUMBER_null; return null; } @@ -1139,9 +1139,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -1155,8 +1155,8 @@ public static RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnl if (value.Equals((2).ToString())) return RequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredNullableEnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredNullableEnumIntegerOnlyEnum: '{value}'"); } @@ -1171,8 +1171,8 @@ public static RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnl if (value.Equals((2).ToString())) return RequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredNullableEnumIntegerOnlyEnum.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/.openapi-generator/FILES b/samples/client/petstore/csharp/generichost/net8/FormModels/.openapi-generator/FILES index bc72f8c05ba1..a04dce5e3a8d 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/.openapi-generator/FILES @@ -40,7 +40,6 @@ docs/models/EnumArraysArrayEnumInner.md docs/models/EnumArraysJustSymbol.md docs/models/EnumClass.md docs/models/EnumTest.md -docs/models/EnumTestEnumInteger.md docs/models/EnumTestEnumIntegerOnly.md docs/models/EnumTestEnumString.md docs/models/EquilateralTriangle.md @@ -199,7 +198,6 @@ src/Org.OpenAPITools/Model/EnumArraysArrayEnumInner.cs src/Org.OpenAPITools/Model/EnumArraysJustSymbol.cs src/Org.OpenAPITools/Model/EnumClass.cs src/Org.OpenAPITools/Model/EnumTest.cs -src/Org.OpenAPITools/Model/EnumTestEnumInteger.cs src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs src/Org.OpenAPITools/Model/EnumTestEnumString.cs src/Org.OpenAPITools/Model/EquilateralTriangle.cs diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net8/FormModels/api/openapi.yaml index c64890a06346..ba5a4a0ad9ef 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/api/openapi.yaml @@ -1676,7 +1676,7 @@ components: enum_string_required: $ref: '#/components/schemas/Enum_Test_enum_string' enum_integer: - $ref: '#/components/schemas/Enum_Test_enum_integer' + $ref: '#/components/schemas/testEnumParameters_enum_query_integer_parameter' enum_integer_only: $ref: '#/components/schemas/Enum_Test_enum_integer_only' enum_number: @@ -2740,7 +2740,7 @@ components: testEnumParameters_enum_query_integer_parameter: enum: - 1 - - -2 + - null format: int32 type: integer testEnumParameters_enum_query_double_parameter: @@ -2895,16 +2895,10 @@ components: value - "Duplicate\r\nvalue" type: string - Enum_Test_enum_integer: - enum: - - 1 - - -1 - format: int32 - type: integer Enum_Test_enum_integer_only: enum: - 2 - - -2 + - null type: integer MapTest_map_of_enum_string_value: enum: @@ -2924,27 +2918,27 @@ components: RequiredClass_required_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer RequiredClass_required_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer RequiredClass_required_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer RequiredClass_required_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer RequiredClass_required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/docs/models/EnumTest.md b/samples/client/petstore/csharp/generichost/net8/FormModels/docs/models/EnumTest.md index 898c1ea1fb69..c38d85092517 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/docs/models/EnumTest.md +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/docs/models/EnumTest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **EnumStringRequired** | **EnumTestEnumString** | | -**EnumInteger** | **EnumTestEnumInteger** | | [optional] +**EnumInteger** | **TestEnumParametersEnumQueryIntegerParameter** | | [optional] **EnumIntegerOnly** | **EnumTestEnumIntegerOnly** | | [optional] **EnumNumber** | **TestEnumParametersEnumQueryDoubleParameter** | | [optional] **EnumString** | **EnumTestEnumString** | | [optional] diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs index 1f8bfa7f6366..db31fb3afabd 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -172,8 +172,6 @@ public static string ParameterToString(object obj, string format = ISO8601_DATET return EnumArraysJustSymbolValueConverter.ToJsonValue(enumArraysJustSymbol); if (obj is EnumClass enumClass) return EnumClassValueConverter.ToJsonValue(enumClass); - if (obj is EnumTestEnumInteger enumTestEnumInteger) - return EnumTestEnumIntegerValueConverter.ToJsonValue(enumTestEnumInteger).ToString(); if (obj is EnumTestEnumIntegerOnly enumTestEnumIntegerOnly) return EnumTestEnumIntegerOnlyValueConverter.ToJsonValue(enumTestEnumIntegerOnly).ToString(); if (obj is EnumTestEnumString enumTestEnumString) diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs index f35ca51d2d2a..be16a09d0380 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -75,8 +75,6 @@ public HostConfiguration(IServiceCollection services) _jsonOptions.Converters.Add(new EnumClassJsonConverter()); _jsonOptions.Converters.Add(new EnumClassNullableJsonConverter()); _jsonOptions.Converters.Add(new EnumTestJsonConverter()); - _jsonOptions.Converters.Add(new EnumTestEnumIntegerJsonConverter()); - _jsonOptions.Converters.Add(new EnumTestEnumIntegerNullableJsonConverter()); _jsonOptions.Converters.Add(new EnumTestEnumIntegerOnlyJsonConverter()); _jsonOptions.Converters.Add(new EnumTestEnumIntegerOnlyNullableJsonConverter()); _jsonOptions.Converters.Add(new EnumTestEnumStringJsonConverter()); diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs index 66fd5877e1ce..b651bfa38e80 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs @@ -42,7 +42,7 @@ public partial class EnumTest : IValidatableObject /// outerEnumInteger /// outerEnumIntegerDefaultValue [JsonConstructor] - public EnumTest(EnumTestEnumString enumStringRequired, Option enumInteger = default, Option enumIntegerOnly = default, Option enumNumber = default, Option enumString = default, Option outerEnum = default, Option outerEnumDefaultValue = default, Option outerEnumInteger = default, Option outerEnumIntegerDefaultValue = default) + public EnumTest(EnumTestEnumString enumStringRequired, Option enumInteger = default, Option enumIntegerOnly = default, Option enumNumber = default, Option enumString = default, Option outerEnum = default, Option outerEnumDefaultValue = default, Option outerEnumInteger = default, Option outerEnumIntegerDefaultValue = default) { EnumStringRequired = enumStringRequired; EnumIntegerOption = enumInteger; @@ -69,13 +69,13 @@ public EnumTest(EnumTestEnumString enumStringRequired, Option [JsonIgnore] [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public Option EnumIntegerOption { get; private set; } + public Option EnumIntegerOption { get; private set; } /// /// Gets or Sets EnumInteger /// [JsonPropertyName("enum_integer")] - public EnumTestEnumInteger? EnumInteger { get { return this.EnumIntegerOption; } set { this.EnumIntegerOption = new(value); } } + public TestEnumParametersEnumQueryIntegerParameter? EnumInteger { get { return this.EnumIntegerOption; } set { this.EnumIntegerOption = new(value); } } /// /// Used to track the state of EnumIntegerOnly @@ -230,7 +230,7 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv JsonTokenType startingTokenType = utf8JsonReader.TokenType; Option enumStringRequired = default; - Option enumInteger = default; + Option enumInteger = default; Option enumIntegerOnly = default; Option enumNumber = default; Option enumString = default; @@ -262,7 +262,7 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv case "enum_integer": string enumIntegerRawValue = utf8JsonReader.GetString(); if (enumIntegerRawValue != null) - enumInteger = new Option(EnumTestEnumIntegerValueConverter.FromStringOrDefault(enumIntegerRawValue)); + enumInteger = new Option(TestEnumParametersEnumQueryIntegerParameterValueConverter.FromStringOrDefault(enumIntegerRawValue)); break; case "enum_integer_only": string enumIntegerOnlyRawValue = utf8JsonReader.GetString(); @@ -364,7 +364,7 @@ public void WriteProperties(Utf8JsonWriter writer, EnumTest enumTest, JsonSerial if (enumTest.EnumIntegerOption.IsSet) { - var enumIntegerRawValue = EnumTestEnumIntegerValueConverter.ToJsonValue(enumTest.EnumInteger.Value); + var enumIntegerRawValue = TestEnumParametersEnumQueryIntegerParameterValueConverter.ToJsonValue(enumTest.EnumInteger.Value); writer.WriteNumber("enum_integer", enumIntegerRawValue); } if (enumTest.EnumIntegerOnlyOption.IsSet) diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs index cd0add6cf3ce..25a25e10ca12 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs @@ -35,9 +35,9 @@ public enum EnumTestEnumIntegerOnly NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -55,8 +55,8 @@ public static EnumTestEnumIntegerOnly FromString(string value) if (value.Equals((2).ToString())) return EnumTestEnumIntegerOnly.NUMBER_2; - if (value.Equals((-2).ToString())) - return EnumTestEnumIntegerOnly.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return EnumTestEnumIntegerOnly.NUMBER_null; throw new NotImplementedException($"Could not convert value to type EnumTestEnumIntegerOnly: '{value}'"); } @@ -71,8 +71,8 @@ public static EnumTestEnumIntegerOnly FromString(string value) if (value.Equals((2).ToString())) return EnumTestEnumIntegerOnly.NUMBER_2; - if (value.Equals((-2).ToString())) - return EnumTestEnumIntegerOnly.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return EnumTestEnumIntegerOnly.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumInteger.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumInteger.cs index 04988ef3ee99..24a8c58d4c5f 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumInteger.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumInteger.cs @@ -35,9 +35,9 @@ public enum RequiredClassRequiredNotnullableEnumInteger NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -55,8 +55,8 @@ public static RequiredClassRequiredNotnullableEnumInteger FromString(string valu if (value.Equals((1).ToString())) return RequiredClassRequiredNotnullableEnumInteger.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredClassRequiredNotnullableEnumInteger.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredClassRequiredNotnullableEnumInteger.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredClassRequiredNotnullableEnumInteger: '{value}'"); } @@ -71,8 +71,8 @@ public static RequiredClassRequiredNotnullableEnumInteger FromString(string valu if (value.Equals((1).ToString())) return RequiredClassRequiredNotnullableEnumInteger.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredClassRequiredNotnullableEnumInteger.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredClassRequiredNotnullableEnumInteger.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumIntegerOnly.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumIntegerOnly.cs index 775aba4f6af0..2de2614bb04e 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumIntegerOnly.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumIntegerOnly.cs @@ -35,9 +35,9 @@ public enum RequiredClassRequiredNotnullableEnumIntegerOnly NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -55,8 +55,8 @@ public static RequiredClassRequiredNotnullableEnumIntegerOnly FromString(string if (value.Equals((2).ToString())) return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredClassRequiredNotnullableEnumIntegerOnly: '{value}'"); } @@ -71,8 +71,8 @@ public static RequiredClassRequiredNotnullableEnumIntegerOnly FromString(string if (value.Equals((2).ToString())) return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumInteger.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumInteger.cs index 365504a241bf..fc8d5b7483cc 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumInteger.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumInteger.cs @@ -35,9 +35,9 @@ public enum RequiredClassRequiredNullableEnumInteger NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -55,8 +55,8 @@ public static RequiredClassRequiredNullableEnumInteger FromString(string value) if (value.Equals((1).ToString())) return RequiredClassRequiredNullableEnumInteger.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredClassRequiredNullableEnumInteger.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredClassRequiredNullableEnumInteger.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredClassRequiredNullableEnumInteger: '{value}'"); } @@ -71,8 +71,8 @@ public static RequiredClassRequiredNullableEnumInteger FromString(string value) if (value.Equals((1).ToString())) return RequiredClassRequiredNullableEnumInteger.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredClassRequiredNullableEnumInteger.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredClassRequiredNullableEnumInteger.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumIntegerOnly.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumIntegerOnly.cs index 4c5f2c56ba58..91fa7c4493e9 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumIntegerOnly.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumIntegerOnly.cs @@ -35,9 +35,9 @@ public enum RequiredClassRequiredNullableEnumIntegerOnly NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -55,8 +55,8 @@ public static RequiredClassRequiredNullableEnumIntegerOnly FromString(string val if (value.Equals((2).ToString())) return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredClassRequiredNullableEnumIntegerOnly: '{value}'"); } @@ -71,8 +71,8 @@ public static RequiredClassRequiredNullableEnumIntegerOnly FromString(string val if (value.Equals((2).ToString())) return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestEnumParametersEnumQueryIntegerParameter.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestEnumParametersEnumQueryIntegerParameter.cs index 33ff2ce2cc21..1c4aec36c25b 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestEnumParametersEnumQueryIntegerParameter.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestEnumParametersEnumQueryIntegerParameter.cs @@ -35,9 +35,9 @@ public enum TestEnumParametersEnumQueryIntegerParameter NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -55,8 +55,8 @@ public static TestEnumParametersEnumQueryIntegerParameter FromString(string valu if (value.Equals((1).ToString())) return TestEnumParametersEnumQueryIntegerParameter.NUMBER_1; - if (value.Equals((-2).ToString())) - return TestEnumParametersEnumQueryIntegerParameter.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return TestEnumParametersEnumQueryIntegerParameter.NUMBER_null; throw new NotImplementedException($"Could not convert value to type TestEnumParametersEnumQueryIntegerParameter: '{value}'"); } @@ -71,8 +71,8 @@ public static TestEnumParametersEnumQueryIntegerParameter FromString(string valu if (value.Equals((1).ToString())) return TestEnumParametersEnumQueryIntegerParameter.NUMBER_1; - if (value.Equals((-2).ToString())) - return TestEnumParametersEnumQueryIntegerParameter.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return TestEnumParametersEnumQueryIntegerParameter.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/api/openapi.yaml index f772773afefa..56dffed232dc 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1741,13 +1741,13 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_integer_only: enum: - 2 - - -2 + - null type: integer enum_number: enum: @@ -2119,53 +2119,53 @@ components: required_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumTest.cs index c38c46267f5d..47c9b7c2a080 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumTest.cs @@ -227,9 +227,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -243,8 +243,8 @@ public static EnumIntegerEnum EnumIntegerEnumFromString(string value) if (value.Equals((1).ToString())) return EnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return EnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return EnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type EnumIntegerEnum: '{value}'"); } @@ -259,8 +259,8 @@ public static EnumIntegerEnum EnumIntegerEnumFromString(string value) if (value.Equals((1).ToString())) return EnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return EnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return EnumIntegerEnum.NUMBER_null; return null; } @@ -299,9 +299,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -315,8 +315,8 @@ public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) if (value.Equals((2).ToString())) return EnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return EnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return EnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type EnumIntegerOnlyEnum: '{value}'"); } @@ -331,8 +331,8 @@ public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) if (value.Equals((2).ToString())) return EnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return EnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return EnumIntegerOnlyEnum.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/RequiredClass.cs index 5e312a74a8db..aa401db7a36a 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -141,9 +141,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -157,8 +157,8 @@ public static RequiredNotnullableEnumIntegerEnum RequiredNotnullableEnumIntegerE if (value.Equals((1).ToString())) return RequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredNotnullableEnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredNotnullableEnumIntegerEnum: '{value}'"); } @@ -173,8 +173,8 @@ public static RequiredNotnullableEnumIntegerEnum RequiredNotnullableEnumIntegerE if (value.Equals((1).ToString())) return RequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredNotnullableEnumIntegerEnum.NUMBER_null; return null; } @@ -206,9 +206,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -222,8 +222,8 @@ public static RequiredNotnullableEnumIntegerOnlyEnum RequiredNotnullableEnumInte if (value.Equals((2).ToString())) return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredNotnullableEnumIntegerOnlyEnum: '{value}'"); } @@ -238,8 +238,8 @@ public static RequiredNotnullableEnumIntegerOnlyEnum RequiredNotnullableEnumInte if (value.Equals((2).ToString())) return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; return null; } @@ -433,9 +433,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -449,8 +449,8 @@ public static NotrequiredNotnullableEnumIntegerEnum NotrequiredNotnullableEnumIn if (value.Equals((1).ToString())) return NotrequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return NotrequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return NotrequiredNotnullableEnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type NotrequiredNotnullableEnumIntegerEnum: '{value}'"); } @@ -465,8 +465,8 @@ public static NotrequiredNotnullableEnumIntegerEnum NotrequiredNotnullableEnumIn if (value.Equals((1).ToString())) return NotrequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return NotrequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return NotrequiredNotnullableEnumIntegerEnum.NUMBER_null; return null; } @@ -505,9 +505,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -521,8 +521,8 @@ public static NotrequiredNotnullableEnumIntegerOnlyEnum NotrequiredNotnullableEn if (value.Equals((2).ToString())) return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type NotrequiredNotnullableEnumIntegerOnlyEnum: '{value}'"); } @@ -537,8 +537,8 @@ public static NotrequiredNotnullableEnumIntegerOnlyEnum NotrequiredNotnullableEn if (value.Equals((2).ToString())) return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; return null; } @@ -753,9 +753,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -769,8 +769,8 @@ public static NotrequiredNullableEnumIntegerEnum NotrequiredNullableEnumIntegerE if (value.Equals((1).ToString())) return NotrequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return NotrequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return NotrequiredNullableEnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type NotrequiredNullableEnumIntegerEnum: '{value}'"); } @@ -785,8 +785,8 @@ public static NotrequiredNullableEnumIntegerEnum NotrequiredNullableEnumIntegerE if (value.Equals((1).ToString())) return NotrequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return NotrequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return NotrequiredNullableEnumIntegerEnum.NUMBER_null; return null; } @@ -825,9 +825,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -841,8 +841,8 @@ public static NotrequiredNullableEnumIntegerOnlyEnum NotrequiredNullableEnumInte if (value.Equals((2).ToString())) return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type NotrequiredNullableEnumIntegerOnlyEnum: '{value}'"); } @@ -857,8 +857,8 @@ public static NotrequiredNullableEnumIntegerOnlyEnum NotrequiredNullableEnumInte if (value.Equals((2).ToString())) return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_null; return null; } @@ -1076,9 +1076,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -1092,8 +1092,8 @@ public static RequiredNullableEnumIntegerEnum RequiredNullableEnumIntegerEnumFro if (value.Equals((1).ToString())) return RequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredNullableEnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredNullableEnumIntegerEnum: '{value}'"); } @@ -1108,8 +1108,8 @@ public static RequiredNullableEnumIntegerEnum RequiredNullableEnumIntegerEnumFro if (value.Equals((1).ToString())) return RequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredNullableEnumIntegerEnum.NUMBER_null; return null; } @@ -1141,9 +1141,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -1157,8 +1157,8 @@ public static RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnl if (value.Equals((2).ToString())) return RequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredNullableEnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredNullableEnumIntegerOnlyEnum: '{value}'"); } @@ -1173,8 +1173,8 @@ public static RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnl if (value.Equals((2).ToString())) return RequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredNullableEnumIntegerOnlyEnum.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net8/Petstore/api/openapi.yaml index f772773afefa..56dffed232dc 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1741,13 +1741,13 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_integer_only: enum: - 2 - - -2 + - null type: integer enum_number: enum: @@ -2119,53 +2119,53 @@ components: required_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 4bc60ff67247..77487ac802c6 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -225,9 +225,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -241,8 +241,8 @@ public static EnumIntegerEnum EnumIntegerEnumFromString(string value) if (value.Equals((1).ToString())) return EnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return EnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return EnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type EnumIntegerEnum: '{value}'"); } @@ -257,8 +257,8 @@ public static EnumIntegerEnum EnumIntegerEnumFromString(string value) if (value.Equals((1).ToString())) return EnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return EnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return EnumIntegerEnum.NUMBER_null; return null; } @@ -297,9 +297,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -313,8 +313,8 @@ public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) if (value.Equals((2).ToString())) return EnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return EnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return EnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type EnumIntegerOnlyEnum: '{value}'"); } @@ -329,8 +329,8 @@ public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) if (value.Equals((2).ToString())) return EnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return EnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return EnumIntegerOnlyEnum.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index b210eda17b35..73613d050666 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -139,9 +139,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -155,8 +155,8 @@ public static RequiredNotnullableEnumIntegerEnum RequiredNotnullableEnumIntegerE if (value.Equals((1).ToString())) return RequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredNotnullableEnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredNotnullableEnumIntegerEnum: '{value}'"); } @@ -171,8 +171,8 @@ public static RequiredNotnullableEnumIntegerEnum RequiredNotnullableEnumIntegerE if (value.Equals((1).ToString())) return RequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredNotnullableEnumIntegerEnum.NUMBER_null; return null; } @@ -204,9 +204,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -220,8 +220,8 @@ public static RequiredNotnullableEnumIntegerOnlyEnum RequiredNotnullableEnumInte if (value.Equals((2).ToString())) return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredNotnullableEnumIntegerOnlyEnum: '{value}'"); } @@ -236,8 +236,8 @@ public static RequiredNotnullableEnumIntegerOnlyEnum RequiredNotnullableEnumInte if (value.Equals((2).ToString())) return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; return null; } @@ -431,9 +431,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -447,8 +447,8 @@ public static NotrequiredNotnullableEnumIntegerEnum NotrequiredNotnullableEnumIn if (value.Equals((1).ToString())) return NotrequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return NotrequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return NotrequiredNotnullableEnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type NotrequiredNotnullableEnumIntegerEnum: '{value}'"); } @@ -463,8 +463,8 @@ public static NotrequiredNotnullableEnumIntegerEnum NotrequiredNotnullableEnumIn if (value.Equals((1).ToString())) return NotrequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return NotrequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return NotrequiredNotnullableEnumIntegerEnum.NUMBER_null; return null; } @@ -503,9 +503,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -519,8 +519,8 @@ public static NotrequiredNotnullableEnumIntegerOnlyEnum NotrequiredNotnullableEn if (value.Equals((2).ToString())) return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type NotrequiredNotnullableEnumIntegerOnlyEnum: '{value}'"); } @@ -535,8 +535,8 @@ public static NotrequiredNotnullableEnumIntegerOnlyEnum NotrequiredNotnullableEn if (value.Equals((2).ToString())) return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; return null; } @@ -751,9 +751,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -767,8 +767,8 @@ public static NotrequiredNullableEnumIntegerEnum NotrequiredNullableEnumIntegerE if (value.Equals((1).ToString())) return NotrequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return NotrequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return NotrequiredNullableEnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type NotrequiredNullableEnumIntegerEnum: '{value}'"); } @@ -783,8 +783,8 @@ public static NotrequiredNullableEnumIntegerEnum NotrequiredNullableEnumIntegerE if (value.Equals((1).ToString())) return NotrequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return NotrequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return NotrequiredNullableEnumIntegerEnum.NUMBER_null; return null; } @@ -823,9 +823,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -839,8 +839,8 @@ public static NotrequiredNullableEnumIntegerOnlyEnum NotrequiredNullableEnumInte if (value.Equals((2).ToString())) return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type NotrequiredNullableEnumIntegerOnlyEnum: '{value}'"); } @@ -855,8 +855,8 @@ public static NotrequiredNullableEnumIntegerOnlyEnum NotrequiredNullableEnumInte if (value.Equals((2).ToString())) return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_null; return null; } @@ -1074,9 +1074,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -1090,8 +1090,8 @@ public static RequiredNullableEnumIntegerEnum RequiredNullableEnumIntegerEnumFro if (value.Equals((1).ToString())) return RequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredNullableEnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredNullableEnumIntegerEnum: '{value}'"); } @@ -1106,8 +1106,8 @@ public static RequiredNullableEnumIntegerEnum RequiredNullableEnumIntegerEnumFro if (value.Equals((1).ToString())) return RequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredNullableEnumIntegerEnum.NUMBER_null; return null; } @@ -1139,9 +1139,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -1155,8 +1155,8 @@ public static RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnl if (value.Equals((2).ToString())) return RequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredNullableEnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredNullableEnumIntegerOnlyEnum: '{value}'"); } @@ -1171,8 +1171,8 @@ public static RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnl if (value.Equals((2).ToString())) return RequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredNullableEnumIntegerOnlyEnum.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/api/openapi.yaml index f772773afefa..56dffed232dc 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1741,13 +1741,13 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_integer_only: enum: - 2 - - -2 + - null type: integer enum_number: enum: @@ -2119,53 +2119,53 @@ components: required_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/EnumTest.cs index dbd6205c64da..101a90a4c7a0 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/EnumTest.cs @@ -228,9 +228,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -244,8 +244,8 @@ public static EnumIntegerEnum EnumIntegerEnumFromString(string value) if (value.Equals((1).ToString())) return EnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return EnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return EnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type EnumIntegerEnum: '{value}'"); } @@ -260,8 +260,8 @@ public static EnumIntegerEnum EnumIntegerEnumFromString(string value) if (value.Equals((1).ToString())) return EnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return EnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return EnumIntegerEnum.NUMBER_null; return null; } @@ -300,9 +300,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -316,8 +316,8 @@ public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) if (value.Equals((2).ToString())) return EnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return EnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return EnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type EnumIntegerOnlyEnum: '{value}'"); } @@ -332,8 +332,8 @@ public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) if (value.Equals((2).ToString())) return EnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return EnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return EnumIntegerOnlyEnum.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/RequiredClass.cs index 441b3c0f879a..4293a12b943b 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -142,9 +142,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -158,8 +158,8 @@ public static RequiredNotnullableEnumIntegerEnum RequiredNotnullableEnumIntegerE if (value.Equals((1).ToString())) return RequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredNotnullableEnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredNotnullableEnumIntegerEnum: '{value}'"); } @@ -174,8 +174,8 @@ public static RequiredNotnullableEnumIntegerEnum RequiredNotnullableEnumIntegerE if (value.Equals((1).ToString())) return RequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredNotnullableEnumIntegerEnum.NUMBER_null; return null; } @@ -207,9 +207,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -223,8 +223,8 @@ public static RequiredNotnullableEnumIntegerOnlyEnum RequiredNotnullableEnumInte if (value.Equals((2).ToString())) return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredNotnullableEnumIntegerOnlyEnum: '{value}'"); } @@ -239,8 +239,8 @@ public static RequiredNotnullableEnumIntegerOnlyEnum RequiredNotnullableEnumInte if (value.Equals((2).ToString())) return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; return null; } @@ -434,9 +434,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -450,8 +450,8 @@ public static NotrequiredNotnullableEnumIntegerEnum NotrequiredNotnullableEnumIn if (value.Equals((1).ToString())) return NotrequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return NotrequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return NotrequiredNotnullableEnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type NotrequiredNotnullableEnumIntegerEnum: '{value}'"); } @@ -466,8 +466,8 @@ public static NotrequiredNotnullableEnumIntegerEnum NotrequiredNotnullableEnumIn if (value.Equals((1).ToString())) return NotrequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return NotrequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return NotrequiredNotnullableEnumIntegerEnum.NUMBER_null; return null; } @@ -506,9 +506,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -522,8 +522,8 @@ public static NotrequiredNotnullableEnumIntegerOnlyEnum NotrequiredNotnullableEn if (value.Equals((2).ToString())) return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type NotrequiredNotnullableEnumIntegerOnlyEnum: '{value}'"); } @@ -538,8 +538,8 @@ public static NotrequiredNotnullableEnumIntegerOnlyEnum NotrequiredNotnullableEn if (value.Equals((2).ToString())) return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; return null; } @@ -754,9 +754,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -770,8 +770,8 @@ public static NotrequiredNullableEnumIntegerEnum NotrequiredNullableEnumIntegerE if (value.Equals((1).ToString())) return NotrequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return NotrequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return NotrequiredNullableEnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type NotrequiredNullableEnumIntegerEnum: '{value}'"); } @@ -786,8 +786,8 @@ public static NotrequiredNullableEnumIntegerEnum NotrequiredNullableEnumIntegerE if (value.Equals((1).ToString())) return NotrequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return NotrequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return NotrequiredNullableEnumIntegerEnum.NUMBER_null; return null; } @@ -826,9 +826,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -842,8 +842,8 @@ public static NotrequiredNullableEnumIntegerOnlyEnum NotrequiredNullableEnumInte if (value.Equals((2).ToString())) return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type NotrequiredNullableEnumIntegerOnlyEnum: '{value}'"); } @@ -858,8 +858,8 @@ public static NotrequiredNullableEnumIntegerOnlyEnum NotrequiredNullableEnumInte if (value.Equals((2).ToString())) return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_null; return null; } @@ -1077,9 +1077,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -1093,8 +1093,8 @@ public static RequiredNullableEnumIntegerEnum RequiredNullableEnumIntegerEnumFro if (value.Equals((1).ToString())) return RequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredNullableEnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredNullableEnumIntegerEnum: '{value}'"); } @@ -1109,8 +1109,8 @@ public static RequiredNullableEnumIntegerEnum RequiredNullableEnumIntegerEnumFro if (value.Equals((1).ToString())) return RequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredNullableEnumIntegerEnum.NUMBER_null; return null; } @@ -1142,9 +1142,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -1158,8 +1158,8 @@ public static RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnl if (value.Equals((2).ToString())) return RequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredNullableEnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredNullableEnumIntegerOnlyEnum: '{value}'"); } @@ -1174,8 +1174,8 @@ public static RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnl if (value.Equals((2).ToString())) return RequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredNullableEnumIntegerOnlyEnum.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/api/openapi.yaml index f772773afefa..56dffed232dc 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1741,13 +1741,13 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_integer_only: enum: - 2 - - -2 + - null type: integer enum_number: enum: @@ -2119,53 +2119,53 @@ components: required_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 0d657779fdc9..6330b46aa33c 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -225,9 +225,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -241,8 +241,8 @@ public static EnumIntegerEnum EnumIntegerEnumFromString(string value) if (value.Equals((1).ToString())) return EnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return EnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return EnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type EnumIntegerEnum: '{value}'"); } @@ -257,8 +257,8 @@ public static EnumIntegerEnum EnumIntegerEnumFromString(string value) if (value.Equals((1).ToString())) return EnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return EnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return EnumIntegerEnum.NUMBER_null; return null; } @@ -297,9 +297,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -313,8 +313,8 @@ public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) if (value.Equals((2).ToString())) return EnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return EnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return EnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type EnumIntegerOnlyEnum: '{value}'"); } @@ -329,8 +329,8 @@ public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) if (value.Equals((2).ToString())) return EnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return EnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return EnumIntegerOnlyEnum.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index fdc63ca701d5..5fdf36da7b50 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -139,9 +139,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -155,8 +155,8 @@ public static RequiredNotnullableEnumIntegerEnum RequiredNotnullableEnumIntegerE if (value.Equals((1).ToString())) return RequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredNotnullableEnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredNotnullableEnumIntegerEnum: '{value}'"); } @@ -171,8 +171,8 @@ public static RequiredNotnullableEnumIntegerEnum RequiredNotnullableEnumIntegerE if (value.Equals((1).ToString())) return RequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredNotnullableEnumIntegerEnum.NUMBER_null; return null; } @@ -204,9 +204,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -220,8 +220,8 @@ public static RequiredNotnullableEnumIntegerOnlyEnum RequiredNotnullableEnumInte if (value.Equals((2).ToString())) return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredNotnullableEnumIntegerOnlyEnum: '{value}'"); } @@ -236,8 +236,8 @@ public static RequiredNotnullableEnumIntegerOnlyEnum RequiredNotnullableEnumInte if (value.Equals((2).ToString())) return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; return null; } @@ -431,9 +431,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -447,8 +447,8 @@ public static NotrequiredNotnullableEnumIntegerEnum NotrequiredNotnullableEnumIn if (value.Equals((1).ToString())) return NotrequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return NotrequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return NotrequiredNotnullableEnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type NotrequiredNotnullableEnumIntegerEnum: '{value}'"); } @@ -463,8 +463,8 @@ public static NotrequiredNotnullableEnumIntegerEnum NotrequiredNotnullableEnumIn if (value.Equals((1).ToString())) return NotrequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return NotrequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return NotrequiredNotnullableEnumIntegerEnum.NUMBER_null; return null; } @@ -503,9 +503,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -519,8 +519,8 @@ public static NotrequiredNotnullableEnumIntegerOnlyEnum NotrequiredNotnullableEn if (value.Equals((2).ToString())) return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type NotrequiredNotnullableEnumIntegerOnlyEnum: '{value}'"); } @@ -535,8 +535,8 @@ public static NotrequiredNotnullableEnumIntegerOnlyEnum NotrequiredNotnullableEn if (value.Equals((2).ToString())) return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; return null; } @@ -751,9 +751,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -767,8 +767,8 @@ public static NotrequiredNullableEnumIntegerEnum NotrequiredNullableEnumIntegerE if (value.Equals((1).ToString())) return NotrequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return NotrequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return NotrequiredNullableEnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type NotrequiredNullableEnumIntegerEnum: '{value}'"); } @@ -783,8 +783,8 @@ public static NotrequiredNullableEnumIntegerEnum NotrequiredNullableEnumIntegerE if (value.Equals((1).ToString())) return NotrequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return NotrequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return NotrequiredNullableEnumIntegerEnum.NUMBER_null; return null; } @@ -823,9 +823,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -839,8 +839,8 @@ public static NotrequiredNullableEnumIntegerOnlyEnum NotrequiredNullableEnumInte if (value.Equals((2).ToString())) return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type NotrequiredNullableEnumIntegerOnlyEnum: '{value}'"); } @@ -855,8 +855,8 @@ public static NotrequiredNullableEnumIntegerOnlyEnum NotrequiredNullableEnumInte if (value.Equals((2).ToString())) return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_null; return null; } @@ -1074,9 +1074,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } /// @@ -1090,8 +1090,8 @@ public static RequiredNullableEnumIntegerEnum RequiredNullableEnumIntegerEnumFro if (value.Equals((1).ToString())) return RequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredNullableEnumIntegerEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredNullableEnumIntegerEnum: '{value}'"); } @@ -1106,8 +1106,8 @@ public static RequiredNullableEnumIntegerEnum RequiredNullableEnumIntegerEnumFro if (value.Equals((1).ToString())) return RequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((-1).ToString())) - return RequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; + if (value.Equals((null).ToString())) + return RequiredNullableEnumIntegerEnum.NUMBER_null; return null; } @@ -1139,9 +1139,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } /// @@ -1155,8 +1155,8 @@ public static RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnl if (value.Equals((2).ToString())) return RequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredNullableEnumIntegerOnlyEnum.NUMBER_null; throw new NotImplementedException($"Could not convert value to type RequiredNullableEnumIntegerOnlyEnum: '{value}'"); } @@ -1171,8 +1171,8 @@ public static RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnl if (value.Equals((2).ToString())) return RequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((-2).ToString())) - return RequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; + if (value.Equals((null).ToString())) + return RequiredNullableEnumIntegerOnlyEnum.NUMBER_null; return null; } diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/api/openapi.yaml index f772773afefa..56dffed232dc 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1741,13 +1741,13 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_integer_only: enum: - 2 - - -2 + - null type: integer enum_number: enum: @@ -2119,53 +2119,53 @@ components: required_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 3309623635ca..e3392e2757bc 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -166,9 +166,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -188,9 +188,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index 3d5eaf99a7d5..33d55f298f8f 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -44,9 +44,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -66,9 +66,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -88,9 +88,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -110,9 +110,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -133,9 +133,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } @@ -155,9 +155,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } @@ -178,9 +178,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } @@ -200,9 +200,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index e38cdb565be0..2912c14822b0 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -44,6 +44,7 @@ public OAuthAuthenticator( _tokenUrl = tokenUrl; _clientId = clientId; _clientSecret = clientSecret; + _scope = scope; _serializerSettings = serializerSettings; _configuration = configuration; diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/api/openapi.yaml index 6cfc875b0745..e31ecce97273 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1731,13 +1731,13 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_integer_only: enum: - 2 - - -2 + - null type: integer enum_number: enum: @@ -2109,53 +2109,53 @@ components: required_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 27d1193954ea..8d1a53515091 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -165,9 +165,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -187,9 +187,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index d040204ece33..edc750d53536 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -43,9 +43,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -65,9 +65,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -87,9 +87,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -109,9 +109,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -132,9 +132,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } @@ -154,9 +154,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } @@ -177,9 +177,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } @@ -199,9 +199,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/api/openapi.yaml index 6cfc875b0745..e31ecce97273 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1731,13 +1731,13 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_integer_only: enum: - 2 - - -2 + - null type: integer enum_number: enum: @@ -2109,53 +2109,53 @@ components: required_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 27d1193954ea..8d1a53515091 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -165,9 +165,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -187,9 +187,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index d040204ece33..edc750d53536 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -43,9 +43,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -65,9 +65,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -87,9 +87,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -109,9 +109,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -132,9 +132,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } @@ -154,9 +154,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } @@ -177,9 +177,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } @@ -199,9 +199,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/api/openapi.yaml index 6cfc875b0745..e31ecce97273 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1731,13 +1731,13 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_integer_only: enum: - 2 - - -2 + - null type: integer enum_number: enum: @@ -2109,53 +2109,53 @@ components: required_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index 24a87bd34345..bcebd8c10482 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -98,7 +98,7 @@ async Task GetToken() } var response = await client.PostAsync(request).ConfigureAwait(false); - + // RFC6749 - token_type is case insensitive. // RFC6750 - In Authorization header Bearer should be capitalized. // Fix the capitalization irrespective of token_type casing. diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumTest.cs index 27d1193954ea..8d1a53515091 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumTest.cs @@ -165,9 +165,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -187,9 +187,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RequiredClass.cs index d8230f423177..87a02c42d0a5 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -43,9 +43,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -65,9 +65,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -87,9 +87,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -109,9 +109,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -132,9 +132,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } @@ -154,9 +154,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } @@ -177,9 +177,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } @@ -199,9 +199,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/net7/Petstore/api/openapi.yaml index f772773afefa..56dffed232dc 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1741,13 +1741,13 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_integer_only: enum: - 2 - - -2 + - null type: integer enum_number: enum: @@ -2119,53 +2119,53 @@ components: required_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index bf17521990cd..4a2a08e59790 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -165,9 +165,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -187,9 +187,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index 5005d284a8e0..461e33569717 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -43,9 +43,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -65,9 +65,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -87,9 +87,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -109,9 +109,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -132,9 +132,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } @@ -154,9 +154,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } @@ -177,9 +177,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } @@ -199,9 +199,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/api/openapi.yaml index f772773afefa..56dffed232dc 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1741,13 +1741,13 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_integer_only: enum: - 2 - - -2 + - null type: integer enum_number: enum: @@ -2119,53 +2119,53 @@ components: required_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumTest.cs index 8f0ea67b780f..bb9ec37743a6 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumTest.cs @@ -205,9 +205,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -247,9 +247,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RequiredClass.cs index 307699149098..83037a57ac8c 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -43,9 +43,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -85,9 +85,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -127,9 +127,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -169,9 +169,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -212,9 +212,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } @@ -254,9 +254,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } @@ -297,9 +297,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } @@ -339,9 +339,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/api/openapi.yaml index 6cfc875b0745..e31ecce97273 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1731,13 +1731,13 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_integer_only: enum: - 2 - - -2 + - null type: integer enum_number: enum: @@ -2109,53 +2109,53 @@ components: required_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 27d1193954ea..8d1a53515091 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -165,9 +165,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -187,9 +187,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index d040204ece33..edc750d53536 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -43,9 +43,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -65,9 +65,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -87,9 +87,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -109,9 +109,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -132,9 +132,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } @@ -154,9 +154,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } @@ -177,9 +177,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } @@ -199,9 +199,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/api/openapi.yaml index f772773afefa..56dffed232dc 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1741,13 +1741,13 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_integer_only: enum: - 2 - - -2 + - null type: integer enum_number: enum: @@ -2119,53 +2119,53 @@ components: required_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - -1 + - null format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - -2 + - null nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 627c8a3acd40..3630d41387d7 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -163,9 +163,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -185,9 +185,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index eb89d56999fc..abb06543e671 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -41,9 +41,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -63,9 +63,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -85,9 +85,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -107,9 +107,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_MINUS_1 for value: -1 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_1 = -1 + NUMBER_null = null } @@ -130,9 +130,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } @@ -152,9 +152,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } @@ -175,9 +175,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } @@ -197,9 +197,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_MINUS_2 for value: -2 + /// Enum NUMBER_null for value: null /// - NUMBER_MINUS_2 = -2 + NUMBER_null = null } diff --git a/samples/client/petstore/go/go-petstore/api/openapi.yaml b/samples/client/petstore/go/go-petstore/api/openapi.yaml index 8d9c8d5ff5e4..9452debd1f36 100644 --- a/samples/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/client/petstore/go/go-petstore/api/openapi.yaml @@ -702,7 +702,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer - description: Query parameter enum test (double) @@ -1789,7 +1789,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -1824,7 +1823,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -1850,7 +1848,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -1885,7 +1882,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -1920,7 +1916,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -1957,7 +1952,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs index 1f120a7c2fab..a2997251c12a 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs @@ -113,7 +113,7 @@ newtype EnumHeaderStringArray = EnumHeaderStringArray { unEnumHeaderStringArray newtype EnumQueryDouble = EnumQueryDouble { unEnumQueryDouble :: E'EnumNumber } deriving (P.Eq, P.Show) -- ** EnumQueryInteger -newtype EnumQueryInteger = EnumQueryInteger { unEnumQueryInteger :: E'EnumQueryInteger } deriving (P.Eq, P.Show) +newtype EnumQueryInteger = EnumQueryInteger { unEnumQueryInteger :: E'EnumInteger } deriving (P.Eq, P.Show) -- ** EnumQueryString newtype EnumQueryString = EnumQueryString { unEnumQueryString :: E'EnumFormString } deriving (P.Eq, P.Show) @@ -2060,7 +2060,7 @@ toE'EnumFormStringArray = \case -- | Enum of 'Int' data E'EnumInteger = E'EnumInteger'Num1 -- ^ @1@ - | E'EnumInteger'NumMinus_1 -- ^ @-1@ + | E'EnumInteger'Numnull -- ^ @null@ deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) instance A.ToJSON E'EnumInteger where toJSON = A.toJSON . fromE'EnumInteger @@ -2073,13 +2073,13 @@ instance MimeRender MimeMultipartFormData E'EnumInteger where mimeRender _ = mim fromE'EnumInteger :: E'EnumInteger -> Int fromE'EnumInteger = \case E'EnumInteger'Num1 -> 1 - E'EnumInteger'NumMinus_1 -> -1 + E'EnumInteger'Numnull -> null -- | parse 'E'EnumInteger' enum toE'EnumInteger :: Int -> P.Either String E'EnumInteger toE'EnumInteger = \case 1 -> P.Right E'EnumInteger'Num1 - -1 -> P.Right E'EnumInteger'NumMinus_1 + null -> P.Right E'EnumInteger'Numnull s -> P.Left $ "toE'EnumInteger: enum parse failure: " P.++ P.show s @@ -2111,34 +2111,6 @@ toE'EnumNumber = \case s -> P.Left $ "toE'EnumNumber: enum parse failure: " P.++ P.show s --- ** E'EnumQueryInteger - --- | Enum of 'Int' -data E'EnumQueryInteger - = E'EnumQueryInteger'Num1 -- ^ @1@ - | E'EnumQueryInteger'NumMinus_2 -- ^ @-2@ - deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) - -instance A.ToJSON E'EnumQueryInteger where toJSON = A.toJSON . fromE'EnumQueryInteger -instance A.FromJSON E'EnumQueryInteger where parseJSON o = P.either P.fail (pure . P.id) . toE'EnumQueryInteger =<< A.parseJSON o -instance WH.ToHttpApiData E'EnumQueryInteger where toQueryParam = WH.toQueryParam . fromE'EnumQueryInteger -instance WH.FromHttpApiData E'EnumQueryInteger where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'EnumQueryInteger -instance MimeRender MimeMultipartFormData E'EnumQueryInteger where mimeRender _ = mimeRenderDefaultMultipartFormData - --- | unwrap 'E'EnumQueryInteger' enum -fromE'EnumQueryInteger :: E'EnumQueryInteger -> Int -fromE'EnumQueryInteger = \case - E'EnumQueryInteger'Num1 -> 1 - E'EnumQueryInteger'NumMinus_2 -> -2 - --- | parse 'E'EnumQueryInteger' enum -toE'EnumQueryInteger :: Int -> P.Either String E'EnumQueryInteger -toE'EnumQueryInteger = \case - 1 -> P.Right E'EnumQueryInteger'Num1 - -2 -> P.Right E'EnumQueryInteger'NumMinus_2 - s -> P.Left $ "toE'EnumQueryInteger: enum parse failure: " P.++ P.show s - - -- ** E'EnumString -- | Enum of 'Text' diff --git a/samples/client/petstore/haskell-http-client/openapi.yaml b/samples/client/petstore/haskell-http-client/openapi.yaml index 3447e0a4c1ad..ee2e0eed8bf9 100644 --- a/samples/client/petstore/haskell-http-client/openapi.yaml +++ b/samples/client/petstore/haskell-http-client/openapi.yaml @@ -798,7 +798,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1556,7 +1556,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: @@ -1909,7 +1909,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -1944,7 +1943,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -1970,7 +1968,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -2005,7 +2002,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2040,7 +2036,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2077,7 +2072,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/haskell-http-client/tests/Instances.hs b/samples/client/petstore/haskell-http-client/tests/Instances.hs index 713272b2f7b4..21c16142d7ff 100644 --- a/samples/client/petstore/haskell-http-client/tests/Instances.hs +++ b/samples/client/petstore/haskell-http-client/tests/Instances.hs @@ -599,9 +599,6 @@ instance Arbitrary E'EnumInteger where instance Arbitrary E'EnumNumber where arbitrary = arbitraryBoundedEnum -instance Arbitrary E'EnumQueryInteger where - arbitrary = arbitraryBoundedEnum - instance Arbitrary E'EnumString where arbitrary = arbitraryBoundedEnum diff --git a/samples/client/petstore/java-helidon-client/v3/mp/docs/EnumTest.md b/samples/client/petstore/java-helidon-client/v3/mp/docs/EnumTest.md index 380a2aef0bc3..b000d0de1c3b 100644 --- a/samples/client/petstore/java-helidon-client/v3/mp/docs/EnumTest.md +++ b/samples/client/petstore/java-helidon-client/v3/mp/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_MINUS_1 | -1 | +| NUMBER_null | null | diff --git a/samples/client/petstore/java-helidon-client/v3/mp/docs/FakeApi.md b/samples/client/petstore/java-helidon-client/v3/mp/docs/FakeApi.md index 4cdd475689dd..1607080685b9 100644 --- a/samples/client/petstore/java-helidon-client/v3/mp/docs/FakeApi.md +++ b/samples/client/petstore/java-helidon-client/v3/mp/docs/FakeApi.md @@ -541,7 +541,7 @@ To test enum parameters | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java-helidon-client/v3/mp/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java-helidon-client/v3/mp/src/main/java/org/openapitools/client/model/EnumTest.java index 538f09adcede..10b3fca45da0 100644 --- a/samples/client/petstore/java-helidon-client/v3/mp/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java-helidon-client/v3/mp/src/main/java/org/openapitools/client/model/EnumTest.java @@ -78,7 +78,7 @@ public String toString() { public enum EnumIntegerEnum { - NUMBER_1(Integer.valueOf(1)), NUMBER_MINUS_1(Integer.valueOf(-1)); + NUMBER_1(Integer.valueOf(1)), NUMBER_null(Integer.valueOf(null)); Integer value; diff --git a/samples/client/petstore/java-helidon-client/v3/se/docs/EnumTest.md b/samples/client/petstore/java-helidon-client/v3/se/docs/EnumTest.md index 380a2aef0bc3..b000d0de1c3b 100644 --- a/samples/client/petstore/java-helidon-client/v3/se/docs/EnumTest.md +++ b/samples/client/petstore/java-helidon-client/v3/se/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_MINUS_1 | -1 | +| NUMBER_null | null | diff --git a/samples/client/petstore/java-helidon-client/v3/se/docs/FakeApi.md b/samples/client/petstore/java-helidon-client/v3/se/docs/FakeApi.md index 37a949ea0508..a75f27d3106f 100644 --- a/samples/client/petstore/java-helidon-client/v3/se/docs/FakeApi.md +++ b/samples/client/petstore/java-helidon-client/v3/se/docs/FakeApi.md @@ -1029,7 +1029,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java-helidon-client/v3/se/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java-helidon-client/v3/se/src/main/java/org/openapitools/client/model/EnumTest.java index 538f09adcede..10b3fca45da0 100644 --- a/samples/client/petstore/java-helidon-client/v3/se/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java-helidon-client/v3/se/src/main/java/org/openapitools/client/model/EnumTest.java @@ -78,7 +78,7 @@ public String toString() { public enum EnumIntegerEnum { - NUMBER_1(Integer.valueOf(1)), NUMBER_MINUS_1(Integer.valueOf(-1)); + NUMBER_1(Integer.valueOf(1)), NUMBER_null(Integer.valueOf(null)); Integer value; diff --git a/samples/client/petstore/java-helidon-client/v4/mp/docs/EnumTest.md b/samples/client/petstore/java-helidon-client/v4/mp/docs/EnumTest.md index 380a2aef0bc3..b000d0de1c3b 100644 --- a/samples/client/petstore/java-helidon-client/v4/mp/docs/EnumTest.md +++ b/samples/client/petstore/java-helidon-client/v4/mp/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_MINUS_1 | -1 | +| NUMBER_null | null | diff --git a/samples/client/petstore/java-helidon-client/v4/mp/docs/FakeApi.md b/samples/client/petstore/java-helidon-client/v4/mp/docs/FakeApi.md index 4cdd475689dd..1607080685b9 100644 --- a/samples/client/petstore/java-helidon-client/v4/mp/docs/FakeApi.md +++ b/samples/client/petstore/java-helidon-client/v4/mp/docs/FakeApi.md @@ -541,7 +541,7 @@ To test enum parameters | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java-helidon-client/v4/mp/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java-helidon-client/v4/mp/src/main/java/org/openapitools/client/model/EnumTest.java index 538f09adcede..10b3fca45da0 100644 --- a/samples/client/petstore/java-helidon-client/v4/mp/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java-helidon-client/v4/mp/src/main/java/org/openapitools/client/model/EnumTest.java @@ -78,7 +78,7 @@ public String toString() { public enum EnumIntegerEnum { - NUMBER_1(Integer.valueOf(1)), NUMBER_MINUS_1(Integer.valueOf(-1)); + NUMBER_1(Integer.valueOf(1)), NUMBER_null(Integer.valueOf(null)); Integer value; diff --git a/samples/client/petstore/java-micronaut-client/docs/apis/FakeApi.md b/samples/client/petstore/java-micronaut-client/docs/apis/FakeApi.md index 50260b878f48..015f5370951b 100644 --- a/samples/client/petstore/java-micronaut-client/docs/apis/FakeApi.md +++ b/samples/client/petstore/java-micronaut-client/docs/apis/FakeApi.md @@ -299,7 +299,7 @@ To test enum parameters | **enumHeaderString** | `String`| Header parameter enum test (string) | [optional parameter] [default to `-efg`] [enum: `_abc`, `-efg`, `(xyz)`] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional parameter] [enum: `>`, `$`] | | **enumQueryString** | `String`| Query parameter enum test (string) | [optional parameter] [default to `-efg`] [enum: `_abc`, `-efg`, `(xyz)`] | -| **enumQueryInteger** | `Integer`| Query parameter enum test (double) | [optional parameter] [enum: `1`, `-2`] | +| **enumQueryInteger** | `Integer`| Query parameter enum test (double) | [optional parameter] [enum: `1`, ``] | | **enumQueryDouble** | `Double`| Query parameter enum test (double) | [optional parameter] [enum: `1.1`, `-1.2`] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional parameter] [default to `$`] [enum: `>`, `$`] | | **enumFormString** | `String`| Form parameter enum test (string) | [optional parameter] [default to `-efg`] [enum: `_abc`, `-efg`, `(xyz)`] | diff --git a/samples/client/petstore/java/apache-httpclient/api/openapi.yaml b/samples/client/petstore/java/apache-httpclient/api/openapi.yaml index 1eddf878948c..135d380a1aaa 100644 --- a/samples/client/petstore/java/apache-httpclient/api/openapi.yaml +++ b/samples/client/petstore/java/apache-httpclient/api/openapi.yaml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: diff --git a/samples/client/petstore/java/apache-httpclient/docs/EnumTest.md b/samples/client/petstore/java/apache-httpclient/docs/EnumTest.md index 380a2aef0bc3..b000d0de1c3b 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/EnumTest.md +++ b/samples/client/petstore/java/apache-httpclient/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_MINUS_1 | -1 | +| NUMBER_null | null | diff --git a/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md b/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md index 37a949ea0508..a75f27d3106f 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md +++ b/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md @@ -1029,7 +1029,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumTest.java index e0012a9e5c49..fb0cf3625d0d 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumTest.java @@ -136,7 +136,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml b/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml index de407d13b2cf..793ba3d2ffb4 100644 --- a/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml +++ b/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,7 +1894,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -1929,7 +1928,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -1955,7 +1953,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -1990,7 +1987,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2025,7 +2021,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2062,7 +2057,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/feign/api/openapi.yaml b/samples/client/petstore/java/feign/api/openapi.yaml index 1eddf878948c..135d380a1aaa 100644 --- a/samples/client/petstore/java/feign/api/openapi.yaml +++ b/samples/client/petstore/java/feign/api/openapi.yaml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java index a603977ce0b6..100a468344ee 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java @@ -133,7 +133,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/client/petstore/java/google-api-client/api/openapi.yaml b/samples/client/petstore/java/google-api-client/api/openapi.yaml index de407d13b2cf..793ba3d2ffb4 100644 --- a/samples/client/petstore/java/google-api-client/api/openapi.yaml +++ b/samples/client/petstore/java/google-api-client/api/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,7 +1894,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -1929,7 +1928,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -1955,7 +1953,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -1990,7 +1987,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2025,7 +2021,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2062,7 +2057,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/google-api-client/docs/FakeApi.md b/samples/client/petstore/java/google-api-client/docs/FakeApi.md index 627366e41db3..1db935b05f74 100644 --- a/samples/client/petstore/java/google-api-client/docs/FakeApi.md +++ b/samples/client/petstore/java/google-api-client/docs/FakeApi.md @@ -698,7 +698,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml b/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml index de407d13b2cf..793ba3d2ffb4 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,7 +1894,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -1929,7 +1928,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -1955,7 +1953,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -1990,7 +1987,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2025,7 +2021,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2062,7 +2057,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md index d21432dbf3e4..daf20fd7ef7c 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md @@ -697,7 +697,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | **List<String>**| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | **List<String>**| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/jersey2-java8/api/openapi.yaml b/samples/client/petstore/java/jersey2-java8/api/openapi.yaml index de407d13b2cf..793ba3d2ffb4 100644 --- a/samples/client/petstore/java/jersey2-java8/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java8/api/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,7 +1894,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -1929,7 +1928,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -1955,7 +1953,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -1990,7 +1987,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2025,7 +2021,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2062,7 +2057,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md index 84167f65462a..fb24b92d5853 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md @@ -697,7 +697,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | **List<String>**| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | **List<String>**| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/jersey3/api/openapi.yaml b/samples/client/petstore/java/jersey3/api/openapi.yaml index 25e78fa9e305..242de316b9e9 100644 --- a/samples/client/petstore/java/jersey3/api/openapi.yaml +++ b/samples/client/petstore/java/jersey3/api/openapi.yaml @@ -790,7 +790,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1672,13 +1672,13 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_integer_only: enum: - 2 - - -2 + - null type: integer enum_number: enum: diff --git a/samples/client/petstore/java/jersey3/docs/EnumTest.md b/samples/client/petstore/java/jersey3/docs/EnumTest.md index 3e226e18b50b..7a3c0981f505 100644 --- a/samples/client/petstore/java/jersey3/docs/EnumTest.md +++ b/samples/client/petstore/java/jersey3/docs/EnumTest.md @@ -44,7 +44,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_MINUS_1 | -1 | +| NUMBER_null | null | @@ -53,7 +53,7 @@ | Name | Value | |---- | -----| | NUMBER_2 | 2 | -| NUMBER_MINUS_2 | -2 | +| NUMBER_null | null | diff --git a/samples/client/petstore/java/jersey3/docs/FakeApi.md b/samples/client/petstore/java/jersey3/docs/FakeApi.md index 7d45cd6a51b8..53e254a333ae 100644 --- a/samples/client/petstore/java/jersey3/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey3/docs/FakeApi.md @@ -883,7 +883,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | **List<String>**| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | **List<String>**| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumTest.java index fd569abed2f6..98d9f4eabe1c 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumTest.java @@ -139,7 +139,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; @@ -177,7 +177,7 @@ public static EnumIntegerEnum fromValue(Integer value) { public enum EnumIntegerOnlyEnum { NUMBER_2(2), - NUMBER_MINUS_2(-2); + NUMBER_null(null); private Integer value; diff --git a/samples/client/petstore/java/native-async/api/openapi.yaml b/samples/client/petstore/java/native-async/api/openapi.yaml index 1be1726129a5..3a9d39cc81d1 100644 --- a/samples/client/petstore/java/native-async/api/openapi.yaml +++ b/samples/client/petstore/java/native-async/api/openapi.yaml @@ -790,7 +790,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1683,13 +1683,13 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_integer_only: enum: - 2 - - -2 + - null type: integer enum_number: enum: diff --git a/samples/client/petstore/java/native-async/docs/EnumTest.md b/samples/client/petstore/java/native-async/docs/EnumTest.md index 3e226e18b50b..7a3c0981f505 100644 --- a/samples/client/petstore/java/native-async/docs/EnumTest.md +++ b/samples/client/petstore/java/native-async/docs/EnumTest.md @@ -44,7 +44,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_MINUS_1 | -1 | +| NUMBER_null | null | @@ -53,7 +53,7 @@ | Name | Value | |---- | -----| | NUMBER_2 | 2 | -| NUMBER_MINUS_2 | -2 | +| NUMBER_null | null | diff --git a/samples/client/petstore/java/native-async/docs/FakeApi.md b/samples/client/petstore/java/native-async/docs/FakeApi.md index e10d657aaa82..c8a2ec123c3a 100644 --- a/samples/client/petstore/java/native-async/docs/FakeApi.md +++ b/samples/client/petstore/java/native-async/docs/FakeApi.md @@ -1975,7 +1975,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | @@ -2065,7 +2065,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/EnumTest.java index 29adafa137b0..6b7fc291ad07 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/EnumTest.java @@ -139,7 +139,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; @@ -177,7 +177,7 @@ public static EnumIntegerEnum fromValue(Integer value) { public enum EnumIntegerOnlyEnum { NUMBER_2(2), - NUMBER_MINUS_2(-2); + NUMBER_null(null); private Integer value; diff --git a/samples/client/petstore/java/native/api/openapi.yaml b/samples/client/petstore/java/native/api/openapi.yaml index 1be1726129a5..3a9d39cc81d1 100644 --- a/samples/client/petstore/java/native/api/openapi.yaml +++ b/samples/client/petstore/java/native/api/openapi.yaml @@ -790,7 +790,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1683,13 +1683,13 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_integer_only: enum: - 2 - - -2 + - null type: integer enum_number: enum: diff --git a/samples/client/petstore/java/native/docs/EnumTest.md b/samples/client/petstore/java/native/docs/EnumTest.md index 3e226e18b50b..7a3c0981f505 100644 --- a/samples/client/petstore/java/native/docs/EnumTest.md +++ b/samples/client/petstore/java/native/docs/EnumTest.md @@ -44,7 +44,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_MINUS_1 | -1 | +| NUMBER_null | null | @@ -53,7 +53,7 @@ | Name | Value | |---- | -----| | NUMBER_2 | 2 | -| NUMBER_MINUS_2 | -2 | +| NUMBER_null | null | diff --git a/samples/client/petstore/java/native/docs/FakeApi.md b/samples/client/petstore/java/native/docs/FakeApi.md index f9dd65ba4ec9..b5722291dffc 100644 --- a/samples/client/petstore/java/native/docs/FakeApi.md +++ b/samples/client/petstore/java/native/docs/FakeApi.md @@ -1857,7 +1857,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | @@ -1939,7 +1939,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java index fd11237555ef..4de3c6fe8349 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java @@ -139,7 +139,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; @@ -177,7 +177,7 @@ public static EnumIntegerEnum fromValue(Integer value) { public enum EnumIntegerOnlyEnum { NUMBER_2(2), - NUMBER_MINUS_2(-2); + NUMBER_null(null); private Integer value; diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md index 98f0b0098b8b..b1b95475a8c7 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md @@ -659,7 +659,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml index de407d13b2cf..793ba3d2ffb4 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,7 +1894,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -1929,7 +1928,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -1955,7 +1953,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -1990,7 +1987,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2025,7 +2021,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2062,7 +2057,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml index de407d13b2cf..793ba3d2ffb4 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,7 +1894,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -1929,7 +1928,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -1955,7 +1953,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -1990,7 +1987,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2025,7 +2021,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2062,7 +2057,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md index 98f0b0098b8b..b1b95475a8c7 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md @@ -659,7 +659,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml index 45059a376787..c4169774a945 100644 --- a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml @@ -787,7 +787,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1899,13 +1899,13 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_integer_only: enum: - 2 - - -2 + - null type: integer enum_number: enum: diff --git a/samples/client/petstore/java/okhttp-gson/docs/EnumTest.md b/samples/client/petstore/java/okhttp-gson/docs/EnumTest.md index 3e226e18b50b..7a3c0981f505 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/EnumTest.md +++ b/samples/client/petstore/java/okhttp-gson/docs/EnumTest.md @@ -44,7 +44,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_MINUS_1 | -1 | +| NUMBER_null | null | @@ -53,7 +53,7 @@ | Name | Value | |---- | -----| | NUMBER_2 | 2 | -| NUMBER_MINUS_2 | -2 | +| NUMBER_null | null | diff --git a/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md index 18f99688c925..e00ef1976b78 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md @@ -970,7 +970,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java index b4b4165efc0b..2f39e4fdaab2 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java @@ -179,7 +179,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; @@ -235,7 +235,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public enum EnumIntegerOnlyEnum { NUMBER_2(2), - NUMBER_MINUS_2(-2); + NUMBER_null(null); private Integer value; diff --git a/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml index de407d13b2cf..793ba3d2ffb4 100644 --- a/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml +++ b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,7 +1894,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -1929,7 +1928,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -1955,7 +1953,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -1990,7 +1987,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2025,7 +2021,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2062,7 +2057,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/FakeApi.md b/samples/client/petstore/java/rest-assured-jackson/docs/FakeApi.md index 969883dc5140..614d3116a716 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/FakeApi.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/FakeApi.md @@ -440,7 +440,7 @@ api.testEnumParameters().execute(r -> r.prettyPeek()); | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [default to $] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/rest-assured/api/openapi.yaml b/samples/client/petstore/java/rest-assured/api/openapi.yaml index de407d13b2cf..793ba3d2ffb4 100644 --- a/samples/client/petstore/java/rest-assured/api/openapi.yaml +++ b/samples/client/petstore/java/rest-assured/api/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,7 +1894,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -1929,7 +1928,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -1955,7 +1953,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -1990,7 +1987,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2025,7 +2021,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2062,7 +2057,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/rest-assured/docs/FakeApi.md b/samples/client/petstore/java/rest-assured/docs/FakeApi.md index 969883dc5140..614d3116a716 100644 --- a/samples/client/petstore/java/rest-assured/docs/FakeApi.md +++ b/samples/client/petstore/java/rest-assured/docs/FakeApi.md @@ -440,7 +440,7 @@ api.testEnumParameters().execute(r -> r.prettyPeek()); | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [default to $] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/restclient-swagger2/api/openapi.yaml b/samples/client/petstore/java/restclient-swagger2/api/openapi.yaml index 1eddf878948c..135d380a1aaa 100644 --- a/samples/client/petstore/java/restclient-swagger2/api/openapi.yaml +++ b/samples/client/petstore/java/restclient-swagger2/api/openapi.yaml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: diff --git a/samples/client/petstore/java/restclient-swagger2/docs/EnumTest.md b/samples/client/petstore/java/restclient-swagger2/docs/EnumTest.md index 380a2aef0bc3..b000d0de1c3b 100644 --- a/samples/client/petstore/java/restclient-swagger2/docs/EnumTest.md +++ b/samples/client/petstore/java/restclient-swagger2/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_MINUS_1 | -1 | +| NUMBER_null | null | diff --git a/samples/client/petstore/java/restclient-swagger2/docs/FakeApi.md b/samples/client/petstore/java/restclient-swagger2/docs/FakeApi.md index 37a949ea0508..a75f27d3106f 100644 --- a/samples/client/petstore/java/restclient-swagger2/docs/FakeApi.md +++ b/samples/client/petstore/java/restclient-swagger2/docs/FakeApi.md @@ -1029,7 +1029,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/EnumTest.java index 2c288999874f..eb3fa286eb93 100644 --- a/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/EnumTest.java @@ -134,7 +134,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/client/petstore/java/restclient/api/openapi.yaml b/samples/client/petstore/java/restclient/api/openapi.yaml index 1eddf878948c..135d380a1aaa 100644 --- a/samples/client/petstore/java/restclient/api/openapi.yaml +++ b/samples/client/petstore/java/restclient/api/openapi.yaml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: diff --git a/samples/client/petstore/java/restclient/docs/EnumTest.md b/samples/client/petstore/java/restclient/docs/EnumTest.md index 380a2aef0bc3..b000d0de1c3b 100644 --- a/samples/client/petstore/java/restclient/docs/EnumTest.md +++ b/samples/client/petstore/java/restclient/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_MINUS_1 | -1 | +| NUMBER_null | null | diff --git a/samples/client/petstore/java/restclient/docs/FakeApi.md b/samples/client/petstore/java/restclient/docs/FakeApi.md index 37a949ea0508..a75f27d3106f 100644 --- a/samples/client/petstore/java/restclient/docs/FakeApi.md +++ b/samples/client/petstore/java/restclient/docs/FakeApi.md @@ -1029,7 +1029,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java/restclient/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/restclient/src/main/java/org/openapitools/client/model/EnumTest.java index 8a07b759db56..ce9f03ecc2d2 100644 --- a/samples/client/petstore/java/restclient/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/restclient/src/main/java/org/openapitools/client/model/EnumTest.java @@ -133,7 +133,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/client/petstore/java/resteasy/api/openapi.yaml b/samples/client/petstore/java/resteasy/api/openapi.yaml index 1eddf878948c..135d380a1aaa 100644 --- a/samples/client/petstore/java/resteasy/api/openapi.yaml +++ b/samples/client/petstore/java/resteasy/api/openapi.yaml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: diff --git a/samples/client/petstore/java/resteasy/docs/EnumTest.md b/samples/client/petstore/java/resteasy/docs/EnumTest.md index 380a2aef0bc3..b000d0de1c3b 100644 --- a/samples/client/petstore/java/resteasy/docs/EnumTest.md +++ b/samples/client/petstore/java/resteasy/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_MINUS_1 | -1 | +| NUMBER_null | null | diff --git a/samples/client/petstore/java/resteasy/docs/FakeApi.md b/samples/client/petstore/java/resteasy/docs/FakeApi.md index 37a949ea0508..a75f27d3106f 100644 --- a/samples/client/petstore/java/resteasy/docs/FakeApi.md +++ b/samples/client/petstore/java/resteasy/docs/FakeApi.md @@ -1029,7 +1029,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumTest.java index 770bcf43922e..738b17cb2b41 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumTest.java @@ -133,7 +133,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml index 1eddf878948c..135d380a1aaa 100644 --- a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/EnumTest.md b/samples/client/petstore/java/resttemplate-withXml/docs/EnumTest.md index 380a2aef0bc3..b000d0de1c3b 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/EnumTest.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_MINUS_1 | -1 | +| NUMBER_null | null | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md index 37a949ea0508..a75f27d3106f 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md @@ -1029,7 +1029,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java index b2c4f3abd424..07140cae0d6c 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java @@ -155,8 +155,8 @@ public enum EnumIntegerEnum { @XmlEnumValue("1") NUMBER_1(1), - @XmlEnumValue("-1") - NUMBER_MINUS_1(-1); + @XmlEnumValue("null") + NUMBER_null(null); private Integer value; diff --git a/samples/client/petstore/java/resttemplate/api/openapi.yaml b/samples/client/petstore/java/resttemplate/api/openapi.yaml index 1eddf878948c..135d380a1aaa 100644 --- a/samples/client/petstore/java/resttemplate/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate/api/openapi.yaml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: diff --git a/samples/client/petstore/java/resttemplate/docs/EnumTest.md b/samples/client/petstore/java/resttemplate/docs/EnumTest.md index 380a2aef0bc3..b000d0de1c3b 100644 --- a/samples/client/petstore/java/resttemplate/docs/EnumTest.md +++ b/samples/client/petstore/java/resttemplate/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_MINUS_1 | -1 | +| NUMBER_null | null | diff --git a/samples/client/petstore/java/resttemplate/docs/FakeApi.md b/samples/client/petstore/java/resttemplate/docs/FakeApi.md index 37a949ea0508..a75f27d3106f 100644 --- a/samples/client/petstore/java/resttemplate/docs/FakeApi.md +++ b/samples/client/petstore/java/resttemplate/docs/FakeApi.md @@ -1029,7 +1029,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java index ba8b4ecba677..548fe76b3e8f 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java @@ -133,7 +133,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml b/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml index de407d13b2cf..793ba3d2ffb4 100644 --- a/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,7 +1894,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -1929,7 +1928,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -1955,7 +1953,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -1990,7 +1987,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2025,7 +2021,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2062,7 +2057,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md b/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md index 5722d2acb576..187ed7b2a366 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md @@ -698,7 +698,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/retrofit2/api/openapi.yaml b/samples/client/petstore/java/retrofit2/api/openapi.yaml index de407d13b2cf..793ba3d2ffb4 100644 --- a/samples/client/petstore/java/retrofit2/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2/api/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,7 +1894,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -1929,7 +1928,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -1955,7 +1953,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -1990,7 +1987,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2025,7 +2021,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2062,7 +2057,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/retrofit2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2/docs/FakeApi.md index 5722d2acb576..187ed7b2a366 100644 --- a/samples/client/petstore/java/retrofit2/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2/docs/FakeApi.md @@ -698,7 +698,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml b/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml index de407d13b2cf..793ba3d2ffb4 100644 --- a/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,7 +1894,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -1929,7 +1928,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -1955,7 +1953,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -1990,7 +1987,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2025,7 +2021,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2062,7 +2057,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md index 5722d2acb576..187ed7b2a366 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md @@ -698,7 +698,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml b/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml index de407d13b2cf..793ba3d2ffb4 100644 --- a/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,7 +1894,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -1929,7 +1928,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -1955,7 +1953,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -1990,7 +1987,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2025,7 +2021,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2062,7 +2057,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md index 5722d2acb576..187ed7b2a366 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md @@ -698,7 +698,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml b/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml index de407d13b2cf..793ba3d2ffb4 100644 --- a/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml +++ b/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,7 +1894,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -1929,7 +1928,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -1955,7 +1953,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -1990,7 +1987,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2025,7 +2021,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2062,7 +2057,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md b/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md index efb255c14f26..ae8802f5181f 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md @@ -698,7 +698,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/vertx/api/openapi.yaml b/samples/client/petstore/java/vertx/api/openapi.yaml index 1eddf878948c..135d380a1aaa 100644 --- a/samples/client/petstore/java/vertx/api/openapi.yaml +++ b/samples/client/petstore/java/vertx/api/openapi.yaml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: diff --git a/samples/client/petstore/java/vertx/docs/EnumTest.md b/samples/client/petstore/java/vertx/docs/EnumTest.md index 380a2aef0bc3..b000d0de1c3b 100644 --- a/samples/client/petstore/java/vertx/docs/EnumTest.md +++ b/samples/client/petstore/java/vertx/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_MINUS_1 | -1 | +| NUMBER_null | null | diff --git a/samples/client/petstore/java/vertx/docs/FakeApi.md b/samples/client/petstore/java/vertx/docs/FakeApi.md index 22cff7dd2e8a..fe73f5124e10 100644 --- a/samples/client/petstore/java/vertx/docs/FakeApi.md +++ b/samples/client/petstore/java/vertx/docs/FakeApi.md @@ -1029,7 +1029,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumTest.java index 770bcf43922e..738b17cb2b41 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumTest.java @@ -133,7 +133,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml b/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml index 1eddf878948c..135d380a1aaa 100644 --- a/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml +++ b/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: diff --git a/samples/client/petstore/java/webclient-jakarta/docs/EnumTest.md b/samples/client/petstore/java/webclient-jakarta/docs/EnumTest.md index 380a2aef0bc3..b000d0de1c3b 100644 --- a/samples/client/petstore/java/webclient-jakarta/docs/EnumTest.md +++ b/samples/client/petstore/java/webclient-jakarta/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_MINUS_1 | -1 | +| NUMBER_null | null | diff --git a/samples/client/petstore/java/webclient-jakarta/docs/FakeApi.md b/samples/client/petstore/java/webclient-jakarta/docs/FakeApi.md index 37a949ea0508..a75f27d3106f 100644 --- a/samples/client/petstore/java/webclient-jakarta/docs/FakeApi.md +++ b/samples/client/petstore/java/webclient-jakarta/docs/FakeApi.md @@ -1029,7 +1029,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/EnumTest.java index 8a07b759db56..ce9f03ecc2d2 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/EnumTest.java @@ -133,7 +133,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml b/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml index 1eddf878948c..135d380a1aaa 100644 --- a/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml +++ b/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: diff --git a/samples/client/petstore/java/webclient-swagger2/docs/EnumTest.md b/samples/client/petstore/java/webclient-swagger2/docs/EnumTest.md index 380a2aef0bc3..b000d0de1c3b 100644 --- a/samples/client/petstore/java/webclient-swagger2/docs/EnumTest.md +++ b/samples/client/petstore/java/webclient-swagger2/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_MINUS_1 | -1 | +| NUMBER_null | null | diff --git a/samples/client/petstore/java/webclient-swagger2/docs/FakeApi.md b/samples/client/petstore/java/webclient-swagger2/docs/FakeApi.md index 37a949ea0508..a75f27d3106f 100644 --- a/samples/client/petstore/java/webclient-swagger2/docs/FakeApi.md +++ b/samples/client/petstore/java/webclient-swagger2/docs/FakeApi.md @@ -1029,7 +1029,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/EnumTest.java index 9cec4234d87f..7c0734e4d6a9 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/EnumTest.java @@ -134,7 +134,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/client/petstore/java/webclient/api/openapi.yaml b/samples/client/petstore/java/webclient/api/openapi.yaml index 1eddf878948c..135d380a1aaa 100644 --- a/samples/client/petstore/java/webclient/api/openapi.yaml +++ b/samples/client/petstore/java/webclient/api/openapi.yaml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: diff --git a/samples/client/petstore/java/webclient/docs/EnumTest.md b/samples/client/petstore/java/webclient/docs/EnumTest.md index 380a2aef0bc3..b000d0de1c3b 100644 --- a/samples/client/petstore/java/webclient/docs/EnumTest.md +++ b/samples/client/petstore/java/webclient/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_MINUS_1 | -1 | +| NUMBER_null | null | diff --git a/samples/client/petstore/java/webclient/docs/FakeApi.md b/samples/client/petstore/java/webclient/docs/FakeApi.md index 37a949ea0508..a75f27d3106f 100644 --- a/samples/client/petstore/java/webclient/docs/FakeApi.md +++ b/samples/client/petstore/java/webclient/docs/FakeApi.md @@ -1029,7 +1029,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumTest.java index 770bcf43922e..738b17cb2b41 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumTest.java @@ -133,7 +133,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/client/petstore/javascript-apollo/docs/EnumTest.md b/samples/client/petstore/javascript-apollo/docs/EnumTest.md index b56c3c4cef63..ff3fc3ead04e 100644 --- a/samples/client/petstore/javascript-apollo/docs/EnumTest.md +++ b/samples/client/petstore/javascript-apollo/docs/EnumTest.md @@ -46,7 +46,7 @@ Name | Type | Description | Notes * `1` (value: `1`) -* `-1` (value: `-1`) +* `null` (value: `null`) diff --git a/samples/client/petstore/javascript-apollo/src/model/EnumTest.js b/samples/client/petstore/javascript-apollo/src/model/EnumTest.js index 708e37e4ac6e..bb7dc6823796 100644 --- a/samples/client/petstore/javascript-apollo/src/model/EnumTest.js +++ b/samples/client/petstore/javascript-apollo/src/model/EnumTest.js @@ -222,10 +222,10 @@ EnumTest['EnumIntegerEnum'] = { "1": 1, /** - * value: -1 + * value: null * @const */ - "-1": -1 + "null": null }; diff --git a/samples/client/petstore/javascript-es6/docs/EnumTest.md b/samples/client/petstore/javascript-es6/docs/EnumTest.md index b56c3c4cef63..ff3fc3ead04e 100644 --- a/samples/client/petstore/javascript-es6/docs/EnumTest.md +++ b/samples/client/petstore/javascript-es6/docs/EnumTest.md @@ -46,7 +46,7 @@ Name | Type | Description | Notes * `1` (value: `1`) -* `-1` (value: `-1`) +* `null` (value: `null`) diff --git a/samples/client/petstore/javascript-es6/src/model/EnumTest.js b/samples/client/petstore/javascript-es6/src/model/EnumTest.js index 708e37e4ac6e..bb7dc6823796 100644 --- a/samples/client/petstore/javascript-es6/src/model/EnumTest.js +++ b/samples/client/petstore/javascript-es6/src/model/EnumTest.js @@ -222,10 +222,10 @@ EnumTest['EnumIntegerEnum'] = { "1": 1, /** - * value: -1 + * value: null * @const */ - "-1": -1 + "null": null }; diff --git a/samples/client/petstore/javascript-promise-es6/docs/EnumTest.md b/samples/client/petstore/javascript-promise-es6/docs/EnumTest.md index b56c3c4cef63..ff3fc3ead04e 100644 --- a/samples/client/petstore/javascript-promise-es6/docs/EnumTest.md +++ b/samples/client/petstore/javascript-promise-es6/docs/EnumTest.md @@ -46,7 +46,7 @@ Name | Type | Description | Notes * `1` (value: `1`) -* `-1` (value: `-1`) +* `null` (value: `null`) diff --git a/samples/client/petstore/javascript-promise-es6/src/model/EnumTest.js b/samples/client/petstore/javascript-promise-es6/src/model/EnumTest.js index 708e37e4ac6e..bb7dc6823796 100644 --- a/samples/client/petstore/javascript-promise-es6/src/model/EnumTest.js +++ b/samples/client/petstore/javascript-promise-es6/src/model/EnumTest.js @@ -222,10 +222,10 @@ EnumTest['EnumIntegerEnum'] = { "1": 1, /** - * value: -1 + * value: null * @const */ - "-1": -1 + "null": null }; diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumTest.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumTest.php index 3614614f611d..2bbed8a5afc0 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumTest.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumTest.php @@ -276,7 +276,7 @@ public function getModelName(): string public const ENUM_STRING_REQUIRED_LOWER = 'lower'; public const ENUM_STRING_REQUIRED_EMPTY = ''; public const ENUM_INTEGER_1 = 1; - public const ENUM_INTEGER_MINUS_1 = -1; + public const ENUM_INTEGER_null = null; public const ENUM_NUMBER_1_DOT_1 = 1.1; public const ENUM_NUMBER_MINUS_1_DOT_2 = -1.2; @@ -317,7 +317,7 @@ public function getEnumIntegerAllowableValues() { return [ self::ENUM_INTEGER_1, - self::ENUM_INTEGER_MINUS_1, + self::ENUM_INTEGER_null, ]; } 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 2bfc08295ff7..ab93d2eebb0c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php @@ -277,7 +277,7 @@ public function getModelName() public const ENUM_STRING_REQUIRED_LOWER = 'lower'; public const ENUM_STRING_REQUIRED_EMPTY = ''; public const ENUM_INTEGER_1 = 1; - public const ENUM_INTEGER_MINUS_1 = -1; + public const ENUM_INTEGER_null = null; public const ENUM_NUMBER_1_DOT_1 = 1.1; public const ENUM_NUMBER_MINUS_1_DOT_2 = -1.2; @@ -318,7 +318,7 @@ public function getEnumIntegerAllowableValues() { return [ self::ENUM_INTEGER_1, - self::ENUM_INTEGER_MINUS_1, + self::ENUM_INTEGER_null, ]; } diff --git a/samples/client/petstore/php/psr-18/lib/Model/EnumTest.php b/samples/client/petstore/php/psr-18/lib/Model/EnumTest.php index 2bfc08295ff7..ab93d2eebb0c 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/EnumTest.php +++ b/samples/client/petstore/php/psr-18/lib/Model/EnumTest.php @@ -277,7 +277,7 @@ public function getModelName() public const ENUM_STRING_REQUIRED_LOWER = 'lower'; public const ENUM_STRING_REQUIRED_EMPTY = ''; public const ENUM_INTEGER_1 = 1; - public const ENUM_INTEGER_MINUS_1 = -1; + public const ENUM_INTEGER_null = null; public const ENUM_NUMBER_1_DOT_1 = 1.1; public const ENUM_NUMBER_MINUS_1_DOT_2 = -1.2; @@ -318,7 +318,7 @@ public function getEnumIntegerAllowableValues() { return [ self::ENUM_INTEGER_1, - self::ENUM_INTEGER_MINUS_1, + self::ENUM_INTEGER_null, ]; } diff --git a/samples/client/petstore/powershell/src/PSPetstore/Api/PSFakeApi.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Api/PSFakeApi.ps1 index 87f58e94686f..2d2696fe7772 100644 --- a/samples/client/petstore/powershell/src/PSPetstore/Api/PSFakeApi.ps1 +++ b/samples/client/petstore/powershell/src/PSPetstore/Api/PSFakeApi.ps1 @@ -1016,7 +1016,7 @@ function Test-PSEnumParameters { [String] ${EnumQueryString}, [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] - [ValidateSet("1", "-2")] + [ValidateSet("1", "null")] [System.Nullable[Int32]] ${EnumQueryInteger}, [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/EnumTest.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/EnumTest.ps1 index 867691b24911..c94454d4392d 100644 --- a/samples/client/petstore/powershell/src/PSPetstore/Model/EnumTest.ps1 +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/EnumTest.ps1 @@ -43,11 +43,11 @@ function Initialize-PSEnumTest { [String] ${EnumStringRequired}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] - [ValidateSet("1", "-1")] + [ValidateSet("1", "")] [System.Nullable[Int32]] ${EnumInteger}, [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)] - [ValidateSet("2", "-2")] + [ValidateSet("2", "")] [System.Nullable[Int32]] ${EnumIntegerOnly}, [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true)] diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby-autoload/lib/petstore/api/fake_api.rb index 0ab4ed2abf4f..42ba288e1ede 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/api/fake_api.rb @@ -1063,7 +1063,7 @@ def test_enum_parameters_with_http_info(opts = {}) if @api_client.config.client_side_validation && opts[:'enum_query_string'] && !allowable_values.include?(opts[:'enum_query_string']) fail ArgumentError, "invalid value for \"enum_query_string\", must be one of #{allowable_values}" end - allowable_values = [1, -2] + allowable_values = [1, null] if @api_client.config.client_side_validation && opts[:'enum_query_integer'] && !allowable_values.include?(opts[:'enum_query_integer']) fail ArgumentError, "invalid value for \"enum_query_integer\", must be one of #{allowable_values}" end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/enum_test.rb index bebc6cf05fda..32f97e3af828 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/enum_test.rb @@ -168,7 +168,7 @@ def valid? return false if @enum_string_required.nil? enum_string_required_validator = EnumAttributeValidator.new('String', ["UPPER", "lower", ""]) return false unless enum_string_required_validator.valid?(@enum_string_required) - enum_integer_validator = EnumAttributeValidator.new('Integer', [1, -1]) + enum_integer_validator = EnumAttributeValidator.new('Integer', [1, null]) return false unless enum_integer_validator.valid?(@enum_integer) enum_number_validator = EnumAttributeValidator.new('Float', [1.1, -1.2]) return false unless enum_number_validator.valid?(@enum_number) @@ -198,7 +198,7 @@ def enum_string_required=(enum_string_required) # Custom attribute writer method checking allowed values (enum). # @param [Object] enum_integer Object to be assigned def enum_integer=(enum_integer) - validator = EnumAttributeValidator.new('Integer', [1, -1]) + validator = EnumAttributeValidator.new('Integer', [1, null]) unless validator.valid?(enum_integer) fail ArgumentError, "invalid value for \"enum_integer\", must be one of #{validator.allowable_values}." 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 0ab4ed2abf4f..42ba288e1ede 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 @@ -1063,7 +1063,7 @@ def test_enum_parameters_with_http_info(opts = {}) if @api_client.config.client_side_validation && opts[:'enum_query_string'] && !allowable_values.include?(opts[:'enum_query_string']) fail ArgumentError, "invalid value for \"enum_query_string\", must be one of #{allowable_values}" end - allowable_values = [1, -2] + allowable_values = [1, null] if @api_client.config.client_side_validation && opts[:'enum_query_integer'] && !allowable_values.include?(opts[:'enum_query_integer']) fail ArgumentError, "invalid value for \"enum_query_integer\", must be one of #{allowable_values}" 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 bebc6cf05fda..32f97e3af828 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 @@ -168,7 +168,7 @@ def valid? return false if @enum_string_required.nil? enum_string_required_validator = EnumAttributeValidator.new('String', ["UPPER", "lower", ""]) return false unless enum_string_required_validator.valid?(@enum_string_required) - enum_integer_validator = EnumAttributeValidator.new('Integer', [1, -1]) + enum_integer_validator = EnumAttributeValidator.new('Integer', [1, null]) return false unless enum_integer_validator.valid?(@enum_integer) enum_number_validator = EnumAttributeValidator.new('Float', [1.1, -1.2]) return false unless enum_number_validator.valid?(@enum_number) @@ -198,7 +198,7 @@ def enum_string_required=(enum_string_required) # Custom attribute writer method checking allowed values (enum). # @param [Object] enum_integer Object to be assigned def enum_integer=(enum_integer) - validator = EnumAttributeValidator.new('Integer', [1, -1]) + validator = EnumAttributeValidator.new('Integer', [1, null]) unless validator.valid?(enum_integer) fail ArgumentError, "invalid value for \"enum_integer\", must be one of #{validator.allowable_values}." end diff --git a/samples/client/petstore/ruby-httpx/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby-httpx/lib/petstore/api/fake_api.rb index 6933d858e527..ec83a9e05b92 100644 --- a/samples/client/petstore/ruby-httpx/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby-httpx/lib/petstore/api/fake_api.rb @@ -1144,7 +1144,7 @@ def test_enum_parameters_with_http_info(opts = {}) if @api_client.config.client_side_validation && opts[:'enum_query_string'] && !allowable_values.include?(opts[:'enum_query_string']) fail ArgumentError, "invalid value for \"enum_query_string\", must be one of #{allowable_values}" end - allowable_values = [1, -2] + allowable_values = [1, null] if @api_client.config.client_side_validation && opts[:'enum_query_integer'] && !allowable_values.include?(opts[:'enum_query_integer']) fail ArgumentError, "invalid value for \"enum_query_integer\", must be one of #{allowable_values}" end diff --git a/samples/client/petstore/ruby-httpx/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby-httpx/lib/petstore/models/enum_test.rb index bebc6cf05fda..32f97e3af828 100644 --- a/samples/client/petstore/ruby-httpx/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby-httpx/lib/petstore/models/enum_test.rb @@ -168,7 +168,7 @@ def valid? return false if @enum_string_required.nil? enum_string_required_validator = EnumAttributeValidator.new('String', ["UPPER", "lower", ""]) return false unless enum_string_required_validator.valid?(@enum_string_required) - enum_integer_validator = EnumAttributeValidator.new('Integer', [1, -1]) + enum_integer_validator = EnumAttributeValidator.new('Integer', [1, null]) return false unless enum_integer_validator.valid?(@enum_integer) enum_number_validator = EnumAttributeValidator.new('Float', [1.1, -1.2]) return false unless enum_number_validator.valid?(@enum_number) @@ -198,7 +198,7 @@ def enum_string_required=(enum_string_required) # Custom attribute writer method checking allowed values (enum). # @param [Object] enum_integer Object to be assigned def enum_integer=(enum_integer) - validator = EnumAttributeValidator.new('Integer', [1, -1]) + validator = EnumAttributeValidator.new('Integer', [1, null]) unless validator.valid?(enum_integer) fail ArgumentError, "invalid value for \"enum_integer\", must be one of #{validator.allowable_values}." 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 cc4e30802f50..7e1117cf06de 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb @@ -1144,7 +1144,7 @@ def test_enum_parameters_with_http_info(opts = {}) if @api_client.config.client_side_validation && opts[:'enum_query_string'] && !allowable_values.include?(opts[:'enum_query_string']) fail ArgumentError, "invalid value for \"enum_query_string\", must be one of #{allowable_values}" end - allowable_values = [1, -2] + allowable_values = [1, null] if @api_client.config.client_side_validation && opts[:'enum_query_integer'] && !allowable_values.include?(opts[:'enum_query_integer']) fail ArgumentError, "invalid value for \"enum_query_integer\", must be one of #{allowable_values}" 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 bebc6cf05fda..32f97e3af828 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb @@ -168,7 +168,7 @@ def valid? return false if @enum_string_required.nil? enum_string_required_validator = EnumAttributeValidator.new('String', ["UPPER", "lower", ""]) return false unless enum_string_required_validator.valid?(@enum_string_required) - enum_integer_validator = EnumAttributeValidator.new('Integer', [1, -1]) + enum_integer_validator = EnumAttributeValidator.new('Integer', [1, null]) return false unless enum_integer_validator.valid?(@enum_integer) enum_number_validator = EnumAttributeValidator.new('Float', [1.1, -1.2]) return false unless enum_number_validator.valid?(@enum_number) @@ -198,7 +198,7 @@ def enum_string_required=(enum_string_required) # Custom attribute writer method checking allowed values (enum). # @param [Object] enum_integer Object to be assigned def enum_integer=(enum_integer) - validator = EnumAttributeValidator.new('Integer', [1, -1]) + validator = EnumAttributeValidator.new('Integer', [1, null]) unless validator.valid?(enum_integer) fail ArgumentError, "invalid value for \"enum_integer\", must be one of #{validator.allowable_values}." end diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumTest.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumTest.java index 37c894f36531..425a02d0049f 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumTest.java @@ -107,7 +107,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java index 30cbcdafe0d9..c490f83bd143 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -27,7 +27,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private Integer integerItem; private Boolean boolItem = true; diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/EnumTestDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/EnumTestDto.java index e1ab901a7d4a..6d36604b83bf 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/EnumTestDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/EnumTestDto.java @@ -107,7 +107,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java index 8e11dbc43cf4..6fdc5a5f3b1b 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java @@ -29,7 +29,7 @@ public class TypeHolderDefaultDto { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private Integer integerItem; private Boolean boolItem = true; diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 9e246a77ebea..a1aecf47e44d 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -442,7 +442,7 @@ open class FakeAPI { */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case number2 = -2 + case numberNull = null } /** diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index a5e7145d297c..1b69ffdfae93 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -378,7 +378,7 @@ open class FakeAPI { */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case number2 = -2 + case numberNull = null } /** diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index e65abe35fcd4..cad20b279d11 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -517,7 +517,7 @@ open class FakeAPI { */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case number2 = -2 + case numberNull = null } /** diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 1a5d74a29efc..c86fff1575b9 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -486,7 +486,7 @@ open class FakeAPI { */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case number2 = -2 + case numberNull = null } /** diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 50acd84cc9f9..06c147e20e7b 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -442,7 +442,7 @@ open class FakeAPI { */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case number2 = -2 + case numberNull = null } /** diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index b4d2b389e062..13a2d002dc86 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -442,7 +442,7 @@ internal class FakeAPI { */ internal enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case number2 = -2 + case numberNull = null } /** diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 3f6e3111d931..ef288566916f 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -442,7 +442,7 @@ import AnyCodable */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case number2 = -2 + case numberNull = null } /** diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 9358f7ce983f..49a8a74fdb85 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -443,7 +443,7 @@ open class FakeAPI { */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case number2 = -2 + case numberNull = null } /** diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index e2056a929dc3..6585cd5ebd1c 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -442,7 +442,7 @@ open class FakeAPI { */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case number2 = -2 + case numberNull = null } /** diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index e18c6a34c8f0..f710486ea5a0 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -442,7 +442,7 @@ open class FakeAPI { */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case number2 = -2 + case numberNull = null } /** diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 03433120c1ab..3899d1e3a0dd 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -491,7 +491,7 @@ open class FakeAPI { */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case number2 = -2 + case numberNull = null } /** diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift index 6f88769930d8..ed2f32d32d95 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift @@ -445,7 +445,7 @@ open class FakeAPI { */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case number2 = -2 + case numberNull = null } /** diff --git a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift index 014da8378336..1008d834ef62 100644 --- a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift @@ -538,7 +538,7 @@ open class FakeAPI { */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable, Content { case _1 = 1 - case number2 = -2 + case numberNull = null } /** diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index e2056a929dc3..6585cd5ebd1c 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -442,7 +442,7 @@ open class FakeAPI { */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case number2 = -2 + case numberNull = null } /** diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/enum_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/enum_test.dart index 687e674d211a..99e5e29fe8f4 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/enum_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/enum_test.dart @@ -200,8 +200,8 @@ enum EnumTestEnumStringRequiredEnum { enum EnumTestEnumIntegerEnum { @JsonValue(1) number1, - @JsonValue(-1) - numberNegative1, + @JsonValue(null) + null_, @JsonValue(11184809) unknownDefaultOpenApi, } diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_test.dart index 831f5b9d6d2d..1b917869ca1a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_test.dart @@ -36,7 +36,7 @@ abstract class EnumTest implements Built { @BuiltValueField(wireName: r'enum_integer') EnumTestEnumIntegerEnum? get enumInteger; - // enum enumIntegerEnum { 1, -1, }; + // enum enumIntegerEnum { 1, , }; @BuiltValueField(wireName: r'enum_number') EnumTestEnumNumberEnum? get enumNumber; @@ -286,8 +286,8 @@ class EnumTestEnumIntegerEnum extends EnumClass { @BuiltValueEnumConst(wireNumber: 1) static const EnumTestEnumIntegerEnum number1 = _$enumTestEnumIntegerEnum_number1; - @BuiltValueEnumConst(wireNumber: -1) - static const EnumTestEnumIntegerEnum numberNegative1 = _$enumTestEnumIntegerEnum_numberNegative1; + @BuiltValueEnumConst(wireNumber: null) + static const EnumTestEnumIntegerEnum null_ = _$enumTestEnumIntegerEnum_null_; @BuiltValueEnumConst(wireNumber: 11184809, fallback: true) static const EnumTestEnumIntegerEnum unknownDefaultOpenApi = _$enumTestEnumIntegerEnum_unknownDefaultOpenApi; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart index 04ee7808fc0d..d1f5d0a305f9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart @@ -370,12 +370,12 @@ class EnumTestEnumIntegerEnum { int toJson() => value; static const number1 = EnumTestEnumIntegerEnum._(1); - static const numberNegative1 = EnumTestEnumIntegerEnum._(-1); + static const null_ = EnumTestEnumIntegerEnum._(null); /// List of all possible values in this [enum][EnumTestEnumIntegerEnum]. static const values = [ number1, - numberNegative1, + null_, ]; static EnumTestEnumIntegerEnum? fromJson(dynamic value) => EnumTestEnumIntegerEnumTypeTransformer().decode(value); @@ -415,7 +415,7 @@ class EnumTestEnumIntegerEnumTypeTransformer { if (data != null) { switch (data) { case 1: return EnumTestEnumIntegerEnum.number1; - case -1: return EnumTestEnumIntegerEnum.numberNegative1; + case null: return EnumTestEnumIntegerEnum.null_; default: if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); diff --git a/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml b/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml index c63b467c8077..934d0e97fc0b 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml @@ -745,7 +745,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1662,7 +1662,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml b/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml index 25e78fa9e305..242de316b9e9 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml +++ b/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml @@ -790,7 +790,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1672,13 +1672,13 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_integer_only: enum: - 2 - - -2 + - null type: integer enum_number: enum: diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/EnumTest.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/EnumTest.md index 3e226e18b50b..7a3c0981f505 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/EnumTest.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/EnumTest.md @@ -44,7 +44,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_MINUS_1 | -1 | +| NUMBER_null | null | @@ -53,7 +53,7 @@ | Name | Value | |---- | -----| | NUMBER_2 | 2 | -| NUMBER_MINUS_2 | -2 | +| NUMBER_null | null | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md index 3816afc1ce7c..9fa6500d8b67 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md @@ -883,7 +883,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | **List<String>**| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | **List<String>**| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumTest.java index d4b912ed9f96..f1619cc62a35 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumTest.java @@ -137,7 +137,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; @@ -175,7 +175,7 @@ public static EnumIntegerEnum fromValue(Integer value) { public enum EnumIntegerOnlyEnum { NUMBER_2(2), - NUMBER_MINUS_2(-2); + NUMBER_null(null); private Integer value; diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/OuterEnumIntegerDefaultValue.md b/samples/openapi3/client/petstore/python-aiohttp/docs/OuterEnumIntegerDefaultValue.md index 66cd0abdb0a5..d2588f4e8c7c 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/OuterEnumIntegerDefaultValue.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/OuterEnumIntegerDefaultValue.md @@ -3,7 +3,7 @@ ## Enum -* `NUMBER_MINUS_1` (value: `-1`) +* `NUMBER_null` (value: `null`) * `NUMBER_0` (value: `0`) diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/enum_test.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/enum_test.py index bbbc4102de45..65c3dfb6f3a7 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/enum_test.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/enum_test.py @@ -76,8 +76,8 @@ def enum_integer_validate_enum(cls, value): if value is None: return value - if value not in set([1, -1]): - raise ValueError("must be one of enum values (1, -1)") + if value not in set([1, null]): + raise ValueError("must be one of enum values (1, null)") return value @field_validator('enum_number') diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/outer_enum_integer_default_value.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/outer_enum_integer_default_value.py index 8df41b2bd320..880ad5e5f374 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/outer_enum_integer_default_value.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/outer_enum_integer_default_value.py @@ -26,7 +26,7 @@ class OuterEnumIntegerDefaultValue(int, Enum): """ allowed enum values """ - NUMBER_MINUS_1 = -1 + NUMBER_null = null NUMBER_0 = 0 NUMBER_1 = 1 NUMBER_2 = 2 diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/OuterEnumIntegerDefaultValue.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/OuterEnumIntegerDefaultValue.md index 66cd0abdb0a5..d2588f4e8c7c 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/OuterEnumIntegerDefaultValue.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/OuterEnumIntegerDefaultValue.md @@ -3,7 +3,7 @@ ## Enum -* `NUMBER_MINUS_1` (value: `-1`) +* `NUMBER_null` (value: `null`) * `NUMBER_0` (value: `0`) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/enum_test.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/enum_test.py index 66c688f9f484..b1204e7bc23e 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/enum_test.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/enum_test.py @@ -75,8 +75,8 @@ def enum_integer_validate_enum(cls, value): if value is None: return value - if value not in (1, -1): - raise ValueError("must be one of enum values (1, -1)") + if value not in (1, null): + raise ValueError("must be one of enum values (1, null)") return value @validator('enum_number') diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/outer_enum_integer_default_value.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/outer_enum_integer_default_value.py index 36381197bb71..d5cf1c2fe453 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/outer_enum_integer_default_value.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/outer_enum_integer_default_value.py @@ -29,7 +29,7 @@ class OuterEnumIntegerDefaultValue(int, Enum): """ allowed enum values """ - NUMBER_MINUS_1 = -1 + NUMBER_null = null NUMBER_0 = 0 NUMBER_1 = 1 NUMBER_2 = 2 diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/OuterEnumIntegerDefaultValue.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/OuterEnumIntegerDefaultValue.md index 66cd0abdb0a5..d2588f4e8c7c 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/OuterEnumIntegerDefaultValue.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/OuterEnumIntegerDefaultValue.md @@ -3,7 +3,7 @@ ## Enum -* `NUMBER_MINUS_1` (value: `-1`) +* `NUMBER_null` (value: `null`) * `NUMBER_0` (value: `0`) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/enum_test.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/enum_test.py index a04be47a43fb..89823b2aa994 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/enum_test.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/enum_test.py @@ -76,8 +76,8 @@ def enum_integer_validate_enum(cls, value): if value is None: return value - if value not in (1, -1): - raise ValueError("must be one of enum values (1, -1)") + if value not in (1, null): + raise ValueError("must be one of enum values (1, null)") return value @validator('enum_number') diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/outer_enum_integer_default_value.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/outer_enum_integer_default_value.py index 36381197bb71..d5cf1c2fe453 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/outer_enum_integer_default_value.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/outer_enum_integer_default_value.py @@ -29,7 +29,7 @@ class OuterEnumIntegerDefaultValue(int, Enum): """ allowed enum values """ - NUMBER_MINUS_1 = -1 + NUMBER_null = null NUMBER_0 = 0 NUMBER_1 = 1 NUMBER_2 = 2 diff --git a/samples/openapi3/client/petstore/python/docs/OuterEnumIntegerDefaultValue.md b/samples/openapi3/client/petstore/python/docs/OuterEnumIntegerDefaultValue.md index 66cd0abdb0a5..d2588f4e8c7c 100644 --- a/samples/openapi3/client/petstore/python/docs/OuterEnumIntegerDefaultValue.md +++ b/samples/openapi3/client/petstore/python/docs/OuterEnumIntegerDefaultValue.md @@ -3,7 +3,7 @@ ## Enum -* `NUMBER_MINUS_1` (value: `-1`) +* `NUMBER_null` (value: `null`) * `NUMBER_0` (value: `0`) diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py index d63819661558..8a67927b1b61 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py @@ -77,8 +77,8 @@ def enum_integer_validate_enum(cls, value): if value is None: return value - if value not in set([1, -1]): - raise ValueError("must be one of enum values (1, -1)") + if value not in set([1, null]): + raise ValueError("must be one of enum values (1, null)") return value @field_validator('enum_number') diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_integer_default_value.py b/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_integer_default_value.py index 8df41b2bd320..880ad5e5f374 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_integer_default_value.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_integer_default_value.py @@ -26,7 +26,7 @@ class OuterEnumIntegerDefaultValue(int, Enum): """ allowed enum values """ - NUMBER_MINUS_1 = -1 + NUMBER_null = null NUMBER_0 = 0 NUMBER_1 = 1 NUMBER_2 = 2 diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java index 99ea45a28c67..659aca648bac 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java @@ -109,7 +109,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java index 4ef3ddd02ba9..a1780ff76fd0 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -29,7 +29,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private Integer integerItem; private Boolean boolItem = true; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java index 539c484f2e83..b3ec889eea85 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -112,7 +112,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @Schema(name = "integer_item", example = "-2", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(name = "integer_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java index 4a3b76b19b54..6ac717ab2377 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java @@ -142,7 +142,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @Schema(name = "attribute_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "attribute_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -250,7 +250,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @Schema(name = "name_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "name_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -386,7 +386,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @Schema(name = "prefix_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "prefix_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -522,7 +522,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @Schema(name = "namespace_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "namespace_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -658,7 +658,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @Schema(name = "prefix_ns_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "prefix_ns_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java index a4634a276f9c..97915f718a32 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java @@ -109,7 +109,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java index e20bec93b0ee..afd41357f7a1 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -29,7 +29,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private Integer integerItem; private Boolean boolItem = true; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java index d455c202b5a5..5017e1d05132 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -124,7 +124,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @Schema(name = "integer_item", example = "-2", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(name = "integer_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java index 4a3b76b19b54..6ac717ab2377 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java @@ -142,7 +142,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @Schema(name = "attribute_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "attribute_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -250,7 +250,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @Schema(name = "name_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "name_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -386,7 +386,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @Schema(name = "prefix_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "prefix_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -522,7 +522,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @Schema(name = "namespace_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "namespace_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -658,7 +658,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @Schema(name = "prefix_ns_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "prefix_ns_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml index f26422f84ebf..92721ac9a0ec 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml @@ -799,7 +799,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1649,7 +1649,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: @@ -1991,7 +1991,6 @@ components: default: 1.234 type: number integer_item: - default: -2 type: integer bool_item: default: true @@ -2025,7 +2024,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -2060,7 +2058,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -2086,7 +2083,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -2121,7 +2117,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2156,7 +2151,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2193,7 +2187,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java index a4634a276f9c..97915f718a32 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java @@ -109,7 +109,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java index e20bec93b0ee..afd41357f7a1 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -29,7 +29,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private Integer integerItem; private Boolean boolItem = true; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java index d455c202b5a5..5017e1d05132 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -124,7 +124,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @Schema(name = "integer_item", example = "-2", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(name = "integer_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java index 4a3b76b19b54..6ac717ab2377 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java @@ -142,7 +142,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @Schema(name = "attribute_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "attribute_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -250,7 +250,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @Schema(name = "name_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "name_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -386,7 +386,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @Schema(name = "prefix_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "prefix_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -522,7 +522,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @Schema(name = "namespace_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "namespace_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -658,7 +658,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @Schema(name = "prefix_ns_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "prefix_ns_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml index f26422f84ebf..92721ac9a0ec 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml @@ -799,7 +799,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1649,7 +1649,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: @@ -1991,7 +1991,6 @@ components: default: 1.234 type: number integer_item: - default: -2 type: integer bool_item: default: true @@ -2025,7 +2024,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -2060,7 +2058,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -2086,7 +2083,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -2121,7 +2117,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2156,7 +2151,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2193,7 +2187,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/schema/petstore/mysql/mysql_schema.sql b/samples/schema/petstore/mysql/mysql_schema.sql index 0c526bdabd3e..33d23af12c7f 100644 --- a/samples/schema/petstore/mysql/mysql_schema.sql +++ b/samples/schema/petstore/mysql/mysql_schema.sql @@ -171,7 +171,7 @@ CREATE TABLE IF NOT EXISTS `EnumArrays` ( CREATE TABLE IF NOT EXISTS `Enum_Test` ( `enum_string` ENUM('UPPER', 'lower', '') DEFAULT NULL, `enum_string_required` ENUM('UPPER', 'lower', '') NOT NULL, - `enum_integer` ENUM('1', '-1') DEFAULT NULL, + `enum_integer` ENUM('1', 'null') DEFAULT NULL, `enum_number` ENUM('1.1', '-1.2') DEFAULT NULL, `outerEnum` TEXT DEFAULT NULL, `outerEnumInteger` TEXT DEFAULT NULL, diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Enum_Test.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/Enum_Test.cpp index d3e5a85d7072..4ff98061567e 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Enum_Test.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Enum_Test.cpp @@ -125,7 +125,7 @@ int32_t Enum_Test::getEnumInteger() const void Enum_Test::setEnumInteger(int32_t value) { static const std::array allowedValues = { - 1, -1 + 1, null }; if (std::find(allowedValues.begin(), allowedValues.end(), value) != allowedValues.end()) { diff --git a/samples/server/petstore/java-helidon-server/v3/mp/src/main/java/org/openapitools/server/model/EnumTest.java b/samples/server/petstore/java-helidon-server/v3/mp/src/main/java/org/openapitools/server/model/EnumTest.java index 9476edffbf91..ce13cf6ea86b 100644 --- a/samples/server/petstore/java-helidon-server/v3/mp/src/main/java/org/openapitools/server/model/EnumTest.java +++ b/samples/server/petstore/java-helidon-server/v3/mp/src/main/java/org/openapitools/server/model/EnumTest.java @@ -131,7 +131,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { - NUMBER_1(Integer.valueOf(1)), NUMBER_MINUS_1(Integer.valueOf(-1)); + NUMBER_1(Integer.valueOf(1)), NUMBER_null(Integer.valueOf(null)); private Integer value; diff --git a/samples/server/petstore/java-helidon-server/v3/mp/src/main/resources/META-INF/openapi.yml b/samples/server/petstore/java-helidon-server/v3/mp/src/main/resources/META-INF/openapi.yml index a08bc26cc144..8289c57fb91b 100644 --- a/samples/server/petstore/java-helidon-server/v3/mp/src/main/resources/META-INF/openapi.yml +++ b/samples/server/petstore/java-helidon-server/v3/mp/src/main/resources/META-INF/openapi.yml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: diff --git a/samples/server/petstore/java-helidon-server/v3/se/src/main/java/org/openapitools/server/model/EnumTest.java b/samples/server/petstore/java-helidon-server/v3/se/src/main/java/org/openapitools/server/model/EnumTest.java index d2d7d27c9414..2b570266ad26 100644 --- a/samples/server/petstore/java-helidon-server/v3/se/src/main/java/org/openapitools/server/model/EnumTest.java +++ b/samples/server/petstore/java-helidon-server/v3/se/src/main/java/org/openapitools/server/model/EnumTest.java @@ -99,7 +99,7 @@ public static EnumStringRequiredEnum fromValue(String text) { */ public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/server/petstore/java-helidon-server/v3/se/src/main/resources/META-INF/openapi.yml b/samples/server/petstore/java-helidon-server/v3/se/src/main/resources/META-INF/openapi.yml index a08bc26cc144..8289c57fb91b 100644 --- a/samples/server/petstore/java-helidon-server/v3/se/src/main/resources/META-INF/openapi.yml +++ b/samples/server/petstore/java-helidon-server/v3/se/src/main/resources/META-INF/openapi.yml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: diff --git a/samples/server/petstore/java-helidon-server/v4/mp/src/main/java/org/openapitools/server/model/EnumTest.java b/samples/server/petstore/java-helidon-server/v4/mp/src/main/java/org/openapitools/server/model/EnumTest.java index 9476edffbf91..ce13cf6ea86b 100644 --- a/samples/server/petstore/java-helidon-server/v4/mp/src/main/java/org/openapitools/server/model/EnumTest.java +++ b/samples/server/petstore/java-helidon-server/v4/mp/src/main/java/org/openapitools/server/model/EnumTest.java @@ -131,7 +131,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { - NUMBER_1(Integer.valueOf(1)), NUMBER_MINUS_1(Integer.valueOf(-1)); + NUMBER_1(Integer.valueOf(1)), NUMBER_null(Integer.valueOf(null)); private Integer value; diff --git a/samples/server/petstore/java-helidon-server/v4/mp/src/main/resources/META-INF/openapi.yml b/samples/server/petstore/java-helidon-server/v4/mp/src/main/resources/META-INF/openapi.yml index a08bc26cc144..8289c57fb91b 100644 --- a/samples/server/petstore/java-helidon-server/v4/mp/src/main/resources/META-INF/openapi.yml +++ b/samples/server/petstore/java-helidon-server/v4/mp/src/main/resources/META-INF/openapi.yml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java index 4c2346a740a2..26d4f9d8a5ea 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java @@ -181,7 +181,7 @@ public Response testEnumParameters(@ApiParam(value = "Header parameter enum test ,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString ,@ApiParam(value = "Query parameter enum test (string array)", allowableValues=">, $") @QueryParam("enum_query_string_array") List enumQueryStringArray ,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString -,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger +,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, ") @QueryParam("enum_query_integer") Integer enumQueryInteger ,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble ,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray ,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/TypeHolderExample.java index 5d9bb177bcd2..505b08868f8d 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -96,7 +96,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem **/ - @ApiModelProperty(example = "-2", required = true, value = "") + @ApiModelProperty(required = true, value = "") public Integer getIntegerItem() { return integerItem; } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/XmlItem.java index 73804fd1847e..9a3616832ed3 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/XmlItem.java @@ -147,7 +147,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger **/ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") public Integer getAttributeInteger() { return attributeInteger; } @@ -245,7 +245,7 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger **/ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") public Integer getNameInteger() { return nameInteger; } @@ -369,7 +369,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger **/ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") public Integer getPrefixInteger() { return prefixInteger; } @@ -493,7 +493,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger **/ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") public Integer getNamespaceInteger() { return namespaceInteger; } @@ -617,7 +617,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger **/ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") public Integer getPrefixNsInteger() { return prefixNsInteger; } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json index d1c6dbe41351..34bbc4a387b7 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json +++ b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json @@ -946,7 +946,7 @@ "in" : "query", "name" : "enum_query_integer", "schema" : { - "enum" : [ 1, -2 ], + "enum" : [ 1, null ], "format" : "int32", "type" : "integer" } @@ -2444,7 +2444,6 @@ "type" : "number" }, "integer_item" : { - "example" : -2, "type" : "integer" }, "bool_item" : { @@ -2479,7 +2478,6 @@ } }, "attribute_integer" : { - "example" : -2, "type" : "integer", "xml" : { "attribute" : true @@ -2516,7 +2514,6 @@ } }, "name_integer" : { - "example" : -2, "type" : "integer", "xml" : { "name" : "xml_name_integer" @@ -2566,7 +2563,6 @@ } }, "prefix_integer" : { - "example" : -2, "type" : "integer", "xml" : { "prefix" : "ef" @@ -2616,7 +2612,6 @@ } }, "namespace_integer" : { - "example" : -2, "type" : "integer", "xml" : { "namespace" : "http://c.com/schema" @@ -2668,7 +2663,6 @@ } }, "prefix_ns_integer" : { - "example" : -2, "type" : "integer", "xml" : { "namespace" : "http://c.com/schema", diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/TypeHolderExample.java index 0f25d81ac331..8ef92df2c65c 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -24,7 +24,7 @@ public class TypeHolderExample { @ApiModelProperty(example = "1.234", required = true, value = "") private Float floatItem; - @ApiModelProperty(example = "-2", required = true, value = "") + @ApiModelProperty(required = true, value = "") private Integer integerItem; @ApiModelProperty(example = "true", required = true, value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/XmlItem.java index 94bdf4ef9503..54165a98fd04 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/XmlItem.java @@ -21,7 +21,7 @@ public class XmlItem { @Valid private BigDecimal attributeNumber; - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") private Integer attributeInteger; @ApiModelProperty(example = "true", value = "") @@ -37,7 +37,7 @@ public class XmlItem { @Valid private BigDecimal nameNumber; - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") private Integer nameInteger; @ApiModelProperty(example = "true", value = "") @@ -56,7 +56,7 @@ public class XmlItem { @Valid private BigDecimal prefixNumber; - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") private Integer prefixInteger; @ApiModelProperty(example = "true", value = "") @@ -75,7 +75,7 @@ public class XmlItem { @Valid private BigDecimal namespaceNumber; - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") private Integer namespaceInteger; @ApiModelProperty(example = "true", value = "") @@ -94,7 +94,7 @@ public class XmlItem { @Valid private BigDecimal prefixNsNumber; - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") private Integer prefixNsInteger; @ApiModelProperty(example = "true", value = "") diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java index ec79a7b0139a..58a601ddc1dc 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java @@ -185,7 +185,7 @@ public Response testEndpointParameters(@ApiParam(value = "None", required=true) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) }) - public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) + public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, ") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, securityContext); } diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/TypeHolderExample.java index bd8c800f5e80..9e91286e3c48 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -134,7 +134,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem **/ @JsonProperty(value = "integer_item") - @ApiModelProperty(example = "-2", required = true, value = "") + @ApiModelProperty(required = true, value = "") @NotNull public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/XmlItem.java index c204835d08a9..df524a9df5ea 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/XmlItem.java @@ -229,7 +229,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger **/ @JsonProperty(value = "attribute_integer") - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") public Integer getAttributeInteger() { return attributeInteger; @@ -337,7 +337,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger **/ @JsonProperty(value = "name_integer") - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") public Integer getNameInteger() { return nameInteger; @@ -473,7 +473,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger **/ @JsonProperty(value = "prefix_integer") - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") public Integer getPrefixInteger() { return prefixInteger; @@ -609,7 +609,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger **/ @JsonProperty(value = "namespace_integer") - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") public Integer getNamespaceInteger() { return namespaceInteger; @@ -745,7 +745,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger **/ @JsonProperty(value = "prefix_ns_integer") - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java index 646056933a3d..c9a9a2558c7e 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java @@ -252,7 +252,7 @@ public Response testEndpointParameters(@ApiParam(value = "None", required=true) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) }) - public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "") @QueryParam("enum_query_model_array") List enumQueryModelArray,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) + public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, ") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "") @QueryParam("enum_query_model_array") List enumQueryModelArray,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString, securityContext); } diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/EnumTest.java index d5c8e6788aa0..90709086af7c 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/EnumTest.java @@ -123,7 +123,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/TypeHolderExample.java index ab86568a2925..edb6c94731cb 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -94,7 +94,7 @@ public TypeHolderExample integerItem(Integer integerItem) { } - @ApiModelProperty(example = "-2", required = true, value = "") + @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") @NotNull public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/XmlItem.java index 759435d2d14e..4f61f3b3d527 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/XmlItem.java @@ -98,7 +98,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { } - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -209,7 +209,7 @@ public XmlItem nameInteger(Integer nameInteger) { } - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -355,7 +355,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { } - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -501,7 +501,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { } - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -647,7 +647,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { } - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml index 6415519aac29..dbb13cd7209d 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml @@ -807,7 +807,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer - description: Query parameter enum test (double) @@ -1968,7 +1968,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -2003,7 +2002,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -2029,7 +2027,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -2064,7 +2061,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2099,7 +2095,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2136,7 +2131,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java index ab86568a2925..edb6c94731cb 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -94,7 +94,7 @@ public TypeHolderExample integerItem(Integer integerItem) { } - @ApiModelProperty(example = "-2", required = true, value = "") + @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") @NotNull public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java index 759435d2d14e..4f61f3b3d527 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java @@ -98,7 +98,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { } - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -209,7 +209,7 @@ public XmlItem nameInteger(Integer nameInteger) { } - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -355,7 +355,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { } - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -501,7 +501,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { } - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -647,7 +647,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { } - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml index 6415519aac29..dbb13cd7209d 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml @@ -807,7 +807,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer - description: Query parameter enum test (double) @@ -1968,7 +1968,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -2003,7 +2002,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -2029,7 +2027,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -2064,7 +2061,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2099,7 +2095,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2136,7 +2131,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/TypeHolderExample.java index 18fb301aaa84..52a44cd34202 100644 --- a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -106,7 +106,7 @@ public TypeHolderExample integerItem(Integer integerItem) { } - @ApiModelProperty(example = "-2", required = true, value = "") + @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") @NotNull public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/XmlItem.java index b4c1f1f84de0..c07bdc7255b2 100644 --- a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/XmlItem.java @@ -133,7 +133,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { } - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -244,7 +244,7 @@ public XmlItem nameInteger(Integer nameInteger) { } - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -390,7 +390,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { } - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -536,7 +536,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { } - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -682,7 +682,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { } - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-jakarta/src/main/openapi/openapi.yaml index 6415519aac29..dbb13cd7209d 100644 --- a/samples/server/petstore/jaxrs-spec-jakarta/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-jakarta/src/main/openapi/openapi.yaml @@ -807,7 +807,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer - description: Query parameter enum test (double) @@ -1968,7 +1968,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -2003,7 +2002,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -2029,7 +2027,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -2064,7 +2061,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2099,7 +2095,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2136,7 +2131,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/TypeHolderExample.java index 93b26f988122..0c0caaea6a05 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -104,7 +104,7 @@ public TypeHolderExample integerItem(Integer integerItem) { } - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "-2", required = true, description = "") + @org.eclipse.microprofile.openapi.annotations.media.Schema(required = true, description = "") @JsonProperty("integer_item") @NotNull public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/XmlItem.java index 010ca20d5300..fc8ac6d5f6b5 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/XmlItem.java @@ -131,7 +131,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { } - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "-2", description = "") + @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -242,7 +242,7 @@ public XmlItem nameInteger(Integer nameInteger) { } - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "-2", description = "") + @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -388,7 +388,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { } - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "-2", description = "") + @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -534,7 +534,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { } - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "-2", description = "") + @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -680,7 +680,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { } - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "-2", description = "") + @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/resources/META-INF/openapi.yaml b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/resources/META-INF/openapi.yaml index 6415519aac29..dbb13cd7209d 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/resources/META-INF/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/resources/META-INF/openapi.yaml @@ -807,7 +807,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer - description: Query parameter enum test (double) @@ -1968,7 +1968,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -2003,7 +2002,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -2029,7 +2027,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -2064,7 +2061,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2099,7 +2095,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2136,7 +2131,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/model/EnumTest.java index f0817b2cd69e..8a7fa77e13e1 100644 --- a/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/model/EnumTest.java @@ -120,7 +120,7 @@ public static EnumStringRequiredEnum fromValue(String value) { private EnumStringRequiredEnum enumStringRequired; public enum EnumIntegerEnum { - NUMBER_1(Integer.valueOf(1)), NUMBER_MINUS_1(Integer.valueOf(-1)); + NUMBER_1(Integer.valueOf(1)), NUMBER_null(Integer.valueOf(null)); private Integer value; diff --git a/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/main/resources/META-INF/openapi.yaml b/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/main/resources/META-INF/openapi.yaml index 77a09d464d9f..e4a0d7f40abc 100644 --- a/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/main/resources/META-INF/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/main/resources/META-INF/openapi.yaml @@ -861,7 +861,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1859,7 +1859,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumTest.java index aa0561d3729c..c432a2f7716c 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumTest.java @@ -122,7 +122,7 @@ public static EnumStringRequiredEnum fromValue(String value) { private EnumStringRequiredEnum enumStringRequired; public enum EnumIntegerEnum { - NUMBER_1(Integer.valueOf(1)), NUMBER_MINUS_1(Integer.valueOf(-1)); + NUMBER_1(Integer.valueOf(1)), NUMBER_null(Integer.valueOf(null)); private Integer value; diff --git a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml index ec445c1aac9b..5fba74997ce2 100644 --- a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml @@ -861,7 +861,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1875,7 +1875,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApi.java index fc792f10d456..9c0da353b6e7 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApi.java @@ -183,7 +183,7 @@ public Response testEndpointParameters(@ApiParam(value = "None", required=true) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) }) - public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) + public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, ") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, securityContext); } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/TypeHolderExample.java index 3be125c1a303..7de5f2e95c16 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -133,7 +133,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem **/ @JsonProperty(value = "integer_item") - @ApiModelProperty(example = "-2", required = true, value = "") + @ApiModelProperty(required = true, value = "") @NotNull public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/XmlItem.java index e99741c1e367..579944cfc091 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/XmlItem.java @@ -228,7 +228,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger **/ @JsonProperty(value = "attribute_integer") - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") public Integer getAttributeInteger() { return attributeInteger; @@ -336,7 +336,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger **/ @JsonProperty(value = "name_integer") - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") public Integer getNameInteger() { return nameInteger; @@ -472,7 +472,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger **/ @JsonProperty(value = "prefix_integer") - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") public Integer getPrefixInteger() { return prefixInteger; @@ -608,7 +608,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger **/ @JsonProperty(value = "namespace_integer") - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") public Integer getNamespaceInteger() { return namespaceInteger; @@ -744,7 +744,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger **/ @JsonProperty(value = "prefix_ns_integer") - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java index ee4fad33ccb4..fe1327a055ce 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java @@ -184,7 +184,7 @@ public Response testEndpointParameters(@ApiParam(value = "None", required=true) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) }) - public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) + public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, ") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, securityContext); } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/TypeHolderExample.java index 3be125c1a303..7de5f2e95c16 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -133,7 +133,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem **/ @JsonProperty(value = "integer_item") - @ApiModelProperty(example = "-2", required = true, value = "") + @ApiModelProperty(required = true, value = "") @NotNull public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/XmlItem.java index e99741c1e367..579944cfc091 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/XmlItem.java @@ -228,7 +228,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger **/ @JsonProperty(value = "attribute_integer") - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") public Integer getAttributeInteger() { return attributeInteger; @@ -336,7 +336,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger **/ @JsonProperty(value = "name_integer") - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") public Integer getNameInteger() { return nameInteger; @@ -472,7 +472,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger **/ @JsonProperty(value = "prefix_integer") - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") public Integer getPrefixInteger() { return prefixInteger; @@ -608,7 +608,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger **/ @JsonProperty(value = "namespace_integer") - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") public Integer getNamespaceInteger() { return namespaceInteger; @@ -744,7 +744,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger **/ @JsonProperty(value = "prefix_ns_integer") - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/FakeApi.java index c59152531220..01c29eba4890 100644 --- a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/FakeApi.java @@ -261,7 +261,7 @@ public Response testEndpointParameters(@Schema(description = "None") @QueryParam @ApiResponse(responseCode = "404", description = "Not found", content = @Content(schema = @Schema(implementation = Void.class))), }, tags={ "fake", }) - public Response testEnumParameters(@Schema(description = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@Schema(description = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@Schema(description = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") List enumQueryStringArray,@Schema(description = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@Schema(description = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger,@Schema(description = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@Schema(description = "") @QueryParam("enum_query_model_array") List enumQueryModelArray,@Schema(description = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @QueryParam("enum_form_string_array") List enumFormStringArray,@Schema(description = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @QueryParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) + public Response testEnumParameters(@Schema(description = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@Schema(description = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@Schema(description = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") List enumQueryStringArray,@Schema(description = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@Schema(description = "Query parameter enum test (double)", allowableValues="1, ") @QueryParam("enum_query_integer") Integer enumQueryInteger,@Schema(description = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@Schema(description = "") @QueryParam("enum_query_model_array") List enumQueryModelArray,@Schema(description = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @QueryParam("enum_form_string_array") List enumFormStringArray,@Schema(description = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @QueryParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString, securityContext); } diff --git a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/EnumTest.java index 9fc81524e0c7..02abbe98bfc7 100644 --- a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/EnumTest.java @@ -122,7 +122,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml index 534372bf58f9..6b6dd9f649bd 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml @@ -643,7 +643,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer - description: Query parameter enum test (double) diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumTest.java index a4634a276f9c..97915f718a32 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumTest.java @@ -109,7 +109,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderDefault.java index e20bec93b0ee..afd41357f7a1 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -29,7 +29,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private Integer integerItem; private Boolean boolItem = true; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderExample.java index d455c202b5a5..5017e1d05132 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -124,7 +124,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @Schema(name = "integer_item", example = "-2", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(name = "integer_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/XmlItem.java index 4a3b76b19b54..6ac717ab2377 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/XmlItem.java @@ -142,7 +142,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @Schema(name = "attribute_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "attribute_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -250,7 +250,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @Schema(name = "name_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "name_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -386,7 +386,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @Schema(name = "prefix_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "prefix_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -522,7 +522,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @Schema(name = "namespace_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "namespace_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -658,7 +658,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @Schema(name = "prefix_ns_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "prefix_ns_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; 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 491edc841567..9e11adc8d102 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 @@ -448,7 +448,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java index 8b976434372e..211b1a383432 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java @@ -109,7 +109,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java index 2365d1198316..98cc2a751a57 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -29,7 +29,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private Integer integerItem; private Boolean boolItem = true; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java index 5b8f63e1b103..197486b55487 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -124,7 +124,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(example = "-2", required = true, value = "") + @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java index cadfadcf8611..d7503b43d7f7 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java @@ -142,7 +142,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -250,7 +250,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -386,7 +386,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -522,7 +522,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -658,7 +658,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml index f26422f84ebf..92721ac9a0ec 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml @@ -799,7 +799,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1649,7 +1649,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: @@ -1991,7 +1991,6 @@ components: default: 1.234 type: number integer_item: - default: -2 type: integer bool_item: default: true @@ -2025,7 +2024,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -2060,7 +2058,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -2086,7 +2083,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -2121,7 +2117,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2156,7 +2151,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2193,7 +2187,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema 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 491edc841567..9e11adc8d102 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 @@ -448,7 +448,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java index 278e63ca726e..e543efe177e4 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java @@ -110,7 +110,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java index e11051684c52..36300a75513c 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -30,7 +30,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private Integer integerItem; private Boolean boolItem = true; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java index 0d7d3d8b924a..e200fd12fcdb 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -125,7 +125,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(example = "-2", required = true, value = "") + @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java index ab3ca67a4be2..8944d746b98a 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java @@ -143,7 +143,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -251,7 +251,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -387,7 +387,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -523,7 +523,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -659,7 +659,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml index f26422f84ebf..92721ac9a0ec 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml @@ -799,7 +799,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1649,7 +1649,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: @@ -1991,7 +1991,6 @@ components: default: 1.234 type: number integer_item: - default: -2 type: integer bool_item: default: true @@ -2025,7 +2024,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -2060,7 +2058,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -2086,7 +2083,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -2121,7 +2117,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2156,7 +2151,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2193,7 +2187,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema 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 5fe4ea1a3dda..bb64fcc66afc 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 @@ -407,7 +407,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java index 278e63ca726e..e543efe177e4 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -110,7 +110,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java index e11051684c52..36300a75513c 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -30,7 +30,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private Integer integerItem; private Boolean boolItem = true; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index 0d7d3d8b924a..e200fd12fcdb 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -125,7 +125,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(example = "-2", required = true, value = "") + @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java index ab3ca67a4be2..8944d746b98a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java @@ -143,7 +143,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -251,7 +251,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -387,7 +387,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -523,7 +523,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -659,7 +659,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml index f26422f84ebf..92721ac9a0ec 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml @@ -799,7 +799,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1649,7 +1649,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: @@ -1991,7 +1991,6 @@ components: default: 1.234 type: number integer_item: - default: -2 type: integer bool_item: default: true @@ -2025,7 +2024,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -2060,7 +2058,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -2086,7 +2083,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -2121,7 +2117,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2156,7 +2151,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2193,7 +2187,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema 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 5fe4ea1a3dda..bb64fcc66afc 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 @@ -407,7 +407,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java index a37a0bb09e83..34c4cde553e7 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java @@ -110,7 +110,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java index d045dbb87355..56d6f7ff4d26 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -30,7 +30,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private Integer integerItem; private Boolean boolItem = true; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java index 675d3eaabd23..847c02a0e3e4 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -125,7 +125,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(example = "-2", required = true, value = "") + @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java index 218271dd6e27..5842f660f961 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java @@ -182,7 +182,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -290,7 +290,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -426,7 +426,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -562,7 +562,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -698,7 +698,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml index f26422f84ebf..92721ac9a0ec 100644 --- a/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml @@ -799,7 +799,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1649,7 +1649,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: @@ -1991,7 +1991,6 @@ components: default: 1.234 type: number integer_item: - default: -2 type: integer bool_item: default: true @@ -2025,7 +2024,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -2060,7 +2058,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -2086,7 +2083,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -2121,7 +2117,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2156,7 +2151,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2193,7 +2187,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema 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 57ef4ff2bf95..0a880695f9d4 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 @@ -448,7 +448,7 @@ default ResponseEntity testEndpointParameters( default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java index 278e63ca726e..e543efe177e4 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java @@ -110,7 +110,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java index e11051684c52..36300a75513c 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -30,7 +30,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private Integer integerItem; private Boolean boolItem = true; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java index 0d7d3d8b924a..e200fd12fcdb 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -125,7 +125,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(example = "-2", required = true, value = "") + @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java index ab3ca67a4be2..8944d746b98a 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java @@ -143,7 +143,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -251,7 +251,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -387,7 +387,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -523,7 +523,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -659,7 +659,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml index f26422f84ebf..92721ac9a0ec 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml @@ -799,7 +799,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1649,7 +1649,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: @@ -1991,7 +1991,6 @@ components: default: 1.234 type: number integer_item: - default: -2 type: integer bool_item: default: true @@ -2025,7 +2024,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -2060,7 +2058,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -2086,7 +2083,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -2121,7 +2117,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2156,7 +2151,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2193,7 +2187,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java index 3a4876c97724..074424ac5161 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java @@ -433,7 +433,7 @@ default Mono testEnumParameters( @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString, diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumTest.java index 278e63ca726e..e543efe177e4 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumTest.java @@ -110,7 +110,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefault.java index e11051684c52..36300a75513c 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -30,7 +30,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private Integer integerItem; private Boolean boolItem = true; diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExample.java index 0d7d3d8b924a..e200fd12fcdb 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -125,7 +125,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(example = "-2", required = true, value = "") + @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/XmlItem.java index ab3ca67a4be2..8944d746b98a 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/XmlItem.java @@ -143,7 +143,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -251,7 +251,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -387,7 +387,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -523,7 +523,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -659,7 +659,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/resources/openapi.yaml index f26422f84ebf..92721ac9a0ec 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/resources/openapi.yaml @@ -799,7 +799,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1649,7 +1649,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: @@ -1991,7 +1991,6 @@ components: default: 1.234 type: number integer_item: - default: -2 type: integer bool_item: default: true @@ -2025,7 +2024,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -2060,7 +2058,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -2086,7 +2083,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -2121,7 +2117,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2156,7 +2151,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2193,7 +2187,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema 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 072db6eeae26..ef3556e18bc3 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 @@ -422,7 +422,7 @@ default Mono> testEnumParameters( @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString, diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java index 278e63ca726e..e543efe177e4 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java @@ -110,7 +110,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java index e11051684c52..36300a75513c 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -30,7 +30,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private Integer integerItem; private Boolean boolItem = true; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java index 0d7d3d8b924a..e200fd12fcdb 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -125,7 +125,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(example = "-2", required = true, value = "") + @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java index ab3ca67a4be2..8944d746b98a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java @@ -143,7 +143,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -251,7 +251,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -387,7 +387,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -523,7 +523,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -659,7 +659,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml index f26422f84ebf..92721ac9a0ec 100644 --- a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml @@ -799,7 +799,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1649,7 +1649,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: @@ -1991,7 +1991,6 @@ components: default: 1.234 type: number integer_item: - default: -2 type: integer bool_item: default: true @@ -2025,7 +2024,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -2060,7 +2058,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -2086,7 +2083,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -2121,7 +2117,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2156,7 +2151,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2193,7 +2187,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema 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 78a69bf9a563..a8e59e7a6403 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 @@ -372,7 +372,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java index 278e63ca726e..e543efe177e4 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -110,7 +110,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index 0d7d3d8b924a..e200fd12fcdb 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -125,7 +125,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(example = "-2", required = true, value = "") + @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java index ab3ca67a4be2..8944d746b98a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java @@ -143,7 +143,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -251,7 +251,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -387,7 +387,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -523,7 +523,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -659,7 +659,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml index 83bb676d2105..239e3e738c9d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml @@ -893,7 +893,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1845,7 +1845,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: @@ -2198,7 +2198,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -2233,7 +2232,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -2259,7 +2257,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -2294,7 +2291,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2329,7 +2325,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2366,7 +2361,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema 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 78a69bf9a563..a8e59e7a6403 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 @@ -372,7 +372,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java index 278e63ca726e..e543efe177e4 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java @@ -110,7 +110,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java index 0d7d3d8b924a..e200fd12fcdb 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -125,7 +125,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(example = "-2", required = true, value = "") + @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java index ab3ca67a4be2..8944d746b98a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java @@ -143,7 +143,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -251,7 +251,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -387,7 +387,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -523,7 +523,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -659,7 +659,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml index 83bb676d2105..239e3e738c9d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml @@ -893,7 +893,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1845,7 +1845,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: @@ -2198,7 +2198,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -2233,7 +2232,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -2259,7 +2257,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -2294,7 +2291,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2329,7 +2325,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2366,7 +2361,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema 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 434c14572ac4..cf5027db00f3 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 @@ -403,7 +403,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java index 278e63ca726e..e543efe177e4 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -110,7 +110,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index 0d7d3d8b924a..e200fd12fcdb 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -125,7 +125,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(example = "-2", required = true, value = "") + @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java index ab3ca67a4be2..8944d746b98a 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java @@ -143,7 +143,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -251,7 +251,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -387,7 +387,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -523,7 +523,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -659,7 +659,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml index 83bb676d2105..239e3e738c9d 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml @@ -893,7 +893,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1845,7 +1845,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: @@ -2198,7 +2198,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -2233,7 +2232,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -2259,7 +2257,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -2294,7 +2291,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2329,7 +2325,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2366,7 +2361,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema 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 434c14572ac4..cf5027db00f3 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 @@ -403,7 +403,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java index 278e63ca726e..e543efe177e4 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java @@ -110,7 +110,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java index 0d7d3d8b924a..e200fd12fcdb 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -125,7 +125,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(example = "-2", required = true, value = "") + @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java index ab3ca67a4be2..8944d746b98a 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java @@ -143,7 +143,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -251,7 +251,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -387,7 +387,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -523,7 +523,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -659,7 +659,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml index 83bb676d2105..239e3e738c9d 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml @@ -893,7 +893,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1845,7 +1845,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: @@ -2198,7 +2198,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -2233,7 +2232,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -2259,7 +2257,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -2294,7 +2291,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2329,7 +2325,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2366,7 +2361,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema 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 15e87397b915..dab6f6529a5b 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 @@ -448,7 +448,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") Optional enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) Optional> enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") Optional enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Optional enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Optional enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Optional enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java index 68a3d88bf25d..ca963ae08ee6 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java @@ -110,7 +110,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java index 20d8e7eddd49..c61cb5db2a5d 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -30,7 +30,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private Integer integerItem; private Boolean boolItem = true; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java index 272b9bfb1b38..ff52380bfe08 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -125,7 +125,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(example = "-2", required = true, value = "") + @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java index 0630acf961bd..b9a502a61e15 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java @@ -143,7 +143,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("attribute_integer") public Optional getAttributeInteger() { return attributeInteger; @@ -251,7 +251,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("name_integer") public Optional getNameInteger() { return nameInteger; @@ -387,7 +387,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_integer") public Optional getPrefixInteger() { return prefixInteger; @@ -523,7 +523,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("namespace_integer") public Optional getNamespaceInteger() { return namespaceInteger; @@ -659,7 +659,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_ns_integer") public Optional getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml index f26422f84ebf..92721ac9a0ec 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml @@ -799,7 +799,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1649,7 +1649,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: @@ -1991,7 +1991,6 @@ components: default: 1.234 type: number integer_item: - default: -2 type: integer bool_item: default: true @@ -2025,7 +2024,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -2060,7 +2058,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -2086,7 +2083,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -2121,7 +2117,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2156,7 +2151,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2193,7 +2187,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java index ddb841b0f2d0..faaa891b6d06 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java @@ -109,7 +109,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java index 68b405759668..5323b9b91b0d 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java @@ -29,7 +29,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private Integer integerItem; private Boolean boolItem = true; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java index a6e93d3a8593..395a7f264d62 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java @@ -124,7 +124,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @Schema(name = "integer_item", example = "-2", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(name = "integer_item", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java index c8696515777b..4a29b032a090 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java @@ -142,7 +142,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @Schema(name = "attribute_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "attribute_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -250,7 +250,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @Schema(name = "name_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "name_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -386,7 +386,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @Schema(name = "prefix_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "prefix_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -522,7 +522,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @Schema(name = "namespace_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "namespace_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -658,7 +658,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @Schema(name = "prefix_ns_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "prefix_ns_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml index f26422f84ebf..92721ac9a0ec 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml @@ -799,7 +799,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1649,7 +1649,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: @@ -1991,7 +1991,6 @@ components: default: 1.234 type: number integer_item: - default: -2 type: integer bool_item: default: true @@ -2025,7 +2024,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -2060,7 +2058,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -2086,7 +2083,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -2121,7 +2117,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2156,7 +2151,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2193,7 +2187,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema 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 88383d4fb06a..15208a8b88ef 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 @@ -448,7 +448,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTestDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTestDto.java index 1d8d7d1884a0..cfb97321bf4c 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTestDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTestDto.java @@ -110,7 +110,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_MINUS_1(-1); + NUMBER_null(null); private Integer value; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java index 5dfcecbfb959..fab32cad3ef0 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java @@ -32,7 +32,7 @@ public class TypeHolderDefaultDto { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem = -2; + private Integer integerItem; private Boolean boolItem = true; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExampleDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExampleDto.java index aca9f3a5f0d4..e09d60f38a34 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExampleDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExampleDto.java @@ -127,7 +127,7 @@ public TypeHolderExampleDto integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(example = "-2", required = true, value = "") + @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItemDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItemDto.java index 49ceb16a3f6a..d20d10d67a18 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItemDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItemDto.java @@ -145,7 +145,7 @@ public XmlItemDto attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -253,7 +253,7 @@ public XmlItemDto nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -389,7 +389,7 @@ public XmlItemDto prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -525,7 +525,7 @@ public XmlItemDto namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -661,7 +661,7 @@ public XmlItemDto prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(example = "-2", value = "") + @ApiModelProperty(value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot/src/main/resources/openapi.yaml b/samples/server/petstore/springboot/src/main/resources/openapi.yaml index 8e4565fad645..a2bb2aae832e 100644 --- a/samples/server/petstore/springboot/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot/src/main/resources/openapi.yaml @@ -799,7 +799,7 @@ paths: schema: enum: - 1 - - -2 + - null format: int32 type: integer style: form @@ -1649,7 +1649,7 @@ components: enum_integer: enum: - 1 - - -1 + - null format: int32 type: integer enum_number: @@ -1979,7 +1979,6 @@ components: default: 1.234 type: number integer_item: - default: -2 type: integer bool_item: default: true @@ -2013,7 +2012,6 @@ components: format: float type: number integer_item: - example: -2 type: integer bool_item: example: true @@ -2048,7 +2046,6 @@ components: xml: attribute: true attribute_integer: - example: -2 type: integer xml: attribute: true @@ -2074,7 +2071,6 @@ components: xml: name: xml_name_number name_integer: - example: -2 type: integer xml: name: xml_name_integer @@ -2109,7 +2105,6 @@ components: xml: prefix: cd prefix_integer: - example: -2 type: integer xml: prefix: ef @@ -2144,7 +2139,6 @@ components: xml: namespace: http://b.com/schema namespace_integer: - example: -2 type: integer xml: namespace: http://c.com/schema @@ -2181,7 +2175,6 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: - example: -2 type: integer xml: namespace: http://c.com/schema From 778b423712c2c7c1b69973bf5a48b8247c9f87cb Mon Sep 17 00:00:00 2001 From: Morten Jansrud Date: Tue, 16 Jul 2024 19:48:23 +0200 Subject: [PATCH 11/21] Revert "Run generate-samples and export_docs_generators" This reverts commit f051f268a564e6487626b0e0a9a5cebc6d198dc0. --- .../FormModels/.openapi-generator/FILES | 2 + .../net4.7/FormModels/api/openapi.yaml | 20 ++-- .../net4.7/FormModels/docs/models/EnumTest.md | 2 +- .../Org.OpenAPITools/Client/ClientUtils.cs | 2 + .../Client/HostConfiguration.cs | 2 + .../src/Org.OpenAPITools/Model/EnumTest.cs | 12 +-- .../Model/EnumTestEnumIntegerOnly.cs | 12 +-- ...iredClassRequiredNotnullableEnumInteger.cs | 12 +-- ...ClassRequiredNotnullableEnumIntegerOnly.cs | 12 +-- ...equiredClassRequiredNullableEnumInteger.cs | 12 +-- ...redClassRequiredNullableEnumIntegerOnly.cs | 12 +-- ...EnumParametersEnumQueryIntegerParameter.cs | 12 +-- .../net4.7/Petstore/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 24 ++--- .../Org.OpenAPITools/Model/RequiredClass.cs | 96 +++++++++---------- .../FormModels/.openapi-generator/FILES | 2 + .../net4.8/FormModels/api/openapi.yaml | 20 ++-- .../net4.8/FormModels/docs/models/EnumTest.md | 2 +- .../Org.OpenAPITools/Client/ClientUtils.cs | 2 + .../Client/HostConfiguration.cs | 2 + .../src/Org.OpenAPITools/Model/EnumTest.cs | 12 +-- .../Model/EnumTestEnumIntegerOnly.cs | 12 +-- ...iredClassRequiredNotnullableEnumInteger.cs | 12 +-- ...ClassRequiredNotnullableEnumIntegerOnly.cs | 12 +-- ...equiredClassRequiredNullableEnumInteger.cs | 12 +-- ...redClassRequiredNullableEnumIntegerOnly.cs | 12 +-- ...EnumParametersEnumQueryIntegerParameter.cs | 12 +-- .../net4.8/Petstore/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 24 ++--- .../Org.OpenAPITools/Model/RequiredClass.cs | 96 +++++++++---------- .../net8/FormModels/.openapi-generator/FILES | 2 + .../net8/FormModels/api/openapi.yaml | 20 ++-- .../net8/FormModels/docs/models/EnumTest.md | 2 +- .../Org.OpenAPITools/Client/ClientUtils.cs | 2 + .../Client/HostConfiguration.cs | 2 + .../src/Org.OpenAPITools/Model/EnumTest.cs | 12 +-- .../Model/EnumTestEnumIntegerOnly.cs | 12 +-- ...iredClassRequiredNotnullableEnumInteger.cs | 12 +-- ...ClassRequiredNotnullableEnumIntegerOnly.cs | 12 +-- ...equiredClassRequiredNullableEnumInteger.cs | 12 +-- ...redClassRequiredNullableEnumIntegerOnly.cs | 12 +-- ...EnumParametersEnumQueryIntegerParameter.cs | 12 +-- .../net8/NullReferenceTypes/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 24 ++--- .../Org.OpenAPITools/Model/RequiredClass.cs | 96 +++++++++---------- .../net8/Petstore/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 24 ++--- .../Org.OpenAPITools/Model/RequiredClass.cs | 96 +++++++++---------- .../net8/SourceGeneration/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 24 ++--- .../Org.OpenAPITools/Model/RequiredClass.cs | 96 +++++++++---------- .../standard2.0/Petstore/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 24 ++--- .../Org.OpenAPITools/Model/RequiredClass.cs | 96 +++++++++---------- .../standard2.0/Petstore/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 8 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 32 +++---- .../Client/Auth/OAuthAuthenticator.cs | 1 - .../net4.7/Petstore/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 8 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 32 +++---- .../net4.8/Petstore/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 8 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 32 +++---- .../net7/EnumMappings/api/openapi.yaml | 22 ++--- .../Client/Auth/OAuthAuthenticator.cs | 2 +- .../src/Org.OpenAPITools/Model/EnumTest.cs | 8 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 32 +++---- .../restsharp/net7/Petstore/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 8 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 32 +++---- .../ConditionalSerialization/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 8 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 32 +++---- .../standard2.0/Petstore/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 8 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 32 +++---- .../standard2.0/Petstore/api/openapi.yaml | 22 ++--- .../src/Org.OpenAPITools/Model/EnumTest.cs | 8 +- .../Org.OpenAPITools/Model/RequiredClass.cs | 32 +++---- .../petstore/go/go-petstore/api/openapi.yaml | 8 +- .../lib/OpenAPIPetstore/Model.hs | 36 ++++++- .../petstore/haskell-http-client/openapi.yaml | 10 +- .../haskell-http-client/tests/Instances.hs | 3 + .../v3/mp/docs/EnumTest.md | 2 +- .../java-helidon-client/v3/mp/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 2 +- .../v3/se/docs/EnumTest.md | 2 +- .../java-helidon-client/v3/se/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 2 +- .../v4/mp/docs/EnumTest.md | 2 +- .../java-helidon-client/v4/mp/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 2 +- .../docs/apis/FakeApi.md | 2 +- .../java/apache-httpclient/api/openapi.yaml | 4 +- .../java/apache-httpclient/docs/EnumTest.md | 2 +- .../java/apache-httpclient/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 2 +- .../java/feign-no-nullable/api/openapi.yaml | 8 +- .../petstore/java/feign/api/openapi.yaml | 4 +- .../openapitools/client/model/EnumTest.java | 2 +- .../java/google-api-client/api/openapi.yaml | 8 +- .../java/google-api-client/docs/FakeApi.md | 2 +- .../api/openapi.yaml | 8 +- .../docs/FakeApi.md | 2 +- .../java/jersey2-java8/api/openapi.yaml | 8 +- .../java/jersey2-java8/docs/FakeApi.md | 2 +- .../petstore/java/jersey3/api/openapi.yaml | 6 +- .../petstore/java/jersey3/docs/EnumTest.md | 4 +- .../petstore/java/jersey3/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 4 +- .../java/native-async/api/openapi.yaml | 6 +- .../java/native-async/docs/EnumTest.md | 4 +- .../java/native-async/docs/FakeApi.md | 4 +- .../openapitools/client/model/EnumTest.java | 4 +- .../petstore/java/native/api/openapi.yaml | 6 +- .../petstore/java/native/docs/EnumTest.md | 4 +- .../petstore/java/native/docs/FakeApi.md | 4 +- .../openapitools/client/model/EnumTest.java | 4 +- .../docs/FakeApi.md | 2 +- .../src/main/resources/openapi/openapi.yaml | 8 +- .../api/openapi.yaml | 8 +- .../docs/FakeApi.md | 2 +- .../java/okhttp-gson/api/openapi.yaml | 6 +- .../java/okhttp-gson/docs/EnumTest.md | 4 +- .../petstore/java/okhttp-gson/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 4 +- .../rest-assured-jackson/api/openapi.yaml | 8 +- .../java/rest-assured-jackson/docs/FakeApi.md | 2 +- .../java/rest-assured/api/openapi.yaml | 8 +- .../java/rest-assured/docs/FakeApi.md | 2 +- .../java/restclient-swagger2/api/openapi.yaml | 4 +- .../java/restclient-swagger2/docs/EnumTest.md | 2 +- .../java/restclient-swagger2/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 2 +- .../petstore/java/restclient/api/openapi.yaml | 4 +- .../petstore/java/restclient/docs/EnumTest.md | 2 +- .../petstore/java/restclient/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 2 +- .../petstore/java/resteasy/api/openapi.yaml | 4 +- .../petstore/java/resteasy/docs/EnumTest.md | 2 +- .../petstore/java/resteasy/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 2 +- .../resttemplate-withXml/api/openapi.yaml | 4 +- .../resttemplate-withXml/docs/EnumTest.md | 2 +- .../java/resttemplate-withXml/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 4 +- .../java/resttemplate/api/openapi.yaml | 4 +- .../java/resttemplate/docs/EnumTest.md | 2 +- .../java/resttemplate/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 2 +- .../java/retrofit2-play26/api/openapi.yaml | 8 +- .../java/retrofit2-play26/docs/FakeApi.md | 2 +- .../petstore/java/retrofit2/api/openapi.yaml | 8 +- .../petstore/java/retrofit2/docs/FakeApi.md | 2 +- .../java/retrofit2rx2/api/openapi.yaml | 8 +- .../java/retrofit2rx2/docs/FakeApi.md | 2 +- .../java/retrofit2rx3/api/openapi.yaml | 8 +- .../java/retrofit2rx3/docs/FakeApi.md | 2 +- .../java/vertx-no-nullable/api/openapi.yaml | 8 +- .../java/vertx-no-nullable/docs/FakeApi.md | 2 +- .../petstore/java/vertx/api/openapi.yaml | 4 +- .../petstore/java/vertx/docs/EnumTest.md | 2 +- .../petstore/java/vertx/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 2 +- .../java/webclient-jakarta/api/openapi.yaml | 4 +- .../java/webclient-jakarta/docs/EnumTest.md | 2 +- .../java/webclient-jakarta/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 2 +- .../java/webclient-swagger2/api/openapi.yaml | 4 +- .../java/webclient-swagger2/docs/EnumTest.md | 2 +- .../java/webclient-swagger2/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 2 +- .../petstore/java/webclient/api/openapi.yaml | 4 +- .../petstore/java/webclient/docs/EnumTest.md | 2 +- .../petstore/java/webclient/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 2 +- .../javascript-apollo/docs/EnumTest.md | 2 +- .../javascript-apollo/src/model/EnumTest.js | 4 +- .../petstore/javascript-es6/docs/EnumTest.md | 2 +- .../javascript-es6/src/model/EnumTest.js | 4 +- .../javascript-promise-es6/docs/EnumTest.md | 2 +- .../src/model/EnumTest.js | 4 +- .../OpenAPIClient-php/src/Model/EnumTest.php | 4 +- .../OpenAPIClient-php/lib/Model/EnumTest.php | 4 +- .../php/psr-18/lib/Model/EnumTest.php | 4 +- .../src/PSPetstore/Api/PSFakeApi.ps1 | 2 +- .../src/PSPetstore/Model/EnumTest.ps1 | 4 +- .../lib/petstore/api/fake_api.rb | 2 +- .../lib/petstore/models/enum_test.rb | 4 +- .../ruby-faraday/lib/petstore/api/fake_api.rb | 2 +- .../lib/petstore/models/enum_test.rb | 4 +- .../ruby-httpx/lib/petstore/api/fake_api.rb | 2 +- .../lib/petstore/models/enum_test.rb | 4 +- .../ruby/lib/petstore/api/fake_api.rb | 2 +- .../ruby/lib/petstore/models/enum_test.rb | 4 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../org/openapitools/model/EnumTestDto.java | 2 +- .../model/TypeHolderDefaultDto.java | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 2 +- .../Sources/PetstoreClient/APIs/FakeAPI.swift | 2 +- .../Sources/PetstoreClient/APIs/FakeAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 2 +- .../lib/src/model/enum_test.dart | 4 +- .../lib/src/model/enum_test.dart | 6 +- .../lib/model/enum_test.dart | 6 +- .../petstore/go/go-petstore/api/openapi.yaml | 4 +- .../java/jersey2-java8/api/openapi.yaml | 6 +- .../java/jersey2-java8/docs/EnumTest.md | 4 +- .../java/jersey2-java8/docs/FakeApi.md | 2 +- .../openapitools/client/model/EnumTest.java | 4 +- .../docs/OuterEnumIntegerDefaultValue.md | 2 +- .../petstore_api/models/enum_test.py | 4 +- .../outer_enum_integer_default_value.py | 2 +- .../docs/OuterEnumIntegerDefaultValue.md | 2 +- .../petstore_api/models/enum_test.py | 4 +- .../outer_enum_integer_default_value.py | 2 +- .../docs/OuterEnumIntegerDefaultValue.md | 2 +- .../petstore_api/models/enum_test.py | 4 +- .../outer_enum_integer_default_value.py | 2 +- .../docs/OuterEnumIntegerDefaultValue.md | 2 +- .../python/petstore_api/models/enum_test.py | 4 +- .../outer_enum_integer_default_value.py | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 11 ++- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 11 ++- .../schema/petstore/mysql/mysql_schema.sql | 2 +- .../generated/3_0/model/Enum_Test.cpp | 2 +- .../openapitools/server/model/EnumTest.java | 2 +- .../src/main/resources/META-INF/openapi.yml | 4 +- .../openapitools/server/model/EnumTest.java | 2 +- .../src/main/resources/META-INF/openapi.yml | 4 +- .../openapitools/server/model/EnumTest.java | 2 +- .../src/main/resources/META-INF/openapi.yml | 4 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../public/openapi.json | 8 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/openapi/openapi.yaml | 8 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/openapi/openapi.yaml | 8 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/openapi/openapi.yaml | 8 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/META-INF/openapi.yaml | 8 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../src/main/resources/META-INF/openapi.yaml | 4 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../jaxrs-spec/src/main/openapi/openapi.yaml | 4 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../api/openapi.yaml | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 11 ++- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 11 ++- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 11 ++- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 11 ++- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 11 ++- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 11 ++- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 11 ++- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 10 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 10 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 10 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 10 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 2 +- .../openapitools/model/TypeHolderDefault.java | 2 +- .../openapitools/model/TypeHolderExample.java | 2 +- .../java/org/openapitools/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 11 ++- .../virtualan/model/EnumTest.java | 2 +- .../virtualan/model/TypeHolderDefault.java | 2 +- .../virtualan/model/TypeHolderExample.java | 2 +- .../openapitools/virtualan/model/XmlItem.java | 10 +- .../src/main/resources/openapi.yaml | 11 ++- .../java/org/openapitools/api/FakeApi.java | 2 +- .../org/openapitools/model/EnumTestDto.java | 2 +- .../model/TypeHolderDefaultDto.java | 2 +- .../model/TypeHolderExampleDto.java | 2 +- .../org/openapitools/model/XmlItemDto.java | 10 +- .../src/main/resources/openapi.yaml | 11 ++- 375 files changed, 1602 insertions(+), 1308 deletions(-) diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/.openapi-generator/FILES b/samples/client/petstore/csharp/generichost/net4.7/FormModels/.openapi-generator/FILES index d135101ac61c..45c476af3183 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/.openapi-generator/FILES @@ -40,6 +40,7 @@ docs/models/EnumArraysArrayEnumInner.md docs/models/EnumArraysJustSymbol.md docs/models/EnumClass.md docs/models/EnumTest.md +docs/models/EnumTestEnumInteger.md docs/models/EnumTestEnumIntegerOnly.md docs/models/EnumTestEnumString.md docs/models/EquilateralTriangle.md @@ -196,6 +197,7 @@ src/Org.OpenAPITools/Model/EnumArraysArrayEnumInner.cs src/Org.OpenAPITools/Model/EnumArraysJustSymbol.cs src/Org.OpenAPITools/Model/EnumClass.cs src/Org.OpenAPITools/Model/EnumTest.cs +src/Org.OpenAPITools/Model/EnumTestEnumInteger.cs src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs src/Org.OpenAPITools/Model/EnumTestEnumString.cs src/Org.OpenAPITools/Model/EquilateralTriangle.cs diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml index ba5a4a0ad9ef..c64890a06346 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml @@ -1676,7 +1676,7 @@ components: enum_string_required: $ref: '#/components/schemas/Enum_Test_enum_string' enum_integer: - $ref: '#/components/schemas/testEnumParameters_enum_query_integer_parameter' + $ref: '#/components/schemas/Enum_Test_enum_integer' enum_integer_only: $ref: '#/components/schemas/Enum_Test_enum_integer_only' enum_number: @@ -2740,7 +2740,7 @@ components: testEnumParameters_enum_query_integer_parameter: enum: - 1 - - null + - -2 format: int32 type: integer testEnumParameters_enum_query_double_parameter: @@ -2895,10 +2895,16 @@ components: value - "Duplicate\r\nvalue" type: string + Enum_Test_enum_integer: + enum: + - 1 + - -1 + format: int32 + type: integer Enum_Test_enum_integer_only: enum: - 2 - - null + - -2 type: integer MapTest_map_of_enum_string_value: enum: @@ -2918,27 +2924,27 @@ components: RequiredClass_required_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer RequiredClass_required_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer RequiredClass_required_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer RequiredClass_required_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer RequiredClass_required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/models/EnumTest.md b/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/models/EnumTest.md index c38d85092517..898c1ea1fb69 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/models/EnumTest.md +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/models/EnumTest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **EnumStringRequired** | **EnumTestEnumString** | | -**EnumInteger** | **TestEnumParametersEnumQueryIntegerParameter** | | [optional] +**EnumInteger** | **EnumTestEnumInteger** | | [optional] **EnumIntegerOnly** | **EnumTestEnumIntegerOnly** | | [optional] **EnumNumber** | **TestEnumParametersEnumQueryDoubleParameter** | | [optional] **EnumString** | **EnumTestEnumString** | | [optional] diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs index 6de077dc8c4c..efff79097e03 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -175,6 +175,8 @@ public static string ParameterToString(object obj, string format = ISO8601_DATET return EnumArraysJustSymbolValueConverter.ToJsonValue(enumArraysJustSymbol); if (obj is EnumClass enumClass) return EnumClassValueConverter.ToJsonValue(enumClass); + if (obj is EnumTestEnumInteger enumTestEnumInteger) + return EnumTestEnumIntegerValueConverter.ToJsonValue(enumTestEnumInteger).ToString(); if (obj is EnumTestEnumIntegerOnly enumTestEnumIntegerOnly) return EnumTestEnumIntegerOnlyValueConverter.ToJsonValue(enumTestEnumIntegerOnly).ToString(); if (obj is EnumTestEnumString enumTestEnumString) diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs index 0ac6f2ab5715..c706302171c4 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -73,6 +73,8 @@ public HostConfiguration(IServiceCollection services) _jsonOptions.Converters.Add(new EnumClassJsonConverter()); _jsonOptions.Converters.Add(new EnumClassNullableJsonConverter()); _jsonOptions.Converters.Add(new EnumTestJsonConverter()); + _jsonOptions.Converters.Add(new EnumTestEnumIntegerJsonConverter()); + _jsonOptions.Converters.Add(new EnumTestEnumIntegerNullableJsonConverter()); _jsonOptions.Converters.Add(new EnumTestEnumIntegerOnlyJsonConverter()); _jsonOptions.Converters.Add(new EnumTestEnumIntegerOnlyNullableJsonConverter()); _jsonOptions.Converters.Add(new EnumTestEnumStringJsonConverter()); diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs index 477f11fcf539..48e1f8c6e676 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs @@ -42,7 +42,7 @@ public partial class EnumTest : IValidatableObject /// outerEnumInteger /// outerEnumIntegerDefaultValue [JsonConstructor] - public EnumTest(EnumTestEnumString enumStringRequired, Option enumInteger = default, Option enumIntegerOnly = default, Option enumNumber = default, Option enumString = default, Option outerEnum = default, Option outerEnumDefaultValue = default, Option outerEnumInteger = default, Option outerEnumIntegerDefaultValue = default) + public EnumTest(EnumTestEnumString enumStringRequired, Option enumInteger = default, Option enumIntegerOnly = default, Option enumNumber = default, Option enumString = default, Option outerEnum = default, Option outerEnumDefaultValue = default, Option outerEnumInteger = default, Option outerEnumIntegerDefaultValue = default) { EnumStringRequired = enumStringRequired; EnumIntegerOption = enumInteger; @@ -69,13 +69,13 @@ public EnumTest(EnumTestEnumString enumStringRequired, Option [JsonIgnore] [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public Option EnumIntegerOption { get; private set; } + public Option EnumIntegerOption { get; private set; } /// /// Gets or Sets EnumInteger /// [JsonPropertyName("enum_integer")] - public TestEnumParametersEnumQueryIntegerParameter? EnumInteger { get { return this.EnumIntegerOption; } set { this.EnumIntegerOption = new Option(value); } } + public EnumTestEnumInteger? EnumInteger { get { return this.EnumIntegerOption; } set { this.EnumIntegerOption = new Option(value); } } /// /// Used to track the state of EnumIntegerOnly @@ -230,7 +230,7 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv JsonTokenType startingTokenType = utf8JsonReader.TokenType; Option enumStringRequired = default; - Option enumInteger = default; + Option enumInteger = default; Option enumIntegerOnly = default; Option enumNumber = default; Option enumString = default; @@ -262,7 +262,7 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv case "enum_integer": string enumIntegerRawValue = utf8JsonReader.GetString(); if (enumIntegerRawValue != null) - enumInteger = new Option(TestEnumParametersEnumQueryIntegerParameterValueConverter.FromStringOrDefault(enumIntegerRawValue)); + enumInteger = new Option(EnumTestEnumIntegerValueConverter.FromStringOrDefault(enumIntegerRawValue)); break; case "enum_integer_only": string enumIntegerOnlyRawValue = utf8JsonReader.GetString(); @@ -364,7 +364,7 @@ public void WriteProperties(Utf8JsonWriter writer, EnumTest enumTest, JsonSerial if (enumTest.EnumIntegerOption.IsSet) { - var enumIntegerRawValue = TestEnumParametersEnumQueryIntegerParameterValueConverter.ToJsonValue(enumTest.EnumInteger.Value); + var enumIntegerRawValue = EnumTestEnumIntegerValueConverter.ToJsonValue(enumTest.EnumInteger.Value); writer.WriteNumber("enum_integer", enumIntegerRawValue); } if (enumTest.EnumIntegerOnlyOption.IsSet) diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs index 25a25e10ca12..cd0add6cf3ce 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs @@ -35,9 +35,9 @@ public enum EnumTestEnumIntegerOnly NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -55,8 +55,8 @@ public static EnumTestEnumIntegerOnly FromString(string value) if (value.Equals((2).ToString())) return EnumTestEnumIntegerOnly.NUMBER_2; - if (value.Equals((null).ToString())) - return EnumTestEnumIntegerOnly.NUMBER_null; + if (value.Equals((-2).ToString())) + return EnumTestEnumIntegerOnly.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type EnumTestEnumIntegerOnly: '{value}'"); } @@ -71,8 +71,8 @@ public static EnumTestEnumIntegerOnly FromString(string value) if (value.Equals((2).ToString())) return EnumTestEnumIntegerOnly.NUMBER_2; - if (value.Equals((null).ToString())) - return EnumTestEnumIntegerOnly.NUMBER_null; + if (value.Equals((-2).ToString())) + return EnumTestEnumIntegerOnly.NUMBER_MINUS_2; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumInteger.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumInteger.cs index 24a8c58d4c5f..04988ef3ee99 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumInteger.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumInteger.cs @@ -35,9 +35,9 @@ public enum RequiredClassRequiredNotnullableEnumInteger NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -55,8 +55,8 @@ public static RequiredClassRequiredNotnullableEnumInteger FromString(string valu if (value.Equals((1).ToString())) return RequiredClassRequiredNotnullableEnumInteger.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredClassRequiredNotnullableEnumInteger.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredClassRequiredNotnullableEnumInteger.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type RequiredClassRequiredNotnullableEnumInteger: '{value}'"); } @@ -71,8 +71,8 @@ public static RequiredClassRequiredNotnullableEnumInteger FromString(string valu if (value.Equals((1).ToString())) return RequiredClassRequiredNotnullableEnumInteger.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredClassRequiredNotnullableEnumInteger.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredClassRequiredNotnullableEnumInteger.NUMBER_MINUS_1; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumIntegerOnly.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumIntegerOnly.cs index 2de2614bb04e..775aba4f6af0 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumIntegerOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumIntegerOnly.cs @@ -35,9 +35,9 @@ public enum RequiredClassRequiredNotnullableEnumIntegerOnly NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -55,8 +55,8 @@ public static RequiredClassRequiredNotnullableEnumIntegerOnly FromString(string if (value.Equals((2).ToString())) return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type RequiredClassRequiredNotnullableEnumIntegerOnly: '{value}'"); } @@ -71,8 +71,8 @@ public static RequiredClassRequiredNotnullableEnumIntegerOnly FromString(string if (value.Equals((2).ToString())) return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_MINUS_2; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumInteger.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumInteger.cs index fc8d5b7483cc..365504a241bf 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumInteger.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumInteger.cs @@ -35,9 +35,9 @@ public enum RequiredClassRequiredNullableEnumInteger NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -55,8 +55,8 @@ public static RequiredClassRequiredNullableEnumInteger FromString(string value) if (value.Equals((1).ToString())) return RequiredClassRequiredNullableEnumInteger.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredClassRequiredNullableEnumInteger.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredClassRequiredNullableEnumInteger.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type RequiredClassRequiredNullableEnumInteger: '{value}'"); } @@ -71,8 +71,8 @@ public static RequiredClassRequiredNullableEnumInteger FromString(string value) if (value.Equals((1).ToString())) return RequiredClassRequiredNullableEnumInteger.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredClassRequiredNullableEnumInteger.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredClassRequiredNullableEnumInteger.NUMBER_MINUS_1; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumIntegerOnly.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumIntegerOnly.cs index 91fa7c4493e9..4c5f2c56ba58 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumIntegerOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumIntegerOnly.cs @@ -35,9 +35,9 @@ public enum RequiredClassRequiredNullableEnumIntegerOnly NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -55,8 +55,8 @@ public static RequiredClassRequiredNullableEnumIntegerOnly FromString(string val if (value.Equals((2).ToString())) return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type RequiredClassRequiredNullableEnumIntegerOnly: '{value}'"); } @@ -71,8 +71,8 @@ public static RequiredClassRequiredNullableEnumIntegerOnly FromString(string val if (value.Equals((2).ToString())) return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_MINUS_2; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestEnumParametersEnumQueryIntegerParameter.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestEnumParametersEnumQueryIntegerParameter.cs index 1c4aec36c25b..33ff2ce2cc21 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestEnumParametersEnumQueryIntegerParameter.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestEnumParametersEnumQueryIntegerParameter.cs @@ -35,9 +35,9 @@ public enum TestEnumParametersEnumQueryIntegerParameter NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -55,8 +55,8 @@ public static TestEnumParametersEnumQueryIntegerParameter FromString(string valu if (value.Equals((1).ToString())) return TestEnumParametersEnumQueryIntegerParameter.NUMBER_1; - if (value.Equals((null).ToString())) - return TestEnumParametersEnumQueryIntegerParameter.NUMBER_null; + if (value.Equals((-2).ToString())) + return TestEnumParametersEnumQueryIntegerParameter.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type TestEnumParametersEnumQueryIntegerParameter: '{value}'"); } @@ -71,8 +71,8 @@ public static TestEnumParametersEnumQueryIntegerParameter FromString(string valu if (value.Equals((1).ToString())) return TestEnumParametersEnumQueryIntegerParameter.NUMBER_1; - if (value.Equals((null).ToString())) - return TestEnumParametersEnumQueryIntegerParameter.NUMBER_null; + if (value.Equals((-2).ToString())) + return TestEnumParametersEnumQueryIntegerParameter.NUMBER_MINUS_2; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml index 56dffed232dc..f772773afefa 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1741,13 +1741,13 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_integer_only: enum: - 2 - - null + - -2 type: integer enum_number: enum: @@ -2119,53 +2119,53 @@ components: required_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 6330b46aa33c..0d657779fdc9 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -225,9 +225,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -241,8 +241,8 @@ public static EnumIntegerEnum EnumIntegerEnumFromString(string value) if (value.Equals((1).ToString())) return EnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return EnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return EnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type EnumIntegerEnum: '{value}'"); } @@ -257,8 +257,8 @@ public static EnumIntegerEnum EnumIntegerEnumFromString(string value) if (value.Equals((1).ToString())) return EnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return EnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return EnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -297,9 +297,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -313,8 +313,8 @@ public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) if (value.Equals((2).ToString())) return EnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return EnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return EnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type EnumIntegerOnlyEnum: '{value}'"); } @@ -329,8 +329,8 @@ public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) if (value.Equals((2).ToString())) return EnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return EnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return EnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index 5fdf36da7b50..fdc63ca701d5 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -139,9 +139,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -155,8 +155,8 @@ public static RequiredNotnullableEnumIntegerEnum RequiredNotnullableEnumIntegerE if (value.Equals((1).ToString())) return RequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredNotnullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type RequiredNotnullableEnumIntegerEnum: '{value}'"); } @@ -171,8 +171,8 @@ public static RequiredNotnullableEnumIntegerEnum RequiredNotnullableEnumIntegerE if (value.Equals((1).ToString())) return RequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredNotnullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -204,9 +204,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -220,8 +220,8 @@ public static RequiredNotnullableEnumIntegerOnlyEnum RequiredNotnullableEnumInte if (value.Equals((2).ToString())) return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type RequiredNotnullableEnumIntegerOnlyEnum: '{value}'"); } @@ -236,8 +236,8 @@ public static RequiredNotnullableEnumIntegerOnlyEnum RequiredNotnullableEnumInte if (value.Equals((2).ToString())) return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } @@ -431,9 +431,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -447,8 +447,8 @@ public static NotrequiredNotnullableEnumIntegerEnum NotrequiredNotnullableEnumIn if (value.Equals((1).ToString())) return NotrequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return NotrequiredNotnullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return NotrequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type NotrequiredNotnullableEnumIntegerEnum: '{value}'"); } @@ -463,8 +463,8 @@ public static NotrequiredNotnullableEnumIntegerEnum NotrequiredNotnullableEnumIn if (value.Equals((1).ToString())) return NotrequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return NotrequiredNotnullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return NotrequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -503,9 +503,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -519,8 +519,8 @@ public static NotrequiredNotnullableEnumIntegerOnlyEnum NotrequiredNotnullableEn if (value.Equals((2).ToString())) return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type NotrequiredNotnullableEnumIntegerOnlyEnum: '{value}'"); } @@ -535,8 +535,8 @@ public static NotrequiredNotnullableEnumIntegerOnlyEnum NotrequiredNotnullableEn if (value.Equals((2).ToString())) return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } @@ -751,9 +751,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -767,8 +767,8 @@ public static NotrequiredNullableEnumIntegerEnum NotrequiredNullableEnumIntegerE if (value.Equals((1).ToString())) return NotrequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return NotrequiredNullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return NotrequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type NotrequiredNullableEnumIntegerEnum: '{value}'"); } @@ -783,8 +783,8 @@ public static NotrequiredNullableEnumIntegerEnum NotrequiredNullableEnumIntegerE if (value.Equals((1).ToString())) return NotrequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return NotrequiredNullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return NotrequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -823,9 +823,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -839,8 +839,8 @@ public static NotrequiredNullableEnumIntegerOnlyEnum NotrequiredNullableEnumInte if (value.Equals((2).ToString())) return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type NotrequiredNullableEnumIntegerOnlyEnum: '{value}'"); } @@ -855,8 +855,8 @@ public static NotrequiredNullableEnumIntegerOnlyEnum NotrequiredNullableEnumInte if (value.Equals((2).ToString())) return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } @@ -1074,9 +1074,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -1090,8 +1090,8 @@ public static RequiredNullableEnumIntegerEnum RequiredNullableEnumIntegerEnumFro if (value.Equals((1).ToString())) return RequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredNullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type RequiredNullableEnumIntegerEnum: '{value}'"); } @@ -1106,8 +1106,8 @@ public static RequiredNullableEnumIntegerEnum RequiredNullableEnumIntegerEnumFro if (value.Equals((1).ToString())) return RequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredNullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -1139,9 +1139,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -1155,8 +1155,8 @@ public static RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnl if (value.Equals((2).ToString())) return RequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredNullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type RequiredNullableEnumIntegerOnlyEnum: '{value}'"); } @@ -1171,8 +1171,8 @@ public static RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnl if (value.Equals((2).ToString())) return RequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredNullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/.openapi-generator/FILES b/samples/client/petstore/csharp/generichost/net4.8/FormModels/.openapi-generator/FILES index d135101ac61c..45c476af3183 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/.openapi-generator/FILES @@ -40,6 +40,7 @@ docs/models/EnumArraysArrayEnumInner.md docs/models/EnumArraysJustSymbol.md docs/models/EnumClass.md docs/models/EnumTest.md +docs/models/EnumTestEnumInteger.md docs/models/EnumTestEnumIntegerOnly.md docs/models/EnumTestEnumString.md docs/models/EquilateralTriangle.md @@ -196,6 +197,7 @@ src/Org.OpenAPITools/Model/EnumArraysArrayEnumInner.cs src/Org.OpenAPITools/Model/EnumArraysJustSymbol.cs src/Org.OpenAPITools/Model/EnumClass.cs src/Org.OpenAPITools/Model/EnumTest.cs +src/Org.OpenAPITools/Model/EnumTestEnumInteger.cs src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs src/Org.OpenAPITools/Model/EnumTestEnumString.cs src/Org.OpenAPITools/Model/EquilateralTriangle.cs diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml index ba5a4a0ad9ef..c64890a06346 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml @@ -1676,7 +1676,7 @@ components: enum_string_required: $ref: '#/components/schemas/Enum_Test_enum_string' enum_integer: - $ref: '#/components/schemas/testEnumParameters_enum_query_integer_parameter' + $ref: '#/components/schemas/Enum_Test_enum_integer' enum_integer_only: $ref: '#/components/schemas/Enum_Test_enum_integer_only' enum_number: @@ -2740,7 +2740,7 @@ components: testEnumParameters_enum_query_integer_parameter: enum: - 1 - - null + - -2 format: int32 type: integer testEnumParameters_enum_query_double_parameter: @@ -2895,10 +2895,16 @@ components: value - "Duplicate\r\nvalue" type: string + Enum_Test_enum_integer: + enum: + - 1 + - -1 + format: int32 + type: integer Enum_Test_enum_integer_only: enum: - 2 - - null + - -2 type: integer MapTest_map_of_enum_string_value: enum: @@ -2918,27 +2924,27 @@ components: RequiredClass_required_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer RequiredClass_required_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer RequiredClass_required_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer RequiredClass_required_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer RequiredClass_required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/models/EnumTest.md b/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/models/EnumTest.md index c38d85092517..898c1ea1fb69 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/models/EnumTest.md +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/models/EnumTest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **EnumStringRequired** | **EnumTestEnumString** | | -**EnumInteger** | **TestEnumParametersEnumQueryIntegerParameter** | | [optional] +**EnumInteger** | **EnumTestEnumInteger** | | [optional] **EnumIntegerOnly** | **EnumTestEnumIntegerOnly** | | [optional] **EnumNumber** | **TestEnumParametersEnumQueryDoubleParameter** | | [optional] **EnumString** | **EnumTestEnumString** | | [optional] diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs index 6de077dc8c4c..efff79097e03 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -175,6 +175,8 @@ public static string ParameterToString(object obj, string format = ISO8601_DATET return EnumArraysJustSymbolValueConverter.ToJsonValue(enumArraysJustSymbol); if (obj is EnumClass enumClass) return EnumClassValueConverter.ToJsonValue(enumClass); + if (obj is EnumTestEnumInteger enumTestEnumInteger) + return EnumTestEnumIntegerValueConverter.ToJsonValue(enumTestEnumInteger).ToString(); if (obj is EnumTestEnumIntegerOnly enumTestEnumIntegerOnly) return EnumTestEnumIntegerOnlyValueConverter.ToJsonValue(enumTestEnumIntegerOnly).ToString(); if (obj is EnumTestEnumString enumTestEnumString) diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs index 0ac6f2ab5715..c706302171c4 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -73,6 +73,8 @@ public HostConfiguration(IServiceCollection services) _jsonOptions.Converters.Add(new EnumClassJsonConverter()); _jsonOptions.Converters.Add(new EnumClassNullableJsonConverter()); _jsonOptions.Converters.Add(new EnumTestJsonConverter()); + _jsonOptions.Converters.Add(new EnumTestEnumIntegerJsonConverter()); + _jsonOptions.Converters.Add(new EnumTestEnumIntegerNullableJsonConverter()); _jsonOptions.Converters.Add(new EnumTestEnumIntegerOnlyJsonConverter()); _jsonOptions.Converters.Add(new EnumTestEnumIntegerOnlyNullableJsonConverter()); _jsonOptions.Converters.Add(new EnumTestEnumStringJsonConverter()); diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs index 477f11fcf539..48e1f8c6e676 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs @@ -42,7 +42,7 @@ public partial class EnumTest : IValidatableObject /// outerEnumInteger /// outerEnumIntegerDefaultValue [JsonConstructor] - public EnumTest(EnumTestEnumString enumStringRequired, Option enumInteger = default, Option enumIntegerOnly = default, Option enumNumber = default, Option enumString = default, Option outerEnum = default, Option outerEnumDefaultValue = default, Option outerEnumInteger = default, Option outerEnumIntegerDefaultValue = default) + public EnumTest(EnumTestEnumString enumStringRequired, Option enumInteger = default, Option enumIntegerOnly = default, Option enumNumber = default, Option enumString = default, Option outerEnum = default, Option outerEnumDefaultValue = default, Option outerEnumInteger = default, Option outerEnumIntegerDefaultValue = default) { EnumStringRequired = enumStringRequired; EnumIntegerOption = enumInteger; @@ -69,13 +69,13 @@ public EnumTest(EnumTestEnumString enumStringRequired, Option [JsonIgnore] [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public Option EnumIntegerOption { get; private set; } + public Option EnumIntegerOption { get; private set; } /// /// Gets or Sets EnumInteger /// [JsonPropertyName("enum_integer")] - public TestEnumParametersEnumQueryIntegerParameter? EnumInteger { get { return this.EnumIntegerOption; } set { this.EnumIntegerOption = new Option(value); } } + public EnumTestEnumInteger? EnumInteger { get { return this.EnumIntegerOption; } set { this.EnumIntegerOption = new Option(value); } } /// /// Used to track the state of EnumIntegerOnly @@ -230,7 +230,7 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv JsonTokenType startingTokenType = utf8JsonReader.TokenType; Option enumStringRequired = default; - Option enumInteger = default; + Option enumInteger = default; Option enumIntegerOnly = default; Option enumNumber = default; Option enumString = default; @@ -262,7 +262,7 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv case "enum_integer": string enumIntegerRawValue = utf8JsonReader.GetString(); if (enumIntegerRawValue != null) - enumInteger = new Option(TestEnumParametersEnumQueryIntegerParameterValueConverter.FromStringOrDefault(enumIntegerRawValue)); + enumInteger = new Option(EnumTestEnumIntegerValueConverter.FromStringOrDefault(enumIntegerRawValue)); break; case "enum_integer_only": string enumIntegerOnlyRawValue = utf8JsonReader.GetString(); @@ -364,7 +364,7 @@ public void WriteProperties(Utf8JsonWriter writer, EnumTest enumTest, JsonSerial if (enumTest.EnumIntegerOption.IsSet) { - var enumIntegerRawValue = TestEnumParametersEnumQueryIntegerParameterValueConverter.ToJsonValue(enumTest.EnumInteger.Value); + var enumIntegerRawValue = EnumTestEnumIntegerValueConverter.ToJsonValue(enumTest.EnumInteger.Value); writer.WriteNumber("enum_integer", enumIntegerRawValue); } if (enumTest.EnumIntegerOnlyOption.IsSet) diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs index 25a25e10ca12..cd0add6cf3ce 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs @@ -35,9 +35,9 @@ public enum EnumTestEnumIntegerOnly NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -55,8 +55,8 @@ public static EnumTestEnumIntegerOnly FromString(string value) if (value.Equals((2).ToString())) return EnumTestEnumIntegerOnly.NUMBER_2; - if (value.Equals((null).ToString())) - return EnumTestEnumIntegerOnly.NUMBER_null; + if (value.Equals((-2).ToString())) + return EnumTestEnumIntegerOnly.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type EnumTestEnumIntegerOnly: '{value}'"); } @@ -71,8 +71,8 @@ public static EnumTestEnumIntegerOnly FromString(string value) if (value.Equals((2).ToString())) return EnumTestEnumIntegerOnly.NUMBER_2; - if (value.Equals((null).ToString())) - return EnumTestEnumIntegerOnly.NUMBER_null; + if (value.Equals((-2).ToString())) + return EnumTestEnumIntegerOnly.NUMBER_MINUS_2; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumInteger.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumInteger.cs index 24a8c58d4c5f..04988ef3ee99 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumInteger.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumInteger.cs @@ -35,9 +35,9 @@ public enum RequiredClassRequiredNotnullableEnumInteger NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -55,8 +55,8 @@ public static RequiredClassRequiredNotnullableEnumInteger FromString(string valu if (value.Equals((1).ToString())) return RequiredClassRequiredNotnullableEnumInteger.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredClassRequiredNotnullableEnumInteger.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredClassRequiredNotnullableEnumInteger.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type RequiredClassRequiredNotnullableEnumInteger: '{value}'"); } @@ -71,8 +71,8 @@ public static RequiredClassRequiredNotnullableEnumInteger FromString(string valu if (value.Equals((1).ToString())) return RequiredClassRequiredNotnullableEnumInteger.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredClassRequiredNotnullableEnumInteger.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredClassRequiredNotnullableEnumInteger.NUMBER_MINUS_1; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumIntegerOnly.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumIntegerOnly.cs index 2de2614bb04e..775aba4f6af0 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumIntegerOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumIntegerOnly.cs @@ -35,9 +35,9 @@ public enum RequiredClassRequiredNotnullableEnumIntegerOnly NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -55,8 +55,8 @@ public static RequiredClassRequiredNotnullableEnumIntegerOnly FromString(string if (value.Equals((2).ToString())) return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type RequiredClassRequiredNotnullableEnumIntegerOnly: '{value}'"); } @@ -71,8 +71,8 @@ public static RequiredClassRequiredNotnullableEnumIntegerOnly FromString(string if (value.Equals((2).ToString())) return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_MINUS_2; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumInteger.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumInteger.cs index fc8d5b7483cc..365504a241bf 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumInteger.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumInteger.cs @@ -35,9 +35,9 @@ public enum RequiredClassRequiredNullableEnumInteger NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -55,8 +55,8 @@ public static RequiredClassRequiredNullableEnumInteger FromString(string value) if (value.Equals((1).ToString())) return RequiredClassRequiredNullableEnumInteger.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredClassRequiredNullableEnumInteger.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredClassRequiredNullableEnumInteger.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type RequiredClassRequiredNullableEnumInteger: '{value}'"); } @@ -71,8 +71,8 @@ public static RequiredClassRequiredNullableEnumInteger FromString(string value) if (value.Equals((1).ToString())) return RequiredClassRequiredNullableEnumInteger.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredClassRequiredNullableEnumInteger.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredClassRequiredNullableEnumInteger.NUMBER_MINUS_1; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumIntegerOnly.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumIntegerOnly.cs index 91fa7c4493e9..4c5f2c56ba58 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumIntegerOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumIntegerOnly.cs @@ -35,9 +35,9 @@ public enum RequiredClassRequiredNullableEnumIntegerOnly NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -55,8 +55,8 @@ public static RequiredClassRequiredNullableEnumIntegerOnly FromString(string val if (value.Equals((2).ToString())) return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type RequiredClassRequiredNullableEnumIntegerOnly: '{value}'"); } @@ -71,8 +71,8 @@ public static RequiredClassRequiredNullableEnumIntegerOnly FromString(string val if (value.Equals((2).ToString())) return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_MINUS_2; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestEnumParametersEnumQueryIntegerParameter.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestEnumParametersEnumQueryIntegerParameter.cs index 1c4aec36c25b..33ff2ce2cc21 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestEnumParametersEnumQueryIntegerParameter.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestEnumParametersEnumQueryIntegerParameter.cs @@ -35,9 +35,9 @@ public enum TestEnumParametersEnumQueryIntegerParameter NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -55,8 +55,8 @@ public static TestEnumParametersEnumQueryIntegerParameter FromString(string valu if (value.Equals((1).ToString())) return TestEnumParametersEnumQueryIntegerParameter.NUMBER_1; - if (value.Equals((null).ToString())) - return TestEnumParametersEnumQueryIntegerParameter.NUMBER_null; + if (value.Equals((-2).ToString())) + return TestEnumParametersEnumQueryIntegerParameter.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type TestEnumParametersEnumQueryIntegerParameter: '{value}'"); } @@ -71,8 +71,8 @@ public static TestEnumParametersEnumQueryIntegerParameter FromString(string valu if (value.Equals((1).ToString())) return TestEnumParametersEnumQueryIntegerParameter.NUMBER_1; - if (value.Equals((null).ToString())) - return TestEnumParametersEnumQueryIntegerParameter.NUMBER_null; + if (value.Equals((-2).ToString())) + return TestEnumParametersEnumQueryIntegerParameter.NUMBER_MINUS_2; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml index 56dffed232dc..f772773afefa 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1741,13 +1741,13 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_integer_only: enum: - 2 - - null + - -2 type: integer enum_number: enum: @@ -2119,53 +2119,53 @@ components: required_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 6330b46aa33c..0d657779fdc9 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -225,9 +225,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -241,8 +241,8 @@ public static EnumIntegerEnum EnumIntegerEnumFromString(string value) if (value.Equals((1).ToString())) return EnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return EnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return EnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type EnumIntegerEnum: '{value}'"); } @@ -257,8 +257,8 @@ public static EnumIntegerEnum EnumIntegerEnumFromString(string value) if (value.Equals((1).ToString())) return EnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return EnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return EnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -297,9 +297,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -313,8 +313,8 @@ public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) if (value.Equals((2).ToString())) return EnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return EnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return EnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type EnumIntegerOnlyEnum: '{value}'"); } @@ -329,8 +329,8 @@ public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) if (value.Equals((2).ToString())) return EnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return EnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return EnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index 5fdf36da7b50..fdc63ca701d5 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -139,9 +139,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -155,8 +155,8 @@ public static RequiredNotnullableEnumIntegerEnum RequiredNotnullableEnumIntegerE if (value.Equals((1).ToString())) return RequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredNotnullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type RequiredNotnullableEnumIntegerEnum: '{value}'"); } @@ -171,8 +171,8 @@ public static RequiredNotnullableEnumIntegerEnum RequiredNotnullableEnumIntegerE if (value.Equals((1).ToString())) return RequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredNotnullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -204,9 +204,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -220,8 +220,8 @@ public static RequiredNotnullableEnumIntegerOnlyEnum RequiredNotnullableEnumInte if (value.Equals((2).ToString())) return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type RequiredNotnullableEnumIntegerOnlyEnum: '{value}'"); } @@ -236,8 +236,8 @@ public static RequiredNotnullableEnumIntegerOnlyEnum RequiredNotnullableEnumInte if (value.Equals((2).ToString())) return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } @@ -431,9 +431,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -447,8 +447,8 @@ public static NotrequiredNotnullableEnumIntegerEnum NotrequiredNotnullableEnumIn if (value.Equals((1).ToString())) return NotrequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return NotrequiredNotnullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return NotrequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type NotrequiredNotnullableEnumIntegerEnum: '{value}'"); } @@ -463,8 +463,8 @@ public static NotrequiredNotnullableEnumIntegerEnum NotrequiredNotnullableEnumIn if (value.Equals((1).ToString())) return NotrequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return NotrequiredNotnullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return NotrequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -503,9 +503,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -519,8 +519,8 @@ public static NotrequiredNotnullableEnumIntegerOnlyEnum NotrequiredNotnullableEn if (value.Equals((2).ToString())) return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type NotrequiredNotnullableEnumIntegerOnlyEnum: '{value}'"); } @@ -535,8 +535,8 @@ public static NotrequiredNotnullableEnumIntegerOnlyEnum NotrequiredNotnullableEn if (value.Equals((2).ToString())) return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } @@ -751,9 +751,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -767,8 +767,8 @@ public static NotrequiredNullableEnumIntegerEnum NotrequiredNullableEnumIntegerE if (value.Equals((1).ToString())) return NotrequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return NotrequiredNullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return NotrequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type NotrequiredNullableEnumIntegerEnum: '{value}'"); } @@ -783,8 +783,8 @@ public static NotrequiredNullableEnumIntegerEnum NotrequiredNullableEnumIntegerE if (value.Equals((1).ToString())) return NotrequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return NotrequiredNullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return NotrequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -823,9 +823,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -839,8 +839,8 @@ public static NotrequiredNullableEnumIntegerOnlyEnum NotrequiredNullableEnumInte if (value.Equals((2).ToString())) return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type NotrequiredNullableEnumIntegerOnlyEnum: '{value}'"); } @@ -855,8 +855,8 @@ public static NotrequiredNullableEnumIntegerOnlyEnum NotrequiredNullableEnumInte if (value.Equals((2).ToString())) return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } @@ -1074,9 +1074,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -1090,8 +1090,8 @@ public static RequiredNullableEnumIntegerEnum RequiredNullableEnumIntegerEnumFro if (value.Equals((1).ToString())) return RequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredNullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type RequiredNullableEnumIntegerEnum: '{value}'"); } @@ -1106,8 +1106,8 @@ public static RequiredNullableEnumIntegerEnum RequiredNullableEnumIntegerEnumFro if (value.Equals((1).ToString())) return RequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredNullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -1139,9 +1139,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -1155,8 +1155,8 @@ public static RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnl if (value.Equals((2).ToString())) return RequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredNullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type RequiredNullableEnumIntegerOnlyEnum: '{value}'"); } @@ -1171,8 +1171,8 @@ public static RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnl if (value.Equals((2).ToString())) return RequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredNullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/.openapi-generator/FILES b/samples/client/petstore/csharp/generichost/net8/FormModels/.openapi-generator/FILES index a04dce5e3a8d..bc72f8c05ba1 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/.openapi-generator/FILES @@ -40,6 +40,7 @@ docs/models/EnumArraysArrayEnumInner.md docs/models/EnumArraysJustSymbol.md docs/models/EnumClass.md docs/models/EnumTest.md +docs/models/EnumTestEnumInteger.md docs/models/EnumTestEnumIntegerOnly.md docs/models/EnumTestEnumString.md docs/models/EquilateralTriangle.md @@ -198,6 +199,7 @@ src/Org.OpenAPITools/Model/EnumArraysArrayEnumInner.cs src/Org.OpenAPITools/Model/EnumArraysJustSymbol.cs src/Org.OpenAPITools/Model/EnumClass.cs src/Org.OpenAPITools/Model/EnumTest.cs +src/Org.OpenAPITools/Model/EnumTestEnumInteger.cs src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs src/Org.OpenAPITools/Model/EnumTestEnumString.cs src/Org.OpenAPITools/Model/EquilateralTriangle.cs diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net8/FormModels/api/openapi.yaml index ba5a4a0ad9ef..c64890a06346 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/api/openapi.yaml @@ -1676,7 +1676,7 @@ components: enum_string_required: $ref: '#/components/schemas/Enum_Test_enum_string' enum_integer: - $ref: '#/components/schemas/testEnumParameters_enum_query_integer_parameter' + $ref: '#/components/schemas/Enum_Test_enum_integer' enum_integer_only: $ref: '#/components/schemas/Enum_Test_enum_integer_only' enum_number: @@ -2740,7 +2740,7 @@ components: testEnumParameters_enum_query_integer_parameter: enum: - 1 - - null + - -2 format: int32 type: integer testEnumParameters_enum_query_double_parameter: @@ -2895,10 +2895,16 @@ components: value - "Duplicate\r\nvalue" type: string + Enum_Test_enum_integer: + enum: + - 1 + - -1 + format: int32 + type: integer Enum_Test_enum_integer_only: enum: - 2 - - null + - -2 type: integer MapTest_map_of_enum_string_value: enum: @@ -2918,27 +2924,27 @@ components: RequiredClass_required_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer RequiredClass_required_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer RequiredClass_required_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer RequiredClass_required_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer RequiredClass_required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/docs/models/EnumTest.md b/samples/client/petstore/csharp/generichost/net8/FormModels/docs/models/EnumTest.md index c38d85092517..898c1ea1fb69 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/docs/models/EnumTest.md +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/docs/models/EnumTest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **EnumStringRequired** | **EnumTestEnumString** | | -**EnumInteger** | **TestEnumParametersEnumQueryIntegerParameter** | | [optional] +**EnumInteger** | **EnumTestEnumInteger** | | [optional] **EnumIntegerOnly** | **EnumTestEnumIntegerOnly** | | [optional] **EnumNumber** | **TestEnumParametersEnumQueryDoubleParameter** | | [optional] **EnumString** | **EnumTestEnumString** | | [optional] diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs index db31fb3afabd..1f8bfa7f6366 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -172,6 +172,8 @@ public static string ParameterToString(object obj, string format = ISO8601_DATET return EnumArraysJustSymbolValueConverter.ToJsonValue(enumArraysJustSymbol); if (obj is EnumClass enumClass) return EnumClassValueConverter.ToJsonValue(enumClass); + if (obj is EnumTestEnumInteger enumTestEnumInteger) + return EnumTestEnumIntegerValueConverter.ToJsonValue(enumTestEnumInteger).ToString(); if (obj is EnumTestEnumIntegerOnly enumTestEnumIntegerOnly) return EnumTestEnumIntegerOnlyValueConverter.ToJsonValue(enumTestEnumIntegerOnly).ToString(); if (obj is EnumTestEnumString enumTestEnumString) diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs index be16a09d0380..f35ca51d2d2a 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -75,6 +75,8 @@ public HostConfiguration(IServiceCollection services) _jsonOptions.Converters.Add(new EnumClassJsonConverter()); _jsonOptions.Converters.Add(new EnumClassNullableJsonConverter()); _jsonOptions.Converters.Add(new EnumTestJsonConverter()); + _jsonOptions.Converters.Add(new EnumTestEnumIntegerJsonConverter()); + _jsonOptions.Converters.Add(new EnumTestEnumIntegerNullableJsonConverter()); _jsonOptions.Converters.Add(new EnumTestEnumIntegerOnlyJsonConverter()); _jsonOptions.Converters.Add(new EnumTestEnumIntegerOnlyNullableJsonConverter()); _jsonOptions.Converters.Add(new EnumTestEnumStringJsonConverter()); diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs index b651bfa38e80..66fd5877e1ce 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs @@ -42,7 +42,7 @@ public partial class EnumTest : IValidatableObject /// outerEnumInteger /// outerEnumIntegerDefaultValue [JsonConstructor] - public EnumTest(EnumTestEnumString enumStringRequired, Option enumInteger = default, Option enumIntegerOnly = default, Option enumNumber = default, Option enumString = default, Option outerEnum = default, Option outerEnumDefaultValue = default, Option outerEnumInteger = default, Option outerEnumIntegerDefaultValue = default) + public EnumTest(EnumTestEnumString enumStringRequired, Option enumInteger = default, Option enumIntegerOnly = default, Option enumNumber = default, Option enumString = default, Option outerEnum = default, Option outerEnumDefaultValue = default, Option outerEnumInteger = default, Option outerEnumIntegerDefaultValue = default) { EnumStringRequired = enumStringRequired; EnumIntegerOption = enumInteger; @@ -69,13 +69,13 @@ public EnumTest(EnumTestEnumString enumStringRequired, Option [JsonIgnore] [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public Option EnumIntegerOption { get; private set; } + public Option EnumIntegerOption { get; private set; } /// /// Gets or Sets EnumInteger /// [JsonPropertyName("enum_integer")] - public TestEnumParametersEnumQueryIntegerParameter? EnumInteger { get { return this.EnumIntegerOption; } set { this.EnumIntegerOption = new(value); } } + public EnumTestEnumInteger? EnumInteger { get { return this.EnumIntegerOption; } set { this.EnumIntegerOption = new(value); } } /// /// Used to track the state of EnumIntegerOnly @@ -230,7 +230,7 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv JsonTokenType startingTokenType = utf8JsonReader.TokenType; Option enumStringRequired = default; - Option enumInteger = default; + Option enumInteger = default; Option enumIntegerOnly = default; Option enumNumber = default; Option enumString = default; @@ -262,7 +262,7 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv case "enum_integer": string enumIntegerRawValue = utf8JsonReader.GetString(); if (enumIntegerRawValue != null) - enumInteger = new Option(TestEnumParametersEnumQueryIntegerParameterValueConverter.FromStringOrDefault(enumIntegerRawValue)); + enumInteger = new Option(EnumTestEnumIntegerValueConverter.FromStringOrDefault(enumIntegerRawValue)); break; case "enum_integer_only": string enumIntegerOnlyRawValue = utf8JsonReader.GetString(); @@ -364,7 +364,7 @@ public void WriteProperties(Utf8JsonWriter writer, EnumTest enumTest, JsonSerial if (enumTest.EnumIntegerOption.IsSet) { - var enumIntegerRawValue = TestEnumParametersEnumQueryIntegerParameterValueConverter.ToJsonValue(enumTest.EnumInteger.Value); + var enumIntegerRawValue = EnumTestEnumIntegerValueConverter.ToJsonValue(enumTest.EnumInteger.Value); writer.WriteNumber("enum_integer", enumIntegerRawValue); } if (enumTest.EnumIntegerOnlyOption.IsSet) diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs index 25a25e10ca12..cd0add6cf3ce 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EnumTestEnumIntegerOnly.cs @@ -35,9 +35,9 @@ public enum EnumTestEnumIntegerOnly NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -55,8 +55,8 @@ public static EnumTestEnumIntegerOnly FromString(string value) if (value.Equals((2).ToString())) return EnumTestEnumIntegerOnly.NUMBER_2; - if (value.Equals((null).ToString())) - return EnumTestEnumIntegerOnly.NUMBER_null; + if (value.Equals((-2).ToString())) + return EnumTestEnumIntegerOnly.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type EnumTestEnumIntegerOnly: '{value}'"); } @@ -71,8 +71,8 @@ public static EnumTestEnumIntegerOnly FromString(string value) if (value.Equals((2).ToString())) return EnumTestEnumIntegerOnly.NUMBER_2; - if (value.Equals((null).ToString())) - return EnumTestEnumIntegerOnly.NUMBER_null; + if (value.Equals((-2).ToString())) + return EnumTestEnumIntegerOnly.NUMBER_MINUS_2; return null; } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumInteger.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumInteger.cs index 24a8c58d4c5f..04988ef3ee99 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumInteger.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumInteger.cs @@ -35,9 +35,9 @@ public enum RequiredClassRequiredNotnullableEnumInteger NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -55,8 +55,8 @@ public static RequiredClassRequiredNotnullableEnumInteger FromString(string valu if (value.Equals((1).ToString())) return RequiredClassRequiredNotnullableEnumInteger.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredClassRequiredNotnullableEnumInteger.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredClassRequiredNotnullableEnumInteger.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type RequiredClassRequiredNotnullableEnumInteger: '{value}'"); } @@ -71,8 +71,8 @@ public static RequiredClassRequiredNotnullableEnumInteger FromString(string valu if (value.Equals((1).ToString())) return RequiredClassRequiredNotnullableEnumInteger.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredClassRequiredNotnullableEnumInteger.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredClassRequiredNotnullableEnumInteger.NUMBER_MINUS_1; return null; } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumIntegerOnly.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumIntegerOnly.cs index 2de2614bb04e..775aba4f6af0 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumIntegerOnly.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumIntegerOnly.cs @@ -35,9 +35,9 @@ public enum RequiredClassRequiredNotnullableEnumIntegerOnly NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -55,8 +55,8 @@ public static RequiredClassRequiredNotnullableEnumIntegerOnly FromString(string if (value.Equals((2).ToString())) return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type RequiredClassRequiredNotnullableEnumIntegerOnly: '{value}'"); } @@ -71,8 +71,8 @@ public static RequiredClassRequiredNotnullableEnumIntegerOnly FromString(string if (value.Equals((2).ToString())) return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredClassRequiredNotnullableEnumIntegerOnly.NUMBER_MINUS_2; return null; } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumInteger.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumInteger.cs index fc8d5b7483cc..365504a241bf 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumInteger.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumInteger.cs @@ -35,9 +35,9 @@ public enum RequiredClassRequiredNullableEnumInteger NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -55,8 +55,8 @@ public static RequiredClassRequiredNullableEnumInteger FromString(string value) if (value.Equals((1).ToString())) return RequiredClassRequiredNullableEnumInteger.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredClassRequiredNullableEnumInteger.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredClassRequiredNullableEnumInteger.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type RequiredClassRequiredNullableEnumInteger: '{value}'"); } @@ -71,8 +71,8 @@ public static RequiredClassRequiredNullableEnumInteger FromString(string value) if (value.Equals((1).ToString())) return RequiredClassRequiredNullableEnumInteger.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredClassRequiredNullableEnumInteger.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredClassRequiredNullableEnumInteger.NUMBER_MINUS_1; return null; } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumIntegerOnly.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumIntegerOnly.cs index 91fa7c4493e9..4c5f2c56ba58 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumIntegerOnly.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumIntegerOnly.cs @@ -35,9 +35,9 @@ public enum RequiredClassRequiredNullableEnumIntegerOnly NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -55,8 +55,8 @@ public static RequiredClassRequiredNullableEnumIntegerOnly FromString(string val if (value.Equals((2).ToString())) return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type RequiredClassRequiredNullableEnumIntegerOnly: '{value}'"); } @@ -71,8 +71,8 @@ public static RequiredClassRequiredNullableEnumIntegerOnly FromString(string val if (value.Equals((2).ToString())) return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredClassRequiredNullableEnumIntegerOnly.NUMBER_MINUS_2; return null; } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestEnumParametersEnumQueryIntegerParameter.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestEnumParametersEnumQueryIntegerParameter.cs index 1c4aec36c25b..33ff2ce2cc21 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestEnumParametersEnumQueryIntegerParameter.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestEnumParametersEnumQueryIntegerParameter.cs @@ -35,9 +35,9 @@ public enum TestEnumParametersEnumQueryIntegerParameter NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -55,8 +55,8 @@ public static TestEnumParametersEnumQueryIntegerParameter FromString(string valu if (value.Equals((1).ToString())) return TestEnumParametersEnumQueryIntegerParameter.NUMBER_1; - if (value.Equals((null).ToString())) - return TestEnumParametersEnumQueryIntegerParameter.NUMBER_null; + if (value.Equals((-2).ToString())) + return TestEnumParametersEnumQueryIntegerParameter.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type TestEnumParametersEnumQueryIntegerParameter: '{value}'"); } @@ -71,8 +71,8 @@ public static TestEnumParametersEnumQueryIntegerParameter FromString(string valu if (value.Equals((1).ToString())) return TestEnumParametersEnumQueryIntegerParameter.NUMBER_1; - if (value.Equals((null).ToString())) - return TestEnumParametersEnumQueryIntegerParameter.NUMBER_null; + if (value.Equals((-2).ToString())) + return TestEnumParametersEnumQueryIntegerParameter.NUMBER_MINUS_2; return null; } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/api/openapi.yaml index 56dffed232dc..f772773afefa 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1741,13 +1741,13 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_integer_only: enum: - 2 - - null + - -2 type: integer enum_number: enum: @@ -2119,53 +2119,53 @@ components: required_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumTest.cs index 47c9b7c2a080..c38c46267f5d 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumTest.cs @@ -227,9 +227,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -243,8 +243,8 @@ public static EnumIntegerEnum EnumIntegerEnumFromString(string value) if (value.Equals((1).ToString())) return EnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return EnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return EnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type EnumIntegerEnum: '{value}'"); } @@ -259,8 +259,8 @@ public static EnumIntegerEnum EnumIntegerEnumFromString(string value) if (value.Equals((1).ToString())) return EnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return EnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return EnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -299,9 +299,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -315,8 +315,8 @@ public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) if (value.Equals((2).ToString())) return EnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return EnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return EnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type EnumIntegerOnlyEnum: '{value}'"); } @@ -331,8 +331,8 @@ public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) if (value.Equals((2).ToString())) return EnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return EnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return EnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/RequiredClass.cs index aa401db7a36a..5e312a74a8db 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -141,9 +141,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -157,8 +157,8 @@ public static RequiredNotnullableEnumIntegerEnum RequiredNotnullableEnumIntegerE if (value.Equals((1).ToString())) return RequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredNotnullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type RequiredNotnullableEnumIntegerEnum: '{value}'"); } @@ -173,8 +173,8 @@ public static RequiredNotnullableEnumIntegerEnum RequiredNotnullableEnumIntegerE if (value.Equals((1).ToString())) return RequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredNotnullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -206,9 +206,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -222,8 +222,8 @@ public static RequiredNotnullableEnumIntegerOnlyEnum RequiredNotnullableEnumInte if (value.Equals((2).ToString())) return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type RequiredNotnullableEnumIntegerOnlyEnum: '{value}'"); } @@ -238,8 +238,8 @@ public static RequiredNotnullableEnumIntegerOnlyEnum RequiredNotnullableEnumInte if (value.Equals((2).ToString())) return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } @@ -433,9 +433,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -449,8 +449,8 @@ public static NotrequiredNotnullableEnumIntegerEnum NotrequiredNotnullableEnumIn if (value.Equals((1).ToString())) return NotrequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return NotrequiredNotnullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return NotrequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type NotrequiredNotnullableEnumIntegerEnum: '{value}'"); } @@ -465,8 +465,8 @@ public static NotrequiredNotnullableEnumIntegerEnum NotrequiredNotnullableEnumIn if (value.Equals((1).ToString())) return NotrequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return NotrequiredNotnullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return NotrequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -505,9 +505,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -521,8 +521,8 @@ public static NotrequiredNotnullableEnumIntegerOnlyEnum NotrequiredNotnullableEn if (value.Equals((2).ToString())) return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type NotrequiredNotnullableEnumIntegerOnlyEnum: '{value}'"); } @@ -537,8 +537,8 @@ public static NotrequiredNotnullableEnumIntegerOnlyEnum NotrequiredNotnullableEn if (value.Equals((2).ToString())) return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } @@ -753,9 +753,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -769,8 +769,8 @@ public static NotrequiredNullableEnumIntegerEnum NotrequiredNullableEnumIntegerE if (value.Equals((1).ToString())) return NotrequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return NotrequiredNullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return NotrequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type NotrequiredNullableEnumIntegerEnum: '{value}'"); } @@ -785,8 +785,8 @@ public static NotrequiredNullableEnumIntegerEnum NotrequiredNullableEnumIntegerE if (value.Equals((1).ToString())) return NotrequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return NotrequiredNullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return NotrequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -825,9 +825,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -841,8 +841,8 @@ public static NotrequiredNullableEnumIntegerOnlyEnum NotrequiredNullableEnumInte if (value.Equals((2).ToString())) return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type NotrequiredNullableEnumIntegerOnlyEnum: '{value}'"); } @@ -857,8 +857,8 @@ public static NotrequiredNullableEnumIntegerOnlyEnum NotrequiredNullableEnumInte if (value.Equals((2).ToString())) return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } @@ -1076,9 +1076,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -1092,8 +1092,8 @@ public static RequiredNullableEnumIntegerEnum RequiredNullableEnumIntegerEnumFro if (value.Equals((1).ToString())) return RequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredNullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type RequiredNullableEnumIntegerEnum: '{value}'"); } @@ -1108,8 +1108,8 @@ public static RequiredNullableEnumIntegerEnum RequiredNullableEnumIntegerEnumFro if (value.Equals((1).ToString())) return RequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredNullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -1141,9 +1141,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -1157,8 +1157,8 @@ public static RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnl if (value.Equals((2).ToString())) return RequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredNullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type RequiredNullableEnumIntegerOnlyEnum: '{value}'"); } @@ -1173,8 +1173,8 @@ public static RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnl if (value.Equals((2).ToString())) return RequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredNullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net8/Petstore/api/openapi.yaml index 56dffed232dc..f772773afefa 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1741,13 +1741,13 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_integer_only: enum: - 2 - - null + - -2 type: integer enum_number: enum: @@ -2119,53 +2119,53 @@ components: required_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 77487ac802c6..4bc60ff67247 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -225,9 +225,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -241,8 +241,8 @@ public static EnumIntegerEnum EnumIntegerEnumFromString(string value) if (value.Equals((1).ToString())) return EnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return EnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return EnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type EnumIntegerEnum: '{value}'"); } @@ -257,8 +257,8 @@ public static EnumIntegerEnum EnumIntegerEnumFromString(string value) if (value.Equals((1).ToString())) return EnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return EnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return EnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -297,9 +297,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -313,8 +313,8 @@ public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) if (value.Equals((2).ToString())) return EnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return EnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return EnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type EnumIntegerOnlyEnum: '{value}'"); } @@ -329,8 +329,8 @@ public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) if (value.Equals((2).ToString())) return EnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return EnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return EnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index 73613d050666..b210eda17b35 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -139,9 +139,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -155,8 +155,8 @@ public static RequiredNotnullableEnumIntegerEnum RequiredNotnullableEnumIntegerE if (value.Equals((1).ToString())) return RequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredNotnullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type RequiredNotnullableEnumIntegerEnum: '{value}'"); } @@ -171,8 +171,8 @@ public static RequiredNotnullableEnumIntegerEnum RequiredNotnullableEnumIntegerE if (value.Equals((1).ToString())) return RequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredNotnullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -204,9 +204,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -220,8 +220,8 @@ public static RequiredNotnullableEnumIntegerOnlyEnum RequiredNotnullableEnumInte if (value.Equals((2).ToString())) return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type RequiredNotnullableEnumIntegerOnlyEnum: '{value}'"); } @@ -236,8 +236,8 @@ public static RequiredNotnullableEnumIntegerOnlyEnum RequiredNotnullableEnumInte if (value.Equals((2).ToString())) return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } @@ -431,9 +431,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -447,8 +447,8 @@ public static NotrequiredNotnullableEnumIntegerEnum NotrequiredNotnullableEnumIn if (value.Equals((1).ToString())) return NotrequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return NotrequiredNotnullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return NotrequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type NotrequiredNotnullableEnumIntegerEnum: '{value}'"); } @@ -463,8 +463,8 @@ public static NotrequiredNotnullableEnumIntegerEnum NotrequiredNotnullableEnumIn if (value.Equals((1).ToString())) return NotrequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return NotrequiredNotnullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return NotrequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -503,9 +503,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -519,8 +519,8 @@ public static NotrequiredNotnullableEnumIntegerOnlyEnum NotrequiredNotnullableEn if (value.Equals((2).ToString())) return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type NotrequiredNotnullableEnumIntegerOnlyEnum: '{value}'"); } @@ -535,8 +535,8 @@ public static NotrequiredNotnullableEnumIntegerOnlyEnum NotrequiredNotnullableEn if (value.Equals((2).ToString())) return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } @@ -751,9 +751,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -767,8 +767,8 @@ public static NotrequiredNullableEnumIntegerEnum NotrequiredNullableEnumIntegerE if (value.Equals((1).ToString())) return NotrequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return NotrequiredNullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return NotrequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type NotrequiredNullableEnumIntegerEnum: '{value}'"); } @@ -783,8 +783,8 @@ public static NotrequiredNullableEnumIntegerEnum NotrequiredNullableEnumIntegerE if (value.Equals((1).ToString())) return NotrequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return NotrequiredNullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return NotrequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -823,9 +823,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -839,8 +839,8 @@ public static NotrequiredNullableEnumIntegerOnlyEnum NotrequiredNullableEnumInte if (value.Equals((2).ToString())) return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type NotrequiredNullableEnumIntegerOnlyEnum: '{value}'"); } @@ -855,8 +855,8 @@ public static NotrequiredNullableEnumIntegerOnlyEnum NotrequiredNullableEnumInte if (value.Equals((2).ToString())) return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } @@ -1074,9 +1074,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -1090,8 +1090,8 @@ public static RequiredNullableEnumIntegerEnum RequiredNullableEnumIntegerEnumFro if (value.Equals((1).ToString())) return RequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredNullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type RequiredNullableEnumIntegerEnum: '{value}'"); } @@ -1106,8 +1106,8 @@ public static RequiredNullableEnumIntegerEnum RequiredNullableEnumIntegerEnumFro if (value.Equals((1).ToString())) return RequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredNullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -1139,9 +1139,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -1155,8 +1155,8 @@ public static RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnl if (value.Equals((2).ToString())) return RequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredNullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type RequiredNullableEnumIntegerOnlyEnum: '{value}'"); } @@ -1171,8 +1171,8 @@ public static RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnl if (value.Equals((2).ToString())) return RequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredNullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/api/openapi.yaml index 56dffed232dc..f772773afefa 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1741,13 +1741,13 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_integer_only: enum: - 2 - - null + - -2 type: integer enum_number: enum: @@ -2119,53 +2119,53 @@ components: required_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/EnumTest.cs index 101a90a4c7a0..dbd6205c64da 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/EnumTest.cs @@ -228,9 +228,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -244,8 +244,8 @@ public static EnumIntegerEnum EnumIntegerEnumFromString(string value) if (value.Equals((1).ToString())) return EnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return EnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return EnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type EnumIntegerEnum: '{value}'"); } @@ -260,8 +260,8 @@ public static EnumIntegerEnum EnumIntegerEnumFromString(string value) if (value.Equals((1).ToString())) return EnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return EnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return EnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -300,9 +300,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -316,8 +316,8 @@ public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) if (value.Equals((2).ToString())) return EnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return EnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return EnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type EnumIntegerOnlyEnum: '{value}'"); } @@ -332,8 +332,8 @@ public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) if (value.Equals((2).ToString())) return EnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return EnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return EnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/RequiredClass.cs index 4293a12b943b..441b3c0f879a 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -142,9 +142,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -158,8 +158,8 @@ public static RequiredNotnullableEnumIntegerEnum RequiredNotnullableEnumIntegerE if (value.Equals((1).ToString())) return RequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredNotnullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type RequiredNotnullableEnumIntegerEnum: '{value}'"); } @@ -174,8 +174,8 @@ public static RequiredNotnullableEnumIntegerEnum RequiredNotnullableEnumIntegerE if (value.Equals((1).ToString())) return RequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredNotnullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -207,9 +207,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -223,8 +223,8 @@ public static RequiredNotnullableEnumIntegerOnlyEnum RequiredNotnullableEnumInte if (value.Equals((2).ToString())) return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type RequiredNotnullableEnumIntegerOnlyEnum: '{value}'"); } @@ -239,8 +239,8 @@ public static RequiredNotnullableEnumIntegerOnlyEnum RequiredNotnullableEnumInte if (value.Equals((2).ToString())) return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } @@ -434,9 +434,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -450,8 +450,8 @@ public static NotrequiredNotnullableEnumIntegerEnum NotrequiredNotnullableEnumIn if (value.Equals((1).ToString())) return NotrequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return NotrequiredNotnullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return NotrequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type NotrequiredNotnullableEnumIntegerEnum: '{value}'"); } @@ -466,8 +466,8 @@ public static NotrequiredNotnullableEnumIntegerEnum NotrequiredNotnullableEnumIn if (value.Equals((1).ToString())) return NotrequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return NotrequiredNotnullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return NotrequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -506,9 +506,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -522,8 +522,8 @@ public static NotrequiredNotnullableEnumIntegerOnlyEnum NotrequiredNotnullableEn if (value.Equals((2).ToString())) return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type NotrequiredNotnullableEnumIntegerOnlyEnum: '{value}'"); } @@ -538,8 +538,8 @@ public static NotrequiredNotnullableEnumIntegerOnlyEnum NotrequiredNotnullableEn if (value.Equals((2).ToString())) return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } @@ -754,9 +754,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -770,8 +770,8 @@ public static NotrequiredNullableEnumIntegerEnum NotrequiredNullableEnumIntegerE if (value.Equals((1).ToString())) return NotrequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return NotrequiredNullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return NotrequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type NotrequiredNullableEnumIntegerEnum: '{value}'"); } @@ -786,8 +786,8 @@ public static NotrequiredNullableEnumIntegerEnum NotrequiredNullableEnumIntegerE if (value.Equals((1).ToString())) return NotrequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return NotrequiredNullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return NotrequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -826,9 +826,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -842,8 +842,8 @@ public static NotrequiredNullableEnumIntegerOnlyEnum NotrequiredNullableEnumInte if (value.Equals((2).ToString())) return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type NotrequiredNullableEnumIntegerOnlyEnum: '{value}'"); } @@ -858,8 +858,8 @@ public static NotrequiredNullableEnumIntegerOnlyEnum NotrequiredNullableEnumInte if (value.Equals((2).ToString())) return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } @@ -1077,9 +1077,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -1093,8 +1093,8 @@ public static RequiredNullableEnumIntegerEnum RequiredNullableEnumIntegerEnumFro if (value.Equals((1).ToString())) return RequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredNullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type RequiredNullableEnumIntegerEnum: '{value}'"); } @@ -1109,8 +1109,8 @@ public static RequiredNullableEnumIntegerEnum RequiredNullableEnumIntegerEnumFro if (value.Equals((1).ToString())) return RequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredNullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -1142,9 +1142,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -1158,8 +1158,8 @@ public static RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnl if (value.Equals((2).ToString())) return RequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredNullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type RequiredNullableEnumIntegerOnlyEnum: '{value}'"); } @@ -1174,8 +1174,8 @@ public static RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnl if (value.Equals((2).ToString())) return RequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredNullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/api/openapi.yaml index 56dffed232dc..f772773afefa 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1741,13 +1741,13 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_integer_only: enum: - 2 - - null + - -2 type: integer enum_number: enum: @@ -2119,53 +2119,53 @@ components: required_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 6330b46aa33c..0d657779fdc9 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -225,9 +225,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -241,8 +241,8 @@ public static EnumIntegerEnum EnumIntegerEnumFromString(string value) if (value.Equals((1).ToString())) return EnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return EnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return EnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type EnumIntegerEnum: '{value}'"); } @@ -257,8 +257,8 @@ public static EnumIntegerEnum EnumIntegerEnumFromString(string value) if (value.Equals((1).ToString())) return EnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return EnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return EnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -297,9 +297,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -313,8 +313,8 @@ public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) if (value.Equals((2).ToString())) return EnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return EnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return EnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type EnumIntegerOnlyEnum: '{value}'"); } @@ -329,8 +329,8 @@ public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) if (value.Equals((2).ToString())) return EnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return EnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return EnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index 5fdf36da7b50..fdc63ca701d5 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -139,9 +139,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -155,8 +155,8 @@ public static RequiredNotnullableEnumIntegerEnum RequiredNotnullableEnumIntegerE if (value.Equals((1).ToString())) return RequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredNotnullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type RequiredNotnullableEnumIntegerEnum: '{value}'"); } @@ -171,8 +171,8 @@ public static RequiredNotnullableEnumIntegerEnum RequiredNotnullableEnumIntegerE if (value.Equals((1).ToString())) return RequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredNotnullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -204,9 +204,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -220,8 +220,8 @@ public static RequiredNotnullableEnumIntegerOnlyEnum RequiredNotnullableEnumInte if (value.Equals((2).ToString())) return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type RequiredNotnullableEnumIntegerOnlyEnum: '{value}'"); } @@ -236,8 +236,8 @@ public static RequiredNotnullableEnumIntegerOnlyEnum RequiredNotnullableEnumInte if (value.Equals((2).ToString())) return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } @@ -431,9 +431,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -447,8 +447,8 @@ public static NotrequiredNotnullableEnumIntegerEnum NotrequiredNotnullableEnumIn if (value.Equals((1).ToString())) return NotrequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return NotrequiredNotnullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return NotrequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type NotrequiredNotnullableEnumIntegerEnum: '{value}'"); } @@ -463,8 +463,8 @@ public static NotrequiredNotnullableEnumIntegerEnum NotrequiredNotnullableEnumIn if (value.Equals((1).ToString())) return NotrequiredNotnullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return NotrequiredNotnullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return NotrequiredNotnullableEnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -503,9 +503,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -519,8 +519,8 @@ public static NotrequiredNotnullableEnumIntegerOnlyEnum NotrequiredNotnullableEn if (value.Equals((2).ToString())) return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type NotrequiredNotnullableEnumIntegerOnlyEnum: '{value}'"); } @@ -535,8 +535,8 @@ public static NotrequiredNotnullableEnumIntegerOnlyEnum NotrequiredNotnullableEn if (value.Equals((2).ToString())) return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return NotrequiredNotnullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } @@ -751,9 +751,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -767,8 +767,8 @@ public static NotrequiredNullableEnumIntegerEnum NotrequiredNullableEnumIntegerE if (value.Equals((1).ToString())) return NotrequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return NotrequiredNullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return NotrequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type NotrequiredNullableEnumIntegerEnum: '{value}'"); } @@ -783,8 +783,8 @@ public static NotrequiredNullableEnumIntegerEnum NotrequiredNullableEnumIntegerE if (value.Equals((1).ToString())) return NotrequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return NotrequiredNullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return NotrequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -823,9 +823,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -839,8 +839,8 @@ public static NotrequiredNullableEnumIntegerOnlyEnum NotrequiredNullableEnumInte if (value.Equals((2).ToString())) return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type NotrequiredNullableEnumIntegerOnlyEnum: '{value}'"); } @@ -855,8 +855,8 @@ public static NotrequiredNullableEnumIntegerOnlyEnum NotrequiredNullableEnumInte if (value.Equals((2).ToString())) return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return NotrequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } @@ -1074,9 +1074,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } /// @@ -1090,8 +1090,8 @@ public static RequiredNullableEnumIntegerEnum RequiredNullableEnumIntegerEnumFro if (value.Equals((1).ToString())) return RequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredNullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; throw new NotImplementedException($"Could not convert value to type RequiredNullableEnumIntegerEnum: '{value}'"); } @@ -1106,8 +1106,8 @@ public static RequiredNullableEnumIntegerEnum RequiredNullableEnumIntegerEnumFro if (value.Equals((1).ToString())) return RequiredNullableEnumIntegerEnum.NUMBER_1; - if (value.Equals((null).ToString())) - return RequiredNullableEnumIntegerEnum.NUMBER_null; + if (value.Equals((-1).ToString())) + return RequiredNullableEnumIntegerEnum.NUMBER_MINUS_1; return null; } @@ -1139,9 +1139,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } /// @@ -1155,8 +1155,8 @@ public static RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnl if (value.Equals((2).ToString())) return RequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredNullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; throw new NotImplementedException($"Could not convert value to type RequiredNullableEnumIntegerOnlyEnum: '{value}'"); } @@ -1171,8 +1171,8 @@ public static RequiredNullableEnumIntegerOnlyEnum RequiredNullableEnumIntegerOnl if (value.Equals((2).ToString())) return RequiredNullableEnumIntegerOnlyEnum.NUMBER_2; - if (value.Equals((null).ToString())) - return RequiredNullableEnumIntegerOnlyEnum.NUMBER_null; + if (value.Equals((-2).ToString())) + return RequiredNullableEnumIntegerOnlyEnum.NUMBER_MINUS_2; return null; } diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/api/openapi.yaml index 56dffed232dc..f772773afefa 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1741,13 +1741,13 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_integer_only: enum: - 2 - - null + - -2 type: integer enum_number: enum: @@ -2119,53 +2119,53 @@ components: required_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index e3392e2757bc..3309623635ca 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -166,9 +166,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -188,9 +188,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index 33d55f298f8f..3d5eaf99a7d5 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -44,9 +44,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -66,9 +66,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -88,9 +88,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -110,9 +110,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -133,9 +133,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } @@ -155,9 +155,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } @@ -178,9 +178,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } @@ -200,9 +200,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index 2912c14822b0..e38cdb565be0 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -44,7 +44,6 @@ public OAuthAuthenticator( _tokenUrl = tokenUrl; _clientId = clientId; _clientSecret = clientSecret; - _scope = scope; _serializerSettings = serializerSettings; _configuration = configuration; diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/api/openapi.yaml index e31ecce97273..6cfc875b0745 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1731,13 +1731,13 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_integer_only: enum: - 2 - - null + - -2 type: integer enum_number: enum: @@ -2109,53 +2109,53 @@ components: required_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 8d1a53515091..27d1193954ea 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -165,9 +165,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -187,9 +187,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index edc750d53536..d040204ece33 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -43,9 +43,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -65,9 +65,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -87,9 +87,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -109,9 +109,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -132,9 +132,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } @@ -154,9 +154,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } @@ -177,9 +177,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } @@ -199,9 +199,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/api/openapi.yaml index e31ecce97273..6cfc875b0745 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1731,13 +1731,13 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_integer_only: enum: - 2 - - null + - -2 type: integer enum_number: enum: @@ -2109,53 +2109,53 @@ components: required_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 8d1a53515091..27d1193954ea 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -165,9 +165,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -187,9 +187,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index edc750d53536..d040204ece33 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -43,9 +43,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -65,9 +65,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -87,9 +87,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -109,9 +109,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -132,9 +132,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } @@ -154,9 +154,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } @@ -177,9 +177,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } @@ -199,9 +199,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/api/openapi.yaml index e31ecce97273..6cfc875b0745 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1731,13 +1731,13 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_integer_only: enum: - 2 - - null + - -2 type: integer enum_number: enum: @@ -2109,53 +2109,53 @@ components: required_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index bcebd8c10482..24a87bd34345 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -98,7 +98,7 @@ async Task GetToken() } var response = await client.PostAsync(request).ConfigureAwait(false); - + // RFC6749 - token_type is case insensitive. // RFC6750 - In Authorization header Bearer should be capitalized. // Fix the capitalization irrespective of token_type casing. diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumTest.cs index 8d1a53515091..27d1193954ea 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/EnumTest.cs @@ -165,9 +165,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -187,9 +187,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RequiredClass.cs index 87a02c42d0a5..d8230f423177 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -43,9 +43,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -65,9 +65,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -87,9 +87,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -109,9 +109,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -132,9 +132,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } @@ -154,9 +154,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } @@ -177,9 +177,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } @@ -199,9 +199,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/net7/Petstore/api/openapi.yaml index 56dffed232dc..f772773afefa 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1741,13 +1741,13 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_integer_only: enum: - 2 - - null + - -2 type: integer enum_number: enum: @@ -2119,53 +2119,53 @@ components: required_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 4a2a08e59790..bf17521990cd 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -165,9 +165,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -187,9 +187,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index 461e33569717..5005d284a8e0 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -43,9 +43,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -65,9 +65,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -87,9 +87,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -109,9 +109,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -132,9 +132,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } @@ -154,9 +154,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } @@ -177,9 +177,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } @@ -199,9 +199,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/api/openapi.yaml index 56dffed232dc..f772773afefa 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1741,13 +1741,13 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_integer_only: enum: - 2 - - null + - -2 type: integer enum_number: enum: @@ -2119,53 +2119,53 @@ components: required_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumTest.cs index bb9ec37743a6..8f0ea67b780f 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/EnumTest.cs @@ -205,9 +205,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -247,9 +247,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RequiredClass.cs index 83037a57ac8c..307699149098 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -43,9 +43,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -85,9 +85,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -127,9 +127,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -169,9 +169,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -212,9 +212,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } @@ -254,9 +254,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } @@ -297,9 +297,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } @@ -339,9 +339,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/api/openapi.yaml index e31ecce97273..6cfc875b0745 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1731,13 +1731,13 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_integer_only: enum: - 2 - - null + - -2 type: integer enum_number: enum: @@ -2109,53 +2109,53 @@ components: required_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 8d1a53515091..27d1193954ea 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -165,9 +165,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -187,9 +187,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index edc750d53536..d040204ece33 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -43,9 +43,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -65,9 +65,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -87,9 +87,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -109,9 +109,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -132,9 +132,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } @@ -154,9 +154,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } @@ -177,9 +177,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } @@ -199,9 +199,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/api/openapi.yaml index 56dffed232dc..f772773afefa 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/api/openapi.yaml @@ -770,7 +770,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1741,13 +1741,13 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_integer_only: enum: - 2 - - null + - -2 type: integer enum_number: enum: @@ -2119,53 +2119,53 @@ components: required_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer required_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer notrequired_nullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: true type: integer notrequired_notnullable_enum_integer: enum: - 1 - - null + - -1 format: int32 nullable: false type: integer required_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer required_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer notrequired_nullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: true type: integer notrequired_notnullable_enum_integer_only: enum: - 2 - - null + - -2 nullable: false type: integer required_notnullable_enum_string: diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 3630d41387d7..627c8a3acd40 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -163,9 +163,9 @@ public enum EnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -185,9 +185,9 @@ public enum EnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index abb06543e671..eb89d56999fc 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -41,9 +41,9 @@ public enum RequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -63,9 +63,9 @@ public enum RequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -85,9 +85,9 @@ public enum NotrequiredNullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -107,9 +107,9 @@ public enum NotrequiredNotnullableEnumIntegerEnum NUMBER_1 = 1, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_1 for value: -1 /// - NUMBER_null = null + NUMBER_MINUS_1 = -1 } @@ -130,9 +130,9 @@ public enum RequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } @@ -152,9 +152,9 @@ public enum RequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } @@ -175,9 +175,9 @@ public enum NotrequiredNullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } @@ -197,9 +197,9 @@ public enum NotrequiredNotnullableEnumIntegerOnlyEnum NUMBER_2 = 2, /// - /// Enum NUMBER_null for value: null + /// Enum NUMBER_MINUS_2 for value: -2 /// - NUMBER_null = null + NUMBER_MINUS_2 = -2 } diff --git a/samples/client/petstore/go/go-petstore/api/openapi.yaml b/samples/client/petstore/go/go-petstore/api/openapi.yaml index 9452debd1f36..8d9c8d5ff5e4 100644 --- a/samples/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/client/petstore/go/go-petstore/api/openapi.yaml @@ -702,7 +702,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer - description: Query parameter enum test (double) @@ -1789,6 +1789,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -1823,6 +1824,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -1848,6 +1850,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -1882,6 +1885,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -1916,6 +1920,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -1952,6 +1957,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs index a2997251c12a..1f120a7c2fab 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs @@ -113,7 +113,7 @@ newtype EnumHeaderStringArray = EnumHeaderStringArray { unEnumHeaderStringArray newtype EnumQueryDouble = EnumQueryDouble { unEnumQueryDouble :: E'EnumNumber } deriving (P.Eq, P.Show) -- ** EnumQueryInteger -newtype EnumQueryInteger = EnumQueryInteger { unEnumQueryInteger :: E'EnumInteger } deriving (P.Eq, P.Show) +newtype EnumQueryInteger = EnumQueryInteger { unEnumQueryInteger :: E'EnumQueryInteger } deriving (P.Eq, P.Show) -- ** EnumQueryString newtype EnumQueryString = EnumQueryString { unEnumQueryString :: E'EnumFormString } deriving (P.Eq, P.Show) @@ -2060,7 +2060,7 @@ toE'EnumFormStringArray = \case -- | Enum of 'Int' data E'EnumInteger = E'EnumInteger'Num1 -- ^ @1@ - | E'EnumInteger'Numnull -- ^ @null@ + | E'EnumInteger'NumMinus_1 -- ^ @-1@ deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) instance A.ToJSON E'EnumInteger where toJSON = A.toJSON . fromE'EnumInteger @@ -2073,13 +2073,13 @@ instance MimeRender MimeMultipartFormData E'EnumInteger where mimeRender _ = mim fromE'EnumInteger :: E'EnumInteger -> Int fromE'EnumInteger = \case E'EnumInteger'Num1 -> 1 - E'EnumInteger'Numnull -> null + E'EnumInteger'NumMinus_1 -> -1 -- | parse 'E'EnumInteger' enum toE'EnumInteger :: Int -> P.Either String E'EnumInteger toE'EnumInteger = \case 1 -> P.Right E'EnumInteger'Num1 - null -> P.Right E'EnumInteger'Numnull + -1 -> P.Right E'EnumInteger'NumMinus_1 s -> P.Left $ "toE'EnumInteger: enum parse failure: " P.++ P.show s @@ -2111,6 +2111,34 @@ toE'EnumNumber = \case s -> P.Left $ "toE'EnumNumber: enum parse failure: " P.++ P.show s +-- ** E'EnumQueryInteger + +-- | Enum of 'Int' +data E'EnumQueryInteger + = E'EnumQueryInteger'Num1 -- ^ @1@ + | E'EnumQueryInteger'NumMinus_2 -- ^ @-2@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'EnumQueryInteger where toJSON = A.toJSON . fromE'EnumQueryInteger +instance A.FromJSON E'EnumQueryInteger where parseJSON o = P.either P.fail (pure . P.id) . toE'EnumQueryInteger =<< A.parseJSON o +instance WH.ToHttpApiData E'EnumQueryInteger where toQueryParam = WH.toQueryParam . fromE'EnumQueryInteger +instance WH.FromHttpApiData E'EnumQueryInteger where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'EnumQueryInteger +instance MimeRender MimeMultipartFormData E'EnumQueryInteger where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'EnumQueryInteger' enum +fromE'EnumQueryInteger :: E'EnumQueryInteger -> Int +fromE'EnumQueryInteger = \case + E'EnumQueryInteger'Num1 -> 1 + E'EnumQueryInteger'NumMinus_2 -> -2 + +-- | parse 'E'EnumQueryInteger' enum +toE'EnumQueryInteger :: Int -> P.Either String E'EnumQueryInteger +toE'EnumQueryInteger = \case + 1 -> P.Right E'EnumQueryInteger'Num1 + -2 -> P.Right E'EnumQueryInteger'NumMinus_2 + s -> P.Left $ "toE'EnumQueryInteger: enum parse failure: " P.++ P.show s + + -- ** E'EnumString -- | Enum of 'Text' diff --git a/samples/client/petstore/haskell-http-client/openapi.yaml b/samples/client/petstore/haskell-http-client/openapi.yaml index ee2e0eed8bf9..3447e0a4c1ad 100644 --- a/samples/client/petstore/haskell-http-client/openapi.yaml +++ b/samples/client/petstore/haskell-http-client/openapi.yaml @@ -798,7 +798,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1556,7 +1556,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: @@ -1909,6 +1909,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -1943,6 +1944,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -1968,6 +1970,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -2002,6 +2005,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2036,6 +2040,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2072,6 +2077,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/haskell-http-client/tests/Instances.hs b/samples/client/petstore/haskell-http-client/tests/Instances.hs index 21c16142d7ff..713272b2f7b4 100644 --- a/samples/client/petstore/haskell-http-client/tests/Instances.hs +++ b/samples/client/petstore/haskell-http-client/tests/Instances.hs @@ -599,6 +599,9 @@ instance Arbitrary E'EnumInteger where instance Arbitrary E'EnumNumber where arbitrary = arbitraryBoundedEnum +instance Arbitrary E'EnumQueryInteger where + arbitrary = arbitraryBoundedEnum + instance Arbitrary E'EnumString where arbitrary = arbitraryBoundedEnum diff --git a/samples/client/petstore/java-helidon-client/v3/mp/docs/EnumTest.md b/samples/client/petstore/java-helidon-client/v3/mp/docs/EnumTest.md index b000d0de1c3b..380a2aef0bc3 100644 --- a/samples/client/petstore/java-helidon-client/v3/mp/docs/EnumTest.md +++ b/samples/client/petstore/java-helidon-client/v3/mp/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_null | null | +| NUMBER_MINUS_1 | -1 | diff --git a/samples/client/petstore/java-helidon-client/v3/mp/docs/FakeApi.md b/samples/client/petstore/java-helidon-client/v3/mp/docs/FakeApi.md index 1607080685b9..4cdd475689dd 100644 --- a/samples/client/petstore/java-helidon-client/v3/mp/docs/FakeApi.md +++ b/samples/client/petstore/java-helidon-client/v3/mp/docs/FakeApi.md @@ -541,7 +541,7 @@ To test enum parameters | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java-helidon-client/v3/mp/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java-helidon-client/v3/mp/src/main/java/org/openapitools/client/model/EnumTest.java index 10b3fca45da0..538f09adcede 100644 --- a/samples/client/petstore/java-helidon-client/v3/mp/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java-helidon-client/v3/mp/src/main/java/org/openapitools/client/model/EnumTest.java @@ -78,7 +78,7 @@ public String toString() { public enum EnumIntegerEnum { - NUMBER_1(Integer.valueOf(1)), NUMBER_null(Integer.valueOf(null)); + NUMBER_1(Integer.valueOf(1)), NUMBER_MINUS_1(Integer.valueOf(-1)); Integer value; diff --git a/samples/client/petstore/java-helidon-client/v3/se/docs/EnumTest.md b/samples/client/petstore/java-helidon-client/v3/se/docs/EnumTest.md index b000d0de1c3b..380a2aef0bc3 100644 --- a/samples/client/petstore/java-helidon-client/v3/se/docs/EnumTest.md +++ b/samples/client/petstore/java-helidon-client/v3/se/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_null | null | +| NUMBER_MINUS_1 | -1 | diff --git a/samples/client/petstore/java-helidon-client/v3/se/docs/FakeApi.md b/samples/client/petstore/java-helidon-client/v3/se/docs/FakeApi.md index a75f27d3106f..37a949ea0508 100644 --- a/samples/client/petstore/java-helidon-client/v3/se/docs/FakeApi.md +++ b/samples/client/petstore/java-helidon-client/v3/se/docs/FakeApi.md @@ -1029,7 +1029,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java-helidon-client/v3/se/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java-helidon-client/v3/se/src/main/java/org/openapitools/client/model/EnumTest.java index 10b3fca45da0..538f09adcede 100644 --- a/samples/client/petstore/java-helidon-client/v3/se/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java-helidon-client/v3/se/src/main/java/org/openapitools/client/model/EnumTest.java @@ -78,7 +78,7 @@ public String toString() { public enum EnumIntegerEnum { - NUMBER_1(Integer.valueOf(1)), NUMBER_null(Integer.valueOf(null)); + NUMBER_1(Integer.valueOf(1)), NUMBER_MINUS_1(Integer.valueOf(-1)); Integer value; diff --git a/samples/client/petstore/java-helidon-client/v4/mp/docs/EnumTest.md b/samples/client/petstore/java-helidon-client/v4/mp/docs/EnumTest.md index b000d0de1c3b..380a2aef0bc3 100644 --- a/samples/client/petstore/java-helidon-client/v4/mp/docs/EnumTest.md +++ b/samples/client/petstore/java-helidon-client/v4/mp/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_null | null | +| NUMBER_MINUS_1 | -1 | diff --git a/samples/client/petstore/java-helidon-client/v4/mp/docs/FakeApi.md b/samples/client/petstore/java-helidon-client/v4/mp/docs/FakeApi.md index 1607080685b9..4cdd475689dd 100644 --- a/samples/client/petstore/java-helidon-client/v4/mp/docs/FakeApi.md +++ b/samples/client/petstore/java-helidon-client/v4/mp/docs/FakeApi.md @@ -541,7 +541,7 @@ To test enum parameters | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java-helidon-client/v4/mp/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java-helidon-client/v4/mp/src/main/java/org/openapitools/client/model/EnumTest.java index 10b3fca45da0..538f09adcede 100644 --- a/samples/client/petstore/java-helidon-client/v4/mp/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java-helidon-client/v4/mp/src/main/java/org/openapitools/client/model/EnumTest.java @@ -78,7 +78,7 @@ public String toString() { public enum EnumIntegerEnum { - NUMBER_1(Integer.valueOf(1)), NUMBER_null(Integer.valueOf(null)); + NUMBER_1(Integer.valueOf(1)), NUMBER_MINUS_1(Integer.valueOf(-1)); Integer value; diff --git a/samples/client/petstore/java-micronaut-client/docs/apis/FakeApi.md b/samples/client/petstore/java-micronaut-client/docs/apis/FakeApi.md index 015f5370951b..50260b878f48 100644 --- a/samples/client/petstore/java-micronaut-client/docs/apis/FakeApi.md +++ b/samples/client/petstore/java-micronaut-client/docs/apis/FakeApi.md @@ -299,7 +299,7 @@ To test enum parameters | **enumHeaderString** | `String`| Header parameter enum test (string) | [optional parameter] [default to `-efg`] [enum: `_abc`, `-efg`, `(xyz)`] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional parameter] [enum: `>`, `$`] | | **enumQueryString** | `String`| Query parameter enum test (string) | [optional parameter] [default to `-efg`] [enum: `_abc`, `-efg`, `(xyz)`] | -| **enumQueryInteger** | `Integer`| Query parameter enum test (double) | [optional parameter] [enum: `1`, ``] | +| **enumQueryInteger** | `Integer`| Query parameter enum test (double) | [optional parameter] [enum: `1`, `-2`] | | **enumQueryDouble** | `Double`| Query parameter enum test (double) | [optional parameter] [enum: `1.1`, `-1.2`] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional parameter] [default to `$`] [enum: `>`, `$`] | | **enumFormString** | `String`| Form parameter enum test (string) | [optional parameter] [default to `-efg`] [enum: `_abc`, `-efg`, `(xyz)`] | diff --git a/samples/client/petstore/java/apache-httpclient/api/openapi.yaml b/samples/client/petstore/java/apache-httpclient/api/openapi.yaml index 135d380a1aaa..1eddf878948c 100644 --- a/samples/client/petstore/java/apache-httpclient/api/openapi.yaml +++ b/samples/client/petstore/java/apache-httpclient/api/openapi.yaml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: diff --git a/samples/client/petstore/java/apache-httpclient/docs/EnumTest.md b/samples/client/petstore/java/apache-httpclient/docs/EnumTest.md index b000d0de1c3b..380a2aef0bc3 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/EnumTest.md +++ b/samples/client/petstore/java/apache-httpclient/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_null | null | +| NUMBER_MINUS_1 | -1 | diff --git a/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md b/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md index a75f27d3106f..37a949ea0508 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md +++ b/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md @@ -1029,7 +1029,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumTest.java index fb0cf3625d0d..e0012a9e5c49 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumTest.java @@ -136,7 +136,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml b/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml index 793ba3d2ffb4..de407d13b2cf 100644 --- a/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml +++ b/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,6 +1894,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -1928,6 +1929,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -1953,6 +1955,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -1987,6 +1990,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2021,6 +2025,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2057,6 +2062,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/feign/api/openapi.yaml b/samples/client/petstore/java/feign/api/openapi.yaml index 135d380a1aaa..1eddf878948c 100644 --- a/samples/client/petstore/java/feign/api/openapi.yaml +++ b/samples/client/petstore/java/feign/api/openapi.yaml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java index 100a468344ee..a603977ce0b6 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java @@ -133,7 +133,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/client/petstore/java/google-api-client/api/openapi.yaml b/samples/client/petstore/java/google-api-client/api/openapi.yaml index 793ba3d2ffb4..de407d13b2cf 100644 --- a/samples/client/petstore/java/google-api-client/api/openapi.yaml +++ b/samples/client/petstore/java/google-api-client/api/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,6 +1894,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -1928,6 +1929,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -1953,6 +1955,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -1987,6 +1990,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2021,6 +2025,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2057,6 +2062,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/google-api-client/docs/FakeApi.md b/samples/client/petstore/java/google-api-client/docs/FakeApi.md index 1db935b05f74..627366e41db3 100644 --- a/samples/client/petstore/java/google-api-client/docs/FakeApi.md +++ b/samples/client/petstore/java/google-api-client/docs/FakeApi.md @@ -698,7 +698,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml b/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml index 793ba3d2ffb4..de407d13b2cf 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,6 +1894,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -1928,6 +1929,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -1953,6 +1955,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -1987,6 +1990,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2021,6 +2025,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2057,6 +2062,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md index daf20fd7ef7c..d21432dbf3e4 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md @@ -697,7 +697,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | **List<String>**| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | **List<String>**| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/jersey2-java8/api/openapi.yaml b/samples/client/petstore/java/jersey2-java8/api/openapi.yaml index 793ba3d2ffb4..de407d13b2cf 100644 --- a/samples/client/petstore/java/jersey2-java8/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java8/api/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,6 +1894,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -1928,6 +1929,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -1953,6 +1955,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -1987,6 +1990,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2021,6 +2025,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2057,6 +2062,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md index fb24b92d5853..84167f65462a 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md @@ -697,7 +697,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | **List<String>**| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | **List<String>**| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/jersey3/api/openapi.yaml b/samples/client/petstore/java/jersey3/api/openapi.yaml index 242de316b9e9..25e78fa9e305 100644 --- a/samples/client/petstore/java/jersey3/api/openapi.yaml +++ b/samples/client/petstore/java/jersey3/api/openapi.yaml @@ -790,7 +790,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1672,13 +1672,13 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_integer_only: enum: - 2 - - null + - -2 type: integer enum_number: enum: diff --git a/samples/client/petstore/java/jersey3/docs/EnumTest.md b/samples/client/petstore/java/jersey3/docs/EnumTest.md index 7a3c0981f505..3e226e18b50b 100644 --- a/samples/client/petstore/java/jersey3/docs/EnumTest.md +++ b/samples/client/petstore/java/jersey3/docs/EnumTest.md @@ -44,7 +44,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_null | null | +| NUMBER_MINUS_1 | -1 | @@ -53,7 +53,7 @@ | Name | Value | |---- | -----| | NUMBER_2 | 2 | -| NUMBER_null | null | +| NUMBER_MINUS_2 | -2 | diff --git a/samples/client/petstore/java/jersey3/docs/FakeApi.md b/samples/client/petstore/java/jersey3/docs/FakeApi.md index 53e254a333ae..7d45cd6a51b8 100644 --- a/samples/client/petstore/java/jersey3/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey3/docs/FakeApi.md @@ -883,7 +883,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | **List<String>**| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | **List<String>**| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumTest.java index 98d9f4eabe1c..fd569abed2f6 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/EnumTest.java @@ -139,7 +139,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; @@ -177,7 +177,7 @@ public static EnumIntegerEnum fromValue(Integer value) { public enum EnumIntegerOnlyEnum { NUMBER_2(2), - NUMBER_null(null); + NUMBER_MINUS_2(-2); private Integer value; diff --git a/samples/client/petstore/java/native-async/api/openapi.yaml b/samples/client/petstore/java/native-async/api/openapi.yaml index 3a9d39cc81d1..1be1726129a5 100644 --- a/samples/client/petstore/java/native-async/api/openapi.yaml +++ b/samples/client/petstore/java/native-async/api/openapi.yaml @@ -790,7 +790,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1683,13 +1683,13 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_integer_only: enum: - 2 - - null + - -2 type: integer enum_number: enum: diff --git a/samples/client/petstore/java/native-async/docs/EnumTest.md b/samples/client/petstore/java/native-async/docs/EnumTest.md index 7a3c0981f505..3e226e18b50b 100644 --- a/samples/client/petstore/java/native-async/docs/EnumTest.md +++ b/samples/client/petstore/java/native-async/docs/EnumTest.md @@ -44,7 +44,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_null | null | +| NUMBER_MINUS_1 | -1 | @@ -53,7 +53,7 @@ | Name | Value | |---- | -----| | NUMBER_2 | 2 | -| NUMBER_null | null | +| NUMBER_MINUS_2 | -2 | diff --git a/samples/client/petstore/java/native-async/docs/FakeApi.md b/samples/client/petstore/java/native-async/docs/FakeApi.md index c8a2ec123c3a..e10d657aaa82 100644 --- a/samples/client/petstore/java/native-async/docs/FakeApi.md +++ b/samples/client/petstore/java/native-async/docs/FakeApi.md @@ -1975,7 +1975,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | @@ -2065,7 +2065,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/EnumTest.java index 6b7fc291ad07..29adafa137b0 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/EnumTest.java @@ -139,7 +139,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; @@ -177,7 +177,7 @@ public static EnumIntegerEnum fromValue(Integer value) { public enum EnumIntegerOnlyEnum { NUMBER_2(2), - NUMBER_null(null); + NUMBER_MINUS_2(-2); private Integer value; diff --git a/samples/client/petstore/java/native/api/openapi.yaml b/samples/client/petstore/java/native/api/openapi.yaml index 3a9d39cc81d1..1be1726129a5 100644 --- a/samples/client/petstore/java/native/api/openapi.yaml +++ b/samples/client/petstore/java/native/api/openapi.yaml @@ -790,7 +790,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1683,13 +1683,13 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_integer_only: enum: - 2 - - null + - -2 type: integer enum_number: enum: diff --git a/samples/client/petstore/java/native/docs/EnumTest.md b/samples/client/petstore/java/native/docs/EnumTest.md index 7a3c0981f505..3e226e18b50b 100644 --- a/samples/client/petstore/java/native/docs/EnumTest.md +++ b/samples/client/petstore/java/native/docs/EnumTest.md @@ -44,7 +44,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_null | null | +| NUMBER_MINUS_1 | -1 | @@ -53,7 +53,7 @@ | Name | Value | |---- | -----| | NUMBER_2 | 2 | -| NUMBER_null | null | +| NUMBER_MINUS_2 | -2 | diff --git a/samples/client/petstore/java/native/docs/FakeApi.md b/samples/client/petstore/java/native/docs/FakeApi.md index b5722291dffc..f9dd65ba4ec9 100644 --- a/samples/client/petstore/java/native/docs/FakeApi.md +++ b/samples/client/petstore/java/native/docs/FakeApi.md @@ -1857,7 +1857,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | @@ -1939,7 +1939,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java index 4de3c6fe8349..fd11237555ef 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java @@ -139,7 +139,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; @@ -177,7 +177,7 @@ public static EnumIntegerEnum fromValue(Integer value) { public enum EnumIntegerOnlyEnum { NUMBER_2(2), - NUMBER_null(null); + NUMBER_MINUS_2(-2); private Integer value; diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md index b1b95475a8c7..98f0b0098b8b 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md @@ -659,7 +659,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml index 793ba3d2ffb4..de407d13b2cf 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,6 +1894,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -1928,6 +1929,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -1953,6 +1955,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -1987,6 +1990,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2021,6 +2025,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2057,6 +2062,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml index 793ba3d2ffb4..de407d13b2cf 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,6 +1894,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -1928,6 +1929,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -1953,6 +1955,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -1987,6 +1990,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2021,6 +2025,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2057,6 +2062,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md index b1b95475a8c7..98f0b0098b8b 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md @@ -659,7 +659,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml index c4169774a945..45059a376787 100644 --- a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml @@ -787,7 +787,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1899,13 +1899,13 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_integer_only: enum: - 2 - - null + - -2 type: integer enum_number: enum: diff --git a/samples/client/petstore/java/okhttp-gson/docs/EnumTest.md b/samples/client/petstore/java/okhttp-gson/docs/EnumTest.md index 7a3c0981f505..3e226e18b50b 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/EnumTest.md +++ b/samples/client/petstore/java/okhttp-gson/docs/EnumTest.md @@ -44,7 +44,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_null | null | +| NUMBER_MINUS_1 | -1 | @@ -53,7 +53,7 @@ | Name | Value | |---- | -----| | NUMBER_2 | 2 | -| NUMBER_null | null | +| NUMBER_MINUS_2 | -2 | diff --git a/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md index e00ef1976b78..18f99688c925 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md @@ -970,7 +970,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java index 2f39e4fdaab2..b4b4165efc0b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java @@ -179,7 +179,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; @@ -235,7 +235,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public enum EnumIntegerOnlyEnum { NUMBER_2(2), - NUMBER_null(null); + NUMBER_MINUS_2(-2); private Integer value; diff --git a/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml index 793ba3d2ffb4..de407d13b2cf 100644 --- a/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml +++ b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,6 +1894,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -1928,6 +1929,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -1953,6 +1955,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -1987,6 +1990,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2021,6 +2025,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2057,6 +2062,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/FakeApi.md b/samples/client/petstore/java/rest-assured-jackson/docs/FakeApi.md index 614d3116a716..969883dc5140 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/FakeApi.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/FakeApi.md @@ -440,7 +440,7 @@ api.testEnumParameters().execute(r -> r.prettyPeek()); | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [default to $] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/rest-assured/api/openapi.yaml b/samples/client/petstore/java/rest-assured/api/openapi.yaml index 793ba3d2ffb4..de407d13b2cf 100644 --- a/samples/client/petstore/java/rest-assured/api/openapi.yaml +++ b/samples/client/petstore/java/rest-assured/api/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,6 +1894,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -1928,6 +1929,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -1953,6 +1955,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -1987,6 +1990,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2021,6 +2025,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2057,6 +2062,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/rest-assured/docs/FakeApi.md b/samples/client/petstore/java/rest-assured/docs/FakeApi.md index 614d3116a716..969883dc5140 100644 --- a/samples/client/petstore/java/rest-assured/docs/FakeApi.md +++ b/samples/client/petstore/java/rest-assured/docs/FakeApi.md @@ -440,7 +440,7 @@ api.testEnumParameters().execute(r -> r.prettyPeek()); | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [default to $] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/restclient-swagger2/api/openapi.yaml b/samples/client/petstore/java/restclient-swagger2/api/openapi.yaml index 135d380a1aaa..1eddf878948c 100644 --- a/samples/client/petstore/java/restclient-swagger2/api/openapi.yaml +++ b/samples/client/petstore/java/restclient-swagger2/api/openapi.yaml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: diff --git a/samples/client/petstore/java/restclient-swagger2/docs/EnumTest.md b/samples/client/petstore/java/restclient-swagger2/docs/EnumTest.md index b000d0de1c3b..380a2aef0bc3 100644 --- a/samples/client/petstore/java/restclient-swagger2/docs/EnumTest.md +++ b/samples/client/petstore/java/restclient-swagger2/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_null | null | +| NUMBER_MINUS_1 | -1 | diff --git a/samples/client/petstore/java/restclient-swagger2/docs/FakeApi.md b/samples/client/petstore/java/restclient-swagger2/docs/FakeApi.md index a75f27d3106f..37a949ea0508 100644 --- a/samples/client/petstore/java/restclient-swagger2/docs/FakeApi.md +++ b/samples/client/petstore/java/restclient-swagger2/docs/FakeApi.md @@ -1029,7 +1029,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/EnumTest.java index eb3fa286eb93..2c288999874f 100644 --- a/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/EnumTest.java @@ -134,7 +134,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/client/petstore/java/restclient/api/openapi.yaml b/samples/client/petstore/java/restclient/api/openapi.yaml index 135d380a1aaa..1eddf878948c 100644 --- a/samples/client/petstore/java/restclient/api/openapi.yaml +++ b/samples/client/petstore/java/restclient/api/openapi.yaml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: diff --git a/samples/client/petstore/java/restclient/docs/EnumTest.md b/samples/client/petstore/java/restclient/docs/EnumTest.md index b000d0de1c3b..380a2aef0bc3 100644 --- a/samples/client/petstore/java/restclient/docs/EnumTest.md +++ b/samples/client/petstore/java/restclient/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_null | null | +| NUMBER_MINUS_1 | -1 | diff --git a/samples/client/petstore/java/restclient/docs/FakeApi.md b/samples/client/petstore/java/restclient/docs/FakeApi.md index a75f27d3106f..37a949ea0508 100644 --- a/samples/client/petstore/java/restclient/docs/FakeApi.md +++ b/samples/client/petstore/java/restclient/docs/FakeApi.md @@ -1029,7 +1029,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java/restclient/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/restclient/src/main/java/org/openapitools/client/model/EnumTest.java index ce9f03ecc2d2..8a07b759db56 100644 --- a/samples/client/petstore/java/restclient/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/restclient/src/main/java/org/openapitools/client/model/EnumTest.java @@ -133,7 +133,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/client/petstore/java/resteasy/api/openapi.yaml b/samples/client/petstore/java/resteasy/api/openapi.yaml index 135d380a1aaa..1eddf878948c 100644 --- a/samples/client/petstore/java/resteasy/api/openapi.yaml +++ b/samples/client/petstore/java/resteasy/api/openapi.yaml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: diff --git a/samples/client/petstore/java/resteasy/docs/EnumTest.md b/samples/client/petstore/java/resteasy/docs/EnumTest.md index b000d0de1c3b..380a2aef0bc3 100644 --- a/samples/client/petstore/java/resteasy/docs/EnumTest.md +++ b/samples/client/petstore/java/resteasy/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_null | null | +| NUMBER_MINUS_1 | -1 | diff --git a/samples/client/petstore/java/resteasy/docs/FakeApi.md b/samples/client/petstore/java/resteasy/docs/FakeApi.md index a75f27d3106f..37a949ea0508 100644 --- a/samples/client/petstore/java/resteasy/docs/FakeApi.md +++ b/samples/client/petstore/java/resteasy/docs/FakeApi.md @@ -1029,7 +1029,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumTest.java index 738b17cb2b41..770bcf43922e 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumTest.java @@ -133,7 +133,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml index 135d380a1aaa..1eddf878948c 100644 --- a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/EnumTest.md b/samples/client/petstore/java/resttemplate-withXml/docs/EnumTest.md index b000d0de1c3b..380a2aef0bc3 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/EnumTest.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_null | null | +| NUMBER_MINUS_1 | -1 | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md index a75f27d3106f..37a949ea0508 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md @@ -1029,7 +1029,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java index 07140cae0d6c..b2c4f3abd424 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java @@ -155,8 +155,8 @@ public enum EnumIntegerEnum { @XmlEnumValue("1") NUMBER_1(1), - @XmlEnumValue("null") - NUMBER_null(null); + @XmlEnumValue("-1") + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/client/petstore/java/resttemplate/api/openapi.yaml b/samples/client/petstore/java/resttemplate/api/openapi.yaml index 135d380a1aaa..1eddf878948c 100644 --- a/samples/client/petstore/java/resttemplate/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate/api/openapi.yaml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: diff --git a/samples/client/petstore/java/resttemplate/docs/EnumTest.md b/samples/client/petstore/java/resttemplate/docs/EnumTest.md index b000d0de1c3b..380a2aef0bc3 100644 --- a/samples/client/petstore/java/resttemplate/docs/EnumTest.md +++ b/samples/client/petstore/java/resttemplate/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_null | null | +| NUMBER_MINUS_1 | -1 | diff --git a/samples/client/petstore/java/resttemplate/docs/FakeApi.md b/samples/client/petstore/java/resttemplate/docs/FakeApi.md index a75f27d3106f..37a949ea0508 100644 --- a/samples/client/petstore/java/resttemplate/docs/FakeApi.md +++ b/samples/client/petstore/java/resttemplate/docs/FakeApi.md @@ -1029,7 +1029,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java index 548fe76b3e8f..ba8b4ecba677 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java @@ -133,7 +133,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml b/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml index 793ba3d2ffb4..de407d13b2cf 100644 --- a/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,6 +1894,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -1928,6 +1929,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -1953,6 +1955,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -1987,6 +1990,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2021,6 +2025,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2057,6 +2062,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md b/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md index 187ed7b2a366..5722d2acb576 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md @@ -698,7 +698,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/retrofit2/api/openapi.yaml b/samples/client/petstore/java/retrofit2/api/openapi.yaml index 793ba3d2ffb4..de407d13b2cf 100644 --- a/samples/client/petstore/java/retrofit2/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2/api/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,6 +1894,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -1928,6 +1929,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -1953,6 +1955,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -1987,6 +1990,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2021,6 +2025,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2057,6 +2062,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/retrofit2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2/docs/FakeApi.md index 187ed7b2a366..5722d2acb576 100644 --- a/samples/client/petstore/java/retrofit2/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2/docs/FakeApi.md @@ -698,7 +698,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml b/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml index 793ba3d2ffb4..de407d13b2cf 100644 --- a/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,6 +1894,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -1928,6 +1929,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -1953,6 +1955,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -1987,6 +1990,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2021,6 +2025,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2057,6 +2062,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md index 187ed7b2a366..5722d2acb576 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md @@ -698,7 +698,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml b/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml index 793ba3d2ffb4..de407d13b2cf 100644 --- a/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,6 +1894,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -1928,6 +1929,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -1953,6 +1955,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -1987,6 +1990,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2021,6 +2025,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2057,6 +2062,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md index 187ed7b2a366..5722d2acb576 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md @@ -698,7 +698,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml b/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml index 793ba3d2ffb4..de407d13b2cf 100644 --- a/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml +++ b/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml @@ -763,7 +763,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer - description: Query parameter enum test (double) @@ -1894,6 +1894,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -1928,6 +1929,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -1953,6 +1955,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -1987,6 +1990,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2021,6 +2025,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2057,6 +2062,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md b/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md index ae8802f5181f..efb255c14f26 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md @@ -698,7 +698,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/client/petstore/java/vertx/api/openapi.yaml b/samples/client/petstore/java/vertx/api/openapi.yaml index 135d380a1aaa..1eddf878948c 100644 --- a/samples/client/petstore/java/vertx/api/openapi.yaml +++ b/samples/client/petstore/java/vertx/api/openapi.yaml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: diff --git a/samples/client/petstore/java/vertx/docs/EnumTest.md b/samples/client/petstore/java/vertx/docs/EnumTest.md index b000d0de1c3b..380a2aef0bc3 100644 --- a/samples/client/petstore/java/vertx/docs/EnumTest.md +++ b/samples/client/petstore/java/vertx/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_null | null | +| NUMBER_MINUS_1 | -1 | diff --git a/samples/client/petstore/java/vertx/docs/FakeApi.md b/samples/client/petstore/java/vertx/docs/FakeApi.md index fe73f5124e10..22cff7dd2e8a 100644 --- a/samples/client/petstore/java/vertx/docs/FakeApi.md +++ b/samples/client/petstore/java/vertx/docs/FakeApi.md @@ -1029,7 +1029,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumTest.java index 738b17cb2b41..770bcf43922e 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumTest.java @@ -133,7 +133,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml b/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml index 135d380a1aaa..1eddf878948c 100644 --- a/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml +++ b/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: diff --git a/samples/client/petstore/java/webclient-jakarta/docs/EnumTest.md b/samples/client/petstore/java/webclient-jakarta/docs/EnumTest.md index b000d0de1c3b..380a2aef0bc3 100644 --- a/samples/client/petstore/java/webclient-jakarta/docs/EnumTest.md +++ b/samples/client/petstore/java/webclient-jakarta/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_null | null | +| NUMBER_MINUS_1 | -1 | diff --git a/samples/client/petstore/java/webclient-jakarta/docs/FakeApi.md b/samples/client/petstore/java/webclient-jakarta/docs/FakeApi.md index a75f27d3106f..37a949ea0508 100644 --- a/samples/client/petstore/java/webclient-jakarta/docs/FakeApi.md +++ b/samples/client/petstore/java/webclient-jakarta/docs/FakeApi.md @@ -1029,7 +1029,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/EnumTest.java index ce9f03ecc2d2..8a07b759db56 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/EnumTest.java @@ -133,7 +133,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml b/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml index 135d380a1aaa..1eddf878948c 100644 --- a/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml +++ b/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: diff --git a/samples/client/petstore/java/webclient-swagger2/docs/EnumTest.md b/samples/client/petstore/java/webclient-swagger2/docs/EnumTest.md index b000d0de1c3b..380a2aef0bc3 100644 --- a/samples/client/petstore/java/webclient-swagger2/docs/EnumTest.md +++ b/samples/client/petstore/java/webclient-swagger2/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_null | null | +| NUMBER_MINUS_1 | -1 | diff --git a/samples/client/petstore/java/webclient-swagger2/docs/FakeApi.md b/samples/client/petstore/java/webclient-swagger2/docs/FakeApi.md index a75f27d3106f..37a949ea0508 100644 --- a/samples/client/petstore/java/webclient-swagger2/docs/FakeApi.md +++ b/samples/client/petstore/java/webclient-swagger2/docs/FakeApi.md @@ -1029,7 +1029,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/EnumTest.java index 7c0734e4d6a9..9cec4234d87f 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/EnumTest.java @@ -134,7 +134,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/client/petstore/java/webclient/api/openapi.yaml b/samples/client/petstore/java/webclient/api/openapi.yaml index 135d380a1aaa..1eddf878948c 100644 --- a/samples/client/petstore/java/webclient/api/openapi.yaml +++ b/samples/client/petstore/java/webclient/api/openapi.yaml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: diff --git a/samples/client/petstore/java/webclient/docs/EnumTest.md b/samples/client/petstore/java/webclient/docs/EnumTest.md index b000d0de1c3b..380a2aef0bc3 100644 --- a/samples/client/petstore/java/webclient/docs/EnumTest.md +++ b/samples/client/petstore/java/webclient/docs/EnumTest.md @@ -43,7 +43,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_null | null | +| NUMBER_MINUS_1 | -1 | diff --git a/samples/client/petstore/java/webclient/docs/FakeApi.md b/samples/client/petstore/java/webclient/docs/FakeApi.md index a75f27d3106f..37a949ea0508 100644 --- a/samples/client/petstore/java/webclient/docs/FakeApi.md +++ b/samples/client/petstore/java/webclient/docs/FakeApi.md @@ -1029,7 +1029,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumTest.java index 738b17cb2b41..770bcf43922e 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/EnumTest.java @@ -133,7 +133,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/client/petstore/javascript-apollo/docs/EnumTest.md b/samples/client/petstore/javascript-apollo/docs/EnumTest.md index ff3fc3ead04e..b56c3c4cef63 100644 --- a/samples/client/petstore/javascript-apollo/docs/EnumTest.md +++ b/samples/client/petstore/javascript-apollo/docs/EnumTest.md @@ -46,7 +46,7 @@ Name | Type | Description | Notes * `1` (value: `1`) -* `null` (value: `null`) +* `-1` (value: `-1`) diff --git a/samples/client/petstore/javascript-apollo/src/model/EnumTest.js b/samples/client/petstore/javascript-apollo/src/model/EnumTest.js index bb7dc6823796..708e37e4ac6e 100644 --- a/samples/client/petstore/javascript-apollo/src/model/EnumTest.js +++ b/samples/client/petstore/javascript-apollo/src/model/EnumTest.js @@ -222,10 +222,10 @@ EnumTest['EnumIntegerEnum'] = { "1": 1, /** - * value: null + * value: -1 * @const */ - "null": null + "-1": -1 }; diff --git a/samples/client/petstore/javascript-es6/docs/EnumTest.md b/samples/client/petstore/javascript-es6/docs/EnumTest.md index ff3fc3ead04e..b56c3c4cef63 100644 --- a/samples/client/petstore/javascript-es6/docs/EnumTest.md +++ b/samples/client/petstore/javascript-es6/docs/EnumTest.md @@ -46,7 +46,7 @@ Name | Type | Description | Notes * `1` (value: `1`) -* `null` (value: `null`) +* `-1` (value: `-1`) diff --git a/samples/client/petstore/javascript-es6/src/model/EnumTest.js b/samples/client/petstore/javascript-es6/src/model/EnumTest.js index bb7dc6823796..708e37e4ac6e 100644 --- a/samples/client/petstore/javascript-es6/src/model/EnumTest.js +++ b/samples/client/petstore/javascript-es6/src/model/EnumTest.js @@ -222,10 +222,10 @@ EnumTest['EnumIntegerEnum'] = { "1": 1, /** - * value: null + * value: -1 * @const */ - "null": null + "-1": -1 }; diff --git a/samples/client/petstore/javascript-promise-es6/docs/EnumTest.md b/samples/client/petstore/javascript-promise-es6/docs/EnumTest.md index ff3fc3ead04e..b56c3c4cef63 100644 --- a/samples/client/petstore/javascript-promise-es6/docs/EnumTest.md +++ b/samples/client/petstore/javascript-promise-es6/docs/EnumTest.md @@ -46,7 +46,7 @@ Name | Type | Description | Notes * `1` (value: `1`) -* `null` (value: `null`) +* `-1` (value: `-1`) diff --git a/samples/client/petstore/javascript-promise-es6/src/model/EnumTest.js b/samples/client/petstore/javascript-promise-es6/src/model/EnumTest.js index bb7dc6823796..708e37e4ac6e 100644 --- a/samples/client/petstore/javascript-promise-es6/src/model/EnumTest.js +++ b/samples/client/petstore/javascript-promise-es6/src/model/EnumTest.js @@ -222,10 +222,10 @@ EnumTest['EnumIntegerEnum'] = { "1": 1, /** - * value: null + * value: -1 * @const */ - "null": null + "-1": -1 }; diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumTest.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumTest.php index 2bbed8a5afc0..3614614f611d 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumTest.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumTest.php @@ -276,7 +276,7 @@ public function getModelName(): string public const ENUM_STRING_REQUIRED_LOWER = 'lower'; public const ENUM_STRING_REQUIRED_EMPTY = ''; public const ENUM_INTEGER_1 = 1; - public const ENUM_INTEGER_null = null; + public const ENUM_INTEGER_MINUS_1 = -1; public const ENUM_NUMBER_1_DOT_1 = 1.1; public const ENUM_NUMBER_MINUS_1_DOT_2 = -1.2; @@ -317,7 +317,7 @@ public function getEnumIntegerAllowableValues() { return [ self::ENUM_INTEGER_1, - self::ENUM_INTEGER_null, + self::ENUM_INTEGER_MINUS_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 ab93d2eebb0c..2bfc08295ff7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php @@ -277,7 +277,7 @@ public function getModelName() public const ENUM_STRING_REQUIRED_LOWER = 'lower'; public const ENUM_STRING_REQUIRED_EMPTY = ''; public const ENUM_INTEGER_1 = 1; - public const ENUM_INTEGER_null = null; + public const ENUM_INTEGER_MINUS_1 = -1; public const ENUM_NUMBER_1_DOT_1 = 1.1; public const ENUM_NUMBER_MINUS_1_DOT_2 = -1.2; @@ -318,7 +318,7 @@ public function getEnumIntegerAllowableValues() { return [ self::ENUM_INTEGER_1, - self::ENUM_INTEGER_null, + self::ENUM_INTEGER_MINUS_1, ]; } diff --git a/samples/client/petstore/php/psr-18/lib/Model/EnumTest.php b/samples/client/petstore/php/psr-18/lib/Model/EnumTest.php index ab93d2eebb0c..2bfc08295ff7 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/EnumTest.php +++ b/samples/client/petstore/php/psr-18/lib/Model/EnumTest.php @@ -277,7 +277,7 @@ public function getModelName() public const ENUM_STRING_REQUIRED_LOWER = 'lower'; public const ENUM_STRING_REQUIRED_EMPTY = ''; public const ENUM_INTEGER_1 = 1; - public const ENUM_INTEGER_null = null; + public const ENUM_INTEGER_MINUS_1 = -1; public const ENUM_NUMBER_1_DOT_1 = 1.1; public const ENUM_NUMBER_MINUS_1_DOT_2 = -1.2; @@ -318,7 +318,7 @@ public function getEnumIntegerAllowableValues() { return [ self::ENUM_INTEGER_1, - self::ENUM_INTEGER_null, + self::ENUM_INTEGER_MINUS_1, ]; } diff --git a/samples/client/petstore/powershell/src/PSPetstore/Api/PSFakeApi.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Api/PSFakeApi.ps1 index 2d2696fe7772..87f58e94686f 100644 --- a/samples/client/petstore/powershell/src/PSPetstore/Api/PSFakeApi.ps1 +++ b/samples/client/petstore/powershell/src/PSPetstore/Api/PSFakeApi.ps1 @@ -1016,7 +1016,7 @@ function Test-PSEnumParameters { [String] ${EnumQueryString}, [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] - [ValidateSet("1", "null")] + [ValidateSet("1", "-2")] [System.Nullable[Int32]] ${EnumQueryInteger}, [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/EnumTest.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/EnumTest.ps1 index c94454d4392d..867691b24911 100644 --- a/samples/client/petstore/powershell/src/PSPetstore/Model/EnumTest.ps1 +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/EnumTest.ps1 @@ -43,11 +43,11 @@ function Initialize-PSEnumTest { [String] ${EnumStringRequired}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] - [ValidateSet("1", "")] + [ValidateSet("1", "-1")] [System.Nullable[Int32]] ${EnumInteger}, [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)] - [ValidateSet("2", "")] + [ValidateSet("2", "-2")] [System.Nullable[Int32]] ${EnumIntegerOnly}, [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true)] diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby-autoload/lib/petstore/api/fake_api.rb index 42ba288e1ede..0ab4ed2abf4f 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/api/fake_api.rb @@ -1063,7 +1063,7 @@ def test_enum_parameters_with_http_info(opts = {}) if @api_client.config.client_side_validation && opts[:'enum_query_string'] && !allowable_values.include?(opts[:'enum_query_string']) fail ArgumentError, "invalid value for \"enum_query_string\", must be one of #{allowable_values}" end - allowable_values = [1, null] + allowable_values = [1, -2] if @api_client.config.client_side_validation && opts[:'enum_query_integer'] && !allowable_values.include?(opts[:'enum_query_integer']) fail ArgumentError, "invalid value for \"enum_query_integer\", must be one of #{allowable_values}" end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/enum_test.rb index 32f97e3af828..bebc6cf05fda 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/enum_test.rb @@ -168,7 +168,7 @@ def valid? return false if @enum_string_required.nil? enum_string_required_validator = EnumAttributeValidator.new('String', ["UPPER", "lower", ""]) return false unless enum_string_required_validator.valid?(@enum_string_required) - enum_integer_validator = EnumAttributeValidator.new('Integer', [1, null]) + enum_integer_validator = EnumAttributeValidator.new('Integer', [1, -1]) return false unless enum_integer_validator.valid?(@enum_integer) enum_number_validator = EnumAttributeValidator.new('Float', [1.1, -1.2]) return false unless enum_number_validator.valid?(@enum_number) @@ -198,7 +198,7 @@ def enum_string_required=(enum_string_required) # Custom attribute writer method checking allowed values (enum). # @param [Object] enum_integer Object to be assigned def enum_integer=(enum_integer) - validator = EnumAttributeValidator.new('Integer', [1, null]) + validator = EnumAttributeValidator.new('Integer', [1, -1]) unless validator.valid?(enum_integer) fail ArgumentError, "invalid value for \"enum_integer\", must be one of #{validator.allowable_values}." 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 42ba288e1ede..0ab4ed2abf4f 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 @@ -1063,7 +1063,7 @@ def test_enum_parameters_with_http_info(opts = {}) if @api_client.config.client_side_validation && opts[:'enum_query_string'] && !allowable_values.include?(opts[:'enum_query_string']) fail ArgumentError, "invalid value for \"enum_query_string\", must be one of #{allowable_values}" end - allowable_values = [1, null] + allowable_values = [1, -2] if @api_client.config.client_side_validation && opts[:'enum_query_integer'] && !allowable_values.include?(opts[:'enum_query_integer']) fail ArgumentError, "invalid value for \"enum_query_integer\", must be one of #{allowable_values}" 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 32f97e3af828..bebc6cf05fda 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 @@ -168,7 +168,7 @@ def valid? return false if @enum_string_required.nil? enum_string_required_validator = EnumAttributeValidator.new('String', ["UPPER", "lower", ""]) return false unless enum_string_required_validator.valid?(@enum_string_required) - enum_integer_validator = EnumAttributeValidator.new('Integer', [1, null]) + enum_integer_validator = EnumAttributeValidator.new('Integer', [1, -1]) return false unless enum_integer_validator.valid?(@enum_integer) enum_number_validator = EnumAttributeValidator.new('Float', [1.1, -1.2]) return false unless enum_number_validator.valid?(@enum_number) @@ -198,7 +198,7 @@ def enum_string_required=(enum_string_required) # Custom attribute writer method checking allowed values (enum). # @param [Object] enum_integer Object to be assigned def enum_integer=(enum_integer) - validator = EnumAttributeValidator.new('Integer', [1, null]) + validator = EnumAttributeValidator.new('Integer', [1, -1]) unless validator.valid?(enum_integer) fail ArgumentError, "invalid value for \"enum_integer\", must be one of #{validator.allowable_values}." end diff --git a/samples/client/petstore/ruby-httpx/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby-httpx/lib/petstore/api/fake_api.rb index ec83a9e05b92..6933d858e527 100644 --- a/samples/client/petstore/ruby-httpx/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby-httpx/lib/petstore/api/fake_api.rb @@ -1144,7 +1144,7 @@ def test_enum_parameters_with_http_info(opts = {}) if @api_client.config.client_side_validation && opts[:'enum_query_string'] && !allowable_values.include?(opts[:'enum_query_string']) fail ArgumentError, "invalid value for \"enum_query_string\", must be one of #{allowable_values}" end - allowable_values = [1, null] + allowable_values = [1, -2] if @api_client.config.client_side_validation && opts[:'enum_query_integer'] && !allowable_values.include?(opts[:'enum_query_integer']) fail ArgumentError, "invalid value for \"enum_query_integer\", must be one of #{allowable_values}" end diff --git a/samples/client/petstore/ruby-httpx/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby-httpx/lib/petstore/models/enum_test.rb index 32f97e3af828..bebc6cf05fda 100644 --- a/samples/client/petstore/ruby-httpx/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby-httpx/lib/petstore/models/enum_test.rb @@ -168,7 +168,7 @@ def valid? return false if @enum_string_required.nil? enum_string_required_validator = EnumAttributeValidator.new('String', ["UPPER", "lower", ""]) return false unless enum_string_required_validator.valid?(@enum_string_required) - enum_integer_validator = EnumAttributeValidator.new('Integer', [1, null]) + enum_integer_validator = EnumAttributeValidator.new('Integer', [1, -1]) return false unless enum_integer_validator.valid?(@enum_integer) enum_number_validator = EnumAttributeValidator.new('Float', [1.1, -1.2]) return false unless enum_number_validator.valid?(@enum_number) @@ -198,7 +198,7 @@ def enum_string_required=(enum_string_required) # Custom attribute writer method checking allowed values (enum). # @param [Object] enum_integer Object to be assigned def enum_integer=(enum_integer) - validator = EnumAttributeValidator.new('Integer', [1, null]) + validator = EnumAttributeValidator.new('Integer', [1, -1]) unless validator.valid?(enum_integer) fail ArgumentError, "invalid value for \"enum_integer\", must be one of #{validator.allowable_values}." 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 7e1117cf06de..cc4e30802f50 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb @@ -1144,7 +1144,7 @@ def test_enum_parameters_with_http_info(opts = {}) if @api_client.config.client_side_validation && opts[:'enum_query_string'] && !allowable_values.include?(opts[:'enum_query_string']) fail ArgumentError, "invalid value for \"enum_query_string\", must be one of #{allowable_values}" end - allowable_values = [1, null] + allowable_values = [1, -2] if @api_client.config.client_side_validation && opts[:'enum_query_integer'] && !allowable_values.include?(opts[:'enum_query_integer']) fail ArgumentError, "invalid value for \"enum_query_integer\", must be one of #{allowable_values}" 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 32f97e3af828..bebc6cf05fda 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb @@ -168,7 +168,7 @@ def valid? return false if @enum_string_required.nil? enum_string_required_validator = EnumAttributeValidator.new('String', ["UPPER", "lower", ""]) return false unless enum_string_required_validator.valid?(@enum_string_required) - enum_integer_validator = EnumAttributeValidator.new('Integer', [1, null]) + enum_integer_validator = EnumAttributeValidator.new('Integer', [1, -1]) return false unless enum_integer_validator.valid?(@enum_integer) enum_number_validator = EnumAttributeValidator.new('Float', [1.1, -1.2]) return false unless enum_number_validator.valid?(@enum_number) @@ -198,7 +198,7 @@ def enum_string_required=(enum_string_required) # Custom attribute writer method checking allowed values (enum). # @param [Object] enum_integer Object to be assigned def enum_integer=(enum_integer) - validator = EnumAttributeValidator.new('Integer', [1, null]) + validator = EnumAttributeValidator.new('Integer', [1, -1]) unless validator.valid?(enum_integer) fail ArgumentError, "invalid value for \"enum_integer\", must be one of #{validator.allowable_values}." end diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumTest.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumTest.java index 425a02d0049f..37c894f36531 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumTest.java @@ -107,7 +107,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java index c490f83bd143..30cbcdafe0d9 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -27,7 +27,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem; + private Integer integerItem = -2; private Boolean boolItem = true; diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/EnumTestDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/EnumTestDto.java index 6d36604b83bf..e1ab901a7d4a 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/EnumTestDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/EnumTestDto.java @@ -107,7 +107,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java index 6fdc5a5f3b1b..8e11dbc43cf4 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java @@ -29,7 +29,7 @@ public class TypeHolderDefaultDto { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem; + private Integer integerItem = -2; private Boolean boolItem = true; diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index a1aecf47e44d..9e246a77ebea 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -442,7 +442,7 @@ open class FakeAPI { */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case numberNull = null + case number2 = -2 } /** diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 1b69ffdfae93..a5e7145d297c 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -378,7 +378,7 @@ open class FakeAPI { */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case numberNull = null + case number2 = -2 } /** diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index cad20b279d11..e65abe35fcd4 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -517,7 +517,7 @@ open class FakeAPI { */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case numberNull = null + case number2 = -2 } /** diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index c86fff1575b9..1a5d74a29efc 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -486,7 +486,7 @@ open class FakeAPI { */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case numberNull = null + case number2 = -2 } /** diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 06c147e20e7b..50acd84cc9f9 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -442,7 +442,7 @@ open class FakeAPI { */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case numberNull = null + case number2 = -2 } /** diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 13a2d002dc86..b4d2b389e062 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -442,7 +442,7 @@ internal class FakeAPI { */ internal enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case numberNull = null + case number2 = -2 } /** diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index ef288566916f..3f6e3111d931 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -442,7 +442,7 @@ import AnyCodable */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case numberNull = null + case number2 = -2 } /** diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 49a8a74fdb85..9358f7ce983f 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -443,7 +443,7 @@ open class FakeAPI { */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case numberNull = null + case number2 = -2 } /** diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 6585cd5ebd1c..e2056a929dc3 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -442,7 +442,7 @@ open class FakeAPI { */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case numberNull = null + case number2 = -2 } /** diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index f710486ea5a0..e18c6a34c8f0 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -442,7 +442,7 @@ open class FakeAPI { */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case numberNull = null + case number2 = -2 } /** diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 3899d1e3a0dd..03433120c1ab 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -491,7 +491,7 @@ open class FakeAPI { */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case numberNull = null + case number2 = -2 } /** diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift index ed2f32d32d95..6f88769930d8 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift @@ -445,7 +445,7 @@ open class FakeAPI { */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case numberNull = null + case number2 = -2 } /** diff --git a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift index 1008d834ef62..014da8378336 100644 --- a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/APIs/FakeAPI.swift @@ -538,7 +538,7 @@ open class FakeAPI { */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable, Content { case _1 = 1 - case numberNull = null + case number2 = -2 } /** diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 6585cd5ebd1c..e2056a929dc3 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -442,7 +442,7 @@ open class FakeAPI { */ public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { case _1 = 1 - case numberNull = null + case number2 = -2 } /** diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/enum_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/enum_test.dart index 99e5e29fe8f4..687e674d211a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/enum_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/enum_test.dart @@ -200,8 +200,8 @@ enum EnumTestEnumStringRequiredEnum { enum EnumTestEnumIntegerEnum { @JsonValue(1) number1, - @JsonValue(null) - null_, + @JsonValue(-1) + numberNegative1, @JsonValue(11184809) unknownDefaultOpenApi, } diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_test.dart index 1b917869ca1a..831f5b9d6d2d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_test.dart @@ -36,7 +36,7 @@ abstract class EnumTest implements Built { @BuiltValueField(wireName: r'enum_integer') EnumTestEnumIntegerEnum? get enumInteger; - // enum enumIntegerEnum { 1, , }; + // enum enumIntegerEnum { 1, -1, }; @BuiltValueField(wireName: r'enum_number') EnumTestEnumNumberEnum? get enumNumber; @@ -286,8 +286,8 @@ class EnumTestEnumIntegerEnum extends EnumClass { @BuiltValueEnumConst(wireNumber: 1) static const EnumTestEnumIntegerEnum number1 = _$enumTestEnumIntegerEnum_number1; - @BuiltValueEnumConst(wireNumber: null) - static const EnumTestEnumIntegerEnum null_ = _$enumTestEnumIntegerEnum_null_; + @BuiltValueEnumConst(wireNumber: -1) + static const EnumTestEnumIntegerEnum numberNegative1 = _$enumTestEnumIntegerEnum_numberNegative1; @BuiltValueEnumConst(wireNumber: 11184809, fallback: true) static const EnumTestEnumIntegerEnum unknownDefaultOpenApi = _$enumTestEnumIntegerEnum_unknownDefaultOpenApi; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart index d1f5d0a305f9..04ee7808fc0d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart @@ -370,12 +370,12 @@ class EnumTestEnumIntegerEnum { int toJson() => value; static const number1 = EnumTestEnumIntegerEnum._(1); - static const null_ = EnumTestEnumIntegerEnum._(null); + static const numberNegative1 = EnumTestEnumIntegerEnum._(-1); /// List of all possible values in this [enum][EnumTestEnumIntegerEnum]. static const values = [ number1, - null_, + numberNegative1, ]; static EnumTestEnumIntegerEnum? fromJson(dynamic value) => EnumTestEnumIntegerEnumTypeTransformer().decode(value); @@ -415,7 +415,7 @@ class EnumTestEnumIntegerEnumTypeTransformer { if (data != null) { switch (data) { case 1: return EnumTestEnumIntegerEnum.number1; - case null: return EnumTestEnumIntegerEnum.null_; + case -1: return EnumTestEnumIntegerEnum.numberNegative1; default: if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); diff --git a/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml b/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml index 934d0e97fc0b..c63b467c8077 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml @@ -745,7 +745,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1662,7 +1662,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml b/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml index 242de316b9e9..25e78fa9e305 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml +++ b/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml @@ -790,7 +790,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1672,13 +1672,13 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_integer_only: enum: - 2 - - null + - -2 type: integer enum_number: enum: diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/EnumTest.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/EnumTest.md index 7a3c0981f505..3e226e18b50b 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/EnumTest.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/EnumTest.md @@ -44,7 +44,7 @@ | Name | Value | |---- | -----| | NUMBER_1 | 1 | -| NUMBER_null | null | +| NUMBER_MINUS_1 | -1 | @@ -53,7 +53,7 @@ | Name | Value | |---- | -----| | NUMBER_2 | 2 | -| NUMBER_null | null | +| NUMBER_MINUS_2 | -2 | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md index 9fa6500d8b67..3816afc1ce7c 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md @@ -883,7 +883,7 @@ public class Example { | **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryStringArray** | **List<String>**| Query parameter enum test (string array) | [optional] [enum: >, $] | | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, ] | +| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | | **enumFormStringArray** | **List<String>**| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumTest.java index f1619cc62a35..d4b912ed9f96 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/EnumTest.java @@ -137,7 +137,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; @@ -175,7 +175,7 @@ public static EnumIntegerEnum fromValue(Integer value) { public enum EnumIntegerOnlyEnum { NUMBER_2(2), - NUMBER_null(null); + NUMBER_MINUS_2(-2); private Integer value; diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/OuterEnumIntegerDefaultValue.md b/samples/openapi3/client/petstore/python-aiohttp/docs/OuterEnumIntegerDefaultValue.md index d2588f4e8c7c..66cd0abdb0a5 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/OuterEnumIntegerDefaultValue.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/OuterEnumIntegerDefaultValue.md @@ -3,7 +3,7 @@ ## Enum -* `NUMBER_null` (value: `null`) +* `NUMBER_MINUS_1` (value: `-1`) * `NUMBER_0` (value: `0`) diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/enum_test.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/enum_test.py index 65c3dfb6f3a7..bbbc4102de45 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/enum_test.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/enum_test.py @@ -76,8 +76,8 @@ def enum_integer_validate_enum(cls, value): if value is None: return value - if value not in set([1, null]): - raise ValueError("must be one of enum values (1, null)") + if value not in set([1, -1]): + raise ValueError("must be one of enum values (1, -1)") return value @field_validator('enum_number') diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/outer_enum_integer_default_value.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/outer_enum_integer_default_value.py index 880ad5e5f374..8df41b2bd320 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/outer_enum_integer_default_value.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/outer_enum_integer_default_value.py @@ -26,7 +26,7 @@ class OuterEnumIntegerDefaultValue(int, Enum): """ allowed enum values """ - NUMBER_null = null + NUMBER_MINUS_1 = -1 NUMBER_0 = 0 NUMBER_1 = 1 NUMBER_2 = 2 diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/OuterEnumIntegerDefaultValue.md b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/OuterEnumIntegerDefaultValue.md index d2588f4e8c7c..66cd0abdb0a5 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/OuterEnumIntegerDefaultValue.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/docs/OuterEnumIntegerDefaultValue.md @@ -3,7 +3,7 @@ ## Enum -* `NUMBER_null` (value: `null`) +* `NUMBER_MINUS_1` (value: `-1`) * `NUMBER_0` (value: `0`) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/enum_test.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/enum_test.py index b1204e7bc23e..66c688f9f484 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/enum_test.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/enum_test.py @@ -75,8 +75,8 @@ def enum_integer_validate_enum(cls, value): if value is None: return value - if value not in (1, null): - raise ValueError("must be one of enum values (1, null)") + if value not in (1, -1): + raise ValueError("must be one of enum values (1, -1)") return value @validator('enum_number') diff --git a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/outer_enum_integer_default_value.py b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/outer_enum_integer_default_value.py index d5cf1c2fe453..36381197bb71 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/outer_enum_integer_default_value.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/models/outer_enum_integer_default_value.py @@ -29,7 +29,7 @@ class OuterEnumIntegerDefaultValue(int, Enum): """ allowed enum values """ - NUMBER_null = null + NUMBER_MINUS_1 = -1 NUMBER_0 = 0 NUMBER_1 = 1 NUMBER_2 = 2 diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/docs/OuterEnumIntegerDefaultValue.md b/samples/openapi3/client/petstore/python-pydantic-v1/docs/OuterEnumIntegerDefaultValue.md index d2588f4e8c7c..66cd0abdb0a5 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/docs/OuterEnumIntegerDefaultValue.md +++ b/samples/openapi3/client/petstore/python-pydantic-v1/docs/OuterEnumIntegerDefaultValue.md @@ -3,7 +3,7 @@ ## Enum -* `NUMBER_null` (value: `null`) +* `NUMBER_MINUS_1` (value: `-1`) * `NUMBER_0` (value: `0`) diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/enum_test.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/enum_test.py index 89823b2aa994..a04be47a43fb 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/enum_test.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/enum_test.py @@ -76,8 +76,8 @@ def enum_integer_validate_enum(cls, value): if value is None: return value - if value not in (1, null): - raise ValueError("must be one of enum values (1, null)") + if value not in (1, -1): + raise ValueError("must be one of enum values (1, -1)") return value @validator('enum_number') diff --git a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/outer_enum_integer_default_value.py b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/outer_enum_integer_default_value.py index d5cf1c2fe453..36381197bb71 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/outer_enum_integer_default_value.py +++ b/samples/openapi3/client/petstore/python-pydantic-v1/petstore_api/models/outer_enum_integer_default_value.py @@ -29,7 +29,7 @@ class OuterEnumIntegerDefaultValue(int, Enum): """ allowed enum values """ - NUMBER_null = null + NUMBER_MINUS_1 = -1 NUMBER_0 = 0 NUMBER_1 = 1 NUMBER_2 = 2 diff --git a/samples/openapi3/client/petstore/python/docs/OuterEnumIntegerDefaultValue.md b/samples/openapi3/client/petstore/python/docs/OuterEnumIntegerDefaultValue.md index d2588f4e8c7c..66cd0abdb0a5 100644 --- a/samples/openapi3/client/petstore/python/docs/OuterEnumIntegerDefaultValue.md +++ b/samples/openapi3/client/petstore/python/docs/OuterEnumIntegerDefaultValue.md @@ -3,7 +3,7 @@ ## Enum -* `NUMBER_null` (value: `null`) +* `NUMBER_MINUS_1` (value: `-1`) * `NUMBER_0` (value: `0`) diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py index 8a67927b1b61..d63819661558 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py @@ -77,8 +77,8 @@ def enum_integer_validate_enum(cls, value): if value is None: return value - if value not in set([1, null]): - raise ValueError("must be one of enum values (1, null)") + if value not in set([1, -1]): + raise ValueError("must be one of enum values (1, -1)") return value @field_validator('enum_number') diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_integer_default_value.py b/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_integer_default_value.py index 880ad5e5f374..8df41b2bd320 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_integer_default_value.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/outer_enum_integer_default_value.py @@ -26,7 +26,7 @@ class OuterEnumIntegerDefaultValue(int, Enum): """ allowed enum values """ - NUMBER_null = null + NUMBER_MINUS_1 = -1 NUMBER_0 = 0 NUMBER_1 = 1 NUMBER_2 = 2 diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java index 659aca648bac..99ea45a28c67 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java @@ -109,7 +109,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java index a1780ff76fd0..4ef3ddd02ba9 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -29,7 +29,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem; + private Integer integerItem = -2; private Boolean boolItem = true; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java index b3ec889eea85..539c484f2e83 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -112,7 +112,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @Schema(name = "integer_item", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(name = "integer_item", example = "-2", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java index 6ac717ab2377..4a3b76b19b54 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java @@ -142,7 +142,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @Schema(name = "attribute_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "attribute_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -250,7 +250,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @Schema(name = "name_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "name_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -386,7 +386,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @Schema(name = "prefix_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "prefix_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -522,7 +522,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @Schema(name = "namespace_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "namespace_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -658,7 +658,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @Schema(name = "prefix_ns_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "prefix_ns_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java index 97915f718a32..a4634a276f9c 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java @@ -109,7 +109,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java index afd41357f7a1..e20bec93b0ee 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -29,7 +29,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem; + private Integer integerItem = -2; private Boolean boolItem = true; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java index 5017e1d05132..d455c202b5a5 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -124,7 +124,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @Schema(name = "integer_item", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(name = "integer_item", example = "-2", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java index 6ac717ab2377..4a3b76b19b54 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java @@ -142,7 +142,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @Schema(name = "attribute_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "attribute_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -250,7 +250,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @Schema(name = "name_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "name_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -386,7 +386,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @Schema(name = "prefix_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "prefix_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -522,7 +522,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @Schema(name = "namespace_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "namespace_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -658,7 +658,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @Schema(name = "prefix_ns_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "prefix_ns_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml index 92721ac9a0ec..f26422f84ebf 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml @@ -799,7 +799,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1649,7 +1649,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: @@ -1991,6 +1991,7 @@ components: default: 1.234 type: number integer_item: + default: -2 type: integer bool_item: default: true @@ -2024,6 +2025,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -2058,6 +2060,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -2083,6 +2086,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -2117,6 +2121,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2151,6 +2156,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2187,6 +2193,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java index 97915f718a32..a4634a276f9c 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java @@ -109,7 +109,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java index afd41357f7a1..e20bec93b0ee 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -29,7 +29,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem; + private Integer integerItem = -2; private Boolean boolItem = true; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java index 5017e1d05132..d455c202b5a5 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -124,7 +124,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @Schema(name = "integer_item", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(name = "integer_item", example = "-2", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java index 6ac717ab2377..4a3b76b19b54 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java @@ -142,7 +142,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @Schema(name = "attribute_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "attribute_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -250,7 +250,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @Schema(name = "name_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "name_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -386,7 +386,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @Schema(name = "prefix_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "prefix_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -522,7 +522,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @Schema(name = "namespace_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "namespace_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -658,7 +658,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @Schema(name = "prefix_ns_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "prefix_ns_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml index 92721ac9a0ec..f26422f84ebf 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml @@ -799,7 +799,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1649,7 +1649,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: @@ -1991,6 +1991,7 @@ components: default: 1.234 type: number integer_item: + default: -2 type: integer bool_item: default: true @@ -2024,6 +2025,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -2058,6 +2060,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -2083,6 +2086,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -2117,6 +2121,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2151,6 +2156,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2187,6 +2193,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/schema/petstore/mysql/mysql_schema.sql b/samples/schema/petstore/mysql/mysql_schema.sql index 33d23af12c7f..0c526bdabd3e 100644 --- a/samples/schema/petstore/mysql/mysql_schema.sql +++ b/samples/schema/petstore/mysql/mysql_schema.sql @@ -171,7 +171,7 @@ CREATE TABLE IF NOT EXISTS `EnumArrays` ( CREATE TABLE IF NOT EXISTS `Enum_Test` ( `enum_string` ENUM('UPPER', 'lower', '') DEFAULT NULL, `enum_string_required` ENUM('UPPER', 'lower', '') NOT NULL, - `enum_integer` ENUM('1', 'null') DEFAULT NULL, + `enum_integer` ENUM('1', '-1') DEFAULT NULL, `enum_number` ENUM('1.1', '-1.2') DEFAULT NULL, `outerEnum` TEXT DEFAULT NULL, `outerEnumInteger` TEXT DEFAULT NULL, diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Enum_Test.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/Enum_Test.cpp index 4ff98061567e..d3e5a85d7072 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Enum_Test.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Enum_Test.cpp @@ -125,7 +125,7 @@ int32_t Enum_Test::getEnumInteger() const void Enum_Test::setEnumInteger(int32_t value) { static const std::array allowedValues = { - 1, null + 1, -1 }; if (std::find(allowedValues.begin(), allowedValues.end(), value) != allowedValues.end()) { diff --git a/samples/server/petstore/java-helidon-server/v3/mp/src/main/java/org/openapitools/server/model/EnumTest.java b/samples/server/petstore/java-helidon-server/v3/mp/src/main/java/org/openapitools/server/model/EnumTest.java index ce13cf6ea86b..9476edffbf91 100644 --- a/samples/server/petstore/java-helidon-server/v3/mp/src/main/java/org/openapitools/server/model/EnumTest.java +++ b/samples/server/petstore/java-helidon-server/v3/mp/src/main/java/org/openapitools/server/model/EnumTest.java @@ -131,7 +131,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { - NUMBER_1(Integer.valueOf(1)), NUMBER_null(Integer.valueOf(null)); + NUMBER_1(Integer.valueOf(1)), NUMBER_MINUS_1(Integer.valueOf(-1)); private Integer value; diff --git a/samples/server/petstore/java-helidon-server/v3/mp/src/main/resources/META-INF/openapi.yml b/samples/server/petstore/java-helidon-server/v3/mp/src/main/resources/META-INF/openapi.yml index 8289c57fb91b..a08bc26cc144 100644 --- a/samples/server/petstore/java-helidon-server/v3/mp/src/main/resources/META-INF/openapi.yml +++ b/samples/server/petstore/java-helidon-server/v3/mp/src/main/resources/META-INF/openapi.yml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: diff --git a/samples/server/petstore/java-helidon-server/v3/se/src/main/java/org/openapitools/server/model/EnumTest.java b/samples/server/petstore/java-helidon-server/v3/se/src/main/java/org/openapitools/server/model/EnumTest.java index 2b570266ad26..d2d7d27c9414 100644 --- a/samples/server/petstore/java-helidon-server/v3/se/src/main/java/org/openapitools/server/model/EnumTest.java +++ b/samples/server/petstore/java-helidon-server/v3/se/src/main/java/org/openapitools/server/model/EnumTest.java @@ -99,7 +99,7 @@ public static EnumStringRequiredEnum fromValue(String text) { */ public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/server/petstore/java-helidon-server/v3/se/src/main/resources/META-INF/openapi.yml b/samples/server/petstore/java-helidon-server/v3/se/src/main/resources/META-INF/openapi.yml index 8289c57fb91b..a08bc26cc144 100644 --- a/samples/server/petstore/java-helidon-server/v3/se/src/main/resources/META-INF/openapi.yml +++ b/samples/server/petstore/java-helidon-server/v3/se/src/main/resources/META-INF/openapi.yml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: diff --git a/samples/server/petstore/java-helidon-server/v4/mp/src/main/java/org/openapitools/server/model/EnumTest.java b/samples/server/petstore/java-helidon-server/v4/mp/src/main/java/org/openapitools/server/model/EnumTest.java index ce13cf6ea86b..9476edffbf91 100644 --- a/samples/server/petstore/java-helidon-server/v4/mp/src/main/java/org/openapitools/server/model/EnumTest.java +++ b/samples/server/petstore/java-helidon-server/v4/mp/src/main/java/org/openapitools/server/model/EnumTest.java @@ -131,7 +131,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { - NUMBER_1(Integer.valueOf(1)), NUMBER_null(Integer.valueOf(null)); + NUMBER_1(Integer.valueOf(1)), NUMBER_MINUS_1(Integer.valueOf(-1)); private Integer value; diff --git a/samples/server/petstore/java-helidon-server/v4/mp/src/main/resources/META-INF/openapi.yml b/samples/server/petstore/java-helidon-server/v4/mp/src/main/resources/META-INF/openapi.yml index 8289c57fb91b..a08bc26cc144 100644 --- a/samples/server/petstore/java-helidon-server/v4/mp/src/main/resources/META-INF/openapi.yml +++ b/samples/server/petstore/java-helidon-server/v4/mp/src/main/resources/META-INF/openapi.yml @@ -817,7 +817,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1769,7 +1769,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java index 26d4f9d8a5ea..4c2346a740a2 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java @@ -181,7 +181,7 @@ public Response testEnumParameters(@ApiParam(value = "Header parameter enum test ,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString ,@ApiParam(value = "Query parameter enum test (string array)", allowableValues=">, $") @QueryParam("enum_query_string_array") List enumQueryStringArray ,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString -,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, ") @QueryParam("enum_query_integer") Integer enumQueryInteger +,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger ,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble ,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray ,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/TypeHolderExample.java index 505b08868f8d..5d9bb177bcd2 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -96,7 +96,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem **/ - @ApiModelProperty(required = true, value = "") + @ApiModelProperty(example = "-2", required = true, value = "") public Integer getIntegerItem() { return integerItem; } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/XmlItem.java index 9a3616832ed3..73804fd1847e 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/XmlItem.java @@ -147,7 +147,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger **/ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") public Integer getAttributeInteger() { return attributeInteger; } @@ -245,7 +245,7 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger **/ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") public Integer getNameInteger() { return nameInteger; } @@ -369,7 +369,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger **/ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") public Integer getPrefixInteger() { return prefixInteger; } @@ -493,7 +493,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger **/ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") public Integer getNamespaceInteger() { return namespaceInteger; } @@ -617,7 +617,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger **/ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") public Integer getPrefixNsInteger() { return prefixNsInteger; } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json index 34bbc4a387b7..d1c6dbe41351 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json +++ b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json @@ -946,7 +946,7 @@ "in" : "query", "name" : "enum_query_integer", "schema" : { - "enum" : [ 1, null ], + "enum" : [ 1, -2 ], "format" : "int32", "type" : "integer" } @@ -2444,6 +2444,7 @@ "type" : "number" }, "integer_item" : { + "example" : -2, "type" : "integer" }, "bool_item" : { @@ -2478,6 +2479,7 @@ } }, "attribute_integer" : { + "example" : -2, "type" : "integer", "xml" : { "attribute" : true @@ -2514,6 +2516,7 @@ } }, "name_integer" : { + "example" : -2, "type" : "integer", "xml" : { "name" : "xml_name_integer" @@ -2563,6 +2566,7 @@ } }, "prefix_integer" : { + "example" : -2, "type" : "integer", "xml" : { "prefix" : "ef" @@ -2612,6 +2616,7 @@ } }, "namespace_integer" : { + "example" : -2, "type" : "integer", "xml" : { "namespace" : "http://c.com/schema" @@ -2663,6 +2668,7 @@ } }, "prefix_ns_integer" : { + "example" : -2, "type" : "integer", "xml" : { "namespace" : "http://c.com/schema", diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/TypeHolderExample.java index 8ef92df2c65c..0f25d81ac331 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -24,7 +24,7 @@ public class TypeHolderExample { @ApiModelProperty(example = "1.234", required = true, value = "") private Float floatItem; - @ApiModelProperty(required = true, value = "") + @ApiModelProperty(example = "-2", required = true, value = "") private Integer integerItem; @ApiModelProperty(example = "true", required = true, value = "") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/XmlItem.java index 54165a98fd04..94bdf4ef9503 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/XmlItem.java @@ -21,7 +21,7 @@ public class XmlItem { @Valid private BigDecimal attributeNumber; - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") private Integer attributeInteger; @ApiModelProperty(example = "true", value = "") @@ -37,7 +37,7 @@ public class XmlItem { @Valid private BigDecimal nameNumber; - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") private Integer nameInteger; @ApiModelProperty(example = "true", value = "") @@ -56,7 +56,7 @@ public class XmlItem { @Valid private BigDecimal prefixNumber; - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") private Integer prefixInteger; @ApiModelProperty(example = "true", value = "") @@ -75,7 +75,7 @@ public class XmlItem { @Valid private BigDecimal namespaceNumber; - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") private Integer namespaceInteger; @ApiModelProperty(example = "true", value = "") @@ -94,7 +94,7 @@ public class XmlItem { @Valid private BigDecimal prefixNsNumber; - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") private Integer prefixNsInteger; @ApiModelProperty(example = "true", value = "") diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java index 58a601ddc1dc..ec79a7b0139a 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java @@ -185,7 +185,7 @@ public Response testEndpointParameters(@ApiParam(value = "None", required=true) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) }) - public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, ") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) + public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, securityContext); } diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/TypeHolderExample.java index 9e91286e3c48..bd8c800f5e80 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -134,7 +134,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem **/ @JsonProperty(value = "integer_item") - @ApiModelProperty(required = true, value = "") + @ApiModelProperty(example = "-2", required = true, value = "") @NotNull public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/XmlItem.java index df524a9df5ea..c204835d08a9 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/XmlItem.java @@ -229,7 +229,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger **/ @JsonProperty(value = "attribute_integer") - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") public Integer getAttributeInteger() { return attributeInteger; @@ -337,7 +337,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger **/ @JsonProperty(value = "name_integer") - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") public Integer getNameInteger() { return nameInteger; @@ -473,7 +473,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger **/ @JsonProperty(value = "prefix_integer") - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") public Integer getPrefixInteger() { return prefixInteger; @@ -609,7 +609,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger **/ @JsonProperty(value = "namespace_integer") - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") public Integer getNamespaceInteger() { return namespaceInteger; @@ -745,7 +745,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger **/ @JsonProperty(value = "prefix_ns_integer") - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java index c9a9a2558c7e..646056933a3d 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java @@ -252,7 +252,7 @@ public Response testEndpointParameters(@ApiParam(value = "None", required=true) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) }) - public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, ") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "") @QueryParam("enum_query_model_array") List enumQueryModelArray,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) + public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "") @QueryParam("enum_query_model_array") List enumQueryModelArray,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString, securityContext); } diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/EnumTest.java index 90709086af7c..d5c8e6788aa0 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/EnumTest.java @@ -123,7 +123,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/TypeHolderExample.java index edb6c94731cb..ab86568a2925 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -94,7 +94,7 @@ public TypeHolderExample integerItem(Integer integerItem) { } - @ApiModelProperty(required = true, value = "") + @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") @NotNull public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/XmlItem.java index 4f61f3b3d527..759435d2d14e 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/XmlItem.java @@ -98,7 +98,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { } - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -209,7 +209,7 @@ public XmlItem nameInteger(Integer nameInteger) { } - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -355,7 +355,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { } - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -501,7 +501,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { } - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -647,7 +647,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { } - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml index dbb13cd7209d..6415519aac29 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml @@ -807,7 +807,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer - description: Query parameter enum test (double) @@ -1968,6 +1968,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -2002,6 +2003,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -2027,6 +2029,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -2061,6 +2064,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2095,6 +2099,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2131,6 +2136,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java index edb6c94731cb..ab86568a2925 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -94,7 +94,7 @@ public TypeHolderExample integerItem(Integer integerItem) { } - @ApiModelProperty(required = true, value = "") + @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") @NotNull public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java index 4f61f3b3d527..759435d2d14e 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java @@ -98,7 +98,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { } - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -209,7 +209,7 @@ public XmlItem nameInteger(Integer nameInteger) { } - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -355,7 +355,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { } - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -501,7 +501,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { } - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -647,7 +647,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { } - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml index dbb13cd7209d..6415519aac29 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml @@ -807,7 +807,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer - description: Query parameter enum test (double) @@ -1968,6 +1968,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -2002,6 +2003,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -2027,6 +2029,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -2061,6 +2064,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2095,6 +2099,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2131,6 +2136,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/TypeHolderExample.java index 52a44cd34202..18fb301aaa84 100644 --- a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -106,7 +106,7 @@ public TypeHolderExample integerItem(Integer integerItem) { } - @ApiModelProperty(required = true, value = "") + @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") @NotNull public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/XmlItem.java index c07bdc7255b2..b4c1f1f84de0 100644 --- a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/XmlItem.java @@ -133,7 +133,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { } - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -244,7 +244,7 @@ public XmlItem nameInteger(Integer nameInteger) { } - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -390,7 +390,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { } - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -536,7 +536,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { } - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -682,7 +682,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { } - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-jakarta/src/main/openapi/openapi.yaml index dbb13cd7209d..6415519aac29 100644 --- a/samples/server/petstore/jaxrs-spec-jakarta/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-jakarta/src/main/openapi/openapi.yaml @@ -807,7 +807,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer - description: Query parameter enum test (double) @@ -1968,6 +1968,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -2002,6 +2003,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -2027,6 +2029,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -2061,6 +2064,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2095,6 +2099,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2131,6 +2136,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/TypeHolderExample.java index 0c0caaea6a05..93b26f988122 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -104,7 +104,7 @@ public TypeHolderExample integerItem(Integer integerItem) { } - @org.eclipse.microprofile.openapi.annotations.media.Schema(required = true, description = "") + @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "-2", required = true, description = "") @JsonProperty("integer_item") @NotNull public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/XmlItem.java index fc8ac6d5f6b5..010ca20d5300 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/XmlItem.java @@ -131,7 +131,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { } - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") + @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "-2", description = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -242,7 +242,7 @@ public XmlItem nameInteger(Integer nameInteger) { } - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") + @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "-2", description = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -388,7 +388,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { } - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") + @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "-2", description = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -534,7 +534,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { } - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") + @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "-2", description = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -680,7 +680,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { } - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") + @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "-2", description = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/resources/META-INF/openapi.yaml b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/resources/META-INF/openapi.yaml index dbb13cd7209d..6415519aac29 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/resources/META-INF/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/resources/META-INF/openapi.yaml @@ -807,7 +807,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer - description: Query parameter enum test (double) @@ -1968,6 +1968,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -2002,6 +2003,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -2027,6 +2029,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -2061,6 +2064,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2095,6 +2099,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2131,6 +2136,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/model/EnumTest.java index 8a7fa77e13e1..f0817b2cd69e 100644 --- a/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/model/EnumTest.java @@ -120,7 +120,7 @@ public static EnumStringRequiredEnum fromValue(String value) { private EnumStringRequiredEnum enumStringRequired; public enum EnumIntegerEnum { - NUMBER_1(Integer.valueOf(1)), NUMBER_null(Integer.valueOf(null)); + NUMBER_1(Integer.valueOf(1)), NUMBER_MINUS_1(Integer.valueOf(-1)); private Integer value; diff --git a/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/main/resources/META-INF/openapi.yaml b/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/main/resources/META-INF/openapi.yaml index e4a0d7f40abc..77a09d464d9f 100644 --- a/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/main/resources/META-INF/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/main/resources/META-INF/openapi.yaml @@ -861,7 +861,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1859,7 +1859,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumTest.java index c432a2f7716c..aa0561d3729c 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumTest.java @@ -122,7 +122,7 @@ public static EnumStringRequiredEnum fromValue(String value) { private EnumStringRequiredEnum enumStringRequired; public enum EnumIntegerEnum { - NUMBER_1(Integer.valueOf(1)), NUMBER_null(Integer.valueOf(null)); + NUMBER_1(Integer.valueOf(1)), NUMBER_MINUS_1(Integer.valueOf(-1)); private Integer value; diff --git a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml index 5fba74997ce2..ec445c1aac9b 100644 --- a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml @@ -861,7 +861,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1875,7 +1875,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApi.java index 9c0da353b6e7..fc792f10d456 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApi.java @@ -183,7 +183,7 @@ public Response testEndpointParameters(@ApiParam(value = "None", required=true) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) }) - public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, ") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) + public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, securityContext); } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/TypeHolderExample.java index 7de5f2e95c16..3be125c1a303 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -133,7 +133,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem **/ @JsonProperty(value = "integer_item") - @ApiModelProperty(required = true, value = "") + @ApiModelProperty(example = "-2", required = true, value = "") @NotNull public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/XmlItem.java index 579944cfc091..e99741c1e367 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/XmlItem.java @@ -228,7 +228,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger **/ @JsonProperty(value = "attribute_integer") - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") public Integer getAttributeInteger() { return attributeInteger; @@ -336,7 +336,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger **/ @JsonProperty(value = "name_integer") - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") public Integer getNameInteger() { return nameInteger; @@ -472,7 +472,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger **/ @JsonProperty(value = "prefix_integer") - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") public Integer getPrefixInteger() { return prefixInteger; @@ -608,7 +608,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger **/ @JsonProperty(value = "namespace_integer") - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") public Integer getNamespaceInteger() { return namespaceInteger; @@ -744,7 +744,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger **/ @JsonProperty(value = "prefix_ns_integer") - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java index fe1327a055ce..ee4fad33ccb4 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java @@ -184,7 +184,7 @@ public Response testEndpointParameters(@ApiParam(value = "None", required=true) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) }) - public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, ") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) + public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, securityContext); } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/TypeHolderExample.java index 7de5f2e95c16..3be125c1a303 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -133,7 +133,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem **/ @JsonProperty(value = "integer_item") - @ApiModelProperty(required = true, value = "") + @ApiModelProperty(example = "-2", required = true, value = "") @NotNull public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/XmlItem.java index 579944cfc091..e99741c1e367 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/XmlItem.java @@ -228,7 +228,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger **/ @JsonProperty(value = "attribute_integer") - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") public Integer getAttributeInteger() { return attributeInteger; @@ -336,7 +336,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger **/ @JsonProperty(value = "name_integer") - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") public Integer getNameInteger() { return nameInteger; @@ -472,7 +472,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger **/ @JsonProperty(value = "prefix_integer") - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") public Integer getPrefixInteger() { return prefixInteger; @@ -608,7 +608,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger **/ @JsonProperty(value = "namespace_integer") - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") public Integer getNamespaceInteger() { return namespaceInteger; @@ -744,7 +744,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger **/ @JsonProperty(value = "prefix_ns_integer") - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/FakeApi.java index 01c29eba4890..c59152531220 100644 --- a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/FakeApi.java @@ -261,7 +261,7 @@ public Response testEndpointParameters(@Schema(description = "None") @QueryParam @ApiResponse(responseCode = "404", description = "Not found", content = @Content(schema = @Schema(implementation = Void.class))), }, tags={ "fake", }) - public Response testEnumParameters(@Schema(description = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@Schema(description = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@Schema(description = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") List enumQueryStringArray,@Schema(description = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@Schema(description = "Query parameter enum test (double)", allowableValues="1, ") @QueryParam("enum_query_integer") Integer enumQueryInteger,@Schema(description = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@Schema(description = "") @QueryParam("enum_query_model_array") List enumQueryModelArray,@Schema(description = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @QueryParam("enum_form_string_array") List enumFormStringArray,@Schema(description = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @QueryParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) + public Response testEnumParameters(@Schema(description = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@Schema(description = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@Schema(description = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") List enumQueryStringArray,@Schema(description = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@Schema(description = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger,@Schema(description = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@Schema(description = "") @QueryParam("enum_query_model_array") List enumQueryModelArray,@Schema(description = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @QueryParam("enum_form_string_array") List enumFormStringArray,@Schema(description = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @QueryParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString, securityContext); } diff --git a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/EnumTest.java index 02abbe98bfc7..9fc81524e0c7 100644 --- a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/EnumTest.java @@ -122,7 +122,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml index 6b6dd9f649bd..534372bf58f9 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml @@ -643,7 +643,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer - description: Query parameter enum test (double) diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumTest.java index 97915f718a32..a4634a276f9c 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumTest.java @@ -109,7 +109,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderDefault.java index afd41357f7a1..e20bec93b0ee 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -29,7 +29,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem; + private Integer integerItem = -2; private Boolean boolItem = true; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderExample.java index 5017e1d05132..d455c202b5a5 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -124,7 +124,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @Schema(name = "integer_item", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(name = "integer_item", example = "-2", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/XmlItem.java index 6ac717ab2377..4a3b76b19b54 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/XmlItem.java @@ -142,7 +142,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @Schema(name = "attribute_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "attribute_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -250,7 +250,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @Schema(name = "name_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "name_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -386,7 +386,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @Schema(name = "prefix_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "prefix_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -522,7 +522,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @Schema(name = "namespace_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "namespace_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -658,7 +658,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @Schema(name = "prefix_ns_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "prefix_ns_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; 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 9e11adc8d102..491edc841567 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 @@ -448,7 +448,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java index 211b1a383432..8b976434372e 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java @@ -109,7 +109,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java index 98cc2a751a57..2365d1198316 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -29,7 +29,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem; + private Integer integerItem = -2; private Boolean boolItem = true; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java index 197486b55487..5b8f63e1b103 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -124,7 +124,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(required = true, value = "") + @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java index d7503b43d7f7..cadfadcf8611 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java @@ -142,7 +142,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -250,7 +250,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -386,7 +386,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -522,7 +522,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -658,7 +658,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml index 92721ac9a0ec..f26422f84ebf 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml @@ -799,7 +799,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1649,7 +1649,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: @@ -1991,6 +1991,7 @@ components: default: 1.234 type: number integer_item: + default: -2 type: integer bool_item: default: true @@ -2024,6 +2025,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -2058,6 +2060,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -2083,6 +2086,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -2117,6 +2121,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2151,6 +2156,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2187,6 +2193,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema 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 9e11adc8d102..491edc841567 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 @@ -448,7 +448,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java index e543efe177e4..278e63ca726e 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java @@ -110,7 +110,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java index 36300a75513c..e11051684c52 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -30,7 +30,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem; + private Integer integerItem = -2; private Boolean boolItem = true; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java index e200fd12fcdb..0d7d3d8b924a 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -125,7 +125,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(required = true, value = "") + @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java index 8944d746b98a..ab3ca67a4be2 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java @@ -143,7 +143,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -251,7 +251,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -387,7 +387,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -523,7 +523,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -659,7 +659,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml index 92721ac9a0ec..f26422f84ebf 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml @@ -799,7 +799,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1649,7 +1649,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: @@ -1991,6 +1991,7 @@ components: default: 1.234 type: number integer_item: + default: -2 type: integer bool_item: default: true @@ -2024,6 +2025,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -2058,6 +2060,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -2083,6 +2086,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -2117,6 +2121,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2151,6 +2156,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2187,6 +2193,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema 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 bb64fcc66afc..5fe4ea1a3dda 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 @@ -407,7 +407,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java index e543efe177e4..278e63ca726e 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -110,7 +110,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java index 36300a75513c..e11051684c52 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -30,7 +30,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem; + private Integer integerItem = -2; private Boolean boolItem = true; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index e200fd12fcdb..0d7d3d8b924a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -125,7 +125,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(required = true, value = "") + @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java index 8944d746b98a..ab3ca67a4be2 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java @@ -143,7 +143,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -251,7 +251,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -387,7 +387,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -523,7 +523,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -659,7 +659,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml index 92721ac9a0ec..f26422f84ebf 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml @@ -799,7 +799,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1649,7 +1649,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: @@ -1991,6 +1991,7 @@ components: default: 1.234 type: number integer_item: + default: -2 type: integer bool_item: default: true @@ -2024,6 +2025,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -2058,6 +2060,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -2083,6 +2086,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -2117,6 +2121,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2151,6 +2156,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2187,6 +2193,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema 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 bb64fcc66afc..5fe4ea1a3dda 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 @@ -407,7 +407,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java index 34c4cde553e7..a37a0bb09e83 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java @@ -110,7 +110,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java index 56d6f7ff4d26..d045dbb87355 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -30,7 +30,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem; + private Integer integerItem = -2; private Boolean boolItem = true; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java index 847c02a0e3e4..675d3eaabd23 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -125,7 +125,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(required = true, value = "") + @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java index 5842f660f961..218271dd6e27 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java @@ -182,7 +182,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -290,7 +290,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -426,7 +426,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -562,7 +562,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -698,7 +698,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml index 92721ac9a0ec..f26422f84ebf 100644 --- a/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml @@ -799,7 +799,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1649,7 +1649,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: @@ -1991,6 +1991,7 @@ components: default: 1.234 type: number integer_item: + default: -2 type: integer bool_item: default: true @@ -2024,6 +2025,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -2058,6 +2060,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -2083,6 +2086,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -2117,6 +2121,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2151,6 +2156,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2187,6 +2193,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema 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 0a880695f9d4..57ef4ff2bf95 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 @@ -448,7 +448,7 @@ default ResponseEntity testEndpointParameters( default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java index e543efe177e4..278e63ca726e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java @@ -110,7 +110,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java index 36300a75513c..e11051684c52 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -30,7 +30,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem; + private Integer integerItem = -2; private Boolean boolItem = true; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java index e200fd12fcdb..0d7d3d8b924a 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -125,7 +125,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(required = true, value = "") + @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java index 8944d746b98a..ab3ca67a4be2 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java @@ -143,7 +143,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -251,7 +251,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -387,7 +387,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -523,7 +523,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -659,7 +659,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml index 92721ac9a0ec..f26422f84ebf 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml @@ -799,7 +799,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1649,7 +1649,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: @@ -1991,6 +1991,7 @@ components: default: 1.234 type: number integer_item: + default: -2 type: integer bool_item: default: true @@ -2024,6 +2025,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -2058,6 +2060,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -2083,6 +2086,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -2117,6 +2121,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2151,6 +2156,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2187,6 +2193,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java index 074424ac5161..3a4876c97724 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java @@ -433,7 +433,7 @@ default Mono testEnumParameters( @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString, diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumTest.java index e543efe177e4..278e63ca726e 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumTest.java @@ -110,7 +110,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefault.java index 36300a75513c..e11051684c52 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -30,7 +30,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem; + private Integer integerItem = -2; private Boolean boolItem = true; diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExample.java index e200fd12fcdb..0d7d3d8b924a 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -125,7 +125,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(required = true, value = "") + @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/XmlItem.java index 8944d746b98a..ab3ca67a4be2 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/XmlItem.java @@ -143,7 +143,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -251,7 +251,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -387,7 +387,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -523,7 +523,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -659,7 +659,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/resources/openapi.yaml index 92721ac9a0ec..f26422f84ebf 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/resources/openapi.yaml @@ -799,7 +799,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1649,7 +1649,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: @@ -1991,6 +1991,7 @@ components: default: 1.234 type: number integer_item: + default: -2 type: integer bool_item: default: true @@ -2024,6 +2025,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -2058,6 +2060,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -2083,6 +2086,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -2117,6 +2121,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2151,6 +2156,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2187,6 +2193,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema 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 ef3556e18bc3..072db6eeae26 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 @@ -422,7 +422,7 @@ default Mono> testEnumParameters( @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString, diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java index e543efe177e4..278e63ca726e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java @@ -110,7 +110,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java index 36300a75513c..e11051684c52 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -30,7 +30,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem; + private Integer integerItem = -2; private Boolean boolItem = true; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java index e200fd12fcdb..0d7d3d8b924a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -125,7 +125,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(required = true, value = "") + @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java index 8944d746b98a..ab3ca67a4be2 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java @@ -143,7 +143,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -251,7 +251,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -387,7 +387,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -523,7 +523,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -659,7 +659,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml index 92721ac9a0ec..f26422f84ebf 100644 --- a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml @@ -799,7 +799,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1649,7 +1649,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: @@ -1991,6 +1991,7 @@ components: default: 1.234 type: number integer_item: + default: -2 type: integer bool_item: default: true @@ -2024,6 +2025,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -2058,6 +2060,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -2083,6 +2086,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -2117,6 +2121,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2151,6 +2156,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2187,6 +2193,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema 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 a8e59e7a6403..78a69bf9a563 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 @@ -372,7 +372,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java index e543efe177e4..278e63ca726e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -110,7 +110,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index e200fd12fcdb..0d7d3d8b924a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -125,7 +125,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(required = true, value = "") + @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java index 8944d746b98a..ab3ca67a4be2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java @@ -143,7 +143,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -251,7 +251,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -387,7 +387,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -523,7 +523,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -659,7 +659,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml index 239e3e738c9d..83bb676d2105 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml @@ -893,7 +893,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1845,7 +1845,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: @@ -2198,6 +2198,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -2232,6 +2233,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -2257,6 +2259,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -2291,6 +2294,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2325,6 +2329,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2361,6 +2366,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema 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 a8e59e7a6403..78a69bf9a563 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 @@ -372,7 +372,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java index e543efe177e4..278e63ca726e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java @@ -110,7 +110,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java index e200fd12fcdb..0d7d3d8b924a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -125,7 +125,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(required = true, value = "") + @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java index 8944d746b98a..ab3ca67a4be2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java @@ -143,7 +143,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -251,7 +251,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -387,7 +387,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -523,7 +523,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -659,7 +659,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml index 239e3e738c9d..83bb676d2105 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml @@ -893,7 +893,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1845,7 +1845,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: @@ -2198,6 +2198,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -2232,6 +2233,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -2257,6 +2259,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -2291,6 +2294,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2325,6 +2329,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2361,6 +2366,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema 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 cf5027db00f3..434c14572ac4 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 @@ -403,7 +403,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java index e543efe177e4..278e63ca726e 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -110,7 +110,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index e200fd12fcdb..0d7d3d8b924a 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -125,7 +125,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(required = true, value = "") + @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java index 8944d746b98a..ab3ca67a4be2 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java @@ -143,7 +143,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -251,7 +251,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -387,7 +387,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -523,7 +523,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -659,7 +659,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml index 239e3e738c9d..83bb676d2105 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml @@ -893,7 +893,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1845,7 +1845,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: @@ -2198,6 +2198,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -2232,6 +2233,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -2257,6 +2259,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -2291,6 +2294,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2325,6 +2329,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2361,6 +2366,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema 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 cf5027db00f3..434c14572ac4 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 @@ -403,7 +403,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java index e543efe177e4..278e63ca726e 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java @@ -110,7 +110,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java index e200fd12fcdb..0d7d3d8b924a 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -125,7 +125,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(required = true, value = "") + @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java index 8944d746b98a..ab3ca67a4be2 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java @@ -143,7 +143,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -251,7 +251,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -387,7 +387,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -523,7 +523,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -659,7 +659,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml index 239e3e738c9d..83bb676d2105 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml @@ -893,7 +893,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1845,7 +1845,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: @@ -2198,6 +2198,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -2232,6 +2233,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -2257,6 +2259,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -2291,6 +2294,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2325,6 +2329,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2361,6 +2366,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema 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 dab6f6529a5b..15e87397b915 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 @@ -448,7 +448,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") Optional enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) Optional> enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") Optional enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Optional enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Optional enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Optional enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java index ca963ae08ee6..68a3d88bf25d 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java @@ -110,7 +110,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java index c61cb5db2a5d..20d8e7eddd49 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -30,7 +30,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem; + private Integer integerItem = -2; private Boolean boolItem = true; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java index ff52380bfe08..272b9bfb1b38 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -125,7 +125,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(required = true, value = "") + @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java index b9a502a61e15..0630acf961bd 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java @@ -143,7 +143,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Optional getAttributeInteger() { return attributeInteger; @@ -251,7 +251,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Optional getNameInteger() { return nameInteger; @@ -387,7 +387,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Optional getPrefixInteger() { return prefixInteger; @@ -523,7 +523,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Optional getNamespaceInteger() { return namespaceInteger; @@ -659,7 +659,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Optional getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml index 92721ac9a0ec..f26422f84ebf 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml @@ -799,7 +799,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1649,7 +1649,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: @@ -1991,6 +1991,7 @@ components: default: 1.234 type: number integer_item: + default: -2 type: integer bool_item: default: true @@ -2024,6 +2025,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -2058,6 +2060,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -2083,6 +2086,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -2117,6 +2121,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2151,6 +2156,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2187,6 +2193,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java index faaa891b6d06..ddb841b0f2d0 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java @@ -109,7 +109,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java index 5323b9b91b0d..68b405759668 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java @@ -29,7 +29,7 @@ public class TypeHolderDefault { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem; + private Integer integerItem = -2; private Boolean boolItem = true; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java index 395a7f264d62..a6e93d3a8593 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java @@ -124,7 +124,7 @@ public TypeHolderExample integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @Schema(name = "integer_item", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(name = "integer_item", example = "-2", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java index 4a29b032a090..c8696515777b 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java @@ -142,7 +142,7 @@ public XmlItem attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @Schema(name = "attribute_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "attribute_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -250,7 +250,7 @@ public XmlItem nameInteger(Integer nameInteger) { * @return nameInteger */ - @Schema(name = "name_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "name_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -386,7 +386,7 @@ public XmlItem prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @Schema(name = "prefix_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "prefix_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -522,7 +522,7 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @Schema(name = "namespace_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "namespace_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -658,7 +658,7 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @Schema(name = "prefix_ns_integer", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "prefix_ns_integer", example = "-2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml index 92721ac9a0ec..f26422f84ebf 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml @@ -799,7 +799,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1649,7 +1649,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: @@ -1991,6 +1991,7 @@ components: default: 1.234 type: number integer_item: + default: -2 type: integer bool_item: default: true @@ -2024,6 +2025,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -2058,6 +2060,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -2083,6 +2086,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -2117,6 +2121,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2151,6 +2156,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2187,6 +2193,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema 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 15208a8b88ef..88383d4fb06a 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 @@ -448,7 +448,7 @@ default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, ") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, @ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $", defaultValue = "$") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, @ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTestDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTestDto.java index cfb97321bf4c..1d8d7d1884a0 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTestDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTestDto.java @@ -110,7 +110,7 @@ public static EnumStringRequiredEnum fromValue(String value) { public enum EnumIntegerEnum { NUMBER_1(1), - NUMBER_null(null); + NUMBER_MINUS_1(-1); private Integer value; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java index fab32cad3ef0..5dfcecbfb959 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java @@ -32,7 +32,7 @@ public class TypeHolderDefaultDto { private BigDecimal numberItem = new BigDecimal("1.234"); - private Integer integerItem; + private Integer integerItem = -2; private Boolean boolItem = true; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExampleDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExampleDto.java index e09d60f38a34..aca9f3a5f0d4 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExampleDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExampleDto.java @@ -127,7 +127,7 @@ public TypeHolderExampleDto integerItem(Integer integerItem) { * @return integerItem */ @NotNull - @ApiModelProperty(required = true, value = "") + @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") public Integer getIntegerItem() { return integerItem; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItemDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItemDto.java index d20d10d67a18..49ceb16a3f6a 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItemDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItemDto.java @@ -145,7 +145,7 @@ public XmlItemDto attributeInteger(Integer attributeInteger) { * @return attributeInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("attribute_integer") public Integer getAttributeInteger() { return attributeInteger; @@ -253,7 +253,7 @@ public XmlItemDto nameInteger(Integer nameInteger) { * @return nameInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("name_integer") public Integer getNameInteger() { return nameInteger; @@ -389,7 +389,7 @@ public XmlItemDto prefixInteger(Integer prefixInteger) { * @return prefixInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_integer") public Integer getPrefixInteger() { return prefixInteger; @@ -525,7 +525,7 @@ public XmlItemDto namespaceInteger(Integer namespaceInteger) { * @return namespaceInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("namespace_integer") public Integer getNamespaceInteger() { return namespaceInteger; @@ -661,7 +661,7 @@ public XmlItemDto prefixNsInteger(Integer prefixNsInteger) { * @return prefixNsInteger */ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "-2", value = "") @JsonProperty("prefix_ns_integer") public Integer getPrefixNsInteger() { return prefixNsInteger; diff --git a/samples/server/petstore/springboot/src/main/resources/openapi.yaml b/samples/server/petstore/springboot/src/main/resources/openapi.yaml index a2bb2aae832e..8e4565fad645 100644 --- a/samples/server/petstore/springboot/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot/src/main/resources/openapi.yaml @@ -799,7 +799,7 @@ paths: schema: enum: - 1 - - null + - -2 format: int32 type: integer style: form @@ -1649,7 +1649,7 @@ components: enum_integer: enum: - 1 - - null + - -1 format: int32 type: integer enum_number: @@ -1979,6 +1979,7 @@ components: default: 1.234 type: number integer_item: + default: -2 type: integer bool_item: default: true @@ -2012,6 +2013,7 @@ components: format: float type: number integer_item: + example: -2 type: integer bool_item: example: true @@ -2046,6 +2048,7 @@ components: xml: attribute: true attribute_integer: + example: -2 type: integer xml: attribute: true @@ -2071,6 +2074,7 @@ components: xml: name: xml_name_number name_integer: + example: -2 type: integer xml: name: xml_name_integer @@ -2105,6 +2109,7 @@ components: xml: prefix: cd prefix_integer: + example: -2 type: integer xml: prefix: ef @@ -2139,6 +2144,7 @@ components: xml: namespace: http://b.com/schema namespace_integer: + example: -2 type: integer xml: namespace: http://c.com/schema @@ -2175,6 +2181,7 @@ components: namespace: http://b.com/schema prefix: b prefix_ns_integer: + example: -2 type: integer xml: namespace: http://c.com/schema From cc124f6f591f3393c9cac6d9658ebd1536eb2f13 Mon Sep 17 00:00:00 2001 From: Morten Jansrud Date: Tue, 16 Jul 2024 20:40:02 +0200 Subject: [PATCH 12/21] Switch to string.IsNullOrEmpty, add langVersion 8 --- .../main/resources/csharp/auth/OAuthAuthenticator.mustache | 2 +- .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 2 +- .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 2 +- .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 4 ++-- .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 2 +- .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 2 +- .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 2 +- .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 2 +- .../Petstore/src/Org.OpenAPITools/Org.OpenAPITools.csproj | 1 + 9 files changed, 10 insertions(+), 9 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache b/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache index ab5b1f432f71..d418dad1b327 100644 --- a/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache @@ -84,7 +84,7 @@ namespace {{packageName}}.Client.Auth .AddParameter("client_id", _clientId) .AddParameter("client_secret", _clientSecret); - if (_scope != null) + if (!string.IsNullOrEmpty(_scope)) { request.AddParameter("scope", _scope); } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index e38cdb565be0..455df4c0ccbd 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -91,7 +91,7 @@ async Task GetToken() .AddParameter("client_id", _clientId) .AddParameter("client_secret", _clientSecret); - if (_scope != null) + if (!string.IsNullOrEmpty(_scope)) { request.AddParameter("scope", _scope); } diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index bcebd8c10482..ce6261390c32 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -92,7 +92,7 @@ async Task GetToken() .AddParameter("client_id", _clientId) .AddParameter("client_secret", _clientSecret); - if (_scope != null) + if (!string.IsNullOrEmpty(_scope)) { request.AddParameter("scope", _scope); } diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index bcebd8c10482..e33181e50f3a 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -36,7 +36,7 @@ public OAuthAuthenticator( string tokenUrl, string clientId, string clientSecret, - string? scope, + STRING? SCOPE, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -92,7 +92,7 @@ async Task GetToken() .AddParameter("client_id", _clientId) .AddParameter("client_secret", _clientSecret); - if (_scope != null) + if (!string.IsNullOrEmpty(_scope)) { request.AddParameter("scope", _scope); } diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index 24a87bd34345..85bba0555c70 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -92,7 +92,7 @@ async Task GetToken() .AddParameter("client_id", _clientId) .AddParameter("client_secret", _clientSecret); - if (_scope != null) + if (!string.IsNullOrEmpty(_scope)) { request.AddParameter("scope", _scope); } diff --git a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index bcebd8c10482..ce6261390c32 100644 --- a/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net7/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -92,7 +92,7 @@ async Task GetToken() .AddParameter("client_id", _clientId) .AddParameter("client_secret", _clientSecret); - if (_scope != null) + if (!string.IsNullOrEmpty(_scope)) { request.AddParameter("scope", _scope); } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index bcebd8c10482..ce6261390c32 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -92,7 +92,7 @@ async Task GetToken() .AddParameter("client_id", _clientId) .AddParameter("client_secret", _clientSecret); - if (_scope != null) + if (!string.IsNullOrEmpty(_scope)) { request.AddParameter("scope", _scope); } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index bcebd8c10482..ce6261390c32 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -92,7 +92,7 @@ async Task GetToken() .AddParameter("client_id", _clientId) .AddParameter("client_secret", _clientSecret); - if (_scope != null) + if (!string.IsNullOrEmpty(_scope)) { request.AddParameter("scope", _scope); } diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 3e3943929588..74854826db4e 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -18,6 +18,7 @@ git Minor update false + 8 From 18dc2a108a4fbcb92635322b628b1cf052782d78 Mon Sep 17 00:00:00 2001 From: Morten Jansrud Date: Tue, 16 Jul 2024 20:42:42 +0200 Subject: [PATCH 13/21] Add langVersion 8 in ConditionalSerialization --- .../src/Org.OpenAPITools/Org.OpenAPITools.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 3e3943929588..74854826db4e 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -18,6 +18,7 @@ git Minor update false + 8 From df907f90f7705bb6f68da6d4168783275d68d1ad Mon Sep 17 00:00:00 2001 From: Morten Jansrud Date: Wed, 17 Jul 2024 09:17:57 +0200 Subject: [PATCH 14/21] Use regular strings for netstandard2.0 --- .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 4 ++-- .../src/Org.OpenAPITools/Client/Configuration.cs | 2 +- .../src/Org.OpenAPITools/Client/IReadableConfiguration.cs | 2 +- .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 4 ++-- .../Petstore/src/Org.OpenAPITools/Client/Configuration.cs | 2 +- .../src/Org.OpenAPITools/Client/IReadableConfiguration.cs | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index ce6261390c32..d7fb1293b34b 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -24,7 +24,7 @@ public class OAuthAuthenticator : AuthenticatorBase readonly string _tokenUrl; readonly string _clientId; readonly string _clientSecret; - readonly string? _scope; + readonly string _scope; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -36,7 +36,7 @@ public OAuthAuthenticator( string tokenUrl, string clientId, string clientSecret, - string? scope, + string scope, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs index 57d2d494d1e0..513d074d8823 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/Configuration.cs @@ -398,7 +398,7 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// Gets or sets the client scope for OAuth2 authentication. /// /// The OAuth Client Scope. - public virtual string? OAuthScope { get; set; } + public virtual string OAuthScope { get; set; } /// /// Gets or sets the flow for OAuth2 authentication. diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 986123acb8c6..8713a816f356 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -50,7 +50,7 @@ public interface IReadableConfiguration /// Gets the OAuth token scope. /// /// OAuth Token scope. - string? OAuthScope { get; } + string OAuthScope { get; } /// /// Gets the OAuth flow. diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index ce6261390c32..d7fb1293b34b 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -24,7 +24,7 @@ public class OAuthAuthenticator : AuthenticatorBase readonly string _tokenUrl; readonly string _clientId; readonly string _clientSecret; - readonly string? _scope; + readonly string _scope; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -36,7 +36,7 @@ public OAuthAuthenticator( string tokenUrl, string clientId, string clientSecret, - string? scope, + string scope, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Configuration.cs index 57d2d494d1e0..513d074d8823 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/Configuration.cs @@ -398,7 +398,7 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// Gets or sets the client scope for OAuth2 authentication. /// /// The OAuth Client Scope. - public virtual string? OAuthScope { get; set; } + public virtual string OAuthScope { get; set; } /// /// Gets or sets the flow for OAuth2 authentication. diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 986123acb8c6..8713a816f356 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -50,7 +50,7 @@ public interface IReadableConfiguration /// Gets the OAuth token scope. /// /// OAuth Token scope. - string? OAuthScope { get; } + string OAuthScope { get; } /// /// Gets the OAuth flow. From 87f198c1b5a82fcdb6e483f9f9c31d5873c3e91d Mon Sep 17 00:00:00 2001 From: Morten Jansrud Date: Wed, 17 Jul 2024 09:19:20 +0200 Subject: [PATCH 15/21] Remove references to langVersion 8 --- .../src/Org.OpenAPITools/Org.OpenAPITools.csproj | 1 - .../Petstore/src/Org.OpenAPITools/Org.OpenAPITools.csproj | 1 - 2 files changed, 2 deletions(-) diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 74854826db4e..3e3943929588 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -18,7 +18,6 @@ git Minor update false - 8 diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 74854826db4e..3e3943929588 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -18,7 +18,6 @@ git Minor update false - 8 From d215eba8259bf34219c2ad76a2a08de7d76be2f1 Mon Sep 17 00:00:00 2001 From: Morten Jansrud Date: Wed, 17 Jul 2024 09:20:45 +0200 Subject: [PATCH 16/21] Fix variable --- .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index e33181e50f3a..ce6261390c32 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -36,7 +36,7 @@ public OAuthAuthenticator( string tokenUrl, string clientId, string clientSecret, - STRING? SCOPE, + string? scope, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") From 3350936d899a0bc0922668ae484bc4f6cd6feef1 Mon Sep 17 00:00:00 2001 From: Morten Jansrud Date: Wed, 17 Jul 2024 09:42:42 +0200 Subject: [PATCH 17/21] Use template engine to toggle nullable string --- .../src/main/resources/csharp/Configuration.mustache | 2 +- .../src/main/resources/csharp/IReadableConfiguration.mustache | 2 +- .../main/resources/csharp/auth/OAuthAuthenticator.mustache | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache b/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache index 6b934af5f0de..9e47785c2600 100644 --- a/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache @@ -370,7 +370,7 @@ namespace {{packageName}}.Client /// Gets or sets the client scope for OAuth2 authentication. /// /// The OAuth Client Scope. - public virtual string? OAuthScope { get; set; } + public virtual string{{^netStandard}}?{{/netStandard}} OAuthScope { get; set; } /// /// Gets or sets the flow for OAuth2 authentication. diff --git a/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache b/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache index 94db1ef06b78..6d1e62cde29b 100644 --- a/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache @@ -47,7 +47,7 @@ namespace {{packageName}}.Client /// Gets the OAuth token scope. /// /// OAuth Token scope. - string? OAuthScope { get; } + string{{^netStandard}}?{{/netStandard}} OAuthScope { get; } /// /// Gets the OAuth flow. diff --git a/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache b/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache index d418dad1b327..9a3f8591463d 100644 --- a/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache @@ -16,7 +16,7 @@ namespace {{packageName}}.Client.Auth readonly string _tokenUrl; readonly string _clientId; readonly string _clientSecret; - readonly string? _scope; + readonly string{{^netStandard}}?{{/netStandard}} _scope; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -28,7 +28,7 @@ namespace {{packageName}}.Client.Auth string tokenUrl, string clientId, string clientSecret, - string? scope, + string{{^netStandard}}?{{/netStandard}} scope, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") From 944ca2fdb19f6b34630b5a4ce85094fceeff263d Mon Sep 17 00:00:00 2001 From: Morten Jansrud Date: Wed, 17 Jul 2024 10:34:24 +0200 Subject: [PATCH 18/21] Trigger tests From 532efb4671a18bacf4daf9a2c4c99e7bd2af17f4 Mon Sep 17 00:00:00 2001 From: Morten Jansrud Date: Wed, 17 Jul 2024 12:00:59 +0200 Subject: [PATCH 19/21] Generate samples --- .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 5 +++-- .../src/Org.OpenAPITools/Client/Configuration.cs | 2 +- .../src/Org.OpenAPITools/Client/IReadableConfiguration.cs | 2 +- .../src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index 455df4c0ccbd..516b93d2f6aa 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -24,7 +24,7 @@ public class OAuthAuthenticator : AuthenticatorBase readonly string _tokenUrl; readonly string _clientId; readonly string _clientSecret; - readonly string? _scope; + readonly string _scope; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -36,7 +36,7 @@ public OAuthAuthenticator( string tokenUrl, string clientId, string clientSecret, - string? scope, + string scope, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("") @@ -44,6 +44,7 @@ public OAuthAuthenticator( _tokenUrl = tokenUrl; _clientId = clientId; _clientSecret = clientSecret; + _scope = scope; _serializerSettings = serializerSettings; _configuration = configuration; diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Configuration.cs index 6cdf335b5126..26df7661dd58 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/Configuration.cs @@ -298,7 +298,7 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) /// Gets or sets the client scope for OAuth2 authentication. /// /// The OAuth Client Scope. - public virtual string? OAuthScope { get; set; } + public virtual string OAuthScope { get; set; } /// /// Gets or sets the flow for OAuth2 authentication. diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index d1a3cd4ef9f4..063daeb1b56c 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -50,7 +50,7 @@ public interface IReadableConfiguration /// Gets the OAuth token scope. /// /// OAuth Token scope. - string? OAuthScope { get; } + string OAuthScope { get; } /// /// Gets the OAuth flow. diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs index 85bba0555c70..ce6261390c32 100644 --- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs +++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Client/Auth/OAuthAuthenticator.cs @@ -98,7 +98,7 @@ async Task GetToken() } var response = await client.PostAsync(request).ConfigureAwait(false); - + // RFC6749 - token_type is case insensitive. // RFC6750 - In Authorization header Bearer should be capitalized. // Fix the capitalization irrespective of token_type casing. From c52d1aafdf1d33706dc243c17d8e7b1f0255eae4 Mon Sep 17 00:00:00 2001 From: Morten Jansrud Date: Wed, 17 Jul 2024 12:39:53 +0200 Subject: [PATCH 20/21] Trigger build From 90c15a71b3108f2e869b254798a3e591d62f68f4 Mon Sep 17 00:00:00 2001 From: Morten Jansrud Date: Fri, 19 Jul 2024 10:42:30 +0200 Subject: [PATCH 21/21] Use {{nrt?}} --- .../src/main/resources/csharp/Configuration.mustache | 2 +- .../src/main/resources/csharp/IReadableConfiguration.mustache | 2 +- .../main/resources/csharp/auth/OAuthAuthenticator.mustache | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache b/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache index 9e47785c2600..71ff47f971da 100644 --- a/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache @@ -370,7 +370,7 @@ namespace {{packageName}}.Client /// Gets or sets the client scope for OAuth2 authentication. /// /// The OAuth Client Scope. - public virtual string{{^netStandard}}?{{/netStandard}} OAuthScope { get; set; } + public virtual string{{nrt?}} OAuthScope { get; set; } /// /// Gets or sets the flow for OAuth2 authentication. diff --git a/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache b/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache index 6d1e62cde29b..5981728b466a 100644 --- a/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache @@ -47,7 +47,7 @@ namespace {{packageName}}.Client /// Gets the OAuth token scope. /// /// OAuth Token scope. - string{{^netStandard}}?{{/netStandard}} OAuthScope { get; } + string{{nrt?}} OAuthScope { get; } /// /// Gets the OAuth flow. diff --git a/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache b/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache index 9a3f8591463d..d71f262a810f 100644 --- a/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/auth/OAuthAuthenticator.mustache @@ -16,7 +16,7 @@ namespace {{packageName}}.Client.Auth readonly string _tokenUrl; readonly string _clientId; readonly string _clientSecret; - readonly string{{^netStandard}}?{{/netStandard}} _scope; + readonly string{{nrt?}} _scope; readonly string _grantType; readonly JsonSerializerSettings _serializerSettings; readonly IReadableConfiguration _configuration; @@ -28,7 +28,7 @@ namespace {{packageName}}.Client.Auth string tokenUrl, string clientId, string clientSecret, - string{{^netStandard}}?{{/netStandard}} scope, + string{{nrt?}} scope, OAuthFlow? flow, JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) : base("")